/// Hash to curve random oracle variant
///
/// This implementation only supports prime order curves with
/// extension degree equal to 1. It would require extension to
/// support other curves such as BLS12-381
Hash to curve random oracle variant
This implementation only supports prime order curves with
extension degree equal to 1. It would require extension to
support other curves such as BLS12-381
Hash to curve random oracle variant This implementation only supports prime order curves with extension degree equal to 1 . It would require extension to support other curves such as BLS12 - 381
pub fn hash2curve_ro(
    curve: EccCurveType,
    input: &[u8],
    domain_separator: &[u8],
) -> ThresholdEcdsaResult<EccPoint> {
    let u = hash_to_field(2, curve, input, domain_separator)?;
    let q0 = map_to_curve(&u[0])?;
    let q1 = map_to_curve(&u[1])?;
    let r = q0.add_points(&q1)?;
    // for a curve without prime order, we would clear the cofactor here
    Ok(r)
}
pub fn hash2curve_ro ( curve : EccCurveType , input : & [ u8 ] , domain_separator : & [ u8 ] , ) -> ThresholdEcdsaResult < EccPoint > { let u = hash_to_field ( 2 , curve , input , domain_separator ) ? ; let q0 = map_to_curve ( & u [ 0 ] ) ? ; let q1 = map_to_curve ( & u [ 1 ] ) ? ; let r = q0 . add_points ( & q1 ) ? ; // for a curve without prime order, we would clear the cofactor here Ok ( r ) }
Hash to curve random oracle variant
This implementation only supports prime order curves with
extension degree equal to 1.
Hash to curve random oracle variant This implementation only supports prime order curves with extension degree equal to 1 .
curve
EccCurveType
input
&[u8]
domain_separator
&[u8]