nrfxlib API 3.3.99
Loading...
Searching...
No Matches
nrf_cc3xx_platform derived key APIs

The nrf_cc3xx_platform_shadow_key APIs provide functions helping with encrypting/decrypting data using derived keys from the KMU/KDR. More...

Data Structures

struct  nrf_cc3xx_platform_shadow_key_derivation_info_t
 Structure containing information for doing the key derivation using AES CMAC. More...
 
struct  nrf_cc3xx_platform_shadow_key_ctx_t
 Derived key context. More...
 

Macros

#define NRF_CC3XX_SHADOW_KEY_MAX_INPLACE_CHUNK_SIZE   (512)
 
#define NRF_CC3XX_SHADOW_AEAD_CONTEXT_SIZE_WORDS   (66)
 

Enumerations

enum  nrf_cc3xx_platform_shadow_key_enc_mode_t { MODE_ENCRYPT , MODE_DECRYPT }
 
enum  nrf_cc3xx_platform_shadow_key_enc_cipher_t { ALG_AES_128_BIT = 1 , ALG_AES_256_BIT = 2 , ALG_CHACHA20_256_BIT = 3 , ALG_CHACHAPOLY_256_BIT = 3 }
 Enum with the encryption/decryption algorithms supported with derived keys. More...
 

Functions

int nrf_cc3xx_platform_shadow_key_init (nrf_cc3xx_platform_shadow_key_ctx_t *ctx, uint32_t slot_id, unsigned int deriv_key_size, uint8_t const *label, size_t label_size)
 Function to initialize the derived key context.
 
int nrf_cc3xx_platform_shadow_key_crypt_setup (nrf_cc3xx_platform_shadow_key_ctx_t *ctx, nrf_cc3xx_platform_shadow_key_enc_cipher_t cipher, nrf_cc3xx_platform_shadow_key_enc_mode_t mode, const uint8_t *nonce, size_t nonce_size, const uint8_t *aad, size_t aad_size, size_t plaintext_size)
 Function to setup the encryption/decryption operation.
 
int nrf_cc3xx_platform_shadow_key_crypt_update (nrf_cc3xx_platform_shadow_key_ctx_t *ctx, uint8_t const *input, size_t input_size, uint8_t *output, size_t output_size, size_t *output_length)
 Function to encrypt/decrypt data using a derived key.
 
int nrf_cc3xx_platform_shadow_key_crypt_finish (nrf_cc3xx_platform_shadow_key_ctx_t *ctx, uint8_t *output, size_t output_size, size_t *output_length, uint8_t *tag, size_t tag_size, size_t *tag_length)
 Function to finalize the encryption/decryption operation.
 

Detailed Description

The nrf_cc3xx_platform_shadow_key APIs provide functions helping with encrypting/decrypting data using derived keys from the KMU/KDR.