diff options
| author | Marco Felsch <[email protected]> | 2020-08-31 16:00:42 +0200 |
|---|---|---|
| committer | Herbert Xu <[email protected]> | 2020-09-11 14:39:14 +1000 |
| commit | 9769635423af703b131d7635e0de83767fe0006d (patch) | |
| tree | bc2aae99bbb37c5bcb2970067f4f44b7f8dce44f /tools/perf/scripts/python | |
| parent | 45cb6653b0c355fc1445a8069ba78a4ce8720511 (diff) | |
hwrng: imx-rngc - add quality to use it as kernel entropy pool
The RNGB can generate 2^20 words (1 word == 4 byte) of 'random' data
after the seed pool was initialized. The pool needs to be reseeded if
more words are required. The reseeding is done automatically since
commit 3acd9ea9331c ("hwrng: imx-rngc - use automatic seeding").
We can't retrieve the TRNG values directly so we need a other way to get
the quality level. We know that the PRNG uses 20.000 entropy samples
from the TRNG to generate 2^20 words (1MiB) and the quality level is
defined as (in bits of entropy per 1024 bits of input). So the quality
level can be calculated by:
20.000 * 1024
------------- = ~ 19.5
2^20
Signed-off-by: Marco Felsch <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions