Home
last modified time | relevance | path

Searched refs:salt_len (Results 1 – 25 of 49) sorted by relevance

12

/third_party/openssl/crypto/kdf/
Dhkdf.c21 const unsigned char *salt, size_t salt_len,
27 const unsigned char *salt, size_t salt_len,
40 size_t salt_len; member
64 OPENSSL_clear_free(kctx->salt, kctx->salt_len); in pkey_hkdf_cleanup()
94 OPENSSL_clear_free(kctx->salt, kctx->salt_len); in pkey_hkdf_ctrl()
100 kctx->salt_len = p1; in pkey_hkdf_ctrl()
183 OPENSSL_clear_free(kctx->salt, kctx->salt_len); in pkey_hkdf_derive_init()
206 return HKDF(kctx->md, kctx->salt, kctx->salt_len, kctx->key, in pkey_hkdf_derive()
215 return HKDF_Extract(kctx->md, kctx->salt, kctx->salt_len, kctx->key, in pkey_hkdf_derive()
258 const unsigned char *salt, size_t salt_len, in HKDF() argument
[all …]
Dscrypt.c26 size_t salt_len; member
84 OPENSSL_clear_free(kctx->salt, kctx->salt_len); in pkey_scrypt_cleanup()
131 return pkey_scrypt_set_membuf(&kctx->salt, &kctx->salt_len, p2, p1); in pkey_scrypt_ctrl()
232 kctx->salt_len, kctx->N, kctx->r, kctx->p, in pkey_scrypt_derive()
/third_party/e2fsprogs/misc/
De4crypt.c186 size_t salt_len; member
193 static struct salt *find_by_salt(unsigned char *salt, size_t salt_len) in find_by_salt() argument
199 if ((p->salt_len == salt_len) && in find_by_salt()
200 !memcmp(p->salt, salt, salt_len)) in find_by_salt()
205 static void add_salt(unsigned char *salt, size_t salt_len) in add_salt() argument
207 if (find_by_salt(salt, salt_len)) in add_salt()
218 salt_list[num_salt].salt_len = salt_len; in add_salt()
279 int fd, ret, salt_len = 0; in parse_salt() local
285 salt_len = strlen(cp); in parse_salt()
286 if (salt_len >= EXT4_MAX_SALT_SIZE) in parse_salt()
[all …]
/third_party/f2fs-tools/tools/
Df2fscrypt.c232 size_t salt_len; member
239 static struct salt *find_by_salt(unsigned char *salt, size_t salt_len) in find_by_salt() argument
245 if ((p->salt_len == salt_len) && in find_by_salt()
246 !memcmp(p->salt, salt, salt_len)) in find_by_salt()
251 static void add_salt(unsigned char *salt, size_t salt_len) in add_salt() argument
253 if (find_by_salt(salt, salt_len)) in add_salt()
264 salt_list[num_salt].salt_len = salt_len; in add_salt()
324 int fd, ret, salt_len = 0; in parse_salt() local
330 salt_len = strlen(cp); in parse_salt()
331 if (salt_len >= F2FS_MAX_SALT_SIZE) in parse_salt()
[all …]
/third_party/mbedtls/library/
Dhkdf.c29 size_t salt_len, const unsigned char *ikm, size_t ikm_len, in mbedtls_hkdf() argument
36 ret = mbedtls_hkdf_extract( md, salt, salt_len, ikm, ikm_len, prk ); in mbedtls_hkdf()
50 const unsigned char *salt, size_t salt_len, in mbedtls_hkdf_extract() argument
60 if( salt_len != 0 ) in mbedtls_hkdf_extract()
73 salt_len = hash_len; in mbedtls_hkdf_extract()
76 return( mbedtls_md_hmac( md, salt, salt_len, ikm, ikm_len, prk ) ); in mbedtls_hkdf_extract()
Dx509.c205 int *salt_len ) in mbedtls_x509_get_rsassa_pss_params() argument
216 *salt_len = 20; in mbedtls_x509_get_rsassa_pss_params()
293 if( ( ret = mbedtls_asn1_get_int( &p, end2, salt_len ) ) != 0 ) in mbedtls_x509_get_rsassa_pss_params()
/third_party/openssl/apps/
Dpasswd.c323 size_t passwd_len, salt_len, magic_len; in md5crypt() local
337 salt_len = strlen(ascii_salt); in md5crypt()
339 ebcdic2ascii(ascii_salt, ascii_salt, salt_len); in md5crypt()
369 if (salt_len > 8) in md5crypt()
384 if (!EVP_DigestUpdate(md, ascii_salt, salt_len)) in md5crypt()
391 || !EVP_DigestUpdate(md2, ascii_salt, salt_len) in md5crypt()
420 if (!EVP_DigestUpdate(md2, ascii_salt, salt_len)) in md5crypt()
456 output = salt_out + salt_len; in md5crypt()
517 size_t passwd_len, salt_len, magic_len; in shacrypt() local
570 salt_len = strlen(ascii_salt); in shacrypt()
[all …]
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/tls/
Dpkcs5.c27 size_t salt_len; member
179 params->salt_len = hdr.length; in pkcs5_get_params_pbes2()
180 wpa_hexdump(MSG_DEBUG, "PKCS #5: salt", params->salt, params->salt_len); in pkcs5_get_params_pbes2()
327 params->salt_len = hdr.length; in pkcs5_get_params()
329 params->salt, params->salt_len); in pkcs5_get_params()
373 params->salt, params->salt_len); in pkcs5_crypto_init_pbes2()
376 if (pbkdf2_sha1(passwd, params->salt, params->salt_len, in pkcs5_crypto_init_pbes2()
401 size_t salt_len, u8 id, unsigned int iter, in pkcs12_key_gen() argument
419 S_len = v * ((salt_len + v - 1) / v); in pkcs12_key_gen()
425 if (salt_len) { in pkcs12_key_gen()
[all …]
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/tls/
Dpkcs5.c27 size_t salt_len; member
187 params->salt_len = hdr.length; in pkcs5_get_params_pbes2()
188 wpa_hexdump(MSG_DEBUG, "PKCS #5: salt", params->salt, params->salt_len); in pkcs5_get_params_pbes2()
348 params->salt_len = hdr.length; in pkcs5_get_params()
350 params->salt, params->salt_len); in pkcs5_get_params()
395 params->salt, params->salt_len); in pkcs5_crypto_init_pbes2()
398 if (pbkdf2_sha1(passwd, params->salt, params->salt_len, in pkcs5_crypto_init_pbes2()
423 size_t salt_len, u8 id, unsigned int iter, in pkcs12_key_gen() argument
441 S_len = v * ((salt_len + v - 1) / v); in pkcs12_key_gen()
447 if (salt_len) { in pkcs12_key_gen()
[all …]
/third_party/mbedtls/tests/suites/
Dtest_suite_hkdf.function41 size_t ikm_len, salt_len, prk_len, output_prk_len;
50 salt = mbedtls_test_unhexify_alloc( hex_salt_string, &salt_len );
53 ret = mbedtls_hkdf_extract( md, salt, salt_len, ikm, ikm_len, output_prk );
109 size_t salt_len, ikm_len;
117 salt_len = 0;
120 output_ret = mbedtls_hkdf_extract( &fake_md_info, salt, salt_len,
Dtest_suite_pkcs12.function32 size_t salt_len = 0;
43 salt_len = salt_arg->len;
52 salt_len,
Dtest_suite_pk.data167 Verify ext RSA #1 (PKCS1 v2.1, salt_len = ANY, OK)
171 Verify ext RSA #2 (PKCS1 v2.1, salt_len = ANY, wrong message)
175 Verify ext RSA #3 (PKCS1 v2.1, salt_len = 0, OK)
179 Verify ext RSA #4 (PKCS1 v2.1, salt_len = max, OK)
183 Verify ext RSA #5 (PKCS1 v2.1, wrong salt_len)
/third_party/mindspore/mindspore/ccsrc/fl/armour/secure_protocol/
Dkey_agreement.cc43 int salt_len, uint8_t *exchangeKey) { in ComputeSharedKey() argument
79 …rivateKey::Exchange(PublicKey *peerPublicKey, int key_len, const unsigned char *salt, int salt_len,
89 if (salt == nullptr || salt_len != SALT_LEN) {
131 …if (!PKCS5_PBKDF2_HMAC(reinterpret_cast<char *>(secret), len, salt, salt_len, ITERATION, EVP_sha25…
223 const unsigned char *salt, int salt_len, uint8_t *exchangeKey) {
228 return privKey->Exchange(peerPublicKey, key_len, salt, salt_len, exchangeKey);
Dkey_agreement.h49 int Exchange(PublicKey *peerPublicKey, int key_len, const unsigned char *salt, int salt_len,
64 int salt_len, unsigned char *exchangeKey);
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/eap_peer/
Deap_pwd.c368 u8 salt_len, salthashpwd[64]; /* 64 = SHA512_DIGEST_LENGTH */ in eap_pwd_perform_commit_exchange() local
431 salt_len = *ptr++; in eap_pwd_perform_commit_exchange()
432 exp_len = 1 + salt_len + 2 * prime_len + order_len; in eap_pwd_perform_commit_exchange()
444 wpa_hexdump(MSG_DEBUG, "EAP-pwd: Salt", ptr, salt_len); in eap_pwd_perform_commit_exchange()
448 salt_pwd_len[1] = salt_len; in eap_pwd_perform_commit_exchange()
454 (int) salt_len); in eap_pwd_perform_commit_exchange()
455 ptr += salt_len; in eap_pwd_perform_commit_exchange()
468 salt_len = *ptr++; in eap_pwd_perform_commit_exchange()
469 exp_len = 1 + salt_len + 2 * prime_len + order_len; in eap_pwd_perform_commit_exchange()
481 wpa_hexdump(MSG_DEBUG, "EAP-pwd: Salt", ptr, salt_len); in eap_pwd_perform_commit_exchange()
[all …]
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/eap_peer/
Deap_pwd.c368 u8 salt_len, salthashpwd[64]; /* 64 = SHA512_DIGEST_LENGTH */ in eap_pwd_perform_commit_exchange() local
431 salt_len = *ptr++; in eap_pwd_perform_commit_exchange()
432 exp_len = 1 + salt_len + 2 * prime_len + order_len; in eap_pwd_perform_commit_exchange()
444 wpa_hexdump(MSG_DEBUG, "EAP-pwd: Salt", ptr, salt_len); in eap_pwd_perform_commit_exchange()
448 salt_pwd_len[1] = salt_len; in eap_pwd_perform_commit_exchange()
454 (int) salt_len); in eap_pwd_perform_commit_exchange()
455 ptr += salt_len; in eap_pwd_perform_commit_exchange()
468 salt_len = *ptr++; in eap_pwd_perform_commit_exchange()
469 exp_len = 1 + salt_len + 2 * prime_len + order_len; in eap_pwd_perform_commit_exchange()
481 wpa_hexdump(MSG_DEBUG, "EAP-pwd: Salt", ptr, salt_len); in eap_pwd_perform_commit_exchange()
[all …]
/third_party/mbedtls/include/mbedtls/
Dhkdf.h69 size_t salt_len, const unsigned char *ikm, size_t ikm_len,
98 const unsigned char *salt, size_t salt_len,
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/eap_server/
Deap_server_pwd.c31 size_t salt_len; member
121 data->salt_len = sm->user->salt_len; in eap_pwd_init()
122 if (data->salt_len) { in eap_pwd_init()
123 data->salt = os_memdup(sm->user->salt, sm->user->salt_len); in eap_pwd_init()
156 bin_clear_free(data->salt, data->salt_len); in eap_pwd_reset()
194 if (data->salt_len) in eap_pwd_build_id_req()
196 data->salt, data->salt_len); in eap_pwd_build_id_req()
202 if (data->salt_len) { in eap_pwd_build_id_req()
283 (data->salt ? 1 + data->salt_len : 0)); in eap_pwd_build_commit_req()
288 if (data->salt_len) { in eap_pwd_build_commit_req()
[all …]
Deap.h35 size_t salt_len; member
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/eap_server/
Deap_server_pwd.c31 size_t salt_len; member
121 data->salt_len = sm->user->salt_len; in eap_pwd_init()
122 if (data->salt_len) { in eap_pwd_init()
123 data->salt = os_memdup(sm->user->salt, sm->user->salt_len); in eap_pwd_init()
156 bin_clear_free(data->salt, data->salt_len); in eap_pwd_reset()
194 if (data->salt_len) in eap_pwd_build_id_req()
196 data->salt, data->salt_len); in eap_pwd_build_id_req()
202 if (data->salt_len) { in eap_pwd_build_id_req()
283 (data->salt ? 1 + data->salt_len : 0)); in eap_pwd_build_commit_req()
288 if (data->salt_len) { in eap_pwd_build_commit_req()
[all …]
/third_party/gstreamer/gstplugins_base/gst-libs/gst/sdp/
Dgstmikey.c633 guint16 salt_len, const guint8 * salt_data) in gst_mikey_payload_key_data_set_salt() argument
639 g_return_val_if_fail ((salt_len == 0 && salt_data == NULL) || in gst_mikey_payload_key_data_set_salt()
640 (salt_len > 0 && salt_data != NULL), FALSE); in gst_mikey_payload_key_data_set_salt()
642 p->salt_len = salt_len; in gst_mikey_payload_key_data_set_salt()
643 INIT_MEMDUP (p->salt_data, salt_data, salt_len); in gst_mikey_payload_key_data_set_salt()
736 gst_mikey_payload_key_data_set_salt (&copy->pt, payload->salt_len, in gst_mikey_payload_key_data_copy()
1607 ((p->key_type | (p->salt_len ? 1 : 0)) << 4) | (p->kv_type & 0xf); in payloads_to_bytes()
1612 if (p->salt_len > 0) { in payloads_to_bytes()
1613 ENSURE_SIZE (2 + p->salt_len); in payloads_to_bytes()
1614 GST_WRITE_UINT16_BE (&data[0], p->salt_len); in payloads_to_bytes()
[all …]
Dgstmikey.h523 guint16 salt_len; member
537 guint16 salt_len, const guint8 *salt_data);
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/ap/
Dauthsrv.c80 if (eap_user->salt && eap_user->salt_len) { in hostapd_radius_get_eap_user()
82 eap_user->salt_len); in hostapd_radius_get_eap_user()
85 user->salt_len = eap_user->salt_len; in hostapd_radius_get_eap_user()
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/ap/
Dauthsrv.c80 if (eap_user->salt && eap_user->salt_len) { in hostapd_radius_get_eap_user()
82 eap_user->salt_len); in hostapd_radius_get_eap_user()
85 user->salt_len = eap_user->salt_len; in hostapd_radius_get_eap_user()
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/common/
Dsae.c533 static int hkdf_extract(size_t hash_len, const u8 *salt, size_t salt_len, in hkdf_extract() argument
538 return hmac_sha256_vector(salt, salt_len, num_elem, addr, len, in hkdf_extract()
542 return hmac_sha384_vector(salt, salt_len, num_elem, addr, len, in hkdf_extract()
547 return hmac_sha512_vector(salt, salt_len, num_elem, addr, len, in hkdf_extract()
1526 size_t hash_len, salt_len, prime_len = sae->tmp->prime_len; in sae_derive_keys() local
1554 salt_len = 0; in sae_derive_keys()
1556 salt_len += wpabuf_len(own); in sae_derive_keys()
1558 salt_len += wpabuf_len(peer); in sae_derive_keys()
1559 rejected_groups = wpabuf_alloc(salt_len); in sae_derive_keys()
1574 salt_len = wpabuf_len(rejected_groups); in sae_derive_keys()
[all …]

12