diff mbox series

[v2,2/2] hwrng: exynos - Set the quality value

Message ID 20200519212552.11671-3-l.stelmach@samsung.com (mailing list archive)
State Changes Requested
Delegated to: Herbert Xu
Headers show
Series Set the quality value for two HW RNGs | expand

Commit Message

Łukasz Stelmach May 19, 2020, 9:25 p.m. UTC
The value was estimaded with ea_iid[1] using on 10485760 bytes read from
the RNG via /dev/hwrng. The min-entropy value calculated using the most
common value estimate (NIST SP 800-90P[2], section 6.3.1) was 7.489627.

[1] https://github.com/usnistgov/SP800-90B_EntropyAssessment
[2] https://csrc.nist.gov/publications/detail/sp/800-90b/final

Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
---
 drivers/char/hw_random/exynos-trng.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/char/hw_random/exynos-trng.c b/drivers/char/hw_random/exynos-trng.c
index 8e1fe3f8dd2d..2a5896122001 100644
--- a/drivers/char/hw_random/exynos-trng.c
+++ b/drivers/char/hw_random/exynos-trng.c
@@ -123,6 +123,7 @@  static int exynos_trng_probe(struct platform_device *pdev)
 	trng->rng.init = exynos_trng_init;
 	trng->rng.read = exynos_trng_do_read;
 	trng->rng.priv = (unsigned long) trng;
+	trng->rng.quality = 900;
 
 	platform_set_drvdata(pdev, trng);
 	trng->dev = &pdev->dev;