True random number generator (RNG)
Health checks
This component ensures that the entire entropy source (with its noise source) starts then
operates as expected, obtaining assurance that failures are caught quickly and with a high
probability and reliability.
The RNG implements the following health check features in accordance with NIST
SP800-90B. The described thresholds correspond to the value recommended for register
RNG_HTCR (configuration A in
1.
Start-up health tests, performed after reset and before the first use of the RNG as
entropy source
–
–
–
2.
Continuous health tests, running indefinitely on the outputs of the noise source
–
–
3.
Vendor specific continuous tests
–
–
4.
On-demand test of digitized noise source (raw data)
–
The CECS and SECS status bits in the RNG_SR register indicate when an error condition is
detected, as detailed in
Note:
An interrupt can be generated when an error is detected.
Above health test thresholds are modified by changing value in RNG_HTCR register. See
Section 20.6: RNG entropy source validation
532/1306
Repetition count test, flagging an error when the noise source has provided more
than 42 consecutive bits at a constant value (0 or 1).
Adaptive proportion test running on a window of 1024 consecutive bits: the RNG
verifies that the first bit on the outputs of the noise source is not repeated more
than 628 times.
Known-answer tests, to verify the conditioning stage.
Repetition count test, similar to the one running in start-up tests.
Adaptive proportion test, similar to the one running in start-up tests.
Transition count test, flagging an error when the noise source has delivered more
than 32 consecutive occurrences of 2-bit patterns (01 or 10).
Real-time "too slow" sampling clock detector, flagging an error when one RNG
clock cycle (before divider) is smaller than AHB clock cycle divided by 32.
Supported by restarting the entropy source and re-running the startup tests (see
software reset sequence in
on-demand testing (software based) are not supported.
Section 20.3.7: Error
Section
20.6.2).
Section 20.3.4: RNG
management.
for details.
RM0461 Rev 5
initialization). Other kinds of
RM0461
Need help?
Do you have a question about the STM32WLEx and is the answer not in the manual?