diff --git a/src/curve.rs b/src/curve.rs index b659980..b9c3848 100644 --- a/src/curve.rs +++ b/src/curve.rs @@ -87,7 +87,7 @@ use field::FieldElement; use scalar::Scalar; use util::bytes_equal_ct; use util::CTAssignable; -use util::CTNegateable; +use util::CTNegatable; // ------------------------------------------------------------------------ // Compressed points diff --git a/src/field.rs b/src/field.rs index e0e4767..aa632b1 100644 --- a/src/field.rs +++ b/src/field.rs @@ -803,7 +803,7 @@ impl FieldElement { mod test { use field::*; use test::Bencher; - use util::CTNegateable; + use util::CTNegatable; #[bench] fn bench_fieldelement_a_mul_a(b: &mut Bencher) { diff --git a/src/util.rs b/src/util.rs index 2d08f79..b0ab17d 100644 --- a/src/util.rs +++ b/src/util.rs @@ -25,13 +25,13 @@ pub trait CTAssignable { /// /// Note: it is not necessary to implement this trait, as a generic /// implementation is provided. -pub trait CTNegateable +pub trait CTNegatable { /// Conditionally negate an element if `choice == 1u8`. fn conditional_negate(&mut self, choice: u8); } -impl CTNegateable for T +impl CTNegatable for T where T: CTAssignable, for<'a> &'a T: Neg { fn conditional_negate(&mut self, choice: u8) {