Module Name: src Committed By: riastradh Date: Fri May 13 09:49:44 UTC 2022
Modified Files: src/sys/arch/arm/rockchip: rk_v1crypto.c Log Message: rkv1crypto(4): Fix units in RNG repeated-output health test. This code was intended to check whether the two 4-word halves of an 8-word, 32-byte, 256-bit sample were repeated. Instead, it accidentally checked whether the first 4 _bytes_ of the two halves were repeated. The effect was a false alarm rate of 1/2^32, instead of a false alarm rate of 1/2^128, with no change on the true alarm rate in the event of an RNG wedged producing all-zero or all-one bits. 1/2^128 is an acceptable false alarm rate; 1/2^32, not so much. (The false alarm right might be higher if the samples are not perfectly uniformly distributed, which they most likey aren't, although the documentation doesn't give any details other than suggesting it's a ring oscillator under the hood, which provides entropy from jitter induced by thermal noise. This driver records half a bit of entropy per bit of sample to be reasonably conservative.) To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/rockchip/rk_v1crypto.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.