The 'Initialize' operation steps for the [SP 800-90A] AES-256 DRBG for TRNG configuration with BC_DF are as follows:
- Make sure the engine is idle by writing zeroes to the TRNG_CONTROL
register twice.
- Write all configuration values in the TRNG_CONFIG
and TRNG_ALARMCNT
registers, write zeroes to the TRNG_ALARMMASK
and TRNG_ALARMSTOP
registers.
- Enable all FROs in the TRNG_FROENABLE
register (note that this can only be done after clearing the TRNG_ALARMSTOP
register).
- Start the actual engine by setting the TRNG_CONTROL[10] ENABLE_TRNG and [12] DRBG_EN register bits. Set all
required _MASK interrupt mask bits in the TRNG_CONTROL
register.
- Wait until the TRNG_STATUS[10] RESEED_AI register bit indicates a '1'.
- Mandatory: Write a 384 bits (48 Bytes) concatenation of a
'Personalization String' and 'Nonce' in the TRNG_PS_AI_0
through TRNG_PS_AI_11
registers. The first byte of the 'Nonce' must be written to bits [31:24] of
TRNG_PS_AI_0
register, while the last byte of the 'Personalization String' must be written to
bits [7:0] of TRNG_PS_AI_0
register. Using a 'Personalization String' is not a hard requirement. If it is
not used, then the 'Nonce' must be 48 Bytes long to fill these registers. All of
the 48 bytes must be used as they are fed through the BC_DF function (and
contribute to the 'L' length value used in that algorithm).
After this, the engine is ready to handle the
first 'Generate' request using the TRNG_CONTROL[16]
REQUEST_DATA register bit (see Section 7.3.4.6.1.2.4, SP 800-90A DRBG 'Generate' Operation). The first output for these
requests will take a while, as the Noise Source must first generate seed entropy for
the DRBG.