Lines Matching refs:mic_size
42 size_t mic_size, uint16_t msg_len, uint8_t b[16], in ccm_calculate_X0() argument
48 b[0] = (((mic_size - 2) / 2) << 3) | ((!!aad_len) << 6) | 0x01; in ccm_calculate_X0()
101 size_t aad_len, uint8_t *mic, size_t mic_size) in ccm_auth() argument
124 ccm_calculate_X0(key, aad, aad_len, mic_size, msg_len, b, Xn); in ccm_auth()
145 for (i = 0; i < mic_size; i++) { in ccm_auth()
193 size_t aad_len, uint8_t *plaintext, size_t mic_size) in bt_ccm_decrypt() argument
197 if (aad_len >= 0xff00 || mic_size > sizeof(mic) || len > UINT16_MAX) { in bt_ccm_decrypt()
203 ccm_auth(key, nonce, plaintext, len, aad, aad_len, mic, mic_size); in bt_ccm_decrypt()
205 if (memcmp(mic, enc_data + len, mic_size)) { in bt_ccm_decrypt()
214 size_t aad_len, uint8_t *enc_data, size_t mic_size) in bt_ccm_encrypt() argument
221 LOG_DBG("aad_len %zu mic_size %zu", aad_len, mic_size); in bt_ccm_encrypt()
224 if (aad_len >= 0xff00 || mic_size > 16 || len > UINT16_MAX) { in bt_ccm_encrypt()
228 ccm_auth(key, nonce, plaintext, len, aad, aad_len, mic, mic_size); in bt_ccm_encrypt()