Lines Matching refs:msg_len
88 size_t msg_len, size_t *ct_size) in ossl_sm2_ciphertext_size() argument
100 + ASN1_object_size(0, msg_len, V_ASN1_OCTET_STRING); in ossl_sm2_ciphertext_size()
109 const uint8_t *msg, size_t msg_len, in ossl_sm2_encrypt() argument
183 msg_mask = OPENSSL_zalloc(msg_len); in ossl_sm2_encrypt()
208 if (!ossl_ecdh_kdf_X9_63(msg_mask, msg_len, x2y2, 2 * field_size, NULL, 0, in ossl_sm2_encrypt()
214 if (is_all_zeros(msg_mask, msg_len)) { in ossl_sm2_encrypt()
219 for (i = 0; i != msg_len; ++i) in ossl_sm2_encrypt()
229 || EVP_DigestUpdate(hash, msg, msg_len) == 0 in ossl_sm2_encrypt()
246 || !ASN1_OCTET_STRING_set(ctext_struct.C2, msg_mask, msg_len)) { in ossl_sm2_encrypt()
295 int msg_len = 0; in ossl_sm2_decrypt() local
319 msg_len = sm2_ctext->C2->length; in ossl_sm2_decrypt()
320 if (*ptext_len < (size_t)msg_len) { in ossl_sm2_decrypt()
340 msg_mask = OPENSSL_zalloc(msg_len); in ossl_sm2_decrypt()
364 || !ossl_ecdh_kdf_X9_63(msg_mask, msg_len, x2y2, 2 * field_size, in ossl_sm2_decrypt()
370 if (is_all_zeros(msg_mask, msg_len)) { in ossl_sm2_decrypt()
375 for (i = 0; i != msg_len; ++i) in ossl_sm2_decrypt()
386 || !EVP_DigestUpdate(hash, ptext_buf, msg_len) in ossl_sm2_decrypt()
399 *ptext_len = msg_len; in ossl_sm2_decrypt()