mirror of
https://github.com/saymrwulf/pasta_curves-source.git
synced 2026-09-04 20:03:39 +00:00
Remove unused hash support for Pasta Fp and Fq.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
parent
8b8dbbe2bb
commit
a14eccc13d
3 changed files with 2 additions and 11 deletions
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
use core::cmp;
|
||||
use core::fmt::Debug;
|
||||
use core::hash::{Hash, Hasher};
|
||||
use core::ops::{Add, Mul, Neg, Sub};
|
||||
use ff::Field;
|
||||
use subtle::{Choice, ConditionallySelectable, ConstantTimeEq, CtOption};
|
||||
|
|
@ -650,14 +649,6 @@ macro_rules! new_curve_impl {
|
|||
}
|
||||
}
|
||||
|
||||
impl Hash for $name_affine {
|
||||
fn hash<H: Hasher>(&self, state: &mut H) {
|
||||
self.x.hash(state);
|
||||
self.y.hash(state);
|
||||
bool::from(self.infinity).hash(state)
|
||||
}
|
||||
}
|
||||
|
||||
impl_binops_additive!($name, $name);
|
||||
impl_binops_additive!($name, $name_affine);
|
||||
impl_binops_additive_specify_output!($name_affine, $name_affine, $name);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ use crate::arithmetic::{adc, mac, sbb, FieldExt, Group, SqrtTables};
|
|||
// The internal representation of this type is four 64-bit unsigned
|
||||
// integers in little-endian order. `Fp` values are always in
|
||||
// Montgomery form; i.e., Fp(a) = aR mod p, with R = 2^256.
|
||||
#[derive(Clone, Copy, Eq, Hash)]
|
||||
#[derive(Clone, Copy, Eq)]
|
||||
pub struct Fp(pub(crate) [u64; 4]);
|
||||
|
||||
impl fmt::Debug for Fp {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ use crate::arithmetic::{adc, mac, sbb, FieldExt, Group, SqrtTables};
|
|||
// The internal representation of this type is four 64-bit unsigned
|
||||
// integers in little-endian order. `Fq` values are always in
|
||||
// Montgomery form; i.e., Fq(a) = aR mod q, with R = 2^256.
|
||||
#[derive(Clone, Copy, Eq, Hash)]
|
||||
#[derive(Clone, Copy, Eq)]
|
||||
pub struct Fq(pub(crate) [u64; 4]);
|
||||
|
||||
impl fmt::Debug for Fq {
|
||||
|
|
|
|||
Loading…
Reference in a new issue