Home | History | Annotate | Download | only in common

Lines Matching refs:hash_len

279 	if (curve->hash_len == 32)
281 if (curve->hash_len == 48)
283 if (curve->hash_len == 64)
289 static int dpp_hkdf_expand(size_t hash_len, const u8 *secret, size_t secret_len,
292 if (hash_len == 32)
296 if (hash_len == 48)
300 if (hash_len == 64)
308 static int dpp_hmac_vector(size_t hash_len, const u8 *key, size_t key_len,
312 if (hash_len == 32)
315 if (hash_len == 48)
318 if (hash_len == 64)
325 static int dpp_hmac(size_t hash_len, const u8 *key, size_t key_len,
328 if (hash_len == 32)
330 if (hash_len == 48)
332 if (hash_len == 64)
1226 unsigned int hash_len)
1235 os_memset(salt, 0, hash_len);
1236 if (dpp_hmac(hash_len, salt, hash_len, Mx, Mx_len, prk) < 0)
1239 prk, hash_len);
1242 res = dpp_hkdf_expand(hash_len, prk, hash_len, info, k1, hash_len);
1243 os_memset(prk, 0, hash_len);
1248 k1, hash_len);
1254 unsigned int hash_len)
1263 os_memset(salt, 0, hash_len);
1264 res = dpp_hmac(hash_len, salt, hash_len, Nx, Nx_len, prk);
1268 prk, hash_len);
1271 res = dpp_hkdf_expand(hash_len, prk, hash_len, info, k2, hash_len);
1272 os_memset(prk, 0, hash_len);
1277 k2, hash_len);
1283 unsigned int hash_len)
1311 res = dpp_hmac_vector(hash_len, nonces, 2 * nonce_len,
1316 prk, hash_len);
1319 res = dpp_hkdf_expand(hash_len, prk, hash_len, info_ke, ke, hash_len);
1320 os_memset(prk, 0, hash_len);
1325 ke, hash_len);
1393 auth->curve->hash_len) < 0)
1458 if (aes_siv_encrypt(auth->k1, auth->curve->hash_len, clear, siv_len,
1523 if (aes_siv_encrypt(auth->ke, auth->curve->hash_len,
1625 auth->curve->hash_len);
1708 auth->curve->hash_len);
1916 auth->curve->hash_len) < 0)
1925 if (dpp_derive_ke(auth, auth->ke, auth->curve->hash_len) < 0)
1930 WPA_PUT_LE16(&r_auth[2], auth->curve->hash_len);
1932 aes_siv_encrypt(auth->ke, auth->curve->hash_len,
1933 r_auth, 4 + auth->curve->hash_len,
1936 wrapped_r_auth_len = 4 + auth->curve->hash_len + AES_BLOCK_SIZE;
2023 if (aes_siv_encrypt(auth->k2, auth->curve->hash_len, clear, siv_len,
2122 if (aes_siv_encrypt(auth->k1, auth->curve->hash_len, clear, siv_len,
2214 auth->curve->hash_len) < 0)
2229 if (aes_siv_decrypt(auth->k1, auth->curve->hash_len,
2377 i_auth_len = 4 + auth->curve->hash_len;
2422 WPA_PUT_LE16(&i_auth[2], auth->curve->hash_len);
2424 aes_siv_encrypt(auth->ke, auth->curve->hash_len,
2481 if (aes_siv_decrypt(auth->k1, auth->curve->hash_len,
2657 auth->curve->hash_len) < 0)
2672 if (aes_siv_decrypt(auth->k2, auth->curve->hash_len,
2714 if (dpp_derive_ke(auth, auth->ke, auth->curve->hash_len) < 0)
2746 if (aes_siv_decrypt(auth->ke, auth->curve->hash_len,
2763 if (!r_auth || r_auth_len != auth->curve->hash_len) {
2888 if (aes_siv_decrypt(auth->ke, auth->curve->hash_len,
2905 if (!i_auth || i_auth_len != auth->curve->hash_len) {
3082 if (curve->hash_len == SHA256_MAC_LEN) {
3084 } else if (curve->hash_len == SHA384_MAC_LEN) {
3086 } else if (curve->hash_len == SHA512_MAC_LEN) {
3372 if (aes_siv_encrypt(auth->ke, auth->curve->hash_len,
3424 if (aes_siv_decrypt(auth->ke, auth->curve->hash_len,
4289 if (aes_siv_decrypt(auth->ke, auth->curve->hash_len,
4551 unsigned int hash_len)
4560 os_memset(salt, 0, hash_len);
4561 if (dpp_hmac(hash_len, salt, hash_len, Nx, Nx_len, prk) < 0)
4564 prk, hash_len);
4567 res = dpp_hkdf_expand(hash_len, prk, hash_len, info, pmk, hash_len);
4568 os_memset(prk, 0, hash_len);
4573 pmk, hash_len);
4758 if (dpp_derive_pmk(Nx, Nx_len, intro->pmk, curve->hash_len) < 0) {
4762 intro->pmk_len = curve->hash_len;
4870 hash, curve->hash_len);
4891 hash_bn = BN_bin2bn(hash, curve->hash_len, NULL);
4951 hash, curve->hash_len);
4972 hash_bn = BN_bin2bn(hash, curve->hash_len, NULL);
5348 u8 *z, unsigned int hash_len)
5359 os_memset(salt, 0, hash_len);
5360 if (dpp_hmac(hash_len, salt, hash_len, Kx, Kx_len, prk) < 0)
5363 prk, hash_len);
5380 if (hash_len == 32)
5381 res = hmac_sha256_kdf(prk, hash_len, NULL, info, info_len,
5382 z, hash_len);
5383 else if (hash_len == 48)
5384 res = hmac_sha384_kdf(prk, hash_len, NULL, info, info_len,
5385 z, hash_len);
5386 else if (hash_len == 64)
5387 res = hmac_sha512_kdf(prk, hash_len, NULL, info, info_len,
5388 z, hash_len);
5392 os_memset(prk, 0, hash_len);
5397 z, hash_len);
5526 if (dpp_hmac_vector(curve->hash_len, Jx, Jx_len, 4, addr, len, u) < 0)
5528 wpa_hexdump(MSG_DEBUG, "DPP: u", u, curve->hash_len);
5554 pkex->z, curve->hash_len);
5560 clear_len = 4 + 2 * curve->prime_len + 4 + curve->hash_len;
5574 wpabuf_put_le16(clear, curve->hash_len);
5575 wpabuf_put_data(clear, u, curve->hash_len);
5590 if (aes_siv_encrypt(pkex->z, curve->hash_len,
5665 Kx, Kx_len, pkex->z, curve->hash_len);
5693 if (aes_siv_decrypt(pkex->z, curve->hash_len,
5754 if (dpp_hmac_vector(curve->hash_len, Jx, Jx_len, 4, addr, len, u) < 0)
5759 if (!peer_u || peer_u_len != curve->hash_len ||
5760 os_memcmp(peer_u, u, curve->hash_len) != 0) {
5763 u, curve->hash_len);
5799 if (dpp_hmac_vector(curve->hash_len, Lx, Lx_len, 4, addr, len, v) < 0)
5801 wpa_hexdump(MSG_DEBUG, "DPP: v", v, curve->hash_len);
5804 clear_len = 4 + 2 * curve->prime_len + 4 + curve->hash_len;
5818 wpabuf_put_le16(clear, curve->hash_len);
5819 wpabuf_put_data(clear, v, curve->hash_len);
5834 if (aes_siv_encrypt(pkex->z, curve->hash_len,
5897 if (aes_siv_decrypt(pkex->z, curve->hash_len,
5957 if (dpp_hmac_vector(curve->hash_len, Lx, Lx_len, 4, addr, len, v) < 0)
5962 if (!peer_v || peer_v_len != curve->hash_len ||
5963 os_memcmp(peer_v, v, curve->hash_len) != 0) {
5966 v, curve->hash_len);