/netbsd/crypto/external/bsd/openssl.old/dist/crypto/rsa/ |
H A D | rsa_oaep.c | 51 int mdlen, dbmask_len = 0; in RSA_padding_add_PKCS1_OAEP_mgf1() local 58 mdlen = EVP_MD_size(md); in RSA_padding_add_PKCS1_OAEP_mgf1() 74 db = to + mdlen + 1; in RSA_padding_add_PKCS1_OAEP_mgf1() 78 memset(db + mdlen, 0, emlen - flen - 2 * mdlen - 1); in RSA_padding_add_PKCS1_OAEP_mgf1() 84 dbmask_len = emlen - mdlen; in RSA_padding_add_PKCS1_OAEP_mgf1() 131 int mdlen; in RSA_padding_check_PKCS1_OAEP_mgf1() local 138 mdlen = EVP_MD_size(md); in RSA_padding_check_PKCS1_OAEP_mgf1() 156 dblen = num - mdlen - 1; in RSA_padding_check_PKCS1_OAEP_mgf1() 280 int mdlen; in PKCS1_MGF1() local 286 if (mdlen < 0) in PKCS1_MGF1() [all …]
|
/netbsd/crypto/external/bsd/openssl/dist/crypto/rsa/ |
H A D | rsa_oaep.c | 66 int mdlen, dbmask_len = 0; in ossl_rsa_padding_add_PKCS1_OAEP_mgf1_ex() local 80 if (mdlen <= 0) { in ossl_rsa_padding_add_PKCS1_OAEP_mgf1_ex() 99 db = to + mdlen + 1; in ossl_rsa_padding_add_PKCS1_OAEP_mgf1_ex() 105 memset(db + mdlen, 0, emlen - flen - 2 * mdlen - 1); in ossl_rsa_padding_add_PKCS1_OAEP_mgf1_ex() 113 dbmask_len = emlen - mdlen; in ossl_rsa_padding_add_PKCS1_OAEP_mgf1_ex() 131 for (i = 0; i < mdlen; i++) in ossl_rsa_padding_add_PKCS1_OAEP_mgf1_ex() 173 int mdlen; in RSA_padding_check_PKCS1_OAEP_mgf1() local 204 dblen = num - mdlen - 1; in RSA_padding_check_PKCS1_OAEP_mgf1() 339 int mdlen; in PKCS1_MGF1() local 345 if (mdlen < 0) in PKCS1_MGF1() [all …]
|
/netbsd/crypto/external/bsd/openssl.old/dist/crypto/ec/ |
H A D | ecdh_kdf.c | 27 size_t mdlen; in ecdh_KDF_X9_63() local 35 mdlen = EVP_MD_size(md); in ecdh_KDF_X9_63() 50 if (outlen >= mdlen) { in ecdh_KDF_X9_63() 53 outlen -= mdlen; in ecdh_KDF_X9_63() 56 out += mdlen; in ecdh_KDF_X9_63() 61 OPENSSL_cleanse(mtmp, mdlen); in ecdh_KDF_X9_63()
|
/netbsd/crypto/external/bsd/openssl.old/dist/crypto/cms/ |
H A D | cms_dd.c | 59 unsigned int mdlen; in cms_DigestedData_do_final() local 73 if (EVP_DigestFinal_ex(mctx, md, &mdlen) <= 0) in cms_DigestedData_do_final() 77 if (mdlen != (unsigned int)dd->digest->length) { in cms_DigestedData_do_final() 83 if (memcmp(md, dd->digest->data, mdlen)) in cms_DigestedData_do_final() 89 if (!ASN1_STRING_set(dd->digest, md, mdlen)) in cms_DigestedData_do_final()
|
H A D | cms_sd.c | 585 unsigned int mdlen; in cms_SignerInfo_content_sign() local 586 if (!EVP_DigestFinal_ex(mctx, md, &mdlen)) in cms_SignerInfo_content_sign() 589 V_ASN1_OCTET_STRING, md, mdlen)) in cms_SignerInfo_content_sign() 601 unsigned int mdlen; in cms_SignerInfo_content_sign() local 603 if (!EVP_DigestFinal_ex(mctx, md, &mdlen)) in cms_SignerInfo_content_sign() 611 if (EVP_PKEY_sign(pctx, sig, &siglen, md, mdlen) <= 0) { in cms_SignerInfo_content_sign()
|
/netbsd/crypto/external/bsd/openssl/dist/crypto/cms/ |
H A D | cms_dd.c | 64 unsigned int mdlen; in ossl_cms_DigestedData_do_final() local 78 if (EVP_DigestFinal_ex(mctx, md, &mdlen) <= 0) in ossl_cms_DigestedData_do_final() 82 if (mdlen != (unsigned int)dd->digest->length) { in ossl_cms_DigestedData_do_final() 87 if (memcmp(md, dd->digest->data, mdlen)) in ossl_cms_DigestedData_do_final() 92 if (!ASN1_STRING_set(dd->digest, md, mdlen)) in ossl_cms_DigestedData_do_final()
|
/netbsd/crypto/external/bsd/openssl.old/dist/crypto/dh/ |
H A D | dh_kdf.c | 106 size_t mdlen; in DH_KDF_X9_42() local 114 mdlen = EVP_MD_size(md); in DH_KDF_X9_42() 129 if (outlen >= mdlen) { in DH_KDF_X9_42() 132 outlen -= mdlen; in DH_KDF_X9_42() 135 out += mdlen; in DH_KDF_X9_42() 140 OPENSSL_cleanse(mtmp, mdlen); in DH_KDF_X9_42()
|
/netbsd/crypto/external/bsd/openssl.old/dist/crypto/evp/ |
H A D | m_sigver.c | 125 unsigned int mdlen = 0; in EVP_DigestSignFinal() local 130 r = EVP_DigestFinal_ex(ctx, md, &mdlen); in EVP_DigestSignFinal() 143 r = EVP_DigestFinal_ex(tmp_ctx, md, &mdlen); in EVP_DigestSignFinal() 148 if (EVP_PKEY_sign(ctx->pctx, sigret, siglen, md, mdlen) <= 0) in EVP_DigestSignFinal() 178 unsigned int mdlen = 0; in EVP_DigestVerifyFinal() local 189 r = EVP_DigestFinal_ex(ctx, md, &mdlen); in EVP_DigestVerifyFinal() 202 r = EVP_DigestFinal_ex(tmp_ctx, md, &mdlen); in EVP_DigestVerifyFinal() 207 return EVP_PKEY_verify(ctx->pctx, sig, siglen, md, mdlen); in EVP_DigestVerifyFinal()
|
H A D | p5_crpt2.c | 37 int cplen, j, k, tkeylen, mdlen; in PKCS5_PBKDF2_HMAC() local 41 mdlen = EVP_MD_size(digest); in PKCS5_PBKDF2_HMAC() 42 if (mdlen < 0) in PKCS5_PBKDF2_HMAC() 66 if (tkeylen > mdlen) in PKCS5_PBKDF2_HMAC() 67 cplen = mdlen; in PKCS5_PBKDF2_HMAC() 97 if (!HMAC_Update(hctx, digtmp, mdlen) in PKCS5_PBKDF2_HMAC()
|
/netbsd/crypto/external/bsd/openssl/dist/providers/implementations/kdfs/ |
H A D | pbkdf2.c | 281 int cplen, k, tkeylen, mdlen; in pbkdf2_derive() local 286 mdlen = EVP_MD_get_size(digest); in pbkdf2_derive() 287 if (mdlen <= 0) in pbkdf2_derive() 294 if ((keylen / mdlen) >= KDF_PBKDF2_MAX_KEY_LEN_DIGEST_RATIO) { in pbkdf2_derive() 325 if (tkeylen > mdlen) in pbkdf2_derive() 326 cplen = mdlen; in pbkdf2_derive() 347 if (!HMAC_Update(hctx, digtmp, mdlen) in pbkdf2_derive()
|
H A D | hkdf.c | 631 size_t mdlen; in prov_tls13_hkdf_generate_secret() local 641 mdlen = (size_t)ret; in prov_tls13_hkdf_generate_secret() 645 insecretlen = mdlen; in prov_tls13_hkdf_generate_secret() 664 if (!prov_tls13_hkdf_expand(md, prevsecret, mdlen, in prov_tls13_hkdf_generate_secret() 666 hash, mdlen, preextractsec, mdlen)) in prov_tls13_hkdf_generate_secret() 669 prevsecretlen = mdlen; in prov_tls13_hkdf_generate_secret() 676 OPENSSL_cleanse(preextractsec, mdlen); in prov_tls13_hkdf_generate_secret()
|
/netbsd/crypto/external/bsd/openssl.old/dist/crypto/ocsp/ |
H A D | ocsp_vfy.c | 283 int mdlen; in ocsp_match_issuerid() local 292 mdlen = EVP_MD_size(dgst); in ocsp_match_issuerid() 293 if (mdlen < 0) in ocsp_match_issuerid() 295 if ((cid->issuerNameHash.length != mdlen) || in ocsp_match_issuerid() 296 (cid->issuerKeyHash.length != mdlen)) in ocsp_match_issuerid() 301 if (memcmp(md, cid->issuerNameHash.data, mdlen)) in ocsp_match_issuerid() 304 if (memcmp(md, cid->issuerKeyHash.data, mdlen)) in ocsp_match_issuerid()
|
/netbsd/crypto/external/bsd/openssl/dist/crypto/ocsp/ |
H A D | ocsp_vfy.c | 313 int mdlen; in ocsp_match_issuerid() local 330 mdlen = EVP_MD_get_size(dgst); in ocsp_match_issuerid() 331 if (mdlen < 0) { in ocsp_match_issuerid() 335 if (cid->issuerNameHash.length != mdlen || in ocsp_match_issuerid() 336 cid->issuerKeyHash.length != mdlen) { in ocsp_match_issuerid() 343 if (memcmp(md, cid->issuerNameHash.data, mdlen) != 0) { in ocsp_match_issuerid() 351 ret = memcmp(md, cid->issuerKeyHash.data, mdlen) == 0; in ocsp_match_issuerid()
|
/netbsd/external/bsd/wpa/dist/src/eap_common/ |
H A D | eap_pwd_common.c | 51 size_t resultbytelen, len = 0, mdlen; in eap_pwd_kdf() local 68 mdlen = SHA256_MAC_LEN; in eap_pwd_kdf() 69 if (crypto_hash_finish(hash, digest, &mdlen) < 0) in eap_pwd_kdf() 71 if ((len + mdlen) > resultbytelen) in eap_pwd_kdf() 74 os_memcpy(result + len, digest, mdlen); in eap_pwd_kdf() 75 len += mdlen; in eap_pwd_kdf()
|
/netbsd/crypto/external/bsd/openssh/dist/ |
H A D | digest-openssl.c | 174 u_int mdlen; in ssh_digest_memory() local 182 mdlen = dlen; in ssh_digest_memory() 183 if (!EVP_Digest(m, mlen, d, &mdlen, digest->mdfunc(), NULL)) in ssh_digest_memory()
|
/netbsd/crypto/external/bsd/openssl/dist/crypto/evp/ |
H A D | m_sigver.c | 526 unsigned int mdlen = 0; in EVP_DigestSignFinal() local 532 r = EVP_DigestFinal_ex(ctx, md, &mdlen); in EVP_DigestSignFinal() 546 r = EVP_DigestFinal_ex(tmp_ctx, md, &mdlen); in EVP_DigestSignFinal() 551 if (EVP_PKEY_sign(pctx, sigret, siglen, md, mdlen) <= 0) in EVP_DigestSignFinal() 597 unsigned int mdlen = 0; in EVP_DigestVerifyFinal() local 639 r = EVP_DigestFinal_ex(ctx, md, &mdlen); in EVP_DigestVerifyFinal() 652 r = EVP_DigestFinal_ex(tmp_ctx, md, &mdlen); in EVP_DigestVerifyFinal() 657 return EVP_PKEY_verify(pctx, sig, siglen, md, mdlen); in EVP_DigestVerifyFinal()
|
/netbsd/crypto/external/bsd/openssl.old/dist/ssl/ |
H A D | tls13_enc.c | 171 size_t mdlen, prevsecretlen; in tls13_generate_secret() local 196 mdlen = (size_t)mdleni; in tls13_generate_secret() 200 insecretlen = mdlen; in tls13_generate_secret() 224 sizeof(derived_secret_label) - 1, hash, mdlen, in tls13_generate_secret() 225 preextractsec, mdlen, 1)) { in tls13_generate_secret() 232 prevsecretlen = mdlen; in tls13_generate_secret() 242 || EVP_PKEY_derive(pctx, outsecret, &mdlen) in tls13_generate_secret() 251 OPENSSL_cleanse(preextractsec, mdlen); in tls13_generate_secret()
|
/netbsd/crypto/external/bsd/openssl.old/dist/doc/man3/ |
H A D | EVP_PKEY_verify.pod | 56 size_t mdlen, siglen; 60 * NB: assumes verify_key, sig, siglen md and mdlen are already set up 74 ret = EVP_PKEY_verify(ctx, sig, siglen, md, mdlen);
|
H A D | EVP_PKEY_sign.pod | 59 size_t mdlen = 32, siglen; 78 if (EVP_PKEY_sign(ctx, NULL, &siglen, md, mdlen) <= 0) 86 if (EVP_PKEY_sign(ctx, sig, &siglen, md, mdlen) <= 0)
|
/netbsd/crypto/external/bsd/openssl.old/dist/crypto/pkcs7/ |
H A D | pk7_attr.c | 108 const unsigned char *md, int mdlen) in PKCS7_add1_attrib_digest() argument 114 if (!ASN1_STRING_set(os, md, mdlen) in PKCS7_add1_attrib_digest()
|
/netbsd/crypto/external/bsd/openssl/dist/crypto/pkcs7/ |
H A D | pk7_attr.c | 107 const unsigned char *md, int mdlen) in PKCS7_add1_attrib_digest() argument 113 if (!ASN1_STRING_set(os, md, mdlen) in PKCS7_add1_attrib_digest()
|
/netbsd/crypto/external/bsd/openssl.old/dist/crypto/sm2/ |
H A D | sm2_pmeth.c | 266 int mdlen = EVP_MD_size(md); in pkey_sm2_digest_custom() local 278 if (mdlen < 0) { in pkey_sm2_digest_custom() 287 return EVP_DigestUpdate(mctx, z, (size_t)mdlen); in pkey_sm2_digest_custom()
|
/netbsd/crypto/external/bsd/openssl/dist/doc/man3/ |
H A D | EVP_PKEY_verify.pod | 64 size_t mdlen, siglen; 68 * NB: assumes verify_key, sig, siglen md and mdlen are already set up 82 ret = EVP_PKEY_verify(ctx, sig, siglen, md, mdlen);
|
H A D | EVP_PKEY_sign.pod | 67 size_t mdlen = 32, siglen; 86 if (EVP_PKEY_sign(ctx, NULL, &siglen, md, mdlen) <= 0) 94 if (EVP_PKEY_sign(ctx, sig, &siglen, md, mdlen) <= 0)
|
/netbsd/external/bsd/ppp/dist/pppd/ |
H A D | chap_ms.c | 590 int mdlen = secret_len; in NTPasswordHash() local 592 int mdlen = secret_len * 8; in NTPasswordHash() 598 while (mdlen > 512) { in NTPasswordHash() 601 mdlen -= 512; in NTPasswordHash() 603 MD4Update(&md4Context, secret, mdlen); in NTPasswordHash()
|