nrfxlib API 2.7.99
Loading...
Searching...
No Matches

◆ mbedtls_ccm_setkey_shadow_key()

int mbedtls_ccm_setkey_shadow_key ( mbedtls_ccm_context *const  ctx,
mbedtls_cipher_id_t  cipher,
uint32_t  slot_id,
unsigned int  keybits 
)

#include <crypto/nrf_cc310_mbedcrypto/include/mbedtls/cc3xx_kmu.h>

Function to configure AES CCM to use one or more KMU key slot as encryption key.

Note
A shadow key is not directly accessible, only reference information is stored in the context type
Replaces the API mbedtls_ccm_setkey.
Using this API enforces raw key usage of keys in the KMU slots. If derived key usage is intended, please use the API nrf_cc3xx_platform_kmu_aes_setkey_enc_shadow_key_derived.
Parameters
ctxAES context to set the key by KMU slot.
cipherCipher id to use.
slot_idIdentifier of the key slot (0 - 127).
keybitsKey size in bits.
Returns
0 on success, otherwise a negative number.