42 #define MBEDTLS_ERR_CCM_BAD_INPUT -0x000D 43 #define MBEDTLS_ERR_CCM_AUTH_FAILED -0x000F 44 #define MBEDTLS_ERR_CCM_HW_ACCEL_FAILED -0x0011 51 #if !defined(MBEDTLS_CCM_ALT) 91 const unsigned char *key,
92 unsigned int keybits );
130 const unsigned char *iv,
size_t iv_len,
131 const unsigned char *add,
size_t add_len,
132 const unsigned char *input,
unsigned char *output,
133 unsigned char *tag,
size_t tag_len );
158 const unsigned char *iv,
size_t iv_len,
159 const unsigned char *add,
size_t add_len,
160 const unsigned char *input,
unsigned char *output,
161 const unsigned char *tag,
size_t tag_len );
164 #if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_AES_C) void mbedtls_ccm_free(mbedtls_ccm_context *ctx)
This function releases and clears the specified CCM context and underlying cipher sub-context...
The CCM context-type definition. The CCM context is passed to the APIs called.
mbedtls_cipher_id_t
Supported cipher types.
int mbedtls_ccm_encrypt_and_tag(mbedtls_ccm_context *ctx, size_t length, const unsigned char *iv, size_t iv_len, const unsigned char *add, size_t add_len, const unsigned char *input, unsigned char *output, unsigned char *tag, size_t tag_len)
This function encrypts a buffer using CCM.
This file contains an abstraction interface for use with the cipher primitives provided by the librar...
int mbedtls_ccm_setkey(mbedtls_ccm_context *ctx, mbedtls_cipher_id_t cipher, const unsigned char *key, unsigned int keybits)
This function initializes the CCM context set in the ctx parameter and sets the encryption key...
int mbedtls_ccm_auth_decrypt(mbedtls_ccm_context *ctx, size_t length, const unsigned char *iv, size_t iv_len, const unsigned char *add, size_t add_len, const unsigned char *input, unsigned char *output, const unsigned char *tag, size_t tag_len)
This function performs a CCM authenticated decryption of a buffer.
int mbedtls_ccm_self_test(int verbose)
The CCM checkup routine.
mbedtls_cipher_context_t cipher_ctx
void mbedtls_ccm_init(mbedtls_ccm_context *ctx)
This function initializes the specified CCM context, to make references valid, and prepare the contex...