/freebsd/crypto/openssl/providers/implementations/rands/ |
H A D | drbg_hmac.c | 64 if (!EVP_MAC_init(ctx, hmac->K, hmac->blocklen, NULL) in do_hmac() 66 || !EVP_MAC_update(ctx, hmac->V, hmac->blocklen) in do_hmac() 75 return EVP_MAC_init(ctx, hmac->K, hmac->blocklen, NULL) in do_hmac() 76 && EVP_MAC_update(ctx, hmac->V, hmac->blocklen) in do_hmac() 135 memset(hmac->K, 0x00, hmac->blocklen); in drbg_hmac_instantiate() 137 memset(hmac->V, 0x01, hmac->blocklen); in drbg_hmac_instantiate() 216 if (!EVP_MAC_init(ctx, hmac->K, hmac->blocklen, NULL) in drbg_hmac_generate() 254 OPENSSL_cleanse(hmac->K, sizeof(hmac->K)); in drbg_hmac_uninstantiate() 255 OPENSSL_cleanse(hmac->V, sizeof(hmac->V)); in drbg_hmac_uninstantiate() 278 hmac = OPENSSL_secure_zalloc(sizeof(*hmac)); in drbg_hmac_new() [all …]
|
/freebsd/contrib/libfido2/tools/ |
H A D | test.sh | 54 dd if=/dev/urandom bs=32 count=1 | base64 > hmac-salt 148 get_assert no.tld "-h" wrap-cred hmac-salt wrap-assert 151 get_assert no.tld "-h -t pin=true" wrap-cred hmac-salt wrap-assert 155 get_assert no.tld "-h -t pin=false" wrap-cred hmac-salt wrap-assert 158 get_assert no.tld "-h -t up=true" wrap-cred hmac-salt wrap-assert 172 ! get_assert no.tld "-h -t up=false" wrap-cred hmac-salt wrap-assert 213 get_assert no.tld "-h -t uv=true" wrap-cred hmac-salt wrap-assert 219 get_assert no.tld "-h -t uv=false" wrap-cred hmac-salt wrap-assert 255 get_assert no.tld "-r -h" /dev/null hmac-salt wrap-assert 256 get_assert no.tld "-r -h -t pin=true" /dev/null hmac-salt wrap-assert [all …]
|
/freebsd/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/contrib/libfido2/src/ |
H A D | config.c | 17 config_prepare_hmac(uint8_t subcmd, const cbor_item_t *item, fido_blob_t *hmac) in config_prepare_hmac() argument 32 if ((hmac->ptr = malloc(cbor_len + sizeof(prefix))) == NULL) { in config_prepare_hmac() 36 memcpy(hmac->ptr, prefix, sizeof(prefix)); in config_prepare_hmac() 37 memcpy(hmac->ptr + sizeof(prefix), cbor, cbor_len); in config_prepare_hmac() 38 hmac->len = cbor_len + sizeof(prefix); in config_prepare_hmac() 49 fido_blob_t *ecdh = NULL, f, hmac; in config_tx() local 54 memset(&hmac, 0, sizeof(hmac)); in config_tx() 73 if (config_prepare_hmac(subcmd, argv[1], &hmac) < 0) { in config_tx() 81 if ((r = cbor_add_uv_params(dev, cmd, &hmac, pk, ecdh, pin, in config_tx() 102 free(hmac.ptr); in config_tx()
|
/freebsd/crypto/openssl/demos/mac/ |
H A D | Makefile | 14 all: gmac hmac-sha512 cmac-aes256 poly1305 17 hmac-sha512: hmac-sha512.o 21 gmac hmac-sha512 cmac-aes256 poly1305: 25 $(RM) gmac hmac-sha512 cmac-aes256 poly1305 *.o
|
/freebsd/sbin/setkey/ |
H A D | sample.cf | 78 -A hmac-sha2-256 "this is the test" ; 81 -A hmac-sha2-256 "this is the test" ; 95 -A hmac-sha2-256 "this is the test" ; 98 -A hmac-sha2-256 "this is the test" ; 103 # is hmac-sha2-512. Authentication algorithm for AH is hmac-sha2-256. 124 -A hmac-sha2-256 "this is the test" ; 131 -A hmac-sha2-256 "this is the test" ; 135 # for ESP is hmac-sha2-256. 138 # for ESP is hmac-sha2-512. 159 -A hmac-sha2-512 "this is the test" ; [all …]
|
/freebsd/tools/regression/ipsec/ |
H A D | ipsec6.t | 54 hmac-md5:0123456789012345 \ 55 hmac-sha1:01234567890123456789 \ 56 hmac-ripemd160:01234567890123456789 \ 57 hmac-sha2-256:01234567890123456789012345678901 \ 58 hmac-sha2-384:012345678901234567890123456789012345678901234567 \ 59 hmac-sha2-512:0123456789012345678901234567890123456789012345678901234567890123; do
|
H A D | ipsec.t | 54 hmac-md5:0123456789012345 \ 55 hmac-sha1:01234567890123456789 \ 56 hmac-ripemd160:01234567890123456789 \ 57 hmac-sha2-256:01234567890123456789012345678901 \ 58 hmac-sha2-384:012345678901234567890123456789012345678901234567 \ 59 hmac-sha2-512:0123456789012345678901234567890123456789012345678901234567890123; do
|
/freebsd/tests/sys/geom/class/eli/ |
H A D | conf.sh | 45 for aalgo in hmac/sha1 hmac/ripemd160 hmac/sha256 \ 46 hmac/sha384 hmac/sha512; do
|
/freebsd/sys/crypto/ccp/ |
H A D | ccp.c | 242 axf = s->hmac.auth_hash; in ccp_init_hmac_digest() 246 axf->Final(s->hmac.ipad, &auth_ctx); in ccp_init_hmac_digest() 250 memcpy(s->hmac.ipad, key, klen); in ccp_init_hmac_digest() 252 memset(s->hmac.ipad + klen, 0, axf->blocksize - klen); in ccp_init_hmac_digest() 253 memcpy(s->hmac.opad, s->hmac.ipad, axf->blocksize); in ccp_init_hmac_digest() 256 s->hmac.ipad[i] ^= HMAC_IPAD_VAL; in ccp_init_hmac_digest() 257 s->hmac.opad[i] ^= HMAC_OPAD_VAL; in ccp_init_hmac_digest() 491 s->hmac.auth_hash = auth_hash; in ccp_newsession() 492 s->hmac.auth_mode = auth_mode; in ccp_newsession() 494 s->hmac.hash_len = auth_hash->hashsize; in ccp_newsession() [all …]
|
/freebsd/crypto/openssl/crypto/pkcs12/ |
H A D | p12_mutl.c | 87 HMAC_CTX *hmac = NULL; in pkcs12_gen_mac() local 162 if ((hmac = HMAC_CTX_new()) == NULL in pkcs12_gen_mac() 163 || !HMAC_Init_ex(hmac, key, md_size, md, NULL) in pkcs12_gen_mac() 164 || !HMAC_Update(hmac, p12->authsafes->d.data->data, in pkcs12_gen_mac() 166 || !HMAC_Final(hmac, mac, maclen)) { in pkcs12_gen_mac() 173 HMAC_CTX_free(hmac); in pkcs12_gen_mac()
|
/freebsd/contrib/ldns/ |
H A D | keys.c | 428 unsigned char *hmac; in ldns_key_new_frm_fp_l() local 648 if (!hmac) { in ldns_key_new_frm_fp_l() 1102 unsigned char *hmac; in ldns_key_new_frm_algorithm() local 1206 LDNS_FREE(hmac); in ldns_key_new_frm_algorithm() 1400 k->_key.hmac.key = hmac; in ldns_key_set_hmac_key() 1523 if (k->_key.hmac.key) { in ldns_key_hmac_key() 1524 return k->_key.hmac.key; in ldns_key_hmac_key() 1533 if (k->_key.hmac.size) { in ldns_key_hmac_size() 1534 return k->_key.hmac.size; in ldns_key_hmac_size() 2056 unsigned char* hmac; in ldns_key_deep_free() local [all …]
|
/freebsd/tests/sys/netipsec/tunnel/ |
H A D | aes_cbc_128_hmac_sha1.sh | 16 ist_test 4 rijndael-cbc "1234567890123456" hmac-sha1 "12345678901234567890" 36 ist_test 6 rijndael-cbc "1234567890123456" hmac-sha1 "12345678901234567890"
|
H A D | aes_cbc_256_hmac_sha2_256.sh | 16 …ist_test 4 rijndael-cbc "12345678901234567890123456789012" hmac-sha2-256 "123456789012345678901234… 36 …ist_test 6 rijndael-cbc "12345678901234567890123456789012" hmac-sha2-256 "123456789012345678901234…
|
H A D | aesni_aes_cbc_128_hmac_sha1.sh | 16 ist_test 4 rijndael-cbc "1234567890123456" hmac-sha1 "12345678901234567890" 36 ist_test 6 rijndael-cbc "1234567890123456" hmac-sha1 "12345678901234567890"
|
H A D | aesni_aes_cbc_256_hmac_sha2_256.sh | 16 …ist_test 4 rijndael-cbc "12345678901234567890123456789012" hmac-sha2-256 "123456789012345678901234… 36 …ist_test 6 rijndael-cbc "12345678901234567890123456789012" hmac-sha2-256 "123456789012345678901234…
|
/freebsd/crypto/openssl/providers/implementations/kdfs/ |
H A D | hkdf.c | 510 HMAC_CTX *hmac; in HKDF_Expand() local 529 if ((hmac = HMAC_CTX_new()) == NULL) in HKDF_Expand() 532 if (!HMAC_Init_ex(hmac, prk, prk_len, evp_md, NULL)) in HKDF_Expand() 541 if (!HMAC_Init_ex(hmac, NULL, 0, NULL, NULL)) in HKDF_Expand() 544 if (!HMAC_Update(hmac, prev, dig_len)) in HKDF_Expand() 548 if (!HMAC_Update(hmac, info, info_len)) in HKDF_Expand() 551 if (!HMAC_Update(hmac, &ctr, 1)) in HKDF_Expand() 554 if (!HMAC_Final(hmac, prev, NULL)) in HKDF_Expand() 569 HMAC_CTX_free(hmac); in HKDF_Expand()
|
/freebsd/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/contrib/netbsd-tests/crypto/libcrypto/ |
H A D | t_hashes.sh | 28 atf_test_case hmac 101 atf_add_test_case hmac
|
/freebsd/sys/dev/cxgbe/crypto/ |
H A D | t4_crypto.c | 224 struct ccr_session_hmac hmac; member 490 axf = s->hmac.auth_hash; in ccr_hash() 564 V_SCMD_AUTH_MODE(s->hmac.auth_mode) | in ccr_hash() 848 axf = s->hmac.auth_hash; in ccr_eta() 849 hash_size_in_response = s->hmac.hash_len; in ccr_eta() 2052 axf = s->hmac.auth_hash; in ccr_init_hash_digest() 2115 mk_size = s->hmac.mk_size; in ccr_aes_setkey() 2474 s->hmac.auth_hash = auth_hash; in ccr_newsession() 2475 s->hmac.auth_mode = auth_mode; in ccr_newsession() 2476 s->hmac.mk_size = mk_size; in ccr_newsession() [all …]
|
/freebsd/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/contrib/libfido2/ |
H A D | NEWS | 4 ** winhello: fix restrictive parsing of the hmac-secret on assertions. 46 ** winhello: support hmac-secret in fido_dev_get_assert(). 155 ** Use CTAP2 canonical CBOR when combining hmac-secret and credProtect. 195 ** assert/hmac: encode public key as per spec, gh#60. 197 ** fido2-{assert,cred}: support for hmac-secret extension. 246 ** Added support for FIDO 2's hmac-secret extension.
|
/freebsd/sys/netinet/ |
H A D | sctp_auth.c | 670 if (list->hmac[i] == hmac_id) { in sctp_auth_add_hmacid() 676 list->hmac[list->num_algo++] = hmac_id; in sctp_auth_add_hmacid() 696 new_list->hmac[i] = list->hmac[i]; in sctp_copy_hmaclist() 728 if (peer->hmac[i] == local->hmac[j]) { in sctp_negotiate_hmacid() 732 peer->hmac[i]); in sctp_negotiate_hmacid() 733 return (peer->hmac[i]); in sctp_negotiate_hmacid() 755 hmac_id = htons(list->hmac[i]); in sctp_serialize_hmaclist() 1129 if (list->hmac[i] == id) in sctp_auth_is_supported_hmac() 1545 m, auth_offset, auth->hmac); in sctp_fill_hmac_digest_m() 1683 memcpy(digest, auth->hmac, digestlen); in sctp_handle_auth() [all …]
|
/freebsd/crypto/openssh/ |
H A D | ssh_config | 38 # MACs hmac-md5,hmac-sha1,umac-64@openssh.com
|
/freebsd/crypto/openssl/providers/implementations/signature/ |
H A D | mac_legacy_sig.c | 93 MAC_NEWCTX(hmac, "HMAC") 241 MAC_SETTABLE_CTX_PARAMS(hmac, "HMAC") 264 MAC_SIGNATURE_FUNCTIONS(hmac)
|