c448_error_t c448_ed448_verify(
                    const uint8_t signature[EDDSA_448_SIGNATURE_BYTES],
                    const uint8_t pubkey[EDDSA_448_PUBLIC_BYTES],
                    const uint8_t *message, size_t message_len,
                    uint8_t prehashed, const uint8_t *context,
                    uint8_t context_len)
{
    curve448_point_t pk_point, r_point;
    c448_error_t error =
        curve448_point_decode_like_eddsa_and_mul_by_ratio(pk_point, pubkey);
    curve448_scalar_t challenge_scalar;
    curve448_scalar_t response_scalar;
    if (C448_SUCCESS != error)
        return error;
    error =
        curve448_point_decode_like_eddsa_and_mul_by_ratio(r_point, signature);
    if (C448_SUCCESS != error)
        return error;
    {
        EVP_MD_CTX *hashctx = EVP_MD_CTX_new();
        uint8_t challenge[2 * EDDSA_448_PRIVATE_BYTES];
        if (hashctx == NULL
                || !hash_init_with_dom(hashctx, prehashed, 0, context,
                                       context_len)
                || !EVP_DigestUpdate(hashctx, signature, EDDSA_448_PUBLIC_BYTES)
                || !EVP_DigestUpdate(hashctx, pubkey, EDDSA_448_PUBLIC_BYTES)
                || !EVP_DigestUpdate(hashctx, message, message_len)
                || !EVP_DigestFinalXOF(hashctx, challenge, sizeof(challenge))) {
            EVP_MD_CTX_free(hashctx);
            return C448_FAILURE;
        }
        EVP_MD_CTX_free(hashctx);
        curve448_scalar_decode_long(challenge_scalar, challenge,
                                    sizeof(challenge));
        OPENSSL_cleanse(challenge, sizeof(challenge));
    }
    curve448_scalar_sub(challenge_scalar, curve448_scalar_zero,
                        challenge_scalar);
    curve448_scalar_decode_long(response_scalar,
                                &signature[EDDSA_448_PUBLIC_BYTES],
                                EDDSA_448_PRIVATE_BYTES);
    curve448_base_double_scalarmul_non_secret(pk_point,
                                              response_scalar,
                                              pk_point, challenge_scalar);
    return c448_succeed_if(curve448_point_eq(pk_point, r_point));
}
['c448_error_t c448_ed448_verify(\n                    const uint8_t signature[EDDSA_448_SIGNATURE_BYTES],\n                    const uint8_t pubkey[EDDSA_448_PUBLIC_BYTES],\n                    const uint8_t *message, size_t message_len,\n                    uint8_t prehashed, const uint8_t *context,\n                    uint8_t context_len)\n{\n    curve448_point_t pk_point, r_point;\n    c448_error_t error =\n        curve448_point_decode_like_eddsa_and_mul_by_ratio(pk_point, pubkey);\n    curve448_scalar_t challenge_scalar;\n    curve448_scalar_t response_scalar;\n    if (C448_SUCCESS != error)\n        return error;\n    error =\n        curve448_point_decode_like_eddsa_and_mul_by_ratio(r_point, signature);\n    if (C448_SUCCESS != error)\n        return error;\n    {\n        EVP_MD_CTX *hashctx = EVP_MD_CTX_new();\n        uint8_t challenge[2 * EDDSA_448_PRIVATE_BYTES];\n        if (hashctx == NULL\n                || !hash_init_with_dom(hashctx, prehashed, 0, context,\n                                       context_len)\n                || !EVP_DigestUpdate(hashctx, signature, EDDSA_448_PUBLIC_BYTES)\n                || !EVP_DigestUpdate(hashctx, pubkey, EDDSA_448_PUBLIC_BYTES)\n                || !EVP_DigestUpdate(hashctx, message, message_len)\n                || !EVP_DigestFinalXOF(hashctx, challenge, sizeof(challenge))) {\n            EVP_MD_CTX_free(hashctx);\n            return C448_FAILURE;\n        }\n        EVP_MD_CTX_free(hashctx);\n        curve448_scalar_decode_long(challenge_scalar, challenge,\n                                    sizeof(challenge));\n        OPENSSL_cleanse(challenge, sizeof(challenge));\n    }\n    curve448_scalar_sub(challenge_scalar, curve448_scalar_zero,\n                        challenge_scalar);\n    curve448_scalar_decode_long(response_scalar,\n                                &signature[EDDSA_448_PUBLIC_BYTES],\n                                EDDSA_448_PRIVATE_BYTES);\n    curve448_base_double_scalarmul_non_secret(pk_point,\n                                              response_scalar,\n                                              pk_point, challenge_scalar);\n    return c448_succeed_if(curve448_point_eq(pk_point, r_point));\n}', 'EVP_MD_CTX *EVP_MD_CTX_new(void)\n{\n    return OPENSSL_zalloc(sizeof(EVP_MD_CTX));\n}', 'void *CRYPTO_zalloc(size_t num, const char *file, int line)\n{\n    void *ret = CRYPTO_malloc(num, file, line);\n    FAILTEST();\n    if (ret != NULL)\n        memset(ret, 0, num);\n    return ret;\n}', 'void *CRYPTO_malloc(size_t num, const char *file, int line)\n{\n    void *ret = NULL;\n    INCREMENT(malloc_count);\n    if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)\n        return malloc_impl(num, file, line);\n    if (num == 0)\n        return NULL;\n    FAILTEST();\n    if (allow_customize) {\n        allow_customize = 0;\n    }\n#ifndef OPENSSL_NO_CRYPTO_MDEBUG\n    if (call_malloc_debug) {\n        CRYPTO_mem_debug_malloc(NULL, num, 0, file, line);\n        ret = malloc(num);\n        CRYPTO_mem_debug_malloc(ret, num, 1, file, line);\n    } else {\n        ret = malloc(num);\n    }\n#else\n    (void)(file); (void)(line);\n    ret = malloc(num);\n#endif\n    return ret;\n}', 'static c448_error_t hash_init_with_dom(EVP_MD_CTX *hashctx, uint8_t prehashed,\n                                       uint8_t for_prehash,\n                                       const uint8_t *context,\n                                       size_t context_len)\n{\n    const char *dom_s = "SigEd448";\n    uint8_t dom[2];\n    if (context_len > UINT8_MAX)\n        return C448_FAILURE;\n    dom[0] = (uint8_t)(2 - (prehashed == 0 ? 1 : 0)\n                       - (for_prehash == 0 ? 1 : 0));\n    dom[1] = (uint8_t)context_len;\n    if (!EVP_DigestInit_ex(hashctx, EVP_shake256(), NULL)\n            || !EVP_DigestUpdate(hashctx, dom_s, strlen(dom_s))\n            || !EVP_DigestUpdate(hashctx, dom, sizeof(dom))\n            || !EVP_DigestUpdate(hashctx, context, context_len))\n        return C448_FAILURE;\n    return C448_SUCCESS;\n}', 'void EVP_MD_CTX_free(EVP_MD_CTX *ctx)\n{\n    EVP_MD_CTX_reset(ctx);\n    OPENSSL_free(ctx);\n}', 'void CRYPTO_free(void *str, const char *file, int line)\n{\n    INCREMENT(free_count);\n    if (free_impl != NULL && free_impl != &CRYPTO_free) {\n        free_impl(str, file, line);\n        return;\n    }\n#ifndef OPENSSL_NO_CRYPTO_MDEBUG\n    if (call_malloc_debug) {\n        CRYPTO_mem_debug_free(str, 0, file, line);\n        free(str);\n        CRYPTO_mem_debug_free(str, 1, file, line);\n    } else {\n        free(str);\n    }\n#else\n    free(str);\n#endif\n}']