Home
last modified time | relevance | path

Searched refs:salt (Results 1 – 14 of 14) sorted by relevance

/hostap-3.6.0/src/tls/
Dpkcs5.c26 u8 salt[64]; member
172 hdr.length > sizeof(params->salt)) { in pkcs5_get_params_pbes2()
178 os_memcpy(params->salt, hdr.payload, 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()
320 !asn1_is_octetstring(&hdr) || hdr.length > sizeof(params->salt)) { in pkcs5_get_params()
326 os_memcpy(params->salt, hdr.payload, 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()
400 static int pkcs12_key_gen(const u8 *pw, size_t pw_len, const u8 *salt, in pkcs12_key_gen() argument
[all …]
/hostap-3.6.0/src/common/
Ddpp_backup.c214 static struct wpabuf * dpp_build_pbkdf2_alg_id(const struct wpabuf *salt, in dpp_build_pbkdf2_alg_id() argument
245 params = wpabuf_alloc(100 + wpabuf_len(salt) + wpabuf_len(prf)); in dpp_build_pbkdf2_alg_id()
248 asn1_put_octet_string(params, salt); /* salt.specified */ in dpp_build_pbkdf2_alg_id()
268 *key_enc_alg = NULL, *salt; in dpp_build_pw_recipient_info() local
274 salt = wpabuf_alloc(64); in dpp_build_pw_recipient_info()
275 if (!salt || os_get_random(wpabuf_put(salt, 64), 64) < 0) in dpp_build_pw_recipient_info()
277 wpa_hexdump_buf(MSG_DEBUG, "DPP: PBKDF2 salt", salt); in dpp_build_pw_recipient_info()
287 if (dpp_pbkdf2(hash_len, key, key_len, wpabuf_head(salt), 64, 1000, in dpp_build_pw_recipient_info()
314 key_der_alg = dpp_build_pbkdf2_alg_id(salt, hash_len); in dpp_build_pw_recipient_info()
341 wpabuf_free(salt); in dpp_build_pw_recipient_info()
[all …]
Ddpp_crypto.c166 const u8 *salt, size_t salt_len, in dpp_pbkdf2_f() argument
176 addr[0] = salt; in dpp_pbkdf2_f()
207 const u8 *salt, size_t salt_len, unsigned int iterations, in dpp_pbkdf2() argument
218 salt, salt_len, iterations, count, digest)) in dpp_pbkdf2()
370 u8 salt[DPP_MAX_HASH_LEN], prk[DPP_MAX_HASH_LEN]; in dpp_derive_k1() local
377 os_memset(salt, 0, hash_len); in dpp_derive_k1()
378 if (dpp_hmac(hash_len, salt, hash_len, Mx, Mx_len, prk) < 0) in dpp_derive_k1()
397 u8 salt[DPP_MAX_HASH_LEN], prk[DPP_MAX_HASH_LEN]; in dpp_derive_k2() local
404 os_memset(salt, 0, hash_len); in dpp_derive_k2()
405 res = dpp_hmac(hash_len, salt, hash_len, Nx, Nx_len, prk); in dpp_derive_k2()
[all …]
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()
1144 u8 salt[64], hash[64]; in sae_derive_pwe_from_pt_ecc() local
1164 os_memset(salt, 0, hash_len); in sae_derive_pwe_from_pt_ecc()
1165 if (hkdf_extract(hash_len, salt, hash_len, 2, addr, len, hash) < 0) in sae_derive_pwe_from_pt_ecc()
1208 u8 salt[64], hash[64]; in sae_derive_pwe_from_pt_ffc() local
1226 os_memset(salt, 0, hash_len); in sae_derive_pwe_from_pt_ffc()
1227 if (hkdf_extract(hash_len, salt, hash_len, 2, addr, len, hash) < 0) in sae_derive_pwe_from_pt_ffc()
[all …]
Ddpp_i.h93 const u8 *salt, size_t salt_len, unsigned int iterations,
/hostap-3.6.0/src/radius/
Dradius.c1059 static void encrypt_ms_key(const u8 *key, size_t key_len, u16 salt, in encrypt_ms_key() argument
1069 WPA_PUT_BE16(saltbuf, salt); in encrypt_ms_key()
1199 u16 salt; in radius_msg_add_mppe_keys() local
1214 if (os_get_random((u8 *) &salt, sizeof(salt)) < 0) { in radius_msg_add_mppe_keys()
1218 salt |= 0x8000; in radius_msg_add_mppe_keys()
1219 WPA_PUT_BE16(pos, salt); in radius_msg_add_mppe_keys()
1221 encrypt_ms_key(send_key, send_key_len, salt, req_authenticator, secret, in radius_msg_add_mppe_keys()
1243 salt ^= 1; in radius_msg_add_mppe_keys()
1244 WPA_PUT_BE16(pos, salt); in radius_msg_add_mppe_keys()
1246 encrypt_ms_key(recv_key, recv_key_len, salt, req_authenticator, secret, in radius_msg_add_mppe_keys()
[all …]
/hostap-3.6.0/src/ap/
Dauthsrv.c80 if (eap_user->salt && eap_user->salt_len) { in hostapd_radius_get_eap_user()
81 user->salt = os_memdup(eap_user->salt, in hostapd_radius_get_eap_user()
83 if (!user->salt) in hostapd_radius_get_eap_user()
Dieee802_1x.c2292 if (eap_user->salt && eap_user->salt_len) { in ieee802_1x_get_eap_user()
2293 user->salt = os_memdup(eap_user->salt, in ieee802_1x_get_eap_user()
2295 if (!user->salt) in ieee802_1x_get_eap_user()
Dap_config.h179 u8 *salt; member
Dap_config.c647 bin_clear_free(user->salt, user->salt_len); in hostapd_config_free_eap_user()
/hostap-3.6.0/src/eap_server/
Deap_server_pwd.c30 u8 *salt; member
123 data->salt = os_memdup(sm->user->salt, sm->user->salt_len); in eap_pwd_init()
124 if (!data->salt) { in eap_pwd_init()
156 bin_clear_free(data->salt, data->salt_len); in eap_pwd_reset()
196 data->salt, data->salt_len); in eap_pwd_build_id_req()
283 (data->salt ? 1 + data->salt_len : 0)); in eap_pwd_build_commit_req()
290 wpabuf_put_data(data->outbuf, data->salt, data->salt_len); in eap_pwd_build_commit_req()
Deap.h34 u8 *salt; member
Deap_server.c1838 bin_clear_free(user->salt, user->salt_len); in eap_user_free()
1839 user->salt = NULL; in eap_user_free()
/hostap-3.6.0/hostapd/
Dconfig_file.c277 user->salt = os_malloc(user->salt_len); in hostapd_config_eap_user_salted()
278 if (!user->salt) { in hostapd_config_eap_user_salted()
285 if (hexstr2bin(*pos, user->salt, user->salt_len) < 0) { in hostapd_config_eap_user_salted()