Home
last modified time | relevance | path

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

12

/openssl/providers/implementations/rands/
H A Ddrbg_hmac.c58 if (!EVP_MAC_init(ctx, hmac->K, hmac->blocklen, NULL) in do_hmac()
60 || !EVP_MAC_update(ctx, hmac->V, hmac->blocklen) in do_hmac()
69 return EVP_MAC_init(ctx, hmac->K, hmac->blocklen, NULL) in do_hmac()
70 && EVP_MAC_update(ctx, hmac->V, hmac->blocklen) in do_hmac()
125 memset(hmac->K, 0x00, hmac->blocklen); in ossl_drbg_hmac_init()
127 memset(hmac->V, 0x01, hmac->blocklen); in ossl_drbg_hmac_init()
225 if (!EVP_MAC_init(ctx, hmac->K, hmac->blocklen, NULL) in ossl_drbg_hmac_generate()
271 OPENSSL_cleanse(hmac->K, sizeof(hmac->K)); in drbg_hmac_uninstantiate()
272 OPENSSL_cleanse(hmac->V, sizeof(hmac->V)); in drbg_hmac_uninstantiate()
315 hmac = OPENSSL_secure_zalloc(sizeof(*hmac)); in drbg_hmac_new()
[all …]
/openssl/providers/implementations/kdfs/
H A Dhmacdrbg_kdf.c141 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()
180 PROV_DRBG_HMAC *drbg = &hmac->base; 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()
207 hmac->nonce = ptr; in hmac_drbg_kdf_set_ctx_params()
208 hmac->noncelen = size; in hmac_drbg_kdf_set_ctx_params()
[all …]
H A Dhkdf.c499 HMAC_CTX *hmac; in HKDF_Expand() local
518 if ((hmac = HMAC_CTX_new()) == NULL) in HKDF_Expand()
521 if (!HMAC_Init_ex(hmac, prk, prk_len, evp_md, NULL)) in HKDF_Expand()
530 if (!HMAC_Init_ex(hmac, NULL, 0, NULL, NULL)) in HKDF_Expand()
533 if (!HMAC_Update(hmac, prev, dig_len)) in HKDF_Expand()
537 if (!HMAC_Update(hmac, info, info_len)) in HKDF_Expand()
540 if (!HMAC_Update(hmac, &ctr, 1)) in HKDF_Expand()
543 if (!HMAC_Final(hmac, prev, NULL)) in HKDF_Expand()
558 HMAC_CTX_free(hmac); in HKDF_Expand()
/openssl/demos/mac/
H A Dbuild.info8 hmac-sha512 \
16 INCLUDE[hmac-sha512]=../../include
17 SOURCE[hmac-sha512]=hmac-sha512.c
18 DEPEND[hmac-sha512]=../../libcrypto
H A DMakefile8 hmac-sha512 \
19 hmac-sha512: hmac-sha512.o
/openssl/crypto/rsa/
H A Drsa_pk1.c290 HMAC_CTX *hmac = NULL; in ossl_rsa_prf() local
303 hmac = HMAC_CTX_new(); in ossl_rsa_prf()
304 if (hmac == NULL) { in ossl_rsa_prf()
322 if (HMAC_Init_ex(hmac, kdk, SHA256_DIGEST_LENGTH, md, NULL) <= 0) { in ossl_rsa_prf()
328 if (HMAC_Init_ex(hmac, NULL, 0, NULL, NULL) <= 0) { in ossl_rsa_prf()
336 if (HMAC_Update(hmac, be_iter, sizeof(be_iter)) <= 0) { in ossl_rsa_prf()
340 if (HMAC_Update(hmac, (unsigned char *)label, llen) <= 0) { in ossl_rsa_prf()
344 if (HMAC_Update(hmac, be_bitlen, sizeof(be_bitlen)) <= 0) { in ossl_rsa_prf()
356 if (HMAC_Final(hmac, hmac_out, &md_len) <= 0) { in ossl_rsa_prf()
362 if (HMAC_Final(hmac, to + pos, &md_len) <= 0) { in ossl_rsa_prf()
[all …]
H A Drsa_ossl.c438 HMAC_CTX *hmac = NULL; in derive_kdk() local
483 hmac = HMAC_CTX_new(); in derive_kdk()
484 if (hmac == NULL) { in derive_kdk()
489 if (HMAC_Init_ex(hmac, d_hash, sizeof(d_hash), md, NULL) <= 0) { in derive_kdk()
496 if (HMAC_Update(hmac, buf, num - flen) <= 0) { in derive_kdk()
501 if (HMAC_Update(hmac, from, flen) <= 0) { in derive_kdk()
507 if (HMAC_Final(hmac, kdk, &md_len) <= 0) { in derive_kdk()
514 HMAC_CTX_free(hmac); in derive_kdk()
/openssl/crypto/pkcs12/
H A Dp12_mutl.c87 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()
/openssl/providers/implementations/signature/
H A Dmac_legacy_sig.c91 MAC_NEWCTX(hmac, "HMAC")
239 MAC_SETTABLE_CTX_PARAMS(hmac, "HMAC")
262 MAC_SIGNATURE_FUNCTIONS(hmac)
/openssl/ssl/record/methods/
H A Dtls1_meth.c470 EVP_MD_CTX *hmac = NULL, *mac_ctx; in tls1_mac() local
485 hmac = EVP_MD_CTX_new(); in tls1_mac()
486 if (hmac == NULL || !EVP_MD_CTX_copy(hmac, hash)) { in tls1_mac()
489 mac_ctx = hmac; in tls1_mac()
551 EVP_MD_CTX_free(hmac); in tls1_mac()
/openssl/crypto/hmac/
H A Dbuild.info3 $COMMON=hmac.c
/openssl/test/
H A Dbad_dtls_test.c284 EVP_MAC *hmac = NULL; in send_record() local
309 if (!TEST_ptr(hmac = EVP_MAC_fetch(NULL, "HMAC", NULL)) in send_record()
310 || !TEST_ptr(ctx = EVP_MAC_CTX_new(hmac))) in send_record()
354 EVP_MAC_free(hmac); in send_record()
/openssl/providers/implementations/include/prov/
H A Dhmac_drbg.h29 int ossl_drbg_hmac_generate(PROV_DRBG_HMAC *hmac,
/openssl/doc/man1/
H A Dopenssl-speed.pod.in15 [B<-hmac> I<algo>]
63 aes-128-cbc-hmac-sha1, then B<-mb> will time multi-buffer operation.
81 =item B<-hmac> I<digest>
H A Dopenssl-dgst.pod.in29 [B<-hmac> I<key>]
149 =item B<-hmac> I<key>
265 The L<openssl-mac(1)> command is preferred over the B<-hmac>, B<-mac> and
/openssl/ssl/statem/
H A Dextensions_srvr.c733 unsigned char hmac[SHA256_DIGEST_LENGTH]; in tls_parse_ctos_cookie() local
776 || EVP_DigestSign(hctx, hmac, &hmaclen, data, in tls_parse_ctos_cookie()
788 if (CRYPTO_memcmp(hmac, mdin, SHA256_DIGEST_LENGTH) != 0) { in tls_parse_ctos_cookie()
1779 unsigned char *hmac, *hmac2; in tls_construct_stoc_cookie() local
1845 || !WPACKET_reserve_bytes(pkt, SHA256_DIGEST_LENGTH, &hmac)) { in tls_construct_stoc_cookie()
1870 || EVP_DigestSign(hctx, hmac, &hmaclen, cookie, in tls_construct_stoc_cookie()
1882 || !ossl_assert(hmac == hmac2) in tls_construct_stoc_cookie()
1883 || !ossl_assert(cookie == hmac - totcookielen) in tls_construct_stoc_cookie()
/openssl/crypto/objects/
H A Dobjects.txt18 identified-organization 6 1 5 5 8 1 1 : HMAC-MD5 : hmac-md5
19 identified-organization 6 1 5 5 8 1 2 : HMAC-SHA1 : hmac-sha1
632 id-alg 3 : id-alg-dh-sig-hmac-sha1
1086 nist_hashalgs 13 : id-hmacWithSHA3-224 : hmac-sha3-224
1087 nist_hashalgs 14 : id-hmacWithSHA3-256 : hmac-sha3-256
1088 nist_hashalgs 15 : id-hmacWithSHA3-384 : hmac-sha3-384
1675 : HMAC : hmac
1680 : RC4-HMAC-MD5 : rc4-hmac-md5
1681 : AES-128-CBC-HMAC-SHA1 : aes-128-cbc-hmac-sha1
1682 : AES-192-CBC-HMAC-SHA1 : aes-192-cbc-hmac-sha1
[all …]
H A Dobj_mac.num855 hmac 855
/openssl/providers/
H A Dfips.module.sources233 crypto/hmac/hmac.c
234 crypto/hmac/hmac_local.h
478 include/openssl/hmac.h
H A Dfips-sources.checksums233 0a4fc92e408b0562cf95c480df93a9907a318a2c92356642903a5d50ed04fd88 crypto/hmac/hmac.c
234 0395c1b0834f2f4a0ca1756385f4dc1a4ef6fb925b2db3743df7f57256c5166f crypto/hmac/hmac_local.h
478 47a088c98ad536ea99f2c6a9333e372507cb61b9bdffb930c586ed52f8f261eb include/openssl/hmac.h
/openssl/crypto/
H A Dbuild.info5 md2 md4 md5 sha mdc2 hmac ripemd whrlpool poly1305 \
/openssl/doc/man3/
H A DHMAC.pod21 #include <openssl/hmac.h>
H A DSSL_CTX_set_tlsext_ticket_key_cb.pod68 set using L<EVP_EncryptInit_ex(3)>. The hmac context and digest can be set using
/openssl/crypto/err/
H A Dopenssl.txt731 EVP_R_EXPECTING_AN_HMAC_KEY:174:expecting an hmac key
/openssl/providers/fips/
H A Dself_test_data.inc379 …* https://github.com/brycx/Test-Vector-Generation/blob/master/PBKDF2/pbkdf2-hmac-sha2-test-vecto…

Completed in 80 milliseconds

12