cardano-crypto-praos/cbits/vrf10_batchcompat/convert.c
void
_vrf_ietfdraft10_hash_to_curve_elligator2_25519(unsigned char H_string[crypto_core_ed25519_BYTES],
                                                const ge25519_p3 *Y_point,
                                                const unsigned char *alpha,
                                                const unsigned long long alphalen)
{
    unsigned char            Y_string[crypto_vrf_ietfdraft10_PUBLICKEYBYTES], string_to_hash[crypto_vrf_ietfdraft10_PUBLICKEYBYTES + alphalen];

    _vrf_ietfdraft10_point_to_string(Y_string, Y_point);
    memmove(string_to_hash, Y_string, crypto_vrf_ietfdraft10_PUBLICKEYBYTES);
    memmove(string_to_hash + crypto_vrf_ietfdraft10_PUBLICKEYBYTES, alpha, alphalen);

    _ext_crypto_core_ed25519_from_string(H_string, "ECVRF_edwards25519_XMD:SHA-512_ELL2_NU_\4", string_to_hash, crypto_vrf_ietfdraft10_PUBLICKEYBYTES + alphalen); /* elligator2 */
}
/* Hash a message to a curve point using Elligator2.
 * Specified in VRF draft spec section 5.4.1.2.
 * The actual elligator2 implementation is ge25519_from_uniform.
 * Runtime depends only on alphalen (the message length)
 */
Hash a message to a curve point using Elligator2.
Specified in VRF draft spec section 5.4.1.2.
The actual elligator2 implementation is ge25519_from_uniform.
Runtime depends only on alphalen (the message length)
Hash a message to a curve point using Elligator2 . Specified in VRF draft spec section 5 . 4 . 1 . 2 . The actual elligator2 implementation is ge25519_from_uniform . Runtime depends only on alphalen ( the message length )
void
_vrf_ietfdraft10_hash_to_curve_elligator2_25519(unsigned char H_string[crypto_core_ed25519_BYTES],
                                                const ge25519_p3 *Y_point,
                                                const unsigned char *alpha,
                                                const unsigned long long alphalen)
{
    unsigned char            Y_string[crypto_vrf_ietfdraft10_PUBLICKEYBYTES], string_to_hash[crypto_vrf_ietfdraft10_PUBLICKEYBYTES + alphalen];
    _vrf_ietfdraft10_point_to_string(Y_string, Y_point);
    memmove(string_to_hash, Y_string, crypto_vrf_ietfdraft10_PUBLICKEYBYTES);
    memmove(string_to_hash + crypto_vrf_ietfdraft10_PUBLICKEYBYTES, alpha, alphalen);
    _ext_crypto_core_ed25519_from_string(H_string, "ECVRF_edwards25519_XMD:SHA-512_ELL2_NU_\4", string_to_hash, crypto_vrf_ietfdraft10_PUBLICKEYBYTES + alphalen); 
}
void _vrf_ietfdraft10_hash_to_curve_elligator2_25519 ( unsigned char H_string [ crypto_core_ed25519_BYTES ] , const ge25519_p3 * Y_point , const unsigned char * alpha , const unsigned long long alphalen ) { unsigned char Y_string [ crypto_vrf_ietfdraft10_PUBLICKEYBYTES ] , string_to_hash [ crypto_vrf_ietfdraft10_PUBLICKEYBYTES + alphalen ] ; _vrf_ietfdraft10_point_to_string ( Y_string , Y_point ) ; memmove ( string_to_hash , Y_string , crypto_vrf_ietfdraft10_PUBLICKEYBYTES ) ; memmove ( string_to_hash + crypto_vrf_ietfdraft10_PUBLICKEYBYTES , alpha , alphalen ) ; _ext_crypto_core_ed25519_from_string ( H_string , " \4 " , string_to_hash , crypto_vrf_ietfdraft10_PUBLICKEYBYTES + alphalen ) ; }
Hash a message to a curve point using Elligator2.
Hash a message to a curve point using Elligator2 .
/* elligator2 */