nrfxlib API 3.3.99
Loading...
Searching...
No Matches
nrf_cc3xx_platform ctr_drbg generation APIs

The nrf_cc3xx_platform_ctr_drbg APIs provide PRNG seeded by TRNG in accordance with NIST SP 800-90A: Recommendation for Random Number Generation Using Deterministic Random Bit Generators The generation of TRNG/PRNG data is using Arm CryptoCell cc3xx hardware acceleration. More...

Data Structures

struct  nrf_cc3xx_platform_ctr_drbg_context_t
 Opaque type for the context required for ctr_drbg generation. More...
 

Macros

#define NRF_CC3XX_PLATFORM_ENTROPY_SIZE_WORDS   (78)
 Macro holding size of the opaque ctr_drbg context type.
 

Functions

int nrf_cc3xx_platform_ctr_drbg_init (nrf_cc3xx_platform_ctr_drbg_context_t *const context, const uint8_t *pers_string, size_t pers_string_len)
 Function that initializes a ctr_drbg context.
 
int nrf_cc3xx_platform_ctr_drbg_free (nrf_cc3xx_platform_ctr_drbg_context_t *const context)
 Function that deintializes a ctr_drbg context.
 
int nrf_cc3xx_platform_ctr_drbg_set_pr (nrf_cc3xx_platform_ctr_drbg_context_t *const context, bool pr_enabled)
 Function to enable prediction resistance.
 
int nrf_cc3xx_platform_ctr_drbg_set_reseed_interval (nrf_cc3xx_platform_ctr_drbg_context_t *const context, int interval)
 Function to change the reseed interval.
 
int nrf_cc3xx_platform_ctr_drbg_reseed (nrf_cc3xx_platform_ctr_drbg_context_t *const context, const uint8_t *additional, size_t add_len)
 Function to do a manual reseed of ctr_drbg (using TRNG)
 
int nrf_cc3xx_platform_ctr_drbg_get_with_add (nrf_cc3xx_platform_ctr_drbg_context_t *const context, uint8_t *buffer, size_t len, size_t *olen, const uint8_t *additional, size_t add_len)
 Function to get PRNG using ctr_drbg and an additional string of data.
 
int nrf_cc3xx_platform_ctr_drbg_get (nrf_cc3xx_platform_ctr_drbg_context_t *const context, uint8_t *buffer, size_t length, size_t *olen)
 Function to get PRNG data using ctr_drbg.
 

Detailed Description

The nrf_cc3xx_platform_ctr_drbg APIs provide PRNG seeded by TRNG in accordance with NIST SP 800-90A: Recommendation for Random Number Generation Using Deterministic Random Bit Generators The generation of TRNG/PRNG data is using Arm CryptoCell cc3xx hardware acceleration.

The pre-built APIs are based on mbedtls_entropy and mbedtls_ctr_drbg but doesn't require setting up memory allocation before use.