nrfxlib API 2.8.99
|
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
.
[out] | ctx | Context. |
key | AES key. May be NULL. | |
size | Key size (16, 24, or 32 bytes). | |
nonce | Nonce. May be NULL. | |
n_len | Nonce length, 7 <= n_len <= 13. | |
tag_len | Tag length (4, 6, 8, 10, 12, 14, or 16). | |
pt_len | Plaintext length, 0 <= pt_len < 2^(8*(15-n_len)). | |
aa_len | Additional authentication data length. |
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.