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

◆ nrf_cc3xx_platform_ctr_drbg_get()

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 )

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

Function to get PRNG data using ctr_drbg.

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

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]lengthLength of PRNG to get.
[out]olenLength reported out.
Returns
0 on success, otherwise a non-zero failure according to the API mbedtls_ctr_drbg_random.