Home
last modified time | relevance | path

Searched refs:aad_len (Results 1 – 7 of 7) sorted by relevance

/Zephyr-Core-3.5.0/tests/bluetooth/bt_crypto_ccm/src/
Dtest_vectors.h16 const size_t aad_len; /* Additional Authenticated Data length */ member
222 .aad_len = 8,
234 .aad_len = 8,
246 .aad_len = 8,
258 .aad_len = 12,
270 .aad_len = 12,
282 .aad_len = 12,
294 .aad_len = 8,
306 .aad_len = 8,
318 .aad_len = 8,
[all …]
Dtest_bt_crypto_ccm.c38 err = bt_ccm_encrypt(p->key, p->nonce, &p->input[p->aad_len], in ZTEST()
39 p->input_len - p->aad_len, aad, p->aad_len, in ZTEST()
40 &encrypted_data[p->aad_len], p->mic_len); in ZTEST()
54 memcpy(decrypted_data, encrypted_data, p->aad_len); in ZTEST()
56 err = bt_ccm_decrypt(p->key, p->nonce, &encrypted_data[p->aad_len], in ZTEST()
57 p->input_len - p->aad_len, aad, p->aad_len, in ZTEST()
58 &decrypted_data[p->aad_len], p->mic_len); in ZTEST()
/Zephyr-Core-3.5.0/subsys/bluetooth/host/
Daes_ccm.c41 static int ccm_calculate_X0(const uint8_t key[16], const uint8_t *aad, uint8_t aad_len, in ccm_calculate_X0() argument
48 b[0] = (((mic_size - 2) / 2) << 3) | ((!!aad_len) << 6) | 0x01; in ccm_calculate_X0()
58 if (aad_len) { in ccm_calculate_X0()
59 sys_put_be16(aad_len, b); in ccm_calculate_X0()
66 aad_len += sizeof(uint16_t); in ccm_calculate_X0()
67 while (aad_len > 16) { in ccm_calculate_X0()
73 aad_len -= 16; in ccm_calculate_X0()
82 for (; i < aad_len; i++, j++) { in ccm_calculate_X0()
86 for (i = aad_len; i < 16; i++) { in ccm_calculate_X0()
101 size_t aad_len, uint8_t *mic, size_t mic_size) in ccm_auth() argument
[all …]
/Zephyr-Core-3.5.0/include/zephyr/bluetooth/
Dcrypto.h93 size_t len, const uint8_t *aad, size_t aad_len,
118 size_t aad_len, uint8_t *enc_data, size_t mic_size);
/Zephyr-Core-3.5.0/subsys/bluetooth/mesh/
Dcrypto_tc.c43 size_t len, const uint8_t *aad, size_t aad_len, uint8_t *enc_data, in bt_mesh_ccm_encrypt() argument
46 return bt_ccm_encrypt(key->key, nonce, plaintext, len, aad, aad_len, enc_data, mic_size); in bt_mesh_ccm_encrypt()
50 size_t len, const uint8_t *aad, size_t aad_len, uint8_t *plaintext, in bt_mesh_ccm_decrypt() argument
53 return bt_ccm_decrypt(key->key, nonce, enc_data, len, aad, aad_len, plaintext, mic_size); in bt_mesh_ccm_decrypt()
Dcrypto_psa.c80 size_t aad_len, uint8_t *enc_data, size_t mic_size) in bt_mesh_ccm_encrypt() argument
89 aad, aad_len, in bt_mesh_ccm_encrypt()
103 size_t aad_len, uint8_t *plaintext, size_t mic_size) in bt_mesh_ccm_decrypt() argument
112 aad, aad_len, in bt_mesh_ccm_decrypt()
Dcrypto.h27 size_t len, const uint8_t *aad, size_t aad_len, uint8_t *enc_data,
31 size_t len, const uint8_t *aad, size_t aad_len, uint8_t *plaintext,