Lines Matching refs:hashctx

27     EVP_MD_CTX *hashctx = EVP_MD_CTX_new();  in oneshot_hash()  local
31 if (hashctx == NULL) in oneshot_hash()
38 if (!EVP_DigestInit_ex(hashctx, shake256, NULL) in oneshot_hash()
39 || !EVP_DigestUpdate(hashctx, in, inlen) in oneshot_hash()
40 || !EVP_DigestFinalXOF(hashctx, out, outlen)) in oneshot_hash()
45 EVP_MD_CTX_free(hashctx); in oneshot_hash()
57 static c448_error_t hash_init_with_dom(OSSL_LIB_CTX *ctx, EVP_MD_CTX *hashctx, in hash_init_with_dom() argument
80 if (!EVP_DigestInit_ex(hashctx, shake256, NULL) in hash_init_with_dom()
81 || !EVP_DigestUpdate(hashctx, dom_s, sizeof(dom_s)-1) in hash_init_with_dom()
82 || !EVP_DigestUpdate(hashctx, dom, sizeof(dom)) in hash_init_with_dom()
83 || !EVP_DigestUpdate(hashctx, context, context_len)) { in hash_init_with_dom()
164 EVP_MD_CTX *hashctx = EVP_MD_CTX_new(); in ossl_c448_ed448_sign() local
171 if (hashctx == NULL) in ossl_c448_ed448_sign()
189 if (!hash_init_with_dom(ctx, hashctx, prehashed, 0, context, in ossl_c448_ed448_sign()
191 || !EVP_DigestUpdate(hashctx, in ossl_c448_ed448_sign()
194 || !EVP_DigestUpdate(hashctx, message, message_len)) { in ossl_c448_ed448_sign()
205 if (!EVP_DigestFinalXOF(hashctx, nonce, sizeof(nonce))) in ossl_c448_ed448_sign()
231 if (!hash_init_with_dom(ctx, hashctx, prehashed, 0, context, context_len, in ossl_c448_ed448_sign()
233 || !EVP_DigestUpdate(hashctx, nonce_point, sizeof(nonce_point)) in ossl_c448_ed448_sign()
234 || !EVP_DigestUpdate(hashctx, pubkey, EDDSA_448_PUBLIC_BYTES) in ossl_c448_ed448_sign()
235 || !EVP_DigestUpdate(hashctx, message, message_len) in ossl_c448_ed448_sign()
236 || !EVP_DigestFinalXOF(hashctx, challenge, sizeof(challenge))) in ossl_c448_ed448_sign()
258 EVP_MD_CTX_free(hashctx); in ossl_c448_ed448_sign()
337 EVP_MD_CTX *hashctx = EVP_MD_CTX_new(); in ossl_c448_ed448_verify() local
340 if (hashctx == NULL in ossl_c448_ed448_verify()
341 || !hash_init_with_dom(ctx, hashctx, prehashed, 0, context, in ossl_c448_ed448_verify()
343 || !EVP_DigestUpdate(hashctx, signature, EDDSA_448_PUBLIC_BYTES) in ossl_c448_ed448_verify()
344 || !EVP_DigestUpdate(hashctx, pubkey, EDDSA_448_PUBLIC_BYTES) in ossl_c448_ed448_verify()
345 || !EVP_DigestUpdate(hashctx, message, message_len) in ossl_c448_ed448_verify()
346 || !EVP_DigestFinalXOF(hashctx, challenge, sizeof(challenge))) { in ossl_c448_ed448_verify()
347 EVP_MD_CTX_free(hashctx); in ossl_c448_ed448_verify()
351 EVP_MD_CTX_free(hashctx); in ossl_c448_ed448_verify()