/freebsd/crypto/openssl/providers/implementations/rands/ |
H A D | drbg_hmac.c | 43 * hmac is an object that holds the input/output Key and Value (K and V). 49 * hmac->K = HMAC(hmac->K, hmac->V || inbyte || [in1] || [in2] || [in3]) 50 * hmac->V = HMAC(hmac->K, hmac->V) 54 static int do_hmac(PROV_DRBG_HMAC *hmac, unsigned char inbyte, in do_hmac() argument 59 EVP_MAC_CTX *ctx = hmac->ctx; in do_hmac() 61 if (!EVP_MAC_init(ctx, hmac->K, hmac->blocklen, NULL) in do_hmac() 62 /* K = HMAC(K, V || inbyte || [in1] || [in2] || [in3]) */ in do_hmac() 63 || !EVP_MAC_update(ctx, hmac->V, hmac->blocklen) in do_hmac() 68 || !EVP_MAC_final(ctx, hmac->K, NULL, sizeof(hmac->K))) in do_hmac() 71 /* V = HMAC(K, V) */ in do_hmac() [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 | 439 Ctrl.mac = mac:HMAC 447 Ctrl.mac = mac:HMAC 455 Ctrl.mac = mac:HMAC 463 Ctrl.mac = mac:HMAC 471 Ctrl.mac = mac:HMAC 479 Ctrl.mac = mac:HMAC 487 Ctrl.mac = mac:HMAC 495 Ctrl.mac = mac:HMAC 503 Ctrl.mac = mac:HMAC 511 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 71 MAC = HMAC 80 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 | evpkdf_kbkdf_counter.txt | 714 Ctrl.mac = mac:HMAC 727 Ctrl.mac = mac:HMAC 740 Ctrl.mac = mac:HMAC 753 Ctrl.mac = mac:HMAC 771 Ctrl.mac = mac:HMAC 784 Ctrl.mac = mac:HMAC 797 Ctrl.mac = mac:HMAC 810 Ctrl.mac = mac:HMAC 828 Ctrl.mac = mac:HMAC 841 Ctrl.mac = mac:HMAC [all …]
|
H A D | evpkdf_hmac_drbg.txt | 12 Title = HMAC-DRBG-KDF Tests 14 KDF = HMAC-DRBG-KDF 21 KDF = HMAC-DRBG-KDF 27 KDF = HMAC-DRBG-KDF 34 KDF = HMAC-DRBG-KDF 40 KDF = HMAC-DRBG-KDF 46 KDF = HMAC-DRBG-KDF
|
/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/krb5/src/lib/crypto/krb/ |
H A D | cksumtypes.c | 56 "hmac-sha1-des3", { "hmac-sha1-des3-kd" }, "HMAC-SHA1 DES3 key", 62 "hmac-md5-rc4", { "hmac-md5-enc", "hmac-md5-earcfour" }, 63 "Microsoft HMAC MD5", 69 "hmac-sha1-96-aes128", { 0 }, "HMAC-SHA1 AES128 key", 75 "hmac-sha1-96-aes256", { 0 }, "HMAC-SHA1 AES256 key", 81 "md5-hmac-rc4", { 0 }, "Microsoft MD5 HMAC", 99 "hmac-sha256-128-aes128", { 0 }, "HMAC-SHA256 AES128 key", 105 "hmac-sha384-192-aes256", { 0 }, "HMAC-SHA384 AES256 key",
|
H A D | etypes.c | 49 "des3-cbc-sha1", { "des3-hmac-sha1", "des3-cbc-sha1-kd" }, 50 "Triple DES cbc mode with HMAC/sha1", 59 /* rc4-hmac uses a 128-bit key, but due to weaknesses in the RC4 cipher, we 62 "arcfour-hmac", { "rc4-hmac", "arcfour-hmac-md5" }, 63 "ArcFour with HMAC/md5", 73 "arcfour-hmac-exp", { "rc4-hmac-exp", "arcfour-hmac-md5-exp" }, 74 "Exportable ArcFour with HMAC/md5", 86 "aes128-cts-hmac-sha1-96", { "aes128-cts", "aes128-sha1" }, 87 "AES-128 CTS mode with 96-bit SHA-1 HMAC", 96 "aes256-cts-hmac-sha1-96", { "aes256-cts", "aes256-sha1" }, [all …]
|
H A D | checksum_hmac_md5.c | 28 * Microsoft HMAC-MD5 and MD5-HMAC checksums (see RFC 4757): 29 * HMAC(KS, hash(msusage || input)) 30 * KS is HMAC(key, "signaturekey\0") for HMAC-MD5, or just the key for 31 * MD5-HMAC. 52 /* Compute HMAC(key, "signaturekey\0") to get the signing key ks. */ in krb5int_hmacmd5_checksum() 65 } else /* For md5-hmac, just use the key. */ in krb5int_hmacmd5_checksum() 84 /* Compute HMAC(ks, md5value). */ in krb5int_hmacmd5_checksum()
|
/freebsd/crypto/krb5/src/tests/ |
H A D | t_sesskeynego.py | 26 'default_tgs_enctypes': 'rc4-hmac,aes128-cts'}} 36 test_kvno(realm, 'aes128-cts-hmac-sha1-96', 'aes256-cts-hmac-sha1-96') 46 test_kvno(realm, 'aes256-cts-hmac-sha1-96', 'aes256-cts-hmac-sha1-96') 57 test_kvno(realm, 'aes128-cts-hmac-sha1-96', 'aes256-cts-hmac-sha1-96') 63 'rc4-hmac,aes128-cts,aes256-cts']) 64 test_kvno(realm, 'aes128-cts-hmac-sha1-96', 'aes256-cts-hmac-sha1-96') 74 # 5: allow_rc4 permits negotiation of rc4-hmac session key. 77 realm.run([kadminl, 'setstr', 'server', 'session_enctypes', 'rc4-hmac']) 78 test_kvno(realm, 'DEPRECATED:arcfour-hmac', 'aes256-cts-hmac-sha1-96') 85 test_kvno(realm, 'DEPRECATED:des3-cbc-sha1', 'aes256-cts-hmac-sha1-96') [all …]
|
H A D | t_salt.py | 20 ('arcfour-hmac', 'onlyrealm'), 21 ('aes128-cts-hmac-sha1-96', 'special')] 24 second_kstypes = ['aes256-cts-hmac-sha1-96', 'arcfour-hmac:normal', 47 dup_kstypes = ['arcfour-hmac-md5:normal,rc4-hmac:normal', 48 'aes256-cts-hmac-sha1-96:normal,aes128-cts,aes256-cts', 49 'aes256-cts-hmac-sha1-96:normal,aes256-cts:special,' + 50 'aes256-cts-hmac-sha1-96:normal']
|
/freebsd/crypto/openssl/test/recipes/ |
H A D | 20-test_dgst.t | 187 subtest "HMAC generation with `dgst` CLI" => sub { 191 #HMAC the data twice to check consistency 192 my @hmacdata = run(app(['openssl', 'dgst', '-sha256', '-hmac', '123456', 195 …my $expected = qr/HMAC-SHA2-256\(\Q$testdata\E\)= 6f12484129c4a761747f13d8234a1ff0e074adb34e9e9bf3… 196 …ok($hmacdata[0] =~ $expected, "HMAC: Check HMAC value is as expected ($hmacdata[0]) vs ($expected)… 198 "HMAC: Check second HMAC value is consistent with the first ($hmacdata[1]) vs ($expected)"); 201 subtest "HMAC generation with `dgst` CLI, default digest" => sub { 205 #HMAC the data twice to check consistency 206 my @hmacdata = run(app(['openssl', 'dgst', '-hmac', '123456', 209 …my $expected = qr/HMAC-SHA256\(\Q$testdata\E\)= 6f12484129c4a761747f13d8234a1ff0e074adb34e9e9bf3a1… [all …]
|
H A D | 03-test_fipsinstall.t | 148 '-provider_name', 'fips', '-mac_name', 'HMAC', 155 '-provider_name', 'fips', '-mac_name', 'HMAC', 162 '-provider_name', 'fips', '-mac_name', 'HMAC', 193 '-provider_name', 'fips', '-mac_name', 'HMAC', 202 '-provider_name', 'fips', '-mac_name', 'HMAC', 212 '-provider_name', 'fips', '-mac_name', 'HMAC', 222 '-provider_name', 'fips', '-mac_name', 'HMAC', 232 '-provider_name', 'fips', '-mac_name', 'HMAC', 240 '-provider_name', 'fips', '-mac_name', 'HMAC', 248 '-provider_name', 'fips', '-mac_name', 'HMAC', [all …]
|
/freebsd/crypto/openssl/doc/man7/ |
H A D | EVP_KDF-HMAC-DRBG.pod | 5 EVP_KDF-HMAC-DRBG 6 - The HMAC DRBG DETERMINISTIC EVP_KDF implementation 10 Support for a deterministic HMAC DRBG using the B<EVP_KDF> API. This is similar 11 to L<EVP_RAND-HMAC-DRBG(7)>, but uses fixed values for its entropy and nonce 17 "HMAC-DRBG-KDF" is the name for this implementation; it can be used 34 Sets the entropy bytes supplied to the HMAC-DRBG. 38 Sets the nonce bytes supplied to the HMAC-DRBG. 44 A context for KDF HMAC DRBG can be obtained by calling: 46 EVP_KDF *kdf = EVP_KDF_fetch(NULL, "HMAC-DRBG-KDF", NULL); 60 The EVP_KDF-HMAC-DRBG functionality was added in OpenSSL 3.2.
|
/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 | EVP_KDF-HMAC-DRBG.7 | 57 .IX Title "EVP_KDF-HMAC-DRBG 7ossl" 58 .TH EVP_KDF-HMAC-DRBG 7ossl 2025-07-01 3.5.1 OpenSSL 64 EVP_KDF\-HMAC\-DRBG 65 \&\- The HMAC DRBG DETERMINISTIC EVP_KDF implementation 68 Support for a deterministic HMAC DRBG using the \fBEVP_KDF\fR API. This is similar 69 to \fBEVP_RAND\-HMAC\-DRBG\fR\|(7), but uses fixed values for its entropy and nonce 88 Sets the entropy bytes supplied to the HMAC-DRBG. 91 Sets the nonce bytes supplied to the HMAC-DRBG. 94 A context for KDF HMAC DRBG can be obtained by calling: 97 \& EVP_KDF *kdf = EVP_KDF_fetch(NULL, "HMAC\-DRBG\-KDF", NULL); [all …]
|
H A D | Makefile | 19 MAN+= EVP_KDF-HMAC-DRBG.7 44 MAN+= EVP_MAC-HMAC.7 68 MAN+= EVP_PKEY-HMAC.7 78 MAN+= EVP_RAND-HMAC-DRBG.7 86 MAN+= EVP_SIGNATURE-HMAC.7 158 MLINKS+= EVP_PKEY-HMAC.7 EVP_KEYMGMT-CMAC.7 165 MLINKS+= EVP_PKEY-HMAC.7 EVP_KEYMGMT-HMAC.7 166 MLINKS+= EVP_PKEY-HMAC.7 EVP_KEYMGMT-Poly1305.7 169 MLINKS+= EVP_PKEY-HMAC.7 EVP_KEYMGMT-Siphash.7 177 MLINKS+= EVP_PKEY-HMAC.7 EVP_PKEY-CMAC.7 [all …]
|
/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/openssl/providers/implementations/kdfs/ |
H A D | hmacdrbg_kdf.c | 141 KDF_HMAC_DRBG *hmac = (KDF_HMAC_DRBG *)vctx; in hmac_drbg_kdf_get_ctx_params() local 142 PROV_DRBG_HMAC *drbg = &hmac->base; in hmac_drbg_kdf_get_ctx_params() 179 KDF_HMAC_DRBG *hmac = (KDF_HMAC_DRBG *)vctx; in hmac_drbg_kdf_set_ctx_params() local 180 PROV_DRBG_HMAC *drbg = &hmac->base; in hmac_drbg_kdf_set_ctx_params() 181 OSSL_LIB_CTX *libctx = PROV_LIBCTX_OF(hmac->provctx); in hmac_drbg_kdf_set_ctx_params() 195 OPENSSL_free(hmac->entropy); in hmac_drbg_kdf_set_ctx_params() 196 hmac->entropy = ptr; in hmac_drbg_kdf_set_ctx_params() 197 hmac->entropylen = size; in hmac_drbg_kdf_set_ctx_params() 198 hmac->init = 0; in hmac_drbg_kdf_set_ctx_params() 206 OPENSSL_free(hmac->nonce); in hmac_drbg_kdf_set_ctx_params() [all …]
|
/freebsd/crypto/krb5/doc/html/_sources/admin/advanced/ |
H A D | retiring-des.rst.txt | 133 [root@casio krb5kdc]# enctypes=aes256-cts-hmac-sha1-96:normal,\ 134 > aes128-cts-hmac-sha1-96:normal,des3-hmac-sha1:normal,des-cbc-crc:normal 170 Key: vno 2, aes256-cts-hmac-sha1-96 171 Key: vno 2, aes128-cts-hmac-sha1-96 190 [root@casio krb5kdc]# enctypes=aes256-cts-hmac-sha1-96:normal,\ 191 > aes128-cts-hmac-sha1-96:normal,des3-hmac-sha1:normal 220 [root@casio krb5kdc]# enctypes=aes256-cts-hmac-sha1-96:normal,\ 221 > aes128-cts-hmac-sha1-96:normal,des3-cbc-sha1:normal,des-cbc-crc:normal 226 …Entry for principal zephyr/zephyr@ZONE.MIT.EDU with kvno 4, encryption type aes256-cts-hmac-sha1-9… 227 …Entry for principal zephyr/zephyr@ZONE.MIT.EDU with kvno 4, encryption type aes128-cts-hmac-sha1-9… [all …]
|
/freebsd/crypto/krb5/doc/admin/advanced/ |
H A D | retiring-des.rst | 133 [root@casio krb5kdc]# enctypes=aes256-cts-hmac-sha1-96:normal,\ 134 > aes128-cts-hmac-sha1-96:normal,des3-hmac-sha1:normal,des-cbc-crc:normal 170 Key: vno 2, aes256-cts-hmac-sha1-96 171 Key: vno 2, aes128-cts-hmac-sha1-96 190 [root@casio krb5kdc]# enctypes=aes256-cts-hmac-sha1-96:normal,\ 191 > aes128-cts-hmac-sha1-96:normal,des3-hmac-sha1:normal 220 [root@casio krb5kdc]# enctypes=aes256-cts-hmac-sha1-96:normal,\ 221 > aes128-cts-hmac-sha1-96:normal,des3-cbc-sha1:normal,des-cbc-crc:normal 226 …Entry for principal zephyr/zephyr@ZONE.MIT.EDU with kvno 4, encryption type aes256-cts-hmac-sha1-9… 227 …Entry for principal zephyr/zephyr@ZONE.MIT.EDU with kvno 4, encryption type aes128-cts-hmac-sha1-9… [all …]
|