29 #define CCM_ERR_INVALID_NONCE_LENGTH (-2)
30 #define CCM_ERR_INVALID_CBC_MAC (-3)
31 #define CCM_ERR_INVALID_DATA_LENGTH (-3)
32 #define CCM_ERR_INVALID_LENGTH_ENCODING (-4)
33 #define CCM_ERR_INVALID_MAC_LENGTH (-5)
39 #define CCM_BLOCK_SIZE 16
44 #define CCM_MAC_MAX_LEN 16
69 const uint8_t *auth_data, uint32_t auth_data_len,
70 uint8_t mac_length, uint8_t length_encoding,
71 const uint8_t *nonce,
size_t nonce_len,
72 const uint8_t *input,
size_t input_len,
98 const uint8_t *auth_data, uint32_t auth_data_len,
99 uint8_t mac_length, uint8_t length_encoding,
100 const uint8_t *nonce,
size_t nonce_len,
101 const uint8_t *input,
size_t input_len,
int cipher_decrypt_ccm(const cipher_t *cipher, const uint8_t *auth_data, uint32_t auth_data_len, uint8_t mac_length, uint8_t length_encoding, const uint8_t *nonce, size_t nonce_len, const uint8_t *input, size_t input_len, uint8_t *output)
Decrypt data of arbitrary length in ccm mode.
int cipher_encrypt_ccm(const cipher_t *cipher, const uint8_t *auth_data, uint32_t auth_data_len, uint8_t mac_length, uint8_t length_encoding, const uint8_t *nonce, size_t nonce_len, const uint8_t *input, size_t input_len, uint8_t *output)
Encrypt and authenticate data of arbitrary length in ccm mode.
Headers for the packet encryption class.
basic struct for using block ciphers contains the cipher interface and the context