mirror of
https://github.com/saymrwulf/pasta_curves-source.git
synced 2026-09-06 20:20:34 +00:00
Remove unnecessary FieldExt bounds in crate::hashtocurve
This commit is contained in:
parent
fbce21598d
commit
bedaa0055c
1 changed files with 3 additions and 2 deletions
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue