nhorman / rng-tools

The rng-tools official repository (formerly part of the gkernel project on sourceforge)
GNU General Public License v2.0
152 stars 61 forks source link

'rngd -l' | sources associated to an incorrect index #184

Closed Ricky-Tigg closed 1 year ago

Ricky-Tigg commented 1 year ago

kernel v.: 6.0 | distribution: Fedora |rng-tools v.: 6.15

Hello. As per the section Entropy sources of the documentation via man 8 rngd, indexes are presented as static Hardware RNG (hwrng) [Index 0], TPM (tpm) [Index 1], RDRAND/RDSEED (rdrand) [Index 2], DARN (darn) [Index 3], NIST Entropy Beacon (nist) [Index 4], JITTER (jitter) [Index 5], PKCS11 (pkcs11) [Index 6], RTLSDR (rtlsdr) [Index 7] and RNDR (rndr) [Index 8].

$ rngd -l
Entropy sources that are available but disabled
1: TPM RNG Device (tpm)
5: NIST Network Entropy Beacon (nist)
Available and enabled entropy sources:
2: Intel RDRAND Instruction RNG (rdrand)
6: JITTER Entropy generator (jitter)
Available entropy sources that failed initalization:
0: Hardware RNG Device (hwrng)
7: PKCS11 Entropy generator (pkcs11)
8: RTLSDR software defined radio generator (rtlsdr)

As noticeable in the output,

nhorman commented 1 year ago

yeah, looks like the man page is a bit out of sync with the code. Probably best just to remove the indices from the man page entirely as the -l option will always ennumerate them properly (see commit cb8cc624ea122ae994cc18b9f78d98db9f94ae91).

As for DARN and RANDR they won't be mentioned if the configure script for your build doesn't set HAVE_DARN or HAVE_RANDR, which will be the case if you are not building for power or arm arches