Lines Matching refs:hash
120 EVP_MD_CTX *hash = EVP_MD_CTX_new(); in ossl_sm2_encrypt() local
140 if (hash == NULL || C3_size <= 0) { in ossl_sm2_encrypt()
227 if (EVP_DigestInit(hash, fetched_digest) == 0 in ossl_sm2_encrypt()
228 || EVP_DigestUpdate(hash, x2y2, field_size) == 0 in ossl_sm2_encrypt()
229 || EVP_DigestUpdate(hash, msg, msg_len) == 0 in ossl_sm2_encrypt()
230 || EVP_DigestUpdate(hash, x2y2 + field_size, field_size) == 0 in ossl_sm2_encrypt()
231 || EVP_DigestFinal(hash, C3, NULL) == 0) { in ossl_sm2_encrypt()
268 EVP_MD_CTX_free(hash); in ossl_sm2_encrypt()
296 EVP_MD_CTX *hash = NULL; in ossl_sm2_decrypt() local
378 hash = EVP_MD_CTX_new(); in ossl_sm2_decrypt()
379 if (hash == NULL) { in ossl_sm2_decrypt()
384 if (!EVP_DigestInit(hash, digest) in ossl_sm2_decrypt()
385 || !EVP_DigestUpdate(hash, x2y2, field_size) in ossl_sm2_decrypt()
386 || !EVP_DigestUpdate(hash, ptext_buf, msg_len) in ossl_sm2_decrypt()
387 || !EVP_DigestUpdate(hash, x2y2 + field_size, field_size) in ossl_sm2_decrypt()
388 || !EVP_DigestFinal(hash, computed_C3, NULL)) { in ossl_sm2_decrypt()
411 EVP_MD_CTX_free(hash); in ossl_sm2_decrypt()