Product Specs

Table Of Contents
26 RNG Random number generator
Page
255
26 RNG Random number generator
The Random number generator (RNG) generates true non-deterministic random numbers based on internal
thermal noise that are suitable for cryptographic purposes. The RNG does not require a seed value.
START
STOP
VALRDY
VALUE
Figure 58: Random number generator
The RNG is started by triggering the START task and stopped by triggering the STOP task. When started,
new random numbers are generated continuously and written to the VALUE register when ready. A VALRDY
event is generated for every new random number that is written to the VALUE register. This means that after
a VALRDY event is generated the CPU has the time until the next VALRDY event to read out the random
number from the VALUE register before it is overwritten by a new random number.
26.1 Bias correction
A bias correction algorithm is employed on the internal bit stream to remove any bias toward '1' or '0'. The
bits are then queued into an eight-bit register for parallel readout from the VALUE register.
It is possible to enable bias correction in the CONFIG register. This will result in slower value generation, but
will ensure a statistically uniform distribution of the random values.
26.2 Speed
The time needed to generate one random byte of data is unpredictable, and may vary from one byte to the
next. This is especially true when bias correction is enabled.
26.3 Registers
Table 49: Instances
Base address
Peripheral
Instance
Description
Configuration
0x4000D000
RNG
RNG
Random number generator
Table 50: Register Overview
Register
Offset
Description
TASKS_START
0x000
Task starting the random number generator
TASKS_STOP
0x004
Task stopping the random number generator
EVENTS_VALRDY
0x100
Event being generated for every new random number written to the VALUE register
SHORTS
0x200
Shortcut register
INTENSET
0x304
Enable interrupt
INTENCLR
0x308
Disable interrupt
CONFIG
0x504
Configuration register
VALUE
0x508
Output random number
26.3.1 SHORTS
Address offset: 0x200
Shortcut register
Random number
generator