/freebsd/crypto/openssl/providers/implementations/rands/ |
H A D | drbg_hmac.c | 46 * hmac is an object that holds the input/output Key and Value (K and V). 52 * hmac->K = HMAC(hmac->K, hmac->V || inbyte || [in1] || [in2] || [in3]) 53 * hmac->V = HMAC(hmac->K, hmac->V) 57 static int do_hmac(PROV_DRBG_HMAC *hmac, unsigne argument 99 PROV_DRBG_HMAC *hmac = (PROV_DRBG_HMAC *)drbg->data; drbg_hmac_update() local 127 PROV_DRBG_HMAC *hmac = (PROV_DRBG_HMAC *)drbg->data; drbg_hmac_instantiate() local 198 PROV_DRBG_HMAC *hmac = (PROV_DRBG_HMAC *)drbg->data; drbg_hmac_generate() local 252 PROV_DRBG_HMAC *hmac = (PROV_DRBG_HMAC *)drbg->data; drbg_hmac_uninstantiate() local 267 PROV_DRBG_HMAC *hmac = (PROV_DRBG_HMAC *)drbg->data; drbg_hmac_verify_zeroization() local 276 PROV_DRBG_HMAC *hmac; drbg_hmac_new() local 307 PROV_DRBG_HMAC *hmac; drbg_hmac_free() local 320 PROV_DRBG_HMAC *hmac = (PROV_DRBG_HMAC *)drbg->data; drbg_hmac_get_ctx_params() local 359 PROV_DRBG_HMAC *hmac = (PROV_DRBG_HMAC *)ctx->data; drbg_hmac_set_ctx_params() local [all...] |
/freebsd/contrib/bearssl/inc/ |
H A D | bearssl_hmac.h | 39 * # HMAC 41 * HMAC is initialized with a key and an underlying hash function; it 45 * With the key context, a HMAC context can be initialized to process 49 * IMPORTANT: HMAC shall be used only with functions that have the 58 * \brief HMAC key context. 60 * The HMAC key context is initialised with a hash function implementation 74 * \brief HMAC key context initialisation. 79 * \param kc HMAC key context to initialise. 81 * \param key pointer to the HMAC secret key. 82 * \param key_len HMAC secret key length (in bytes). [all …]
|
/freebsd/crypto/openssl/test/recipes/30-test_evp_data/ |
H A D | evpkdf_ss.txt | 433 Ctrl.mac = mac:HMAC 441 Ctrl.mac = mac:HMAC 449 Ctrl.mac = mac:HMAC 457 Ctrl.mac = mac:HMAC 465 Ctrl.mac = mac:HMAC 473 Ctrl.mac = mac:HMAC 481 Ctrl.mac = mac:HMAC 489 Ctrl.mac = mac:HMAC 497 Ctrl.mac = mac:HMAC 505 Ctrl.mac = mac:HMAC [all …]
|
H A D | evpmac_common.txt | 15 Title = HMAC tests (from RFC2104 and others) 18 MAC = HMAC 27 MAC = HMAC 35 MAC = HMAC 44 # HMAC tests from NIST test data 46 MAC = HMAC 54 MAC = HMAC 61 MAC = HMAC 70 MAC = HMAC 78 MAC = HMAC [all …]
|
H A D | evpciph_aes_stitched.txt | 1 Title = AES-128-CBC-HMAC-SHA1 test vectors 3 Cipher = AES-128-CBC-HMAC-SHA1 13 Cipher = AES-128-CBC-HMAC-SHA1 23 Cipher = AES-128-CBC-HMAC-SHA1 33 Title = AES-256-CBC-HMAC-SHA1 test vectors 35 Cipher = AES-256-CBC-HMAC-SHA1 45 Cipher = AES-256-CBC-HMAC-SHA1 55 Cipher = AES-256-CBC-HMAC-SHA1 64 Title = AES-128-CBC-HMAC-SHA256 test vectors 66 Cipher = AES-128-CBC-HMAC-SHA256 [all …]
|
H A D | evpmac_sm3.txt | 14 Title = HMAC-SM3 from GM/T 0042-2015 Appendix D.3 16 MAC = HMAC 22 MAC = HMAC 28 MAC = HMAC 34 MAC = HMAC
|
/freebsd/contrib/libfido2/tools/ |
H A D | test.sh | 12 # - assumes CTAP 2.1-like hmac-secret; 54 dd if=/dev/urandom bs=32 count=1 | base64 > hmac-salt 81 # wrap (non-resident) + hmac-secret 102 # resident + hmac-secret 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 162 get_assert no.tld "-h -t up=true -t pin=true" wrap-cred hmac-salt wrap-assert 168 get_assert no.tld "-h -t up=true -t pin=false" wrap-cred hmac-salt wrap-assert [all …]
|
/freebsd/crypto/openssl/test/recipes/ |
H A D | 20-test_dgst.t | 168 subtest "HMAC generation with `dgst` CLI" => sub { 172 #HMAC the data twice to check consistency 173 my @hmacdata = run(app(['openssl', 'dgst', '-sha256', '-hmac', '123456', 176 …my $expected = qr/HMAC-SHA2-256\(\Q$testdata\E\)= 6f12484129c4a761747f13d8234a1ff0e074adb34e9e9bf3… 177 …ok($hmacdata[0] =~ $expected, "HMAC: Check HMAC value is as expected ($hmacdata[0]) vs ($expected)… 179 "HMAC: Check second HMAC value is consistent with the first ($hmacdata[1]) vs ($expected)"); 182 subtest "HMAC generation with `dgst` CLI, default digest" => sub { 186 #HMAC the data twice to check consistency 187 my @hmacdata = run(app(['openssl', 'dgst', '-hmac', '123456', 190 …my $expected = qr/HMAC-SHA256\(\Q$testdata\E\)= 6f12484129c4a761747f13d8234a1ff0e074adb34e9e9bf3a1… [all …]
|
H A D | 03-test_fipsinstall.t | 95 '-provider_name', 'fips', '-mac_name', 'HMAC', 103 '-provider_name', 'fips', '-mac_name', 'HMAC', 110 '-provider_name', 'fips', '-mac_name', 'HMAC', 119 '-provider_name', 'fips', '-mac_name', 'HMAC', 128 '-provider_name', 'fips', '-mac_name', 'HMAC', 138 '-provider_name', 'fips', '-mac_name', 'HMAC', 148 '-provider_name', 'fips', '-mac_name', 'HMAC', 158 '-provider_name', 'fips', '-mac_name', 'HMAC', 165 '-provider_name', 'fips', '-mac_name', 'HMAC', 172 '-provider_name', 'fips', '-mac_name', 'HMAC', [all …]
|
/freebsd/sbin/setkey/ |
H A D | sample.cf | 38 # hmac-sha2-512 whose key is "this is the test key". 53 -A hmac-sha2-512 "this is the test key" ; 57 -A hmac-sha2-512 "this is the test key" ; 62 # Security protocol is old AH tunnel mode, i.e. RFC1826, with hmac-sha2-256 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. 121 -A hmac-sha2-512 "this is the test key" ; [all …]
|
/freebsd/contrib/wpa/src/tls/ |
H A D | tlsv1_record.c | 140 * header, IV (TLS v1.1), and HMAC) 147 * This function fills in the TLS record layer header, adds HMAC, and encrypts 155 struct crypto_hash *hmac; in tlsv1_record_send() local 207 hmac = crypto_hash_init(rl->hash_alg, rl->write_mac_secret, in tlsv1_record_send() 209 if (hmac == NULL) { in tlsv1_record_send() 211 "to initialize HMAC"); in tlsv1_record_send() 214 crypto_hash_update(hmac, rl->write_seq_num, TLS_SEQ_NUM_LEN); 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() [all …]
|
/freebsd/secure/lib/libcrypto/man/man7/ |
H A D | Makefile | 38 MAN+= EVP_MAC-HMAC.7 61 MAN+= EVP_PKEY-HMAC.7 67 MAN+= EVP_RAND-HMAC-DRBG.7 74 MAN+= EVP_SIGNATURE-HMAC.7 128 MLINKS+= EVP_PKEY-HMAC.7 EVP_KEYMGMT-CMAC.7 135 MLINKS+= EVP_PKEY-HMAC.7 EVP_KEYMGMT-HMAC.7 136 MLINKS+= EVP_PKEY-HMAC.7 EVP_KEYMGMT-Poly1305.7 139 MLINKS+= EVP_PKEY-HMAC.7 EVP_KEYMGMT-Siphash.7 147 MLINKS+= EVP_PKEY-HMAC.7 EVP_PKEY-CMAC.7 151 MLINKS+= EVP_PKEY-HMAC.7 EVP_PKEY-Poly1305.7 [all …]
|
H A D | EVP_RAND-HMAC-DRBG.7 | 133 .IX Title "EVP_RAND-HMAC-DRBG 7ossl" 134 .TH EVP_RAND-HMAC-DRBG 7ossl "2023-09-19" "3.0.11" "OpenSSL" 140 EVP_RAND\-HMAC\-DRBG \- The HMAC DRBG EVP_RAND implementation 143 Support for the \s-1HMAC\s0 deterministic random bit generator through the 147 \&\*(L"HMAC-DRBG\*(R" is the name for this implementation; it can be used with the 202 A context for \s-1HMAC DRBG\s0 can be obtained by calling: 205 \& EVP_RAND *rand = EVP_RAND_fetch(NULL, "HMAC\-DRBG", NULL); 217 \& rand = EVP_RAND_fetch(NULL, "HMAC\-DRBG", NULL);
|
H A D | OSSL_PROVIDER-FIPS.7 | 203 .IP "\s-1HMAC,\s0 see \s-1\fBEVP_MAC\-HMAC\s0\fR\|(7)" 4 204 .IX Item "HMAC, see EVP_MAC-HMAC" 253 .IP "\s-1HMAC,\s0 see \s-1\fBEVP_SIGNATURE\-HMAC\s0\fR\|(7)" 4 254 .IX Item "HMAC, see EVP_SIGNATURE-HMAC" 293 .IP "HMAC-DRBG, see \s-1\fBEVP_RAND\-HMAC\-DRBG\s0\fR\|(7)" 4 294 .IX Item "HMAC-DRBG, see EVP_RAND-HMAC-DRBG" 318 Uses \s-1HMAC SHA256\s0 on the module file to validate that the module has not been 324 Uses \s-1HMAC SHA256\s0 on a fixed string to validate that the installation process 382 .IX Item "HMAC (OSSL_SELF_TEST_DESC_INTEGRITY_HMAC)" 492 .IX Item "HMAC (OSSL_SELF_TEST_DESC_DRBG_HMAC)"
|
/freebsd/share/man/man4/ |
H A D | ccr.4 | 53 SHA1-HMAC, SHA2-224-HMAC, SHA2-256-HMAC, SHA2-384-HMAC, and SHA2-512-HMAC 62 SHA1-HMAC, SHA2-224-HMAC, SHA2-256-HMAC, SHA2-384-HMAC, or SHA2-512-HMAC for
|
/freebsd/sys/geom/eli/ |
H A D | g_eli_key.c | 56 const unsigned char *odhmac; /* On-disk HMAC. */ in g_eli_mkey_verify() 57 unsigned char chmac[SHA512_MDLEN]; /* Calculated HMAC. */ in g_eli_mkey_verify() 58 unsigned char hmkey[SHA512_MDLEN]; /* Key for HMAC. */ in g_eli_mkey_verify() 61 * The key for HMAC calculations is: hmkey = HMAC_SHA512(Derived-Key, 0) in g_eli_mkey_verify() 67 /* Calculate HMAC from Data-Key and IV-Key. */ in g_eli_mkey_verify() 74 * Compare calculated HMAC with HMAC from metadata. in g_eli_mkey_verify() 81 * Calculate HMAC from Data-Key and IV-Key. 86 unsigned char hmkey[SHA512_MDLEN]; /* Key for HMAC. */ in g_eli_mkey_hmac() 87 unsigned char *odhmac; /* On-disk HMAC. */ in g_eli_mkey_hmac() 90 * The key for HMAC calculations is: hmkey = HMAC_SHA512(Derived-Key, 0) in g_eli_mkey_hmac() [all …]
|
/freebsd/crypto/openssh/ |
H A D | mac.c | 35 #include "hmac.h" 60 { "hmac-sha1", SSH_DIGEST, SSH_DIGEST_SHA1, 0, 0, 0, 0 }, 61 { "hmac-sha1-96", SSH_DIGEST, SSH_DIGEST_SHA1, 96, 0, 0, 0 }, 62 { "hmac-sha2-256", SSH_DIGEST, SSH_DIGEST_SHA256, 0, 0, 0, 0 }, 63 { "hmac-sha2-512", SSH_DIGEST, SSH_DIGEST_SHA512, 0, 0, 0, 0 }, 64 { "hmac-md5", SSH_DIGEST, SSH_DIGEST_MD5, 0, 0, 0, 0 }, 65 { "hmac-md5-96", SSH_DIGEST, SSH_DIGEST_MD5, 96, 0, 0, 0 }, 70 { "hmac-sha1-etm@openssh.com", SSH_DIGEST, SSH_DIGEST_SHA1, 0, 0, 0, 1 }, 71 { "hmac-sha1-96-etm@openssh.com", SSH_DIGEST, SSH_DIGEST_SHA1, 96, 0, 0, 1 }, 72 { "hmac-sha2-256-etm@openssh.com", SSH_DIGEST, SSH_DIGEST_SHA256, 0, 0, 0, 1 }, [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/contrib/wpa/src/eap_common/ |
H A D | eap_peap_common.c | 37 * T1 = HMAC-SHA1(K, S | 0x01 | 0x00 | 0x00) in peap_prfplus() 38 * T2 = HMAC-SHA1(K, T1 | S | 0x02 | 0x00 | 0x00) in peap_prfplus() 40 * Tn = HMAC-SHA1(K, Tn-1 | S | n | 0x00 | 0x00) in peap_prfplus() 53 * T1 = HMAC-SHA1(K, S | LEN | 0x01) in peap_prfplus() 54 * T2 = HMAC-SHA1 (K, T1 | S | LEN | 0x02) in peap_prfplus() 55 * T3 = HMAC-SHA1 (K, T2 | S | LEN | 0x03) in peap_prfplus() 56 * T4 = HMAC-SHA1 (K, T3 | S | LEN | 0x04) in peap_prfplus()
|
/freebsd/crypto/openssl/doc/man7/ |
H A D | EVP_RAND-HMAC-DRBG.pod | 5 EVP_RAND-HMAC-DRBG - The HMAC DRBG EVP_RAND implementation 9 Support for the HMAC deterministic random bit generator through the 14 "HMAC-DRBG" is the name for this implementation; it can be used with the 59 A context for HMAC DRBG can be obtained by calling: 61 EVP_RAND *rand = EVP_RAND_fetch(NULL, "HMAC-DRBG", NULL); 72 rand = EVP_RAND_fetch(NULL, "HMAC-DRBG", NULL);
|
/freebsd/crypto/openssl/doc/man3/ |
H A D | HMAC.pod | 5 HMAC, 17 - HMAC message authentication code 21 #include <openssl/hmac.h> 23 unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, 56 HMAC is a MAC (message authentication code), i.e. a keyed hash 60 HMAC() computes the message authentication code of the I<data_len> bytes at 71 HMAC does not support variable output length digests such as EVP_shake128() and 74 HMAC() uses the default B<OSSL_LIB_CTX>. 128 HMAC() returns a pointer to the message authentication code or NULL if 153 All functions except for HMAC() were deprecated in OpenSSL 3.0.
|
/freebsd/tests/sys/geom/class/eli/ |
H A D | conf.sh | 19 # Execute `func` for each combination of cipher, sectorsize, and hmac algo 45 for aalgo in hmac/sha1 hmac/ripemd160 hmac/sha256 \ 46 hmac/sha384 hmac/sha512; do 55 # Execute `func` for each combination of cipher, and sectorsize, with no hmac
|
/freebsd/secure/lib/libcrypto/man/man3/ |
H A D | HMAC.3 | 133 .IX Title "HMAC 3ossl" 134 .TH HMAC 3ossl "2023-09-19" "3.0.11" "OpenSSL" 140 HMAC, 152 \&\- HMAC message authentication code 156 \& #include <openssl/hmac.h> 158 \& unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, 195 \&\s-1HMAC\s0 is a \s-1MAC\s0 (message authentication code), i.e. a keyed hash 199 \&\s-1\fBHMAC\s0()\fR computes the message authentication code of the \fIdata_len\fR bytes at 210 \&\s-1HMAC\s0 does not support variable output length digests such as \fBEVP_shake128()\fR and 213 \&\s-1\fBHMAC\s0()\fR uses the default \fB\s-1OSSL_LIB_CTX\s0\fR. [all …]
|
/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/sys/netinet/ |
H A D | sctp_auth.c | 632 alloc_size = sizeof(*new_list) + num_hmacs * sizeof(new_list->hmac[0]); in sctp_alloc_hmaclist() 661 "SCTP: HMAC id list full, ignoring add %u\n", hmac_id); in sctp_auth_add_hmacid() 670 if (list->hmac[i] == hmac_id) { in sctp_auth_add_hmacid() 675 SCTPDBG(SCTP_DEBUG_AUTH1, "SCTP: add HMAC id %u to list\n", 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() 715 * HMAC algos are listed in priority/preference order 716 * find the best HMAC id to use for the peer based on local support 728 if (peer->hmac[i] == local->hmac[j]) { in sctp_negotiate_hmacid() 731 "SCTP: negotiated peer HMAC id %u\n", in sctp_negotiate_hmacid() [all …]
|