nrfxlib API 3.3.99
Loading...
Searching...
No Matches

◆ nrf_cc3xx_platform_ctr_drbg_get_with_add()

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 )

#include <crypto/nrf_cc310_platform/include/nrf_cc3xx_platform_ctr_drbg.h>

Function to get PRNG using ctr_drbg and an additional string of data.

Note
If the context is NULL the function uses an internal context.

This function will calculate PRNG using HW accelerated AES CTR_DRBG with a 16-byte key and reseed with TRNG using ARM CryptoCell cc3xx HW according to a reseed interval.

This function calculates random numbers using PRNG seeded by TRNG as defined in NIST SP 800-90A: Recommendation for Random Number Generation Using Deterministic Random Bit Generators. The random numbers are generated using Arm CryptoCell cc3xx hardware acceleration.

Note
Before calling this API the context to must be initialized by calling nrf_cc3xx_platform_ctr_drbg_init.
This API is only usable if nrf_cc3xx_platform initialization APIs was run prior to calling it.
Parameters
[in,out]contextPointer to structure holding the ctr_drbg context.
[in]bufferPointer to buffer to hold PRNG data.
[in]lenLength of PRNG to get.
[out]olenLength reported out.
[in]additionalAdditional input to use with CTR_DRBG_Generate_algorithm.
[in]add_lenLength of CTR_DRBG additional input.
Returns
0 on success, otherwise a non-zero failure according to the API mbedtls_ctrl_drbg_get_with_add.