| /freebsd-12.1/contrib/wpa/src/tls/ |
| H A D | tlsv1_record.c | 155 struct crypto_hash *hmac; in tlsv1_record_send() local 209 if (hmac == NULL) { in tlsv1_record_send() 216 crypto_hash_update(hmac, ct_start, TLS_RECORD_HEADER_LEN); in tlsv1_record_send() 217 crypto_hash_update(hmac, payload, payload_len); in tlsv1_record_send() 222 crypto_hash_finish(hmac, NULL, NULL); in tlsv1_record_send() 226 if (crypto_hash_finish(hmac, pos, &clen) < 0) { in tlsv1_record_send() 284 struct crypto_hash *hmac; in tlsv1_record_receive() local 438 if (hmac == NULL) { in tlsv1_record_receive() 449 crypto_hash_update(hmac, len, 2); in tlsv1_record_receive() 450 crypto_hash_update(hmac, out_data, plen); in tlsv1_record_receive() [all …]
|
| /freebsd-12.1/tools/regression/ipsec/ |
| H A D | ipsec6.t | 55 hmac-md5:0123456789012345 \ 56 hmac-sha1:01234567890123456789 \ 57 hmac-ripemd160:01234567890123456789 \ 58 hmac-sha2-256:01234567890123456789012345678901 \ 59 hmac-sha2-384:012345678901234567890123456789012345678901234567 \ 60 hmac-sha2-512:0123456789012345678901234567890123456789012345678901234567890123; do
|
| H A D | ipsec.t | 55 hmac-md5:0123456789012345 \ 56 hmac-sha1:01234567890123456789 \ 57 hmac-ripemd160:01234567890123456789 \ 58 hmac-sha2-256:01234567890123456789012345678901 \ 59 hmac-sha2-384:012345678901234567890123456789012345678901234567 \ 60 hmac-sha2-512:0123456789012345678901234567890123456789012345678901234567890123; do
|
| /freebsd-12.1/sbin/setkey/ |
| H A D | sample.cf | 54 -A hmac-sha1 "this is the test key" ; 58 -A hmac-sha1 "this is the test key" ; 104 # is hmac-sha1. Authentication algorithm for AH is hmac-md5. 122 -A hmac-sha1 "this is the test key" ; 125 -A hmac-md5 "this is the test" ; 129 -A hmac-sha1 "this is the test key" ; 132 -A hmac-md5 "this is the test" ; 136 # for ESP is hmac-sha1. 139 # for ESP is hmac-md5. 160 -A hmac-md5 "this is the test" ; [all …]
|
| /freebsd-12.1/tests/sys/geom/class/eli/ |
| H A D | conf.sh | 43 for aalgo in hmac/sha1 hmac/ripemd160 hmac/sha256 \ 44 hmac/sha384 hmac/sha512; do
|
| /freebsd-12.1/crypto/openssl/crypto/kdf/ |
| H A D | hkdf.c | 295 HMAC_CTX *hmac; in HKDF_Expand() local 311 if ((hmac = HMAC_CTX_new()) == NULL) in HKDF_Expand() 314 if (!HMAC_Init_ex(hmac, prk, prk_len, evp_md, NULL)) in HKDF_Expand() 322 if (!HMAC_Init_ex(hmac, NULL, 0, NULL, NULL)) in HKDF_Expand() 325 if (!HMAC_Update(hmac, prev, dig_len)) in HKDF_Expand() 329 if (!HMAC_Update(hmac, info, info_len)) in HKDF_Expand() 332 if (!HMAC_Update(hmac, &ctr, 1)) in HKDF_Expand() 335 if (!HMAC_Final(hmac, prev, NULL)) in HKDF_Expand() 350 HMAC_CTX_free(hmac); in HKDF_Expand()
|
| /freebsd-12.1/crypto/openssl/crypto/pkcs12/ |
| H A D | p12_mutl.c | 80 HMAC_CTX *hmac = NULL; in pkcs12_gen_mac() local 128 if ((hmac = HMAC_CTX_new()) == NULL in pkcs12_gen_mac() 129 || !HMAC_Init_ex(hmac, key, md_size, md_type, NULL) in pkcs12_gen_mac() 130 || !HMAC_Update(hmac, p12->authsafes->d.data->data, in pkcs12_gen_mac() 132 || !HMAC_Final(hmac, mac, maclen)) { in pkcs12_gen_mac() 139 HMAC_CTX_free(hmac); in pkcs12_gen_mac()
|
| /freebsd-12.1/sys/dev/cxgbe/crypto/ |
| H A D | t4_crypto.c | 452 axf = s->hmac.auth_hash; in ccr_hash() 533 memcpy(crwr->key_ctx.key, s->hmac.ipad, s->hmac.partial_digest_len); in ccr_hash() 829 axf = s->hmac.auth_hash; in ccr_authenc() 1072 memcpy(dst, s->hmac.ipad, s->hmac.partial_digest_len); in ccr_authenc() 1073 memcpy(dst + iopad_size, s->hmac.opad, s->hmac.partial_digest_len); in ccr_authenc() 2286 memcpy(s->hmac.opad, s->hmac.ipad, axf->blocksize); in ccr_init_hmac_digest() 2428 bool gcm_hash, hmac; in ccr_newsession() local 2434 hmac = false; in ccr_newsession() 2515 hmac = true; in ccr_newsession() 2603 if (hmac) in ccr_newsession() [all …]
|
| /freebsd-12.1/sys/crypto/ccp/ |
| H A D | ccp.c | 318 axf = s->hmac.auth_hash; in ccp_init_hmac_digest() 323 axf->Final(s->hmac.ipad, &auth_ctx); in ccp_init_hmac_digest() 327 memcpy(s->hmac.ipad, key, klen); in ccp_init_hmac_digest() 330 memcpy(s->hmac.opad, s->hmac.ipad, axf->blocksize); in ccp_init_hmac_digest() 333 s->hmac.ipad[i] ^= HMAC_IPAD_VAL; in ccp_init_hmac_digest() 334 s->hmac.opad[i] ^= HMAC_OPAD_VAL; in ccp_init_hmac_digest() 535 s->hmac.auth_hash = auth_hash; in ccp_newsession() 536 s->hmac.auth_mode = auth_mode; in ccp_newsession() 537 s->hmac.partial_digest_len = partial_digest_len; in ccp_newsession() 539 s->hmac.hash_len = auth_hash->hashsize; in ccp_newsession() [all …]
|
| H A D | ccp_hardware.c | 1210 axf = s->hmac.auth_hash; in ccp_do_hmac_done() 1221 axf->Update(&auth_ctx, s->hmac.opad, axf->blocksize); in ccp_do_hmac_done() 1222 ccp_sha_copy_result(ihash, s->hmac.ipad, s->hmac.auth_mode); in ccp_do_hmac_done() 1228 axf->Final(s->hmac.ipad, &auth_ctx); in ccp_do_hmac_done() 1231 s->hmac.hash_len, s->hmac.ipad); in ccp_do_hmac_done() 1235 explicit_bzero(s->hmac.ipad, sizeof(s->hmac.ipad)); in ccp_do_hmac_done() 1236 explicit_bzero(s->hmac.opad, sizeof(s->hmac.opad)); in ccp_do_hmac_done() 1263 axf = s->hmac.auth_hash; in ccp_do_hmac() 1271 error = sglist_append(qp->cq_sg_ulptx, s->hmac.ipad, axf->blocksize); in ccp_do_hmac() 1282 error = sglist_append(qp->cq_sg_dst, s->hmac.ipad, in ccp_do_hmac() [all …]
|
| /freebsd-12.1/contrib/ldns/ |
| H A D | keys.c | 465 unsigned char *hmac; in ldns_key_new_frm_fp_l() local 685 if (!hmac) { in ldns_key_new_frm_fp_l() 1143 unsigned char *hmac; in ldns_key_new_frm_algorithm() local 1247 LDNS_FREE(hmac); in ldns_key_new_frm_algorithm() 1453 k->_key.hmac.key = hmac; in ldns_key_set_hmac_key() 1576 if (k->_key.hmac.key) { in ldns_key_hmac_key() 1577 return k->_key.hmac.key; in ldns_key_hmac_key() 1586 if (k->_key.hmac.size) { in ldns_key_hmac_size() 1587 return k->_key.hmac.size; in ldns_key_hmac_size() 2073 unsigned char* hmac; in ldns_key_deep_free() local [all …]
|
| /freebsd-12.1/contrib/wpa/src/eap_common/ |
| H A D | eap_sim_common.c | 168 unsigned char hmac[SHA1_MAC_LEN]; in eap_sim_verify_mac() local 195 hmac_sha1_vector(k_aut, EAP_SIM_K_AUT_LEN, 2, addr, len, hmac); in eap_sim_verify_mac() 197 hmac, EAP_SIM_MAC_LEN); in eap_sim_verify_mac() 200 return (os_memcmp_const(hmac, mac, EAP_SIM_MAC_LEN) == 0) ? 0 : 1; in eap_sim_verify_mac() 207 unsigned char hmac[SHA1_MAC_LEN]; in eap_sim_add_mac() local 223 hmac_sha1_vector(k_aut, EAP_SIM_K_AUT_LEN, 2, addr, len, hmac); in eap_sim_add_mac() 224 os_memcpy(mac, hmac, EAP_SIM_MAC_LEN); in eap_sim_add_mac() 362 unsigned char hmac[SHA256_MAC_LEN]; in eap_sim_verify_mac_sha256() local 391 hmac, EAP_SIM_MAC_LEN); in eap_sim_verify_mac_sha256() 401 unsigned char hmac[SHA256_MAC_LEN]; in eap_sim_add_mac_sha256() local [all …]
|
| /freebsd-12.1/tests/sys/netipsec/tunnel/ |
| H A D | aes_cbc_256_hmac_sha2_256.sh | 17 …ist_test 4 rijndael-cbc "12345678901234567890123456789012" hmac-sha2-256 "123456789012345678901234… 37 …ist_test 6 rijndael-cbc "12345678901234567890123456789012" hmac-sha2-256 "123456789012345678901234…
|
| H A D | aesni_aes_cbc_128_hmac_sha1.sh | 17 ist_test 4 rijndael-cbc "1234567890123456" hmac-sha1 "12345678901234567890" 37 ist_test 6 rijndael-cbc "1234567890123456" hmac-sha1 "12345678901234567890"
|
| H A D | aes_cbc_128_hmac_sha1.sh | 17 ist_test 4 rijndael-cbc "1234567890123456" hmac-sha1 "12345678901234567890" 37 ist_test 6 rijndael-cbc "1234567890123456" hmac-sha1 "12345678901234567890"
|
| H A D | aesni_aes_cbc_256_hmac_sha2_256.sh | 17 …ist_test 4 rijndael-cbc "12345678901234567890123456789012" hmac-sha2-256 "123456789012345678901234… 37 …ist_test 6 rijndael-cbc "12345678901234567890123456789012" hmac-sha2-256 "123456789012345678901234…
|
| /freebsd-12.1/contrib/netbsd-tests/crypto/libcrypto/ |
| H A D | t_hashes.sh | 28 atf_test_case hmac 101 atf_add_test_case hmac
|
| /freebsd-12.1/crypto/heimdal/lib/gssapi/ntlm/ |
| H A D | crypto.c | 149 unsigned char hmac[16]; in v2_sign_message() local 158 encode_le_uint32(seq, hmac); in v2_sign_message() 159 HMAC_Update(c, hmac, 4); in v2_sign_message() 161 HMAC_Final(c, hmac, &hmaclen); in v2_sign_message() 166 RC4(sealkey, 8, hmac, &out[4]); in v2_sign_message() 168 memcpy(&out[4], hmac, 8); in v2_sign_message()
|
| /freebsd-12.1/sys/netinet/ |
| H A D | sctp_auth.c | 683 if (list->hmac[i] == hmac_id) { in sctp_auth_add_hmacid() 689 list->hmac[list->num_algo++] = hmac_id; in sctp_auth_add_hmacid() 709 new_list->hmac[i] = list->hmac[i]; in sctp_copy_hmaclist() 741 if (peer->hmac[i] == local->hmac[j]) { in sctp_negotiate_hmacid() 745 peer->hmac[i]); in sctp_negotiate_hmacid() 746 return (peer->hmac[i]); in sctp_negotiate_hmacid() 768 hmac_id = htons(list->hmac[i]); in sctp_serialize_hmaclist() 1143 if (list->hmac[i] == id) in sctp_auth_is_supported_hmac() 1559 m, auth_offset, auth->hmac); in sctp_fill_hmac_digest_m() 1703 memcpy(digest, auth->hmac, digestlen); in sctp_handle_auth() [all …]
|
| /freebsd-12.1/sys/mips/nlm/hal/ |
| H A D | nlmsaelib.h | 220 nlm_crypto_form_pkt_ctrl_desc(unsigned int hmac, unsigned int hashalg, in nlm_crypto_form_pkt_ctrl_desc() argument 225 return (left_shift64(hmac, 61, 1) | in nlm_crypto_form_pkt_ctrl_desc() 462 nlm_crypto_fill_pkt_ctrl(struct nlm_crypto_pkt_ctrl *ctrl, unsigned int hmac, in nlm_crypto_fill_pkt_ctrl() argument 470 ctrl->desc0 = nlm_crypto_form_pkt_ctrl_desc(hmac, hashalg, hashmode, in nlm_crypto_fill_pkt_ctrl()
|
| /freebsd-12.1/crypto/openssh/ |
| H A D | ssh_config | 40 # MACs hmac-md5,hmac-sha1,[email protected]
|
| /freebsd-12.1/tools/tools/crypto/ |
| H A D | cryptocheck.c | 233 assert(hmac->type == T_HMAC); in build_authenc() 238 authenc.mac = hmac->mac; in build_authenc() 241 authenc.evp_md = hmac->evp_md; in build_authenc() 248 struct alg *cipher, *hmac; in build_authenc_name() local 259 hmac = find_alg(hmac_name); in build_authenc_name() 260 if (hmac == NULL) in build_authenc_name() 262 return (build_authenc(cipher, hmac)); in build_authenc_name() 1452 struct alg *authenc, *cipher, *hmac; in run_authenc_tests() local 1460 hmac = &algs[j]; in run_authenc_tests() 1461 if (hmac->type != T_HMAC) in run_authenc_tests() [all …]
|
| /freebsd-12.1/contrib/wpa/src/crypto/ |
| H A D | crypto_libtomcrypt.c | 149 hmac_state hmac; member 175 if (hmac_init(&ctx->u.hmac, find_hash("md5"), key, key_len) != in crypto_hash_init() 180 if (hmac_init(&ctx->u.hmac, find_hash("sha1"), key, key_len) != in crypto_hash_init() 209 ctx->error = hmac_process(&ctx->u.hmac, data, len) != CRYPT_OK; in crypto_hash_update() 268 if (hmac_done(&ctx->u.hmac, mac, &clen) != CRYPT_OK) { in crypto_hash_finish()
|
| /freebsd-12.1/sys/crypto/aesni/ |
| H A D | aesni.c | 893 bool hmac; in aesni_cipher_mac() local 906 hmac = false; in aesni_cipher_mac() 909 hmac = true; in aesni_cipher_mac() 920 hmac = true; in aesni_cipher_mac() 931 hmac = true; in aesni_cipher_mac() 948 if (hmac) { in aesni_cipher_mac()
|
| /freebsd-12.1/crypto/openssl/crypto/hmac/ |
| H A D | build.info | 3 hmac.c hm_ameth.c hm_pmeth.c
|