Home
last modified time | relevance | path

Searched refs:md_size (Results 1 – 25 of 36) sorted by relevance

12

/third_party/openssl/crypto/evp/
Dbio_ok.c438 int md_size; in sig_out() local
444 md_size = EVP_MD_get_size(digest); in sig_out()
447 if (ctx->buf_len + 2 * md_size > OK_BLOCK_SIZE) in sig_out()
456 if (RAND_bytes(md_data, md_size) <= 0) in sig_out()
458 memcpy(&(ctx->buf[ctx->buf_len]), md_data, md_size); in sig_out()
459 longswap(&(ctx->buf[ctx->buf_len]), md_size); in sig_out()
460 ctx->buf_len += md_size; in sig_out()
466 ctx->buf_len += md_size; in sig_out()
482 int md_size; in sig_in() local
489 if ((md_size = EVP_MD_get_size(digest)) < 0) in sig_in()
[all …]
Dlegacy_sha.c32 return fn##_init(EVP_MD_CTX_get0_md_data(ctx), tag, ctx->digest->md_size * 8); \
45 return fn##_init(EVP_MD_CTX_get0_md_data(ctx), tag, ctx->digest->md_size * 8); \
78 ctx->md_size = p1; in shake_ctrl()
/third_party/node/deps/openssl/openssl/crypto/evp/
Dbio_ok.c438 int md_size; in sig_out() local
444 md_size = EVP_MD_get_size(digest); in sig_out()
447 if (ctx->buf_len + 2 * md_size > OK_BLOCK_SIZE) in sig_out()
456 if (RAND_bytes(md_data, md_size) <= 0) in sig_out()
458 memcpy(&(ctx->buf[ctx->buf_len]), md_data, md_size); in sig_out()
459 longswap(&(ctx->buf[ctx->buf_len]), md_size); in sig_out()
460 ctx->buf_len += md_size; in sig_out()
466 ctx->buf_len += md_size; in sig_out()
482 int md_size; in sig_in() local
489 if ((md_size = EVP_MD_get_size(digest)) < 0) in sig_in()
[all …]
Dlegacy_sha.c32 return fn##_init(EVP_MD_CTX_get0_md_data(ctx), tag, ctx->digest->md_size * 8); \
45 return fn##_init(EVP_MD_CTX_get0_md_data(ctx), tag, ctx->digest->md_size * 8); \
82 ctx->md_size = p1; in shake_ctrl()
/third_party/node/deps/openssl/openssl/ssl/
Ds3_cbc.c174 size_t md_size, md_block_size = 64; in ssl3_cbc_digest_record() local
211 md_size = 16; in ssl3_cbc_digest_record()
221 md_size = 20; in ssl3_cbc_digest_record()
228 md_size = 224 / 8; in ssl3_cbc_digest_record()
235 md_size = 32; in ssl3_cbc_digest_record()
242 md_size = 384 / 8; in ssl3_cbc_digest_record()
251 md_size = 64; in ssl3_cbc_digest_record()
266 || !ossl_assert(md_size <= EVP_MAX_MD_SIZE)) in ssl3_cbc_digest_record()
292 … variance_blocks = is_sslv3 ? 2 : ( ((255 + 1 + md_size + md_block_size - 1) / md_block_size) + 1); in ssl3_cbc_digest_record()
303 max_mac_bytes = len - md_size - 1; in ssl3_cbc_digest_record()
[all …]
/third_party/openssl/ssl/
Ds3_cbc.c174 size_t md_size, md_block_size = 64; in ssl3_cbc_digest_record() local
211 md_size = 16; in ssl3_cbc_digest_record()
221 md_size = 20; in ssl3_cbc_digest_record()
228 md_size = 224 / 8; in ssl3_cbc_digest_record()
235 md_size = 32; in ssl3_cbc_digest_record()
242 md_size = 384 / 8; in ssl3_cbc_digest_record()
251 md_size = 64; in ssl3_cbc_digest_record()
266 || !ossl_assert(md_size <= EVP_MAX_MD_SIZE)) in ssl3_cbc_digest_record()
292 … variance_blocks = is_sslv3 ? 2 : ( ((255 + 1 + md_size + md_block_size - 1) / md_block_size) + 1); in ssl3_cbc_digest_record()
303 max_mac_bytes = len - md_size - 1; in ssl3_cbc_digest_record()
[all …]
/third_party/mbedtls/library/
Dpkcs5.c235 unsigned char md_size = mbedtls_md_get_size(ctx->md_info); in pkcs5_pbkdf2_hmac() local
271 memcpy(md1, work, md_size); in pkcs5_pbkdf2_hmac()
276 if ((ret = mbedtls_md_hmac_update(ctx, md1, md_size)) != 0) { in pkcs5_pbkdf2_hmac()
290 mbedtls_xor(work, work, md1, md_size); in pkcs5_pbkdf2_hmac()
293 use_len = (key_length < md_size) ? key_length : md_size; in pkcs5_pbkdf2_hmac()
357 const unsigned char md_size = mbedtls_hash_info_get_size(md_alg); in mbedtls_pkcs5_pbkdf2_hmac_ext()
422 if ((status = psa_mac_update(&operation, md1, md_size)) != PSA_SUCCESS) { in mbedtls_pkcs5_pbkdf2_hmac_ext()
432 mbedtls_xor(work, work, md1, md_size); in mbedtls_pkcs5_pbkdf2_hmac_ext()
435 use_len = (key_length < md_size) ? key_length : md_size; in mbedtls_pkcs5_pbkdf2_hmac_ext()
Dhmac_drbg.c242 size_t md_size; in mbedtls_hmac_drbg_seed() local
253 md_size = mbedtls_md_get_size(md_info); in mbedtls_hmac_drbg_seed()
260 if ((ret = mbedtls_md_hmac_starts(&ctx->md_ctx, ctx->V, md_size)) != 0) { in mbedtls_hmac_drbg_seed()
263 memset(ctx->V, 0x01, md_size); in mbedtls_hmac_drbg_seed()
276 ctx->entropy_len = md_size <= 20 ? 16 : /* 160-bits hash -> 128 bits */ in mbedtls_hmac_drbg_seed()
277 md_size <= 28 ? 24 : /* 224-bits hash -> 192 bits */ in mbedtls_hmac_drbg_seed()
/third_party/node/deps/openssl/openssl/crypto/pkcs12/
Dp12_mutl.c91 int md_size = 0; in pkcs12_gen_mac() local
130 md_size = EVP_MD_get_size(md); in pkcs12_gen_mac()
132 if (md_size < 0) in pkcs12_gen_mac()
138 md_size = TK26_MAC_KEY_LEN; in pkcs12_gen_mac()
140 md_size, key, md)) { in pkcs12_gen_mac()
147 iter, md_size, key, md)) { in pkcs12_gen_mac()
154 iter, md_size, key, md, in pkcs12_gen_mac()
163 || !HMAC_Init_ex(hmac, key, md_size, md, NULL) in pkcs12_gen_mac()
/third_party/openssl/crypto/pkcs12/
Dp12_mutl.c91 int md_size = 0; in pkcs12_gen_mac() local
125 md_size = EVP_MD_get_size(md); in pkcs12_gen_mac()
127 if (md_size < 0) in pkcs12_gen_mac()
133 md_size = TK26_MAC_KEY_LEN; in pkcs12_gen_mac()
135 md_size, key, md)) { in pkcs12_gen_mac()
142 iter, md_size, key, md)) { in pkcs12_gen_mac()
149 iter, md_size, key, md, in pkcs12_gen_mac()
158 || !HMAC_Init_ex(hmac, key, md_size, md, NULL) in pkcs12_gen_mac()
/third_party/openssl/crypto/sha/
Dsha3.c28 ctx->md_size = bitlen / 8; in ossl_sha3_init()
41 ctx->md_size *= 2; in ossl_keccak_kmac_init()
92 if (ctx->md_size == 0) in ossl_sha3_final()
106 SHA3_squeeze(ctx->A, md, ctx->md_size, bsz); in ossl_sha3_final()
/third_party/node/deps/openssl/openssl/crypto/sha/
Dsha3.c28 ctx->md_size = bitlen / 8; in ossl_sha3_init()
41 ctx->md_size *= 2; in ossl_keccak_kmac_init()
92 if (ctx->md_size == 0) in ossl_sha3_final()
106 SHA3_squeeze(ctx->A, md, ctx->md_size, bsz); in ossl_sha3_final()
/third_party/node/deps/openssl/openssl/ssl/record/
Dssl3_record.c1312 size_t md_size; in n_ssl3_mac() local
1329 md_size = t; in n_ssl3_mac()
1330 npad = (48 / md_size) * md_size; in n_ssl3_mac()
1354 memcpy(header + j, mac_sec, md_size); in n_ssl3_mac()
1355 j += md_size; in n_ssl3_mac()
1366 md, &md_size, in n_ssl3_mac()
1369 mac_sec, md_size, 1) <= 0) in n_ssl3_mac()
1384 || EVP_DigestUpdate(md_ctx, mac_sec, md_size) <= 0 in n_ssl3_mac()
1392 || EVP_DigestUpdate(md_ctx, mac_sec, md_size) <= 0 in n_ssl3_mac()
1394 || EVP_DigestUpdate(md_ctx, md, md_size) <= 0 in n_ssl3_mac()
[all …]
/third_party/openssl/ssl/record/
Dssl3_record.c1312 size_t md_size; in n_ssl3_mac() local
1329 md_size = t; in n_ssl3_mac()
1330 npad = (48 / md_size) * md_size; in n_ssl3_mac()
1354 memcpy(header + j, mac_sec, md_size); in n_ssl3_mac()
1355 j += md_size; in n_ssl3_mac()
1366 md, &md_size, in n_ssl3_mac()
1369 mac_sec, md_size, 1) <= 0) in n_ssl3_mac()
1384 || EVP_DigestUpdate(md_ctx, mac_sec, md_size) <= 0 in n_ssl3_mac()
1392 || EVP_DigestUpdate(md_ctx, mac_sec, md_size) <= 0 in n_ssl3_mac()
1394 || EVP_DigestUpdate(md_ctx, md, md_size) <= 0 in n_ssl3_mac()
[all …]
/third_party/openssl/providers/implementations/digests/
Dsha3_prov.c116 *outl = ctx->md_size; in keccak_final()
166 memcpy(md, ctx->A, ctx->md_size); in s390x_sha3_final()
176 s390x_klmd(ctx->buf, ctx->bufsz, md, ctx->md_size, ctx->pad, ctx->A); in s390x_shake_final()
293 if (p != NULL && !OSSL_PARAM_get_size_t(p, &ctx->md_size)) { in shake_set_ctx_params()
/third_party/node/deps/openssl/openssl/providers/implementations/digests/
Dsha3_prov.c116 *outl = ctx->md_size; in keccak_final()
166 memcpy(md, ctx->A, ctx->md_size); in s390x_sha3_final()
176 s390x_klmd(ctx->buf, ctx->bufsz, md, ctx->md_size, ctx->pad, ctx->A); in s390x_shake_final()
293 if (p != NULL && !OSSL_PARAM_get_size_t(p, &ctx->md_size)) { in shake_set_ctx_params()
/third_party/node/deps/openssl/openssl/crypto/sm2/
Dsm2_sign.c148 const int md_size = EVP_MD_get_size(digest); in sm2_compute_msg_hash() local
155 if (md_size < 0) { in sm2_compute_msg_hash()
160 z = OPENSSL_zalloc(md_size); in sm2_compute_msg_hash()
178 || !EVP_DigestUpdate(hash, z, md_size) in sm2_compute_msg_hash()
186 e = BN_bin2bn(z, md_size, NULL); in sm2_compute_msg_hash()
Dsm2_crypt.c92 const int md_size = EVP_MD_get_size(digest); in ossl_sm2_ciphertext_size() local
95 if (field_size == 0 || md_size < 0) in ossl_sm2_ciphertext_size()
100 + ASN1_object_size(0, md_size, V_ASN1_OCTET_STRING) in ossl_sm2_ciphertext_size()
/third_party/openssl/crypto/sm2/
Dsm2_sign.c148 const int md_size = EVP_MD_get_size(digest); in sm2_compute_msg_hash() local
155 if (md_size < 0) { in sm2_compute_msg_hash()
160 z = OPENSSL_zalloc(md_size); in sm2_compute_msg_hash()
178 || !EVP_DigestUpdate(hash, z, md_size) in sm2_compute_msg_hash()
186 e = BN_bin2bn(z, md_size, NULL); in sm2_compute_msg_hash()
Dsm2_crypt.c92 const int md_size = EVP_MD_get_size(digest); in ossl_sm2_ciphertext_size() local
95 if (field_size == 0 || md_size < 0) in ossl_sm2_ciphertext_size()
100 + ASN1_object_size(0, md_size, V_ASN1_OCTET_STRING) in ossl_sm2_ciphertext_size()
/third_party/openssl/providers/implementations/rands/
Dcrngt.c36 unsigned int *md_size) in crngt_get_entropy() argument
44 r = EVP_Digest(p, CRNGT_BUFSIZ, md, md_size, digest, NULL); in crngt_get_entropy()
/third_party/node/deps/openssl/openssl/providers/implementations/rands/
Dcrngt.c36 unsigned int *md_size) in crngt_get_entropy() argument
44 r = EVP_Digest(p, CRNGT_BUFSIZ, md, md_size, digest, NULL); in crngt_get_entropy()
/third_party/openssl/include/internal/
Dsha3.h37 size_t md_size; /* output length, variable in XOF */ member
/third_party/node/deps/openssl/openssl/include/internal/
Dsha3.h37 size_t md_size; /* output length, variable in XOF */ member
/third_party/node/src/crypto/
Dcrypto_common.cc403 unsigned int md_size, in AddFingerprintDigest() argument
408 for (i = 0; i < md_size; i++) { in AddFingerprintDigest()
414 DCHECK_GT(md_size, 0); in AddFingerprintDigest()
415 fingerprint[(3 * (md_size - 1)) + 2] = '\0'; in AddFingerprintDigest()
562 unsigned int md_size; in GetFingerprintDigest() local
565 if (X509_digest(cert, method, md, &md_size)) { in GetFingerprintDigest()
566 AddFingerprintDigest(md, md_size, fingerprint); in GetFingerprintDigest()

12