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

◆ nrf_cc3xx_platform_hmac_drbg_set_pr()

int nrf_cc3xx_platform_hmac_drbg_set_pr ( nrf_cc3xx_platform_hmac_drbg_context_t *const context,
bool pr_enabled )

#include <crypto/nrf_cc310_platform/include/nrf_cc3xx_platform_hmac_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_hmac_drbg_get and nrf_cc3xx_platform_hmac_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_hmac_drbg_init
The default configuration is to have prediction resistance turned off.
Parameters
[in,out]contextPointer to a structure holding the hmac_drbg context.
[in]pr_enabledEnables prediction resistance if true, otherwise false (default).
Returns
NRF_CC3XX_PLATFORM_SUCCESS on success, NRF_CC3XX_PLATFORM_ERROR_ENTROPY_NOT_INITIALIZED when entropy is not initialized