Skip to content

Commit 8006aff

Browse files
elkabloherbertx
authored andcommitted
crypto: atmel-sha204a - Set hwrng quality to lowest possible
According to the review by Bill Cox [1], the Atmel SHA204A random number generator produces random numbers with very low entropy. Set the lowest possible entropy for this chip just to be safe. [1] https://www.metzdowd.com/pipermail/cryptography/2014-December/023858.html Fixes: da001fb ("crypto: atmel-i2c - add support for SHA204A random number generator") Cc: <[email protected]> Signed-off-by: Marek Behún <[email protected]> Acked-by: Ard Biesheuvel <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 002ba34 commit 8006aff

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/crypto/atmel-sha204a.c

+6
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,12 @@ static int atmel_sha204a_probe(struct i2c_client *client)
163163
i2c_priv->hwrng.name = dev_name(&client->dev);
164164
i2c_priv->hwrng.read = atmel_sha204a_rng_read;
165165

166+
/*
167+
* According to review by Bill Cox [1], this HWRNG has very low entropy.
168+
* [1] https://www.metzdowd.com/pipermail/cryptography/2014-December/023858.html
169+
*/
170+
i2c_priv->hwrng.quality = 1;
171+
166172
ret = devm_hwrng_register(&client->dev, &i2c_priv->hwrng);
167173
if (ret)
168174
dev_warn(&client->dev, "failed to register RNG (%d)\n", ret);

0 commit comments

Comments
 (0)