Add Ristretto eVRF trait impls

This commit is contained in:
Luke Parker
2024-07-28 15:33:45 -04:00
parent a6775d7dc5
commit c5cc0dc883
3 changed files with 8 additions and 1 deletions

View File

@@ -45,6 +45,12 @@ impl EvrfCurve for ciphersuite::Ed25519 {
type EmbeddedCurveParameters = embedwards25519::Embedwards25519;
}
#[cfg(feature = "evrf-ristretto")]
impl EvrfCurve for ciphersuite::Ristretto {
type EmbeddedCurve = embedwards25519::Embedwards25519;
type EmbeddedCurveParameters = embedwards25519::Embedwards25519;
}
fn sample_point<C: Ciphersuite>(rng: &mut (impl RngCore + CryptoRng)) -> C::G {
let mut repr = <C::G as GroupEncoding>::Repr::default();
loop {