Remove unnecessary FieldExt bounds in crate::hashtocurve

This commit is contained in:
Jack Grigg 2022-11-24 12:14:59 +00:00
parent fbce21598d
commit bedaa0055c

View file

@ -1,6 +1,7 @@
//! This module implements "simplified SWU" hashing to short Weierstrass curves //! This module implements "simplified SWU" hashing to short Weierstrass curves
//! with a = 0. //! with a = 0.
use ff::{Field, PrimeField};
use static_assertions::const_assert; use static_assertions::const_assert;
use subtle::ConstantTimeEq; use subtle::ConstantTimeEq;
@ -77,7 +78,7 @@ pub fn hash_to_field<F: FieldExt>(
} }
/// Implements a degree 3 isogeny map. /// Implements a degree 3 isogeny map.
pub fn iso_map<F: FieldExt, C: CurveExt<Base = F>, I: CurveExt<Base = F>>( pub fn iso_map<F: Field, C: CurveExt<Base = F>, I: CurveExt<Base = F>>(
p: &I, p: &I,
iso: &[C::Base; 13], iso: &[C::Base; 13],
) -> C { ) -> C {
@ -105,7 +106,7 @@ pub fn iso_map<F: FieldExt, C: CurveExt<Base = F>, I: CurveExt<Base = F>>(
} }
#[allow(clippy::many_single_char_names)] #[allow(clippy::many_single_char_names)]
pub fn map_to_curve_simple_swu<F: FieldExt, C: CurveExt<Base = F>, I: CurveExt<Base = F>>( pub fn map_to_curve_simple_swu<F: PrimeField, C: CurveExt<Base = F>, I: CurveExt<Base = F>>(
u: &F, u: &F,
theta: F, theta: F,
z: F, z: F,