Home
last modified time | relevance | path

Searched refs:hmac (Results 1 – 25 of 86) sorted by relevance

1234

/freebsd-13.1/contrib/libfido2/tools/
H A Dtest.sh50 dd if=/dev/urandom bs=32 count=1 | base64 > hmac-salt
140 get_assert no.tld "-h" wrap-cred hmac-salt wrap-assert
143 get_assert no.tld "-h -t pin=true" wrap-cred hmac-salt wrap-assert
147 get_assert no.tld "-h -t pin=false" wrap-cred hmac-salt wrap-assert
150 get_assert no.tld "-h -t up=true" wrap-cred hmac-salt wrap-assert
164 ! get_assert no.tld "-h -t up=false" wrap-cred hmac-salt wrap-assert
205 get_assert no.tld "-h -t uv=true" wrap-cred hmac-salt wrap-assert
211 get_assert no.tld "-h -t uv=false" wrap-cred hmac-salt wrap-assert
247 get_assert no.tld "-r -h" /dev/null hmac-salt wrap-assert
248 get_assert no.tld "-r -h -t pin=true" /dev/null hmac-salt wrap-assert
[all …]
/freebsd-13.1/contrib/libfido2/openbsd-compat/
H A Dhkdf.c81 HMAC_CTX hmac; in HKDF_expand() local
90 HMAC_CTX_init(&hmac); in HKDF_expand()
91 if (!HMAC_Init_ex(&hmac, prk, (int)prk_len, digest, NULL)) in HKDF_expand()
98 if (i != 0 && (!HMAC_Init_ex(&hmac, NULL, 0, NULL, NULL) || in HKDF_expand()
99 !HMAC_Update(&hmac, previous, digest_len))) in HKDF_expand()
102 if (!HMAC_Update(&hmac, info, info_len) || in HKDF_expand()
103 !HMAC_Update(&hmac, &ctr, 1) || in HKDF_expand()
104 !HMAC_Final(&hmac, previous, NULL)) in HKDF_expand()
118 HMAC_CTX_cleanup(&hmac); in HKDF_expand()
/freebsd-13.1/contrib/wpa/src/tls/
H A Dtlsv1_record.c155 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-13.1/contrib/libfido2/src/
H A Dconfig.c16 config_prepare_hmac(uint8_t subcmd, const cbor_item_t *item, fido_blob_t *hmac) in config_prepare_hmac() argument
29 if ((hmac->ptr = malloc(cbor_len + sizeof(prefix))) == NULL) { in config_prepare_hmac()
33 memcpy(hmac->ptr, prefix, sizeof(prefix)); in config_prepare_hmac()
34 memcpy(hmac->ptr + sizeof(prefix), cbor, cbor_len); in config_prepare_hmac()
35 hmac->len = cbor_len + sizeof(prefix); in config_prepare_hmac()
46 fido_blob_t *ecdh = NULL, f, hmac; in config_tx() local
51 memset(&hmac, 0, sizeof(hmac)); in config_tx()
67 if (config_prepare_hmac(subcmd, argv[1], &hmac) < 0) { in config_tx()
75 if ((r = cbor_add_uv_params(dev, cmd, &hmac, pk, ecdh, pin, in config_tx()
96 free(hmac.ptr); in config_tx()
H A Dbio.c67 fido_blob_t hmac; in bio_tx() local
72 memset(&hmac, 0, sizeof(hmac)); in bio_tx()
85 &hmac) < 0) { in bio_tx()
97 if ((r = cbor_add_uv_params(dev, cmd, &hmac, pk, ecdh, pin, in bio_tx()
104 (argv[4] = cbor_encode_pin_auth(dev, token, &hmac)) == NULL) { in bio_tx()
124 free(hmac.ptr); in bio_tx()
/freebsd-13.1/sbin/setkey/
H A Dsample.cf79 -A hmac-sha2-256 "this is the test" ;
82 -A hmac-sha2-256 "this is the test" ;
96 -A hmac-sha2-256 "this is the test" ;
99 -A hmac-sha2-256 "this is the test" ;
104 # is hmac-sha2-512. Authentication algorithm for AH is hmac-sha2-256.
125 -A hmac-sha2-256 "this is the test" ;
132 -A hmac-sha2-256 "this is the test" ;
136 # for ESP is hmac-sha2-256.
139 # for ESP is hmac-sha2-512.
160 -A hmac-sha2-512 "this is the test" ;
[all …]
/freebsd-13.1/tools/regression/ipsec/
H A Dipsec6.t55 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 Dipsec.t55 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-13.1/tests/sys/geom/class/eli/
H A Dconf.sh43 for aalgo in hmac/sha1 hmac/ripemd160 hmac/sha256 \
44 hmac/sha384 hmac/sha512; do
/freebsd-13.1/crypto/openssl/crypto/kdf/
H A Dhkdf.c295 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-13.1/sys/crypto/ccp/
H A Dccp.c244 axf = s->hmac.auth_hash; in ccp_init_hmac_digest()
248 axf->Final(s->hmac.ipad, &auth_ctx); in ccp_init_hmac_digest()
252 memcpy(s->hmac.ipad, key, klen); in ccp_init_hmac_digest()
254 memset(s->hmac.ipad + klen, 0, axf->blocksize - klen); in ccp_init_hmac_digest()
255 memcpy(s->hmac.opad, s->hmac.ipad, axf->blocksize); in ccp_init_hmac_digest()
258 s->hmac.ipad[i] ^= HMAC_IPAD_VAL; in ccp_init_hmac_digest()
259 s->hmac.opad[i] ^= HMAC_OPAD_VAL; in ccp_init_hmac_digest()
498 s->hmac.auth_hash = auth_hash; in ccp_newsession()
499 s->hmac.auth_mode = auth_mode; in ccp_newsession()
501 s->hmac.hash_len = auth_hash->hashsize; in ccp_newsession()
[all …]
/freebsd-13.1/crypto/openssl/crypto/pkcs12/
H A Dp12_mutl.c80 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-13.1/contrib/ldns/
H A Dkeys.c465 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-13.1/tests/sys/netipsec/tunnel/
H A Daesni_aes_cbc_256_hmac_sha2_256.sh17 …ist_test 4 rijndael-cbc "12345678901234567890123456789012" hmac-sha2-256 "123456789012345678901234…
37 …ist_test 6 rijndael-cbc "12345678901234567890123456789012" hmac-sha2-256 "123456789012345678901234…
H A Daes_cbc_128_hmac_sha1.sh17 ist_test 4 rijndael-cbc "1234567890123456" hmac-sha1 "12345678901234567890"
37 ist_test 6 rijndael-cbc "1234567890123456" hmac-sha1 "12345678901234567890"
H A Daesni_aes_cbc_128_hmac_sha1.sh17 ist_test 4 rijndael-cbc "1234567890123456" hmac-sha1 "12345678901234567890"
37 ist_test 6 rijndael-cbc "1234567890123456" hmac-sha1 "12345678901234567890"
H A Daes_cbc_256_hmac_sha2_256.sh17 …ist_test 4 rijndael-cbc "12345678901234567890123456789012" hmac-sha2-256 "123456789012345678901234…
37 …ist_test 6 rijndael-cbc "12345678901234567890123456789012" hmac-sha2-256 "123456789012345678901234…
/freebsd-13.1/contrib/wpa/src/eap_common/
H A Deap_sim_common.c168 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-13.1/contrib/netbsd-tests/crypto/libcrypto/
H A Dt_hashes.sh28 atf_test_case hmac
101 atf_add_test_case hmac
/freebsd-13.1/sys/dev/cxgbe/crypto/
H A Dt4_crypto.c187 struct ccr_session_hmac hmac; member
485 axf = s->hmac.auth_hash; in ccr_hash()
559 V_SCMD_AUTH_MODE(s->hmac.auth_mode) | in ccr_hash()
843 axf = s->hmac.auth_hash; in ccr_eta()
844 hash_size_in_response = s->hmac.hash_len; in ccr_eta()
2355 axf = s->hmac.auth_hash; in ccr_init_hash_digest()
2418 mk_size = s->hmac.mk_size; in ccr_aes_setkey()
2771 s->hmac.auth_hash = auth_hash; in ccr_newsession()
2772 s->hmac.auth_mode = auth_mode; in ccr_newsession()
2773 s->hmac.mk_size = mk_size; in ccr_newsession()
[all …]
/freebsd-13.1/crypto/heimdal/lib/gssapi/ntlm/
H A Dcrypto.c149 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-13.1/contrib/libfido2/
H A DNEWS68 ** Use CTAP2 canonical CBOR when combining hmac-secret and credProtect.
108 ** assert/hmac: encode public key as per spec, gh#60.
110 ** fido2-{assert,cred}: support for hmac-secret extension.
159 ** Added support for FIDO 2's hmac-secret extension.
/freebsd-13.1/sys/netinet/
H A Dsctp_auth.c673 if (list->hmac[i] == hmac_id) { in sctp_auth_add_hmacid()
679 list->hmac[list->num_algo++] = hmac_id; in sctp_auth_add_hmacid()
699 new_list->hmac[i] = list->hmac[i]; in sctp_copy_hmaclist()
731 if (peer->hmac[i] == local->hmac[j]) { in sctp_negotiate_hmacid()
735 peer->hmac[i]); in sctp_negotiate_hmacid()
736 return (peer->hmac[i]); in sctp_negotiate_hmacid()
758 hmac_id = htons(list->hmac[i]); in sctp_serialize_hmaclist()
1132 if (list->hmac[i] == id) in sctp_auth_is_supported_hmac()
1548 m, auth_offset, auth->hmac); in sctp_fill_hmac_digest_m()
1691 memcpy(digest, auth->hmac, digestlen); in sctp_handle_auth()
[all …]
/freebsd-13.1/sys/mips/nlm/hal/
H A Dnlmsaelib.h220 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-13.1/crypto/openssh/
H A Dssh_config39 # MACs hmac-md5,hmac-sha1,[email protected]

1234