
Introduction
Many standards contain requirements and references for the extraction, validation, and use of random number generators
(RNGs), to verify that their output is indeed random.
This application note provides guidelines for verification of the randomness of numbers generated by the RNG peripheral
embedded in a selection of STM32 microcontrollers (MCUs). These MCUs are listed in Table 1. The verification is based either
on the NIST (national institute of standards and technology) SP 800-22rev1a (April 2010) or SP 800-90b (January 2018)
statistical test suite (STS).
This document is structured as follows:
• A general introduction to the STM32 microcontroller random number generator. See Section 1.
• The NIST SP800-22rev1a test suite. See Section 2.
• The steps needed to run NIST SP800-22rev1a test and analysis. See Section 3.
• The NIST SP800-90b test suite. See Section 4.
• The steps needed to run the NIST SP800-90b test and analysis. See Section 3.
Table 1. Applicable products
Type
Products
Can be checked with SP800-22rev1a Can be checked with SP800-90b
Microcontrollers
Series
STM32F2 series, STM32F4 series, STM32F7 series,
STM32L0 series, STM32L4 series, STM32G4 series,
STM32WB series, STM32MP15x.
STM32WBA series, STM32H5 series, STM32L5
series, STM32U5 series, STM32MP13x, STM32WL
series.
Lines
STM32H742, STM32H743/753, STM32H745/755,
STM32H747/757 lines, STM32H750 value line,
STM32L4R5/S5, STM32L4R7/S7, STM32L4R9/S9 lines,
STM32G0x1 lines.
STM32H7A3/7B3 line, STM32H7B0 value line,
STM32H723/733, STM32H725/735, STM32H730
value line, STM32L4P5/Q5 line.
Introduction to random number generation validation using the NIST statistical
test suite for STM32 MCUs and MPUs
AN4230
Application note
AN4230 - Rev 9 - January 2024
For further information contact your local STMicroelectronics sales office.
www.st.com