Lines Matching refs:hash_ctx

5437 static int hash_init_with_dom(EVP_MD_CTX *hash_ctx,  in hash_init_with_dom()  argument
5451 if (!EVP_DigestInit_ex(hash_ctx, sha512, NULL)) in hash_init_with_dom()
5464 if (!EVP_DigestUpdate(hash_ctx, dom_s, sizeof(dom_s)-1) in hash_init_with_dom()
5465 || !EVP_DigestUpdate(hash_ctx, dom, sizeof(dom)) in hash_init_with_dom()
5466 || !EVP_DigestUpdate(hash_ctx, context, context_len)) { in hash_init_with_dom()
5485 EVP_MD_CTX *hash_ctx = EVP_MD_CTX_new(); in ossl_ed25519_sign() local
5500 if (sha512 == NULL || hash_ctx == NULL) in ossl_ed25519_sign()
5503 if (!EVP_DigestInit_ex(hash_ctx, sha512, NULL) in ossl_ed25519_sign()
5504 || !EVP_DigestUpdate(hash_ctx, private_key, 32) in ossl_ed25519_sign()
5505 || !EVP_DigestFinal_ex(hash_ctx, az, &sz)) in ossl_ed25519_sign()
5512 if (!hash_init_with_dom(hash_ctx, sha512, dom2flag, phflag, context, context_len) in ossl_ed25519_sign()
5513 || !EVP_DigestUpdate(hash_ctx, az + 32, 32) in ossl_ed25519_sign()
5514 || !EVP_DigestUpdate(hash_ctx, tbs, tbs_len) in ossl_ed25519_sign()
5515 || !EVP_DigestFinal_ex(hash_ctx, nonce, &sz)) in ossl_ed25519_sign()
5522 if (!hash_init_with_dom(hash_ctx, sha512, dom2flag, phflag, context, context_len) in ossl_ed25519_sign()
5523 || !EVP_DigestUpdate(hash_ctx, out_sig, 32) in ossl_ed25519_sign()
5524 || !EVP_DigestUpdate(hash_ctx, public_key, 32) in ossl_ed25519_sign()
5525 || !EVP_DigestUpdate(hash_ctx, tbs, tbs_len) in ossl_ed25519_sign()
5526 || !EVP_DigestFinal_ex(hash_ctx, hram, &sz)) in ossl_ed25519_sign()
5537 EVP_MD_CTX_free(hash_ctx); in ossl_ed25519_sign()
5569 EVP_MD_CTX *hash_ctx = NULL; in ossl_ed25519_verify() local
5632 hash_ctx = EVP_MD_CTX_new(); in ossl_ed25519_verify()
5633 if (hash_ctx == NULL) in ossl_ed25519_verify()
5636 if (!hash_init_with_dom(hash_ctx, sha512, dom2flag, phflag, context, context_len) in ossl_ed25519_verify()
5637 || !EVP_DigestUpdate(hash_ctx, r, 32) in ossl_ed25519_verify()
5638 || !EVP_DigestUpdate(hash_ctx, public_key, 32) in ossl_ed25519_verify()
5639 || !EVP_DigestUpdate(hash_ctx, tbs, tbs_len) in ossl_ed25519_verify()
5640 || !EVP_DigestFinal_ex(hash_ctx, h, &sz)) in ossl_ed25519_verify()
5660 EVP_MD_CTX_free(hash_ctx); in ossl_ed25519_verify()