[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20191112231727.bzgh42lc333gu4eu@gondor.apana.org.au>
Date: Wed, 13 Nov 2019 07:17:27 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Andrey Smirnov <andrew.smirnov@...il.com>
Cc: Lucas Stach <l.stach@...gutronix.de>,
"open list:HARDWARE RANDOM NUMBER GENERATOR CORE"
<linux-crypto@...r.kernel.org>, Chris Healy <cphealy@...il.com>,
Horia Geantă <horia.geanta@....com>,
Iuliana Prodan <iuliana.prodan@....com>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 0/3] enable CAAM's HWRNG as default
On Tue, Nov 12, 2019 at 07:13:02AM -0800, Andrey Smirnov wrote:
>
> If I am reading the datasheet right reseeding should be done every
> time CAAM is asked to generated random data.
If you can guarantee that everytime the driver reads n bytes from
the hardware, that the hardware is then reseeded with nbytes prior
to that read, then it should be good enough.
If the hardware only reseeds afterwards or reseeds with less than
n bytes then it is not sufficient.
> Even if prediction resistance is an acceptable approach, would it be
> better to expose underlying TRNG and downgrade current CAAM hwrng code
> to crypto rng API? If that's the best path forward, I am more than
> happy to go that way in v2.
If it offers true prediction resistance it should be good enough
to use the drivers/char/hw_random interface. Otherwise please
switch to the Crypto API RNG interface.
Thanks,
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists