lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180627050853.GE22377@vkoul-mobl>
Date:   Wed, 27 Jun 2018 10:38:53 +0530
From:   Vinod <vkoul@...nel.org>
To:     Stephan Mueller <smueller@...onox.de>,
        Herbert Xu <herbert@...dor.apana.org.au>
Cc:     Stanimir Varbanov <stanimir.varbanov@...aro.org>,
        linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
        Matt Mackall <mpm@...enic.com>, Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH 3/3] hwrng: msm - Add support for prng v2

On 22-06-18, 19:57, Stephan Mueller wrote:
> Hi
> 
> 
> > Am 22.06.2018 um 16:50 schrieb Herbert Xu <herbert@...dor.apana.org.au>:
> > 
> >> On Fri, Jun 22, 2018 at 08:18:09PM +0530, Vinod wrote:
> >> 
> >> Okay I am doing the port taking the exynos-rng as a ref.
> >> Question is how to test it, how is one supposed to exercise the rng, any
> >> test utils/apps for that? Sorry for noob question, new to crypto
> >> interfaces.
> > 
> > algif_rng is available through the af_alg socket interface.
> > 
> You can use the libkcapi library at http://www.chronox.de/libkcapi.html
> 
> The RNG API is documented at http://chronox.de/libkcapi/html/ch03s15.html and http://chronox.de/libkcapi/html/ch03s16.html
> 
> A command line app is also present with kcapi-rng as documented at https://github.com/smuellerDD/libkcapi/blob/master/README.md

Thanks for the pointers, it helped me to test the driver :)

I have two follow up question on crypto:

 - If there a way to avoid using a global variable in driver to hold the
   pointer for driver memory? Looks like exynos driver does that.

   I understand that the crypto callback don't provide driver context as
   they copy the data structures passed in registration API, but a simpler
   way to get driver context would be desirable.

 - .seed seems to be mandatory, if I do not set it and even use
   .seedsize = 0, it panics at crypto_rng_reset(). So is .seed
   mandatory?

Thanks
-- 
~Vinod

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ