cardano-crypto-praos/cbits/vrf10_batchcompat/verify.c
int
crypto_vrf_ietfdraft10_proof_to_hash_batchcompat(unsigned char beta[crypto_vrf_ietfdraft10_OUTPUTBYTES],
                                     const unsigned char pi[crypto_vrf_ietfdraft10_PROOFBYTES_BATCHCOMPAT])
{
    ge25519_p3    Gamma_point;
    unsigned char s_scalar[crypto_core_ed25519_SCALARBYTES];
    unsigned char gamma_string[crypto_core_ed25519_BYTES];

    unsigned char U_point[crypto_core_ed25519_BYTES], V_point[crypto_core_ed25519_BYTES];
    /* (Gamma, U, V, s) = ECVRF_decode_proof(pi_string) */
    if (_vrf_ietfdraft10_decode_proof_batchcompat(&Gamma_point, U_point, V_point, s_scalar, pi) != 0) {
        return -1;
    }

    hash_gamma(beta, Gamma_point);

    return 0;
}
/*
 * Convert a batch compatible VRF proof pi into a VRF output hash beta per draft spec section 5.2.
 * This function does not verify the proof! For an untrusted proof, instead call
 * crypto_vrf_ietfdraft10_verify, which will output the hash if verification
 * succeeds.
 * Returns 0 on success, -1 on failure decoding the proof.
 */
Convert a batch compatible VRF proof pi into a VRF output hash beta per draft spec section 5.2.
This function does not verify the proof. For an untrusted proof, instead call
crypto_vrf_ietfdraft10_verify, which will output the hash if verification
succeeds.
Returns 0 on success, -1 on failure decoding the proof.
Convert a batch compatible VRF proof pi into a VRF output hash beta per draft spec section 5 . 2 . This function does not verify the proof . For an untrusted proof instead call crypto_vrf_ietfdraft10_verify which will output the hash if verification succeeds . Returns 0 on success - 1 on failure decoding the proof .
int
crypto_vrf_ietfdraft10_proof_to_hash_batchcompat(unsigned char beta[crypto_vrf_ietfdraft10_OUTPUTBYTES],
                                     const unsigned char pi[crypto_vrf_ietfdraft10_PROOFBYTES_BATCHCOMPAT])
{
    ge25519_p3    Gamma_point;
    unsigned char s_scalar[crypto_core_ed25519_SCALARBYTES];
    unsigned char gamma_string[crypto_core_ed25519_BYTES];
    unsigned char U_point[crypto_core_ed25519_BYTES], V_point[crypto_core_ed25519_BYTES];
    if (_vrf_ietfdraft10_decode_proof_batchcompat(&Gamma_point, U_point, V_point, s_scalar, pi) != 0) {
        return -1;
    }
    hash_gamma(beta, Gamma_point);
    return 0;
}
int crypto_vrf_ietfdraft10_proof_to_hash_batchcompat ( unsigned char beta [ crypto_vrf_ietfdraft10_OUTPUTBYTES ] , const unsigned char pi [ crypto_vrf_ietfdraft10_PROOFBYTES_BATCHCOMPAT ] ) { ge25519_p3 Gamma_point ; unsigned char s_scalar [ crypto_core_ed25519_SCALARBYTES ] ; unsigned char gamma_string [ crypto_core_ed25519_BYTES ] ; unsigned char U_point [ crypto_core_ed25519_BYTES ] , V_point [ crypto_core_ed25519_BYTES ] ; if ( _vrf_ietfdraft10_decode_proof_batchcompat ( & Gamma_point , U_point , V_point , s_scalar , pi ) != 0 ) { return -1 ; } hash_gamma ( beta , Gamma_point ) ; return 0 ; }
Convert a batch compatible VRF proof pi into a VRF output hash beta per draft spec section 5.2.
Convert a batch compatible VRF proof pi into a VRF output hash beta per draft spec section 5 . 2 .
/* (Gamma, U, V, s) = ECVRF_decode_proof(pi_string) */