NIST configuration for RNG
Hi!
My application requires NIST-compliant random number generation, and I see some unclear/contradicting info on the Reference Manual, the AN4230 application note, and the public NIST certificate. My MCU is STM32H563ZI.
- Reference Manual: https://www.st.com/resource/en/reference_manual/rm0481-stm32h52333xx-stm32h56263xx-and-stm32h573xx-armbased-32bit-mcus-stmicroelectronics.pdf
- Public NIST certificate E163: https://csrc.nist.gov/CSRC/media/projects/cryptographic-module-validation-program/documents/entropy/E163_PublicUse.pdf
Confusing/contradicting info:
- E163 gives a RNG_CR of 0x08F01EXX, but AN4230 says value should be 0x00F01E00 (note difference in bit 27). Also, manual says bit 27 "must be kept at reset value.".
- Reset values on the manual do not match my observations
. RNG_CR: manual says 0x00800D00, I see 0x00F00E00
. RNG_NSRC: manual says 0x0003FFFF, I see 0x3AF66 (which is the value given in AN4230 & E163)
. ENG_HTCR: manual says 0x000072AC, I see 0x6A91 (which is the value given in AN4230 & E163)
- So, reset values seem to match AN4230 & E163 ones, except for bit 12 (NISTC). Reset value is 0, certified value is 1, but manual describes this field as "NIST Custom" with 0 meaning "Hardware default values for NIST compliant RNG". However, this bit is called "NistCompliance" (which sounds like the opposite to "NIST Custom").
I bias towards taking E163 certificate as the valid one, but the 1 value of bit 27 being different in AN4230 seems suspicious and I wonder if that can be an error in the public certificate.
Questions:
1) Is the HW-reset configuration or RNG NIST-compliant?
2) What is the NIST-compliant value for bit 27 of RNG_CR?
3) What is the NIST-compliant value for bit 12 of RNG_CR?
