nrfxlib API 0.1.0
Loading...
Searching...
No Matches

◆ ocrypto_aes_ccm_init()

void ocrypto_aes_ccm_init ( ocrypto_aes_ccm_ctx *  ctx,
const uint8_t *  key,
size_t  size,
const uint8_t *  nonce,
size_t  n_len,
size_t  tag_len,
size_t  pt_len,
size_t  aa_len 
)

#include <crypto/nrf_oberon/include/ocrypto_aes_ccm.h>

AES-CCM initialization.

The context ctx is initialized using the given key key and nonce nonce.

Parameters
[out]ctxContext.
keyAES key. May be NULL.
sizeKey size (16, 24, or 32 bytes).
nonceNonce. May be NULL.
n_lenNonce length, 7 <= n_len <= 13.
tag_lenTag length (4, 6, 8, 10, 12, 14, or 16).
pt_lenPlaintext length, 0 <= pt_len < 2^(8*(15-n_len)).
aa_lenAdditional authentication data length.
Remarks
If key is NULL only nonce and lengths are set. If nonce is NULL only key is set. Both key and nonce must be set before update is called.