aes_sync_ccm_auth_decrypt

AES-CCM block authenticated decryption.

int32_t aes_sync_ccm_auth_decrypt(
    struct aes_sync_descriptor *const descr,
    const uint8_t * input,
    uint8_t * output,
    uint32_t length,
    const uint8_t * iv,
    uint32_t iv_len,
    const uint8_t * aad,
    uint32_t aad_len,
    const uint8_t * tag,
    uint32_t tag_len
)

Parameters

descr

Type: struct aes_sync_descriptor Struct *const

The AES descriptor

input

Type: const uint8_t *

Buffer holding the input data

output

Type: uint8_t *

Buffer holding the output data

length

Type: uint32_t

Byte length of the input data

iv

Type: const uint8_t *

Initialization Vector

iv_len

Type: uint32_t

Length of IV

aad

Type: const uint8_t *

Additional data

aad_len

Type: uint32_t

Length of additional data

tag

Type: const uint8_t *

Buffer holding the input data

tag_len

Type: uint32_t

Length of tag

Returns

Type: int32_t

ERR_NONE if successful