Home
last modified time | relevance | path

Searched refs:nonce (Results 1 – 19 of 19) sorted by relevance

/AliOS-Things-master/components/ble_host/bt_crypto/tinycrypt/source/
A Dctr_mode.c42 uint8_t nonce[TC_AES_BLOCK_SIZE]; in tc_ctr_mode() local
58 (void)_copy(nonce, sizeof(nonce), ctr, sizeof(nonce)); in tc_ctr_mode()
61 block_num = (nonce[12] << 24) | (nonce[13] << 16) | in tc_ctr_mode()
62 (nonce[14] << 8) | (nonce[15]); in tc_ctr_mode()
66 if (tc_aes_encrypt(buffer, nonce, sched)) { in tc_ctr_mode()
68 nonce[12] = (uint8_t)(block_num >> 24); in tc_ctr_mode()
69 nonce[13] = (uint8_t)(block_num >> 16); in tc_ctr_mode()
70 nonce[14] = (uint8_t)(block_num >> 8); in tc_ctr_mode()
71 nonce[15] = (uint8_t)(block_num); in tc_ctr_mode()
81 ctr[12] = nonce[12]; ctr[13] = nonce[13]; in tc_ctr_mode()
[all …]
A Dccm_mode.c46 nonce == (uint8_t *) 0) { in tc_ccm_config()
56 c->nonce = nonce; in tc_ccm_config()
98 uint8_t nonce[TC_AES_BLOCK_SIZE]; in ccm_ctr_mode() local
114 (void) _copy(nonce, sizeof(nonce), ctr, sizeof(nonce)); in ccm_ctr_mode()
117 block_num = (uint16_t) ((nonce[14] << 8)|(nonce[15])); in ccm_ctr_mode()
121 nonce[14] = (uint8_t)(block_num >> 8); in ccm_ctr_mode()
122 nonce[15] = (uint8_t)(block_num); in ccm_ctr_mode()
132 ctr[14] = nonce[14]; ctr[15] = nonce[15]; in ccm_ctr_mode()
163 b[i] = c->nonce[i - 1]; in tc_ccm_generation_encryption()
225 b[i] = c->nonce[i - 1]; in tc_ccm_decryption_verification()
[all …]
/AliOS-Things-master/components/ble_mesh/bt_mesh/core/src/
A Dcrypto.c514 nonce[0] = 0x03; in create_proxy_nonce()
517 nonce[1] = 0x00; in create_proxy_nonce()
529 nonce[7] = 0; in create_proxy_nonce()
530 nonce[8] = 0; in create_proxy_nonce()
541 nonce[0] = 0x00; in create_net_nonce()
556 nonce[7] = 0; in create_net_nonce()
557 nonce[8] = 0; in create_net_nonce()
597 u8_t nonce[13]; in bt_mesh_net_encrypt() local
634 u8_t nonce[13]; in bt_mesh_net_decrypt() local
684 u8_t nonce[13]; in bt_mesh_app_encrypt() local
[all …]
A Dprov.c1130 u8_t nonce[13]; in prov_data() local
1152 err = bt_mesh_prov_nonce(plink.dhkey, plink.prov_salt, nonce); in prov_data()
1159 BT_DBG("Nonce: %s", bt_hex(nonce, 13)); in prov_data()
1161 err = bt_mesh_prov_decrypt(session_key, nonce, data, pdu); in prov_data()
A Dprovisioner_prov.c2332 u8_t nonce[13]; in send_prov_data() local
2346 err = bt_mesh_prov_nonce(link[i].dhkey, link[i].prov_salt, nonce); in send_prov_data()
2353 BT_DBG("Nonce: %s", bt_hex(nonce, 13)); in send_prov_data()
2438 err = bt_mesh_prov_encrypt(session_key, nonce, pdu, net_buf_simple_add(buf, 33)); in send_prov_data()
/AliOS-Things-master/components/ble_host/bt_host/host/
A Daes_ccm.c97 static int ccm_auth(const u8_t key[16], u8_t nonce[13], in ccm_auth()
112 memcpy(b + 1, nonce, 13); in ccm_auth()
150 static int ccm_crypt(const u8_t key[16], const u8_t nonce[13], in ccm_crypt()
165 memcpy(&a_i[1], nonce, 13); in ccm_crypt()
189 int bt_ccm_decrypt(const u8_t key[16], u8_t nonce[13], const u8_t *enc_msg, in bt_ccm_decrypt()
199 ccm_crypt(key, nonce, enc_msg, out_msg, msg_len); in bt_ccm_decrypt()
201 ccm_auth(key, nonce, out_msg, msg_len, aad, aad_len, mic, mic_size); in bt_ccm_decrypt()
210 int bt_ccm_encrypt(const u8_t key[16], u8_t nonce[13], const u8_t *msg, in bt_ccm_encrypt()
217 BT_DBG("nonce %s", bt_hex(nonce, 13)); in bt_ccm_encrypt()
226 ccm_auth(key, nonce, out_msg, msg_len, aad, aad_len, mic, mic_size); in bt_ccm_encrypt()
[all …]
/AliOS-Things-master/hardware/chip/rtl872xd/sdk/component/soc/realtek/amebad/fwlib/crypto/
A Drtl8721dhp_chacha_poly1305.c183 IN const u8* nonce, in rtl_crypto_chacha_poly1305_encrypt() argument
191 if ( nonce == NULL ) return _ERRNO_CRYPTO_NULL_POINTER; in rtl_crypto_chacha_poly1305_encrypt()
192 …if ( (u32)(nonce) & 0x3 ) return _ERRNO_CRYPTO_ADDR_NOT_4Byte_Aligned; // need to be 4-byte alignm… in rtl_crypto_chacha_poly1305_encrypt()
201 _memcpy((void*)(&(pIE->gcm_iv)[4]), nonce, 96/8); in rtl_crypto_chacha_poly1305_encrypt()
219 IN const u8* nonce, in rtl_crypto_chacha_poly1305_decrypt() argument
227 if ( nonce == NULL ) return _ERRNO_CRYPTO_NULL_POINTER; in rtl_crypto_chacha_poly1305_decrypt()
228 …if ( (u32)(nonce) & 0x3 ) return _ERRNO_CRYPTO_ADDR_NOT_4Byte_Aligned; // need to be 4-byte alignm… in rtl_crypto_chacha_poly1305_decrypt()
238 _memcpy((void*)(&(pIE->gcm_iv)[4]), nonce, 96/8); in rtl_crypto_chacha_poly1305_decrypt()
/AliOS-Things-master/components/mbedtls/library/
A Dchachapoly.c135 const unsigned char nonce[12], in mbedtls_chachapoly_starts()
141 CHACHAPOLY_VALIDATE_RET( nonce != NULL ); in mbedtls_chachapoly_starts()
144 ret = mbedtls_chacha20_starts( &ctx->chacha20_ctx, nonce, 0U ); in mbedtls_chachapoly_starts()
300 const unsigned char nonce[12], in chachapoly_crypt_and_tag()
309 ret = mbedtls_chachapoly_starts( ctx, nonce, mode ); in chachapoly_crypt_and_tag()
329 const unsigned char nonce[12], in mbedtls_chachapoly_encrypt_and_tag()
337 CHACHAPOLY_VALIDATE_RET( nonce != NULL ); in mbedtls_chachapoly_encrypt_and_tag()
344 length, nonce, aad, aad_len, in mbedtls_chachapoly_encrypt_and_tag()
350 const unsigned char nonce[12], in mbedtls_chachapoly_auth_decrypt()
362 CHACHAPOLY_VALIDATE_RET( nonce != NULL ); in mbedtls_chachapoly_auth_decrypt()
[all …]
A Dchacha20.c233 const unsigned char nonce[12], in mbedtls_chacha20_starts()
237 CHACHA20_VALIDATE_RET( nonce != NULL ); in mbedtls_chacha20_starts()
243 ctx->state[13] = BYTES_TO_U32_LE( nonce, 0 ); in mbedtls_chacha20_starts()
244 ctx->state[14] = BYTES_TO_U32_LE( nonce, 4 ); in mbedtls_chacha20_starts()
245 ctx->state[15] = BYTES_TO_U32_LE( nonce, 8 ); in mbedtls_chacha20_starts()
321 const unsigned char nonce[12], in mbedtls_chacha20_crypt()
331 CHACHA20_VALIDATE_RET( nonce != NULL ); in mbedtls_chacha20_crypt()
341 ret = mbedtls_chacha20_starts( &ctx, nonce, counter ); in mbedtls_chacha20_crypt()
/AliOS-Things-master/components/mbedtls/include/mbedtls/
A Dchachapoly.h171 const unsigned char nonce[12],
303 const unsigned char nonce[12],
337 const unsigned char nonce[12],
A Dchacha20.h140 const unsigned char nonce[12],
206 const unsigned char nonce[12],
/AliOS-Things-master/components/ble_host/bt_crypto/tinycrypt/include/tinycrypt/
A Dccm_mode.h93 uint8_t *nonce; /* nonce required by CCM */ member
111 int tc_ccm_config(TCCcmMode_t c, TCAesKeySched_t sched, uint8_t *nonce,
/AliOS-Things-master/components/ble_host/bt_host/include/bluetooth/
A Dcrypto.h93 int bt_ccm_decrypt(const u8_t key[16], u8_t nonce[13], const u8_t *enc_data,
117 int bt_ccm_encrypt(const u8_t key[16], u8_t nonce[13], const u8_t *enc_data,
/AliOS-Things-master/components/ble_mesh/bt_mesh/core/inc/
A Dcrypto.h86 u8_t nonce[13]) in bt_mesh_prov_nonce()
93 memcpy(nonce, tmp + 3, 13); in bt_mesh_prov_nonce()
153 int bt_mesh_prov_decrypt(const u8_t key[16], u8_t nonce[13],
156 int bt_mesh_prov_encrypt(const u8_t key[16], u8_t nonce[13],
/AliOS-Things-master/hardware/chip/rtl872xd/sdk/component/common/mbed/hal_ext/
A Dcrypto_api.h989 const uint8_t *nonce,
1007 const uint8_t *nonce,
/AliOS-Things-master/hardware/chip/rtl872xd/sdk/component/soc/realtek/amebad/fwlib/usb_otg/include/
A Dusb_ch9.h515 u8 nonce[16]; member
/AliOS-Things-master/hardware/chip/rtl872xd/sdk/component/soc/realtek/amebad/fwlib/include/
A Drtl8721d_crypto_api.h218 …poly1305_encrypt(IN const u8* message, IN const u32 msglen, IN const u8* nonce, IN const u8* aad,…
219 …poly1305_decrypt(IN const u8* message, IN const u32 msglen, IN const u8* nonce, IN const u8* aad,…
/AliOS-Things-master/hardware/chip/haas1000/drivers/services/ble_stack/common/api/
A Dco_lmp.h765 struct byte16 nonce; member
/AliOS-Things-master/hardware/chip/rtl872xd/sdk/component/common/api/wifi/
A Dwifi_simple_config.c203 unsigned char nonce[64]; in SC_scan_thread() member

Completed in 64 milliseconds