/openssl/crypto/sha/ |
H A D | sha1_one.c | 28 if (md == NULL) in ossl_sha1() 29 md = m; in ossl_sha1() 35 return md; in ossl_sha1() 42 if (md == NULL) in SHA1() 43 md = m; in SHA1() 51 if (md == NULL) in SHA224() 52 md = m; in SHA224() 60 if (md == NULL) in SHA256() 61 md = m; in SHA256() 70 md = m; in SHA384() [all …]
|
/openssl/engines/ |
H A D | e_ossltest.c | 73 EVP_MD *md; in digest_md5() local 85 md = NULL; in digest_md5() 102 EVP_MD *md; in digest_sha1() local 114 md = NULL; in digest_sha1() 131 EVP_MD *md; in digest_sha256() local 143 md = NULL; in digest_sha256() 165 EVP_MD *md; in digest_sha384() local 177 md = NULL; in digest_sha384() 187 EVP_MD *md; in digest_sha512() local 199 md = NULL; in digest_sha512() [all …]
|
/openssl/test/recipes/30-test_evp_data/ |
H A D | evppkey_kdf_hkdf.txt | 17 Ctrl.md = md:SHA256 25 Ctrl.md = md:SHA256 32 Ctrl.md = md:SHA256 38 Ctrl.md = md:SHA256 46 Ctrl.md = md:SHA256 53 Ctrl.md = md:SHA256 82 Ctrl.md = md:SHA1 91 Ctrl.md = md:SHA1 98 Ctrl.md = md:SHA1 104 Ctrl.md = md:SHA1 [all …]
|
/openssl/crypto/hmac/ |
H A D | hmac.c | 35 if (md != NULL && md != ctx->md && (key == NULL || len < 0)) in HMAC_Init_ex() 38 if (md != NULL) in HMAC_Init_ex() 39 ctx->md = md; in HMAC_Init_ex() 41 md = ctx->md; in HMAC_Init_ex() 49 if (EVP_MD_xof(md)) in HMAC_Init_ex() 110 if (key && md) in HMAC_Init() 118 if (!ctx->md) in HMAC_Update() 134 if (!ctx->md) in HMAC_Final() 180 ctx->md = NULL; in hmac_ctx_cleanup() 235 dctx->md = sctx->md; in HMAC_CTX_copy() [all …]
|
/openssl/crypto/evp/ |
H A D | evp_lib.c | 738 if (md == NULL) in EVP_MD_is_a() 741 return evp_is_a(md->prov, md->name_id, NULL, name); in EVP_MD_is_a() 763 if (md == NULL) in EVP_MD_get0_name() 779 return evp_names_do_all(md->prov, md->name_id, fn, data); in EVP_MD_names_do_all() 786 return md->prov; in EVP_MD_get0_provider() 836 return md; in EVP_MD_meth_new() 850 if ((to = EVP_MD_meth_new(md->type, md->pkey_type)) != NULL) { in EVP_MD_meth_dup() 870 if (md == NULL || md->origin != EVP_ORIG_METH) in EVP_MD_meth_free() 1026 EVP_MD *md; in EVP_MD_CTX_get1_md() local 1031 if (md == NULL || !EVP_MD_up_ref(md)) in EVP_MD_CTX_get1_md() [all …]
|
H A D | digest.c | 798 if (md != NULL && md->settable_ctx_params != NULL) { in EVP_MD_settable_ctx_params() 854 if (md != NULL && md->gettable_ctx_params != NULL) { in EVP_MD_gettable_ctx_params() 942 EVP_MD *md = OPENSSL_zalloc(sizeof(*md)); in evp_md_new() local 944 if (md != NULL && !CRYPTO_NEW_REF(&md->refcnt, 1)) { in evp_md_new() 948 return md; in evp_md_new() 1137 md->prov = prov; in evp_md_from_algorithm() 1144 md = NULL; in evp_md_from_algorithm() 1147 return md; in evp_md_from_algorithm() 1163 EVP_MD *md = in EVP_MD_fetch() local 1167 return md; in EVP_MD_fetch() [all …]
|
H A D | e_rc4_hmac_md5.c | 33 MD5_CTX head, tail, md; member 58 key->md = key->head; in rc4_hmac_md5_init_key() 112 key->md.Nh++; in rc4_hmac_md5_cipher() 126 key->md = key->tail; in rc4_hmac_md5_cipher() 154 if (l < key->md.Nl) in rc4_hmac_md5_cipher() 155 key->md.Nh++; in rc4_hmac_md5_cipher() 156 key->md.Nl = l; in rc4_hmac_md5_cipher() 169 MD5_Final(mac, &key->md); in rc4_hmac_md5_cipher() 170 key->md = key->tail; in rc4_hmac_md5_cipher() 172 MD5_Final(mac, &key->md); in rc4_hmac_md5_cipher() [all …]
|
H A D | bio_ok.c | 105 EVP_MD_CTX *md; member 322 EVP_MD *md; in ok_ctrl() local 386 md = ptr; in ok_ctrl() 387 if (!EVP_DigestInit_ex(ctx->md, md, NULL)) in ok_ctrl() 435 EVP_MD_CTX *md; in sig_out() local 441 md = ctx->md; in sig_out() 479 EVP_MD_CTX *md; in sig_in() local 487 if ((md = ctx->md) == NULL) in sig_in() 529 EVP_MD_CTX *md; in block_out() local 535 md = ctx->md; in block_out() [all …]
|
H A D | e_aes_cbc_hmac_sha1.c | 33 SHA_CTX head, tail, md; member 88 key->md = key->head; in aesni_cbc_hmac_sha1_init_key() 225 ctx->A[i] = key->md.h0; in tls1_1_multi_block_encrypt() 226 ctx->B[i] = key->md.h1; in tls1_1_multi_block_encrypt() 227 ctx->C[i] = key->md.h2; in tls1_1_multi_block_encrypt() 228 ctx->D[i] = key->md.h3; in tls1_1_multi_block_encrypt() 229 ctx->E[i] = key->md.h4; in tls1_1_multi_block_encrypt() 451 key->md.Nh++; in aesni_cbc_hmac_sha1_cipher() 465 key->md = key->tail; in aesni_cbc_hmac_sha1_cipher() 559 key->md = key->head; in aesni_cbc_hmac_sha1_cipher() [all …]
|
H A D | e_aes_cbc_hmac_sha256.c | 33 SHA256_CTX head, tail, md; member 83 key->md = key->head; in aesni_cbc_hmac_sha256_init_key() 220 ctx->A[i] = key->md.h[0]; in tls1_1_multi_block_encrypt() 221 ctx->B[i] = key->md.h[1]; in tls1_1_multi_block_encrypt() 222 ctx->C[i] = key->md.h[2]; in tls1_1_multi_block_encrypt() 223 ctx->D[i] = key->md.h[3]; in tls1_1_multi_block_encrypt() 224 ctx->E[i] = key->md.h[4]; in tls1_1_multi_block_encrypt() 225 ctx->F[i] = key->md.h[5]; in tls1_1_multi_block_encrypt() 226 ctx->G[i] = key->md.h[6]; in tls1_1_multi_block_encrypt() 479 key->md.Nh++; in aesni_cbc_hmac_sha256_cipher() [all …]
|
H A D | names.c | 35 int EVP_add_digest(const EVP_MD *md) in EVP_add_digest() argument 40 name = OBJ_nid2sn(md->type); in EVP_add_digest() 44 r = OBJ_NAME_add(OBJ_nid2ln(md->type), OBJ_NAME_TYPE_MD_METH, in EVP_add_digest() 45 (const char *)md); in EVP_add_digest() 49 if (md->pkey_type && md->type != md->pkey_type) { in EVP_add_digest() 50 r = OBJ_NAME_add(OBJ_nid2sn(md->pkey_type), in EVP_add_digest() 54 r = OBJ_NAME_add(OBJ_nid2ln(md->pkey_type), in EVP_add_digest() 122 const EVP_MD **md = data; in digest_from_name() local 124 if (*md != NULL) in digest_from_name() 255 void EVP_MD_do_all(void (*fn) (const EVP_MD *md, in EVP_MD_do_all() argument [all …]
|
/openssl/providers/implementations/asymciphers/ |
H A D | sm2_enc.c | 46 PROV_DIGEST md; member 74 const EVP_MD *md = ossl_prov_digest_md(&psm2ctx->md); in sm2_get_md() local 76 if (md == NULL) in sm2_get_md() 77 md = ossl_prov_digest_fetch(&psm2ctx->md, psm2ctx->libctx, "SM3", NULL); in sm2_get_md() 79 return md; in sm2_get_md() 89 if (md == NULL) in sm2_asym_encrypt() 110 if (md == NULL) in sm2_asym_decrypt() 127 ossl_prov_digest_reset(&psm2ctx->md); in sm2_freectx() 142 memset(&dstctx->md, 0, sizeof(dstctx->md)); in sm2_dupctx() 149 if (!ossl_prov_digest_copy(&dstctx->md, &srcctx->md)) { in sm2_dupctx() [all …]
|
/openssl/providers/implementations/ciphers/ |
H A D | cipher_rc4_hmac_md5_hw.c | 43 ctx->md = ctx->head; in cipher_hw_rc4_hmac_md5_initkey() 85 ctx->md.Nh += blocks >> 29; in cipher_hw_rc4_hmac_md5_cipher() 88 ctx->md.Nh++; in cipher_hw_rc4_hmac_md5_cipher() 102 ctx->md = ctx->tail; in cipher_hw_rc4_hmac_md5_cipher() 132 if (l < ctx->md.Nl) in cipher_hw_rc4_hmac_md5_cipher() 133 ctx->md.Nh++; in cipher_hw_rc4_hmac_md5_cipher() 134 ctx->md.Nl = l; in cipher_hw_rc4_hmac_md5_cipher() 148 MD5_Final(mac, &ctx->md); in cipher_hw_rc4_hmac_md5_cipher() 149 ctx->md = ctx->tail; in cipher_hw_rc4_hmac_md5_cipher() 151 MD5_Final(mac, &ctx->md); in cipher_hw_rc4_hmac_md5_cipher() [all …]
|
H A D | cipher_aes_cbc_hmac_sha256_hw.c | 61 sctx->md = sctx->head; in aesni_cbc_hmac_sha256_init_key() 192 mctx->A[i] = sctx->md.h[0]; in tls1_multi_block_encrypt() 193 mctx->B[i] = sctx->md.h[1]; in tls1_multi_block_encrypt() 194 mctx->C[i] = sctx->md.h[2]; in tls1_multi_block_encrypt() 195 mctx->D[i] = sctx->md.h[3]; in tls1_multi_block_encrypt() 196 mctx->E[i] = sctx->md.h[4]; in tls1_multi_block_encrypt() 197 mctx->F[i] = sctx->md.h[5]; in tls1_multi_block_encrypt() 198 mctx->G[i] = sctx->md.h[6]; in tls1_multi_block_encrypt() 449 sctx->md.Nh++; in aesni_cbc_hmac_sha256_cipher() 739 sctx->md = sctx->head; in aesni_cbc_hmac_sha256_set_tls1_aad() [all …]
|
H A D | cipher_aes_cbc_hmac_sha1_hw.c | 59 sctx->md = sctx->head; in aesni_cbc_hmac_sha1_init_key() 187 mctx->A[i] = sctx->md.h0; in tls1_multi_block_encrypt() 188 mctx->B[i] = sctx->md.h1; in tls1_multi_block_encrypt() 189 mctx->C[i] = sctx->md.h2; in tls1_multi_block_encrypt() 190 mctx->D[i] = sctx->md.h3; in tls1_multi_block_encrypt() 191 mctx->E[i] = sctx->md.h4; in tls1_multi_block_encrypt() 411 sctx->md.Nh++; in aesni_cbc_hmac_sha1_cipher() 424 sctx->md = sctx->tail; in aesni_cbc_hmac_sha1_cipher() 496 sctx->md = sctx->head; in aesni_cbc_hmac_sha1_cipher() 686 sctx->md = sctx->head; in aesni_cbc_hmac_sha1_set_tls1_aad() [all …]
|
/openssl/crypto/hashtable/ |
H A D | hashtable.c | 157 struct ht_mutable_data_st *md; member 216 new->md = OPENSSL_zalloc(sizeof(*new->md)); in ossl_ht_new() 217 if (new->md == NULL) in ossl_ht_new() 220 new->md->neighborhoods = in ossl_ht_new() 239 if (new->md != NULL) in ossl_ht_new() 241 OPENSSL_free(new->md); in ossl_ht_new() 342 OPENSSL_free(h->md); in ossl_ht_free() 361 md = ossl_rcu_deref(&h->md); in ossl_ht_foreach_until() 394 md = ossl_rcu_deref(&h->md); in ossl_ht_filter() 544 struct ht_mutable_data_st *md = h->md; in ossl_ht_insert_locked() local [all …]
|
/openssl/providers/implementations/kdfs/ |
H A D | sshkdf.c | 139 && !EVP_MD_is_a(md, SN_sha224) in fips_digest_check_passed() 140 && !EVP_MD_is_a(md, SN_sha256) in fips_digest_check_passed() 141 && !EVP_MD_is_a(md, SN_sha384) in fips_digest_check_passed() 176 const EVP_MD *md; in kdf_sshkdf_derive() local 182 if (md == NULL) { in kdf_sshkdf_derive() 226 const EVP_MD *md = NULL; in kdf_sshkdf_set_ctx_params() local 232 if (EVP_MD_xof(md)) { in kdf_sshkdf_set_ctx_params() 343 EVP_MD_CTX *md = NULL; in SSHKDF() local 349 md = EVP_MD_CTX_new(); in SSHKDF() 350 if (md == NULL) in SSHKDF() [all …]
|
/openssl/ssl/ |
H A D | tls13_enc.c | 33 const EVP_MD *md, in tls13_hkdf_expand_ex() argument 64 if ((ret = EVP_MD_get_size(md)) <= 0) { in tls13_hkdf_expand_ex() 189 mdleni = EVP_MD_get_size(md); in tls13_generate_secret() 252 md_size = EVP_MD_get_size(md); in tls13_generate_master_secret() 278 if (md == NULL) in tls13_final_finish_mac() 359 int hashleni = EVP_MD_get_size(md); in derive_secret_key_and_iv() 558 if (md == NULL || !EVP_DigestInit_ex(mdctx, md, NULL) in tls13_change_cipher_state() 639 md = ssl_handshake_md(s); in tls13_change_cipher_state() 783 if (!derive_secret_key_and_iv(s, md, in tls13_update_key() 880 const EVP_MD *md; in tls13_export_keying_material_early() local [all …]
|
/openssl/doc/man3/ |
H A D | EVP_MD_meth_new.pod | 26 void EVP_MD_meth_free(EVP_MD *md); 27 EVP_MD *EVP_MD_meth_dup(const EVP_MD *md); 31 int EVP_MD_meth_set_app_datasize(EVP_MD *md, int datasize); 32 int EVP_MD_meth_set_flags(EVP_MD *md, unsigned long flags); 45 int EVP_MD_meth_get_input_blocksize(const EVP_MD *md); 46 int EVP_MD_meth_get_result_size(const EVP_MD *md); 47 int EVP_MD_meth_get_app_datasize(const EVP_MD *md); 48 unsigned long EVP_MD_meth_get_flags(const EVP_MD *md); 73 EVP_MD_meth_dup() creates a copy of B<md>. 80 for the method B<md> to B<blocksize> bytes. [all …]
|
/openssl/crypto/asn1/ |
H A D | a_digest.c | 29 unsigned char *md, unsigned int *len) in ASN1_digest() argument 44 if (!EVP_Digest(str, inl, md, len, type, NULL)) { in ASN1_digest() 54 int ossl_asn1_item_digest_ex(const ASN1_ITEM *it, const EVP_MD *md, void *asn, in ossl_asn1_item_digest_ex() argument 60 EVP_MD *fetched_md = (EVP_MD *)md; in ossl_asn1_item_digest_ex() 66 if (EVP_MD_get0_provider(md) == NULL) { in ossl_asn1_item_digest_ex() 68 ENGINE *tmpeng = ENGINE_get_digest_engine(EVP_MD_get_type(md)); in ossl_asn1_item_digest_ex() 74 fetched_md = EVP_MD_fetch(libctx, EVP_MD_get0_name(md), propq); in ossl_asn1_item_digest_ex() 82 if (fetched_md != md) in ossl_asn1_item_digest_ex() 87 int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *md, void *asn, in ASN1_item_digest() argument 90 return ossl_asn1_item_digest_ex(it, md, asn, data, len, NULL, NULL); in ASN1_item_digest()
|
/openssl/crypto/conf/ |
H A D | conf_mod.c | 264 CONF_MODULE *md; in module_run() local 276 if (!md) { in module_run() 305 CONF_MODULE *md; in module_load_dso() local 326 if (md == NULL) in module_load_dso() 329 return md; in module_load_dso() 519 CONF_MODULE *md; in CONF_modules_unload() local 543 if (((md->links > 0) || !md->dso) && !all) in CONF_modules_unload() 568 OPENSSL_free(md); in module_free() 641 return md->name; in CONF_imodule_get_name() 646 return md->value; in CONF_imodule_get_value() [all …]
|
/openssl/crypto/rsa/ |
H A D | rsa_oaep.c | 68 if (md == NULL) { in ossl_rsa_padding_add_PKCS1_OAEP_mgf1_ex() 70 md = EVP_sha1(); in ossl_rsa_padding_add_PKCS1_OAEP_mgf1_ex() 77 mgf1md = md; in ossl_rsa_padding_add_PKCS1_OAEP_mgf1_ex() 81 if (EVP_MD_xof(md)) { in ossl_rsa_padding_add_PKCS1_OAEP_mgf1_ex() 91 mdlen = EVP_MD_get_size(md); in ossl_rsa_padding_add_PKCS1_OAEP_mgf1_ex() 185 if (md == NULL) { in RSA_padding_check_PKCS1_OAEP_mgf1() 187 md = EVP_sha1(); in RSA_padding_check_PKCS1_OAEP_mgf1() 195 mgf1md = md; in RSA_padding_check_PKCS1_OAEP_mgf1() 199 if (EVP_MD_xof(md)) { in RSA_padding_check_PKCS1_OAEP_mgf1() 209 mdlen = EVP_MD_get_size(md); in RSA_padding_check_PKCS1_OAEP_mgf1() [all …]
|
H A D | rsa_pmeth.c | 43 const EVP_MD *md; member 100 dctx->md = sctx->md; in pkey_rsa_copy() 149 if (rctx->md) { in pkey_rsa_sign() 225 if (rctx->md) { in pkey_rsa_verifyrecover() 278 if (rctx->md) { in pkey_rsa_verify() 402 if (!md) in check_padding_md() 463 if (!rctx->md) in pkey_rsa_ctrl() 552 rctx->md = p2; in pkey_rsa_ctrl() 564 rctx->md = p2; in pkey_rsa_ctrl() 870 const EVP_MD *md; in pkey_pss_init() local [all …]
|
/openssl/include/openssl/ |
H A D | sha.h | 51 OSSL_DEPRECATEDIN_3_0 int SHA1_Final(unsigned char *md, SHA_CTX *c); 55 unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md); 72 OSSL_DEPRECATEDIN_3_0 int SHA224_Final(unsigned char *md, SHA256_CTX *c); 76 OSSL_DEPRECATEDIN_3_0 int SHA256_Final(unsigned char *md, SHA256_CTX *c); 81 unsigned char *SHA224(const unsigned char *d, size_t n, unsigned char *md); 82 unsigned char *SHA256(const unsigned char *d, size_t n, unsigned char *md); 123 OSSL_DEPRECATEDIN_3_0 int SHA384_Final(unsigned char *md, SHA512_CTX *c); 127 OSSL_DEPRECATEDIN_3_0 int SHA512_Final(unsigned char *md, SHA512_CTX *c); 132 unsigned char *SHA384(const unsigned char *d, size_t n, unsigned char *md); 133 unsigned char *SHA512(const unsigned char *d, size_t n, unsigned char *md);
|
/openssl/providers/implementations/signature/ |
H A D | dsa_sig.c | 105 EVP_MD *md; member 153 EVP_MD *md = NULL; in dsa_setup_md() local 168 if (md == NULL) in dsa_setup_md() 180 if (EVP_MD_xof(md)) { in dsa_setup_md() 206 EVP_MD_free(md); in dsa_setup_md() 211 EVP_MD_free(ctx->md); in dsa_setup_md() 233 ctx->md = md; in dsa_setup_md() 239 EVP_MD_free(md); in dsa_setup_md() 619 EVP_MD_free(ctx->md); in dsa_freectx() 646 if (srcctx->md != NULL && !EVP_MD_up_ref(srcctx->md)) in dsa_dupctx() [all …]
|