Trait spake2::Group [−][src]
pub trait Group { type Scalar; type Element; type TranscriptHash; fn const_m() -> Self::Element; fn const_n() -> Self::Element; fn const_s() -> Self::Element; fn hash_to_scalar(s: &[u8]) -> Self::Scalar; fn random_scalar<T>(cspring: &mut T) -> Self::Scalar
where
T: Rng + CryptoRng; fn scalar_neg(s: &Self::Scalar) -> Self::Scalar; fn element_to_bytes(e: &Self::Element) -> Vec<u8>; fn bytes_to_element(b: &[u8]) -> Option<Self::Element>; fn element_length() -> usize; fn basepoint_mult(s: &Self::Scalar) -> Self::Element; fn scalarmult(e: &Self::Element, s: &Self::Scalar) -> Self::Element; fn add(a: &Self::Element, b: &Self::Element) -> Self::Element; }
Associated Types
Required Methods
fn const_m() -> Self::Element
fn const_n() -> Self::Element
fn const_s() -> Self::Element
fn hash_to_scalar(s: &[u8]) -> Self::Scalar
fn random_scalar<T>(cspring: &mut T) -> Self::Scalar where
T: Rng + CryptoRng,
T: Rng + CryptoRng,
fn scalar_neg(s: &Self::Scalar) -> Self::Scalar
fn element_to_bytes(e: &Self::Element) -> Vec<u8>
fn bytes_to_element(b: &[u8]) -> Option<Self::Element>
fn element_length() -> usize
fn basepoint_mult(s: &Self::Scalar) -> Self::Element
fn scalarmult(e: &Self::Element, s: &Self::Scalar) -> Self::Element
fn add(a: &Self::Element, b: &Self::Element) -> Self::Element
Implementors
impl Group for Ed25519Group type Scalar = c2_Scalar; type Element = c2_Element; type TranscriptHash = Sha256;