Home
last modified time | relevance | path

Searched refs:hash_len (Results 1 – 25 of 78) sorted by relevance

1234

/external/rust/crates/aho-corasick/src/packed/
Drabinkarp.rs48 hash_len: usize, field
71 let hash_len = patterns.minimum_len(); in new() localVariable
72 assert!(hash_len >= 1); in new()
75 for _ in 1..hash_len { in new()
81 hash_len, in new()
86 let hash = rk.hash(&pat.bytes()[..rk.hash_len]); in new()
108 if at + self.hash_len > haystack.len() { in find_at()
111 let mut hash = self.hash(&haystack[at..at + self.hash_len]); in find_at()
121 if at + self.hash_len >= haystack.len() { in find_at()
127 haystack[at + self.hash_len], in find_at()
[all …]
/external/scapy/scapy/layers/tls/crypto/
Dhash.py38 hash_len = 0 variable in Hash_NULL
45 hash_len = 16 variable in Hash_MD5
49 hash_len = 20 variable in Hash_SHA
53 hash_len = 28 variable in Hash_SHA224
57 hash_len = 32 variable in Hash_SHA256
61 hash_len = 48 variable in Hash_SHA384
65 hash_len = 64 variable in Hash_SHA512
Dprf.py39 hash_len = hm.hash_alg.hash_len
40 n = (req_len + hash_len - 1) // hash_len
73 rounds = (req_len + hash_md5.hash_len - 1) // hash_md5.hash_len
108 rounds = (req_len + hash_md5.hash_len - 1) // hash_md5.hash_len
Dhkdf.py50 hash_len = self.hash.digest_size
51 return self.expand_label(secret, label, hash_messages, hash_len)
54 hash_len = self.hash.digest_size
55 finished_key = self.expand_label(basekey, b"finished", b"", hash_len)
/external/avb/libavb/
Davb_crypto.c330 {.padding = NULL, .padding_len = 0, .hash_len = 0},
334 .hash_len = AVB_SHA256_DIGEST_SIZE},
338 .hash_len = AVB_SHA256_DIGEST_SIZE},
342 .hash_len = AVB_SHA256_DIGEST_SIZE},
346 .hash_len = AVB_SHA512_DIGEST_SIZE},
350 .hash_len = AVB_SHA512_DIGEST_SIZE},
354 .hash_len = AVB_SHA512_DIGEST_SIZE},
/external/wpa_supplicant_8/src/common/
Ddpp_crypto.c237 if (curve->hash_len == 32) in dpp_hash_vector()
239 if (curve->hash_len == 48) in dpp_hash_vector()
241 if (curve->hash_len == 64) in dpp_hash_vector()
247 int dpp_hkdf_expand(size_t hash_len, const u8 *secret, size_t secret_len, in dpp_hkdf_expand() argument
250 if (hash_len == 32) in dpp_hkdf_expand()
254 if (hash_len == 48) in dpp_hkdf_expand()
258 if (hash_len == 64) in dpp_hkdf_expand()
266 int dpp_hmac_vector(size_t hash_len, const u8 *key, size_t key_len, in dpp_hmac_vector() argument
270 if (hash_len == 32) in dpp_hmac_vector()
273 if (hash_len == 48) in dpp_hmac_vector()
[all …]
Dsae.c533 static int hkdf_extract(size_t hash_len, const u8 *salt, size_t salt_len, in hkdf_extract() argument
537 if (hash_len == 32) in hkdf_extract()
541 if (hash_len == 48) in hkdf_extract()
546 if (hash_len == 64) in hkdf_extract()
554 static int hkdf_expand(size_t hash_len, const u8 *prk, size_t prk_len, in hkdf_expand() argument
559 if (hash_len == 32) in hkdf_expand()
564 if (hash_len == 48) in hkdf_expand()
570 if (hash_len == 64) in hkdf_expand()
832 static int sae_pwd_seed(size_t hash_len, const u8 *ssid, size_t ssid_len, in sae_pwd_seed() argument
854 if (hkdf_extract(hash_len, ssid, ssid_len, num_elem, addr, len, in sae_pwd_seed()
[all …]
Dsae_pk.c529 int sae_hash(size_t hash_len, const u8 *data, size_t len, u8 *hash) in sae_hash() argument
531 if (hash_len == 32) in sae_hash()
534 if (hash_len == 48) in sae_hash()
538 if (hash_len == 64) in sae_hash()
545 static int sae_pk_hash_sig_data(struct sae_data *sae, size_t hash_len, in sae_pk_hash_sig_data() argument
587 if (sae_hash(hash_len, wpabuf_head(sig_data), wpabuf_len(sig_data), in sae_pk_hash_sig_data()
591 hash, hash_len); in sae_pk_hash_sig_data()
609 size_t hash_len; in sae_write_confirm_pk() local
643 hash_len = sae_group_2_hash_len(pk->group); in sae_write_confirm_pk()
644 if (sae_pk_hash_sig_data(sae, hash_len, true, wpabuf_head(pk->m), in sae_write_confirm_pk()
[all …]
Ddpp_backup.c251 size_t hash_len) in dpp_build_pbkdf2_alg_id() argument
270 if (hash_len == 32) in dpp_build_pbkdf2_alg_id()
272 else if (hash_len == 48) in dpp_build_pbkdf2_alg_id()
274 else if (hash_len == 64) in dpp_build_pbkdf2_alg_id()
286 asn1_put_integer(params, hash_len); /* keyLength */ in dpp_build_pbkdf2_alg_id()
300 dpp_build_pw_recipient_info(struct dpp_authentication *auth, size_t hash_len, in dpp_build_pw_recipient_info() argument
315 key_len = auth->curve->hash_len; in dpp_build_pw_recipient_info()
323 if (dpp_pbkdf2(hash_len, key, key_len, wpabuf_head(salt), 64, 1000, in dpp_build_pw_recipient_info()
324 kek, hash_len)) { in dpp_build_pw_recipient_info()
329 kek, hash_len); in dpp_build_pw_recipient_info()
[all …]
Ddpp_pkex.c543 Kx, Kx_len, pkex->z, curve->hash_len); in dpp_pkex_rx_exchange_req()
586 clear_len = 4 + 2 * curve->prime_len + 4 + curve->hash_len; in dpp_pkex_build_commit_reveal_req()
626 wpabuf_put_le16(clear, curve->hash_len); in dpp_pkex_build_commit_reveal_req()
627 wpabuf_put_data(clear, u, curve->hash_len - 1); in dpp_pkex_build_commit_reveal_req()
628 wpabuf_put_u8(clear, u[curve->hash_len - 1] ^ 0x01); in dpp_pkex_build_commit_reveal_req()
635 wpabuf_put_le16(clear, curve->hash_len); in dpp_pkex_build_commit_reveal_req()
636 wpabuf_put_data(clear, u, curve->hash_len); in dpp_pkex_build_commit_reveal_req()
659 if (aes_siv_encrypt(pkex->z, curve->hash_len, in dpp_pkex_build_commit_reveal_req()
828 if (dpp_hmac_vector(curve->hash_len, Jx, Jx_len, 4, addr, len, u) < 0) in dpp_pkex_rx_exchange_resp()
830 wpa_hexdump(MSG_DEBUG, "DPP: u", u, curve->hash_len); in dpp_pkex_rx_exchange_resp()
[all …]
Ddpp_i.h85 int dpp_hkdf_expand(size_t hash_len, const u8 *secret, size_t secret_len,
87 int dpp_hmac_vector(size_t hash_len, const u8 *key, size_t key_len,
94 int dpp_pbkdf2(size_t hash_len, const u8 *password, size_t password_len,
105 int dpp_derive_k1(const u8 *Mx, size_t Mx_len, u8 *k1, unsigned int hash_len);
106 int dpp_derive_k2(const u8 *Nx, size_t Nx_len, u8 *k2, unsigned int hash_len);
112 int dpp_derive_pmk(const u8 *Nx, size_t Nx_len, u8 *pmk, unsigned int hash_len);
128 u8 *z, unsigned int hash_len);
Ddpp_auth.c205 if (aes_siv_encrypt(auth->k1, auth->curve->hash_len, clear, siv_len, in dpp_auth_build_req()
391 if (aes_siv_encrypt(siv_key, auth->curve->hash_len, clear, siv_len, in dpp_auth_build_resp()
492 auth->curve->hash_len) < 0) in dpp_auth_build_resp_ok()
506 WPA_PUT_LE16(&r_auth[2], auth->curve->hash_len); in dpp_auth_build_resp_ok()
512 r_auth[4 + auth->curve->hash_len / 2] ^= 0x01; in dpp_auth_build_resp_ok()
515 if (aes_siv_encrypt(auth->ke, auth->curve->hash_len, in dpp_auth_build_resp_ok()
516 r_auth, 4 + auth->curve->hash_len, in dpp_auth_build_resp_ok()
519 wrapped_r_auth_len = 4 + auth->curve->hash_len + AES_BLOCK_SIZE; in dpp_auth_build_resp_ok()
792 auth->curve->hash_len) < 0) in dpp_auth_req_rx()
807 if (aes_siv_decrypt(auth->k1, auth->curve->hash_len, in dpp_auth_req_rx()
[all …]
/external/wpa_supplicant_8/hostapd/
Dsae_pk_gen.c33 size_t hash_len; in main() local
81 hash_len = 32; in main()
84 hash_len = 48; in main()
87 hash_len = 64; in main()
110 if (sae_hash(hash_len, data, data_len, hash) < 0) { in main()
129 wpa_snprintf_hex(hash_hex, sizeof(hash_hex), hash, hash_len) < 0) in main()
149 for (j = 0; j < 8 * (int) hash_len / 20; j++) { in main()
152 sae_pk_buf_shift_left_19(hash + sec, hash_len - sec); in main()
166 pw_base_bin, hash_len - sec) >= 0) in main()
177 for (j = 4; j <= ((int) hash_len * 8 + 5 - 8 * sec) / 19; j++) { in main()
/external/libsrtp2/crypto/test/
Dsha1_driver.c63 unsigned hash_len; /* number of octets output by hash */ member
75 unsigned hash_len) in hash_test_case_add() argument
93 hash_len * 2); in hash_test_case_add()
94 if (tmp_len != hash_len * 2) { in hash_test_case_add()
100 test_case->hash_len = hash_len; in hash_test_case_add()
117 if (test_case->hash_len != 20) in sha1_test_case_validate()
/external/wpa_supplicant_8/src/eap_common/
Dikev2_common.c118 size_t hash_len; in ikev2_prf_plus() local
128 hash_len = prf->hash_len; in ikev2_prf_plus()
131 len[0] = hash_len; in ikev2_prf_plus()
150 clen = hash_len; in ikev2_prf_plus()
402 sign_len = wpabuf_len(sign_msg) + nonce_len + prf->hash_len; in ikev2_derive_auth_data()
411 os_memcpy(pos, hash, prf->hash_len); in ikev2_derive_auth_data()
416 ikev2_prf_hash(prf->id, hash, prf->hash_len, 1, in ikev2_derive_auth_data()
461 if (encrypted_len < iv_len + 1 + integ_alg->hash_len) { in ikev2_decrypt_payload()
470 integ = end - integ_alg->hash_len; in ikev2_decrypt_payload()
483 if (os_memcmp_const(integ, hash, integ_alg->hash_len) != 0) { in ikev2_decrypt_payload()
[all …]
/external/rust/crates/quiche/deps/boringssl/src/ssl/
Dssl_transcript.cc195 size_t hash_len; in UpdateForHelloRetryRequest() local
196 if (!GetHash(old_hash, &hash_len)) { in UpdateForHelloRetryRequest()
200 static_cast<uint8_t>(hash_len)}; in UpdateForHelloRetryRequest()
203 !Update(MakeConstSpan(old_hash, hash_len))) { in UpdateForHelloRetryRequest()
Dtls13_enc.cc378 unsigned hash_len; in tls13_export_keying_material() local
380 if (!EVP_Digest(context.data(), context.size(), hash_buf, &hash_len, digest, in tls13_export_keying_material()
387 auto hash = MakeConstSpan(hash_buf, hash_len); in tls13_export_keying_material()
453 size_t hash_len = EVP_MD_size(digest); in tls13_write_psk_binder() local
462 1 /* length prefix */ + hash_len) || in tls13_write_psk_binder()
468 verify_data_len != hash_len) { in tls13_write_psk_binder()
/external/boringssl/src/ssl/
Dssl_transcript.cc195 size_t hash_len; in UpdateForHelloRetryRequest() local
196 if (!GetHash(old_hash, &hash_len)) { in UpdateForHelloRetryRequest()
200 static_cast<uint8_t>(hash_len)}; in UpdateForHelloRetryRequest()
203 !Update(MakeConstSpan(old_hash, hash_len))) { in UpdateForHelloRetryRequest()
Dtls13_enc.cc377 unsigned hash_len; in tls13_export_keying_material() local
379 if (!EVP_Digest(context.data(), context.size(), hash_buf, &hash_len, digest, in tls13_export_keying_material()
386 auto hash = MakeConstSpan(hash_buf, hash_len); in tls13_export_keying_material()
452 size_t hash_len = EVP_MD_size(digest); in tls13_write_psk_binder() local
461 1 /* length prefix */ + hash_len) || in tls13_write_psk_binder()
466 verify_data_len != hash_len) { in tls13_write_psk_binder()
/external/wpa_supplicant_8/src/tls/
Dtlsv1_client_ocsp.c124 unsigned int hash_len; in tls_process_ocsp_single_response() local
181 hash_len = ocsp_hash_data(&alg.oid, issuer->subject_dn, in tls_process_ocsp_single_response()
183 if (hash_len == 0 || name_hash_len != hash_len || in tls_process_ocsp_single_response()
184 os_memcmp(name_hash, hash, hash_len) != 0) { in tls_process_ocsp_single_response()
187 hash, hash_len); in tls_process_ocsp_single_response()
205 hash_len = ocsp_hash_data(&alg.oid, issuer->public_key, in tls_process_ocsp_single_response()
207 if (hash_len == 0 || key_hash_len != hash_len || in tls_process_ocsp_single_response()
208 os_memcmp(key_hash, hash, hash_len) != 0) { in tls_process_ocsp_single_response()
211 hash, hash_len); in tls_process_ocsp_single_response()
/external/wpa_supplicant_8/src/eap_server/
Deap_server.c710 size_t hash_len; in erp_send_finish_reauth() local
716 hash_len = 32; in erp_send_finish_reauth()
719 hash_len = 16; in erp_send_finish_reauth()
725 hash_len = 0; in erp_send_finish_reauth()
728 if (hash_len) in erp_send_finish_reauth()
729 plen += 1 + hash_len; in erp_send_finish_reauth()
749 wpabuf_put_data(msg, hash, hash_len); in erp_send_finish_reauth()
808 size_t hash_len; in SM_STATE() local
913 hash_len = 32; in SM_STATE()
921 hash_len = 16; in SM_STATE()
[all …]
/external/tpm2-tss/src/tss2-esys/
Desys_crypto.c401 size_t hash_len; in iesys_crypto_KDFe() local
415 r = iesys_crypto_hash_get_digest_size(hashAlg, &hash_len); in iesys_crypto_KDFe()
424 for (; byte_size > 0; stream = &stream[hash_len], byte_size = byte_size - hash_len) in iesys_crypto_KDFe()
457 r = iesys_crypto_hash_finish(&cryptoContext, (uint8_t *) stream, &hash_len); in iesys_crypto_KDFe()
Desys_crypto_gcrypt.c33 size_t hash_len; member
106 int hash_len = gcry_md_get_algo_dlen(mycontext->hash.gcry_hash_alg); in iesys_cryptogcry_hash_start() local
107 if (hash_len <= 0) { in iesys_cryptogcry_hash_start()
112 mycontext->hash.hash_len = hash_len; in iesys_cryptogcry_hash_start()
208 if (*size < mycontext->hash.hash_len) { in iesys_cryptogcry_hash_finish()
217 LOGBLOB_TRACE(cpHash, mycontext->hash.hash_len, "read hash result"); in iesys_cryptogcry_hash_finish()
219 *size = mycontext->hash.hash_len; in iesys_cryptogcry_hash_finish()
/external/rust/crates/quiche/deps/boringssl/src/crypto/evp/
Dp_rsa.c270 const size_t hash_len = EVP_MD_size(rctx->md); in pkey_rsa_verify_recover() local
277 kDummyHash, hash_len)) { in pkey_rsa_verify_recover()
287 CRYPTO_memcmp(rctx->tbuf, asn1_prefix, asn1_prefix_len - hash_len) != 0) { in pkey_rsa_verify_recover()
300 OPENSSL_memcpy(out, rctx->tbuf + rslen - hash_len, hash_len); in pkey_rsa_verify_recover()
302 *out_len = hash_len; in pkey_rsa_verify_recover()
/external/boringssl/src/crypto/evp/
Dp_rsa.c270 const size_t hash_len = EVP_MD_size(rctx->md); in pkey_rsa_verify_recover() local
277 kDummyHash, hash_len)) { in pkey_rsa_verify_recover()
287 CRYPTO_memcmp(rctx->tbuf, asn1_prefix, asn1_prefix_len - hash_len) != 0) { in pkey_rsa_verify_recover()
300 OPENSSL_memcpy(out, rctx->tbuf + rslen - hash_len, hash_len); in pkey_rsa_verify_recover()
302 *out_len = hash_len; in pkey_rsa_verify_recover()

1234