diff options
Diffstat (limited to 'src/spake2.rs')
-rw-r--r-- | src/spake2.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/spake2.rs b/src/spake2.rs index 07c92a3..31be328 100644 --- a/src/spake2.rs +++ b/src/spake2.rs @@ -13,14 +13,14 @@ use std::fmt; //use hex::ToHex; -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Eq)] pub enum ErrorType { BadSide, WrongLength, CorruptMessage, } -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Eq)] pub struct SPAKEErr { pub kind: ErrorType, } @@ -49,7 +49,7 @@ pub trait Group { fn add(a: &Self::Element, b: &Self::Element) -> Self::Element; } -#[derive(Debug)] +#[derive(Debug, PartialEq, Eq)] pub struct Ed25519Group; impl Group for Ed25519Group { @@ -257,13 +257,15 @@ fn ed25519_hash_symmetric( /* "session type pattern" */ -#[derive(Debug)] +#[derive(Debug, PartialEq, Eq)] enum Side { A, B, Symmetric, } +// we implement a custom Debug below, to avoid revealing secrets in a dump +#[derive(PartialEq, Eq)] pub struct SPAKE2<G: Group> { //where &G::Scalar: Neg { side: Side, |