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