Home
last modified time | relevance | path

Searched refs:hash (Results 1 – 25 of 56) sorted by relevance

123

/hal_espressif-2.7.6/components/bt/common/osi/
Dhash_functions.c40 hash_index_t hash = 5381; in hash_function_string() local
44 hash = ((hash << 5) + hash ) + name[i]; in hash_function_string()
46 return hash; in hash_function_string()
/hal_espressif-2.7.6/components/wpa_supplicant/src/eap_peer/
Deap_peap_common.c24 u8 hash[SHA1_MAC_LEN]; in peap_prfplus() local
30 addr[0] = hash; in peap_prfplus()
75 if (hmac_sha1_vector(key, key_len, 5, addr, len, hash) < 0) in peap_prfplus()
78 os_memcpy(&buf[pos], hash, SHA1_MAC_LEN); in peap_prfplus()
81 os_memcpy(&buf[pos], hash, plen); in peap_prfplus()
/hal_espressif-2.7.6/components/wpa_supplicant/src/crypto/
Dsha256-prf.c60 u8 hash[SHA256_MAC_LEN]; in sha256_prf_bits() local
87 hash) < 0) in sha256_prf_bits()
89 os_memcpy(&buf[pos], hash, plen); in sha256_prf_bits()
105 os_memset(hash, 0, sizeof(hash)); in sha256_prf_bits()
Dms_funcs.c85 u8 hash[SHA1_MAC_LEN]; in challenge_hash() local
96 if (sha1_vector(3, addr, len, hash)) in challenge_hash()
98 os_memcpy(challenge, hash, 8); in challenge_hash()
336 u8 hash[SHA1_MAC_LEN]; in get_master_key() local
342 if (sha1_vector(3, addr, len, hash)) in get_master_key()
344 os_memcpy(master_key, hash, 16); in get_master_key()
Dsha1.c134 u8 hash[SHA1_MAC_LEN]; in sha1_prf() local
156 hash)) in sha1_prf()
158 os_memcpy(&buf[pos], hash, plen); in sha1_prf()
/hal_espressif-2.7.6/components/wpa_supplicant/src/tls/
Dpkcs5.c144 u8 hash[MD5_MAC_LEN]; in pkcs5_crypto_init() local
156 if (md5_vector(2, addr, len, hash) < 0) in pkcs5_crypto_init()
158 addr[0] = hash; in pkcs5_crypto_init()
161 if (md5_vector(1, addr, len, hash) < 0) in pkcs5_crypto_init()
165 wpa_hexdump_key(MSG_DEBUG, "PKCS #5: DES key", hash, 8); in pkcs5_crypto_init()
166 wpa_hexdump_key(MSG_DEBUG, "PKCS #5: DES IV", hash + 8, 8); in pkcs5_crypto_init()
168 return crypto_cipher_init(CRYPTO_CIPHER_ALG_DES, hash + 8, hash, 8); in pkcs5_crypto_init()
Dtlsv1_record.c45 if (suite->hash == TLS_HASH_MD5) { in tlsv1_record_set_cipher_suite()
48 } else if (suite->hash == TLS_HASH_SHA) { in tlsv1_record_set_cipher_suite()
51 } else if (suite->hash == TLS_HASH_SHA256) { in tlsv1_record_set_cipher_suite()
289 u8 len[2], hash[100]; in tlsv1_record_receive() local
457 hlen = sizeof(hash); in tlsv1_record_receive()
458 if ((int)crypto_hash_finish(hmac, hash, &hlen) < 0) { in tlsv1_record_receive()
465 os_memcmp(hash, out_data + plen, hlen) != 0 || in tlsv1_record_receive()
Dtlsv1_common.c344 size_t server_params_len, u8 *hash) in tlsv12_key_x_server_params_hash() argument
364 if (crypto_hash_finish(ctx, hash, &hlen) < 0) in tlsv12_key_x_server_params_hash()
375 size_t server_params_len, u8 *hash) in tls_key_x_server_params_hash() argument
381 hpos = hash; in tls_key_x_server_params_hash()
390 if (crypto_hash_finish(ctx, hash, &hlen) < 0) in tls_key_x_server_params_hash()
400 hlen = hash + sizeof(hash) - hpos; in tls_key_x_server_params_hash()
404 return hpos - hash; in tls_key_x_server_params_hash()
Dtlsv1_client_write.c466 u8 hash[100], *hpos; in tls_write_client_certificate_verify() local
504 hpos = hash; in tls_write_client_certificate_verify()
533 os_memmove(hash + 19, hash, hlen); in tls_write_client_certificate_verify()
535 os_memcpy(hash, "\x30\x31\x30\x0d\x06\x09\x60\x86\x48\x01\x65" in tls_write_client_certificate_verify()
574 wpa_hexdump(MSG_MSGDUMP, "TLSv1: CertificateVerify hash", hash, hlen); in tls_write_client_certificate_verify()
608 crypto_private_key_sign_pkcs1(conn->cred->key, hash, hlen, in tls_write_client_certificate_verify()
678 u8 hash[MD5_MAC_LEN + SHA1_MAC_LEN]; in tls_write_client_finished() local
688 crypto_hash_finish(conn->verify.sha256_client, hash, &hlen) in tls_write_client_finished()
701 crypto_hash_finish(conn->verify.md5_client, hash, &hlen) < 0) { in tls_write_client_finished()
712 crypto_hash_finish(conn->verify.sha1_client, hash + MD5_MAC_LEN, in tls_write_client_finished()
[all …]
Dtlsv1_common.h218 tls_hash hash; member
265 size_t server_params_len, u8 *hash);
269 size_t server_params_len, u8 *hash);
Dtlsv1_client_read.c473 u8 hash[64]; in tlsv1_process_diffie_hellman() local
501 server_params_end - server_params, hash); in tlsv1_process_diffie_hellman()
510 server_params_end - server_params, hash); in tlsv1_process_diffie_hellman()
516 hash, hlen); in tlsv1_process_diffie_hellman()
520 hash, hlen, pos, end - pos, in tlsv1_process_diffie_hellman()
819 u8 hash[MD5_MAC_LEN + SHA1_MAC_LEN]; in tls_process_server_finished() local
878 crypto_hash_finish(conn->verify.sha256_server, hash, &hlen) < 0) { in tls_process_server_finished()
889 crypto_hash_finish(conn->verify.md5_server, hash, &hlen) < 0) { in tls_process_server_finished()
900 crypto_hash_finish(conn->verify.sha1_server, hash + MD5_MAC_LEN, in tls_process_server_finished()
916 "server finished", hash, hlen, in tls_process_server_finished()
Dtlsv1_server_read.c774 u8 hash[MD5_MAC_LEN + SHA1_MAC_LEN], *hpos, *buf; in tls_process_certificate_verify() local
842 hpos = hash; in tls_process_certificate_verify()
919 wpa_hexdump(MSG_MSGDUMP, "TLSv1: CertificateVerify hash", hash, hlen); in tls_process_certificate_verify()
993 if (buflen != hlen || os_memcmp(buf, hash, buflen) != 0) { in tls_process_certificate_verify()
1069 u8 hash[MD5_MAC_LEN + SHA1_MAC_LEN]; in tls_process_client_finished() local
1128 crypto_hash_finish(conn->verify.sha256_client, hash, &hlen) in tls_process_client_finished()
1141 crypto_hash_finish(conn->verify.md5_client, hash, &hlen) < 0) { in tls_process_client_finished()
1152 crypto_hash_finish(conn->verify.sha1_client, hash + MD5_MAC_LEN, in tls_process_client_finished()
1168 "client finished", hash, hlen, in tls_process_client_finished()
/hal_espressif-2.7.6/components/bt/host/bluedroid/device/
Dbdaddr.c120 hash_index_t hash = 5381; in hash_function_bdaddr() local
123 hash = ((hash << 5) + hash) + bytes[i]; in hash_function_bdaddr()
125 return hash; in hash_function_bdaddr()
/hal_espressif-2.7.6/components/mbedtls/port/esp_ds/
Desp_rsa_sign_alt.c100 const unsigned char *hash, in rsa_rsassa_pkcs1_v15_encode() argument
169 memcpy( p, hash, hashlen ); in rsa_rsassa_pkcs1_v15_encode()
198 memcpy( p, hash, hashlen ); in rsa_rsassa_pkcs1_v15_encode()
215 const unsigned char *hash, unsigned char *sig ) in esp_ds_rsa_sign() argument
226 …if ((ret = (rsa_rsassa_pkcs1_v15_encode( md_alg, hashlen, hash, ((s_ds_data->rsa_length + 1) * FAC… in esp_ds_rsa_sign()
/hal_espressif-2.7.6/components/wpa_supplicant/src/wps/
Dwps_common.c29 u8 hash[SHA256_MAC_LEN], *opos; in wps_kdf() local
49 hmac_sha256_vector(key, SHA256_MAC_LEN, 4, addr, len, hash); in wps_kdf()
51 os_memcpy(opos, hash, SHA256_MAC_LEN); in wps_kdf()
55 os_memcpy(opos, hash, left); in wps_kdf()
140 u8 hash[SHA256_MAC_LEN]; in wps_derive_psk() local
143 (dev_passwd_len + 1) / 2, hash); in wps_derive_psk()
144 os_memcpy(wps->psk1, hash, WPS_PSK_LEN); in wps_derive_psk()
147 dev_passwd_len / 2, hash); in wps_derive_psk()
148 os_memcpy(wps->psk2, hash, WPS_PSK_LEN); in wps_derive_psk()
477 u8 hash[SHA1_MAC_LEN]; in uuid_gen_mac_addr() local
[all …]
Dwps_attr_process.c18 u8 hash[SHA256_MAC_LEN]; in wps_process_authenticator() local
41 hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 2, addr, len, hash); in wps_process_authenticator()
42 if (os_memcmp(hash, authenticator, WPS_AUTHENTICATOR_LEN) != 0) { in wps_process_authenticator()
54 u8 hash[SHA256_MAC_LEN]; in wps_process_key_wrap_auth() local
71 hmac_sha256(wps->authkey, WPS_AUTHKEY_LEN, head, len, hash); in wps_process_key_wrap_auth()
72 if (os_memcmp(hash, key_wrap_auth, WPS_KWA_LEN) != 0) { in wps_process_key_wrap_auth()
Dwps_attr_build.c152 u8 hash[SHA256_MAC_LEN]; in wps_build_authenticator() local
169 hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 2, addr, len, hash); in wps_build_authenticator()
173 wpabuf_put_data(msg, hash, WPS_AUTHENTICATOR_LEN); in wps_build_authenticator()
324 u8 hash[SHA256_MAC_LEN]; in wps_build_key_wrap_auth() local
328 wpabuf_len(msg), hash); in wps_build_key_wrap_auth()
331 wpabuf_put_data(msg, hash, WPS_KWA_LEN); in wps_build_key_wrap_auth()
Dwps_enrollee.c49 u8 *hash; in wps_build_e_hash() local
68 hash = wpabuf_put(msg, SHA256_MAC_LEN); in wps_build_e_hash()
78 hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 4, addr, len, hash); in wps_build_e_hash()
79 wpa_hexdump(MSG_DEBUG, "WPS: E-Hash1", hash, SHA256_MAC_LEN); in wps_build_e_hash()
84 hash = wpabuf_put(msg, SHA256_MAC_LEN); in wps_build_e_hash()
88 hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 4, addr, len, hash); in wps_build_e_hash()
89 wpa_hexdump(MSG_DEBUG, "WPS: E-Hash2", hash, SHA256_MAC_LEN); in wps_build_e_hash()
575 u8 hash[SHA256_MAC_LEN]; in wps_process_r_snonce1() local
597 hmac_sha256_vector(wps->authkey, WPS_AUTHKEY_LEN, 4, addr, len, hash); in wps_process_r_snonce1()
598 if (os_memcmp(wps->peer_hash1, hash, WPS_HASH_LEN) != 0) { in wps_process_r_snonce1()
[all …]
/hal_espressif-2.7.6/components/cxx/test/
Dtest_rtti.cpp83 size_t hash = 0; variable
86 hash = typeid(*base).hash_code();
90 TEST_ASSERT_EQUAL(0, hash);
/hal_espressif-2.7.6/components/nvs_flash/src/
Dnvs_item_hash_list.hpp48 HashListNode(uint32_t hash, size_t index) : in HashListNode()
49 mIndex((uint32_t) index), mHash(hash) in HashListNode()
/hal_espressif-2.7.6/components/wpa_supplicant/src/common/
Dwpa_common.c386 u8 hash[SHA1_MAC_LEN]; in wpa_eapol_key_mic() local
392 if (hmac_sha1(key, 16, buf, len, hash)) in wpa_eapol_key_mic()
394 memcpy(mic, hash, MD5_MAC_LEN); in wpa_eapol_key_mic()
553 unsigned char hash[SHA256_MAC_LEN]; in rsn_pmkid() local
562 hmac_sha256_vector(pmk, pmk_len, 3, addr, len, hash); in rsn_pmkid()
566 hmac_sha1_vector(pmk, pmk_len, 3, addr, len, hash); in rsn_pmkid()
567 memcpy(pmkid, hash, PMKID_LEN); in rsn_pmkid()
/hal_espressif-2.7.6/examples/peripherals/secure_element/atecc608_ecdsa/main/
Decdsa_example_main.c75 static unsigned char hash[32] = { variable
149 ret = mbedtls_pk_sign(&pkey, MBEDTLS_MD_SHA256, hash, 0, buf, &olen, in atca_ecdsa_test()
158 ret = mbedtls_pk_verify(&pkey, MBEDTLS_MD_SHA256, hash, 0, in atca_ecdsa_test()
/hal_espressif-2.7.6/components/mbedtls/esp_crt_bundle/
Desp_crt_bundle.c52 unsigned char hash[MBEDTLS_MD_MAX_SIZE]; in esp_crt_check_signature() local
70 if ( (ret = mbedtls_md( md_info, child->tbs.p, child->tbs.len, hash )) != 0 ) { in esp_crt_check_signature()
76 child->sig_md, hash, mbedtls_md_get_size( md_info ), in esp_crt_check_signature()
/hal_espressif-2.7.6/components/bootloader_support/src/
Desp_image_format.c263 … const void *hash = bootloader_mmap(data->start_addr + data->image_len - HASH_LEN, HASH_LEN); local
264 if (hash == NULL) {
268 memcpy(data->image_digest, hash, HASH_LEN);
269 bootloader_munmap(hash);
912 const void *hash = bootloader_mmap(data->start_addr + data->image_len - HASH_LEN, HASH_LEN); local
913 if (memcmp(hash, image_hash, HASH_LEN) != 0) {
915 bootloader_debug_buffer(hash, HASH_LEN, "Expected hash");
916 bootloader_munmap(hash);
920 bootloader_munmap(hash);
/hal_espressif-2.7.6/tools/kconfig/
Dsymbol.c791 unsigned hash = 2166136261U; in strhash() local
793 hash = (hash ^ *s) * 0x01000193; in strhash()
794 return hash; in strhash()
801 int hash; in sym_lookup() local
811 hash = strhash(name) % SYMBOL_HASHSIZE; in sym_lookup()
813 for (symbol = symbol_hash[hash]; symbol; symbol = symbol->next) { in sym_lookup()
823 hash = 0; in sym_lookup()
832 symbol->next = symbol_hash[hash]; in sym_lookup()
833 symbol_hash[hash] = symbol; in sym_lookup()
841 int hash = 0; in sym_find() local
[all …]

123