xref: /btstack/test/crypto/aes_ccm.h (revision 80e33422a96c028b3a9c308fc4b9b874712dafb4)
1*80e33422SMatthias Ringwald #ifndef AES_CCM_H
2*80e33422SMatthias Ringwald #define AES_CCM_H
3ba1e2dc4SMatthias Ringwald 
4ba1e2dc4SMatthias Ringwald #include <stdint.h>
5ba1e2dc4SMatthias Ringwald #include <stdio.h>
6ba1e2dc4SMatthias Ringwald 
7ba1e2dc4SMatthias Ringwald // CCM Encrypt & Decrypt from Zephyr Project
8ba1e2dc4SMatthias Ringwald int bt_mesh_ccm_decrypt(const uint8_t key[16], uint8_t nonce[13], const uint8_t *enc_msg, size_t msg_len,
9ba1e2dc4SMatthias Ringwald 			       const uint8_t *aad, size_t aad_len, uint8_t *out_msg, size_t mic_size);
10ba1e2dc4SMatthias Ringwald 
11ba1e2dc4SMatthias Ringwald int bt_mesh_ccm_encrypt(const uint8_t key[16], uint8_t nonce[13], const uint8_t *msg, size_t msg_len,
12ba1e2dc4SMatthias Ringwald 			       const uint8_t *aad, size_t aad_len, uint8_t *out_msg, size_t mic_size);
13ba1e2dc4SMatthias Ringwald 
14ba1e2dc4SMatthias Ringwald #endif
15