mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
crypto: atmel-sha204a - Set hwrng quality to lowest possible
commit 8006aff15516a170640239c5a8e6696c0ba18d8e upstream.
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: da001fb651 ("crypto: atmel-i2c - add support for SHA204A random number generator")
Cc: <stable@vger.kernel.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3a57f45b91
commit
4f9f61598b
@@ -107,7 +107,12 @@ static int atmel_sha204a_probe(struct i2c_client *client,
|
||||
|
||||
i2c_priv->hwrng.name = dev_name(&client->dev);
|
||||
i2c_priv->hwrng.read = atmel_sha204a_rng_read;
|
||||
i2c_priv->hwrng.quality = 1024;
|
||||
|
||||
/*
|
||||
* According to review by Bill Cox [1], this HWRNG has very low entropy.
|
||||
* [1] https://www.metzdowd.com/pipermail/cryptography/2014-December/023858.html
|
||||
*/
|
||||
i2c_priv->hwrng.quality = 1;
|
||||
|
||||
ret = devm_hwrng_register(&client->dev, &i2c_priv->hwrng);
|
||||
if (ret)
|
||||
|
||||
Reference in New Issue
Block a user