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

◆ nrf_cc3xx_platform_identity_key_retrieve()

int nrf_cc3xx_platform_identity_key_retrieve ( uint32_t slot_id,
uint8_t key[32] )

Function to retrieve an identity key.

The primary usage of this API is to retrieve asymmetric key material corresponding to a secret identity of the device, for example an ECC private key using curve type secp256r1.

This API decrypts 32 bytes of raw key material that is stored in two consecutive KMU slots. The key is decrypted using a key derived from the Master Key Encryption Key (MKEK).

Note
This API assumes no format of the data stored.
The identity key should be cleared from RAM using nrf_cc3xx_platform_identity_key_free after usage, to keep it secret on the device.
Parameters
[in]slot_idThe first KMU slot ID for the stored identity key (uses 2).
[in,out]keyThe retrieved identity key.
Returns
NRF_CC3XX_PLATFORM_SUCCESS on success, otherwise a negative value.