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

◆ nrf_cc3xx_platform_ctr_drbg_set_pr()

int nrf_cc3xx_platform_ctr_drbg_set_pr ( nrf_cc3xx_platform_ctr_drbg_context_t *const context,
bool pr_enabled )

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

Function to enable prediction resistance.

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

If prediction resistance is enabled, TRNG is gathered at the beginning of every call to nrf_cc3xx_platform_ctr_drbg_get and nrf_cc3xx_platform_ctr_drbg_get_with_add. This leads to a higher power draw and longer execution time.

Note
Before calling this API the context to must be initialized by calling nrf_cc3xx_platform_ctr_drbg_init
The default configuration is to have prediction resistance turned off.
Parameters
[in,out]contextPointer to a structure holding the ctr_drbg context.
[in]pr_enabledEnables prediction resistance if true, otherwise false (default).
Returns
0 on success, otherwise a non-zero failure.