Struct spake2::Ed25519Group
source · pub struct Ed25519Group;
Expand description
Ed25519 elliptic curve group.
Trait Implementations§
source§impl Debug for Ed25519Group
impl Debug for Ed25519Group
source§impl Group for Ed25519Group
impl Group for Ed25519Group
§type Element = EdwardsPoint
type Element = EdwardsPoint
Base field element
§type TranscriptHash = CoreWrapper<CtVariableCoreWrapper<Sha256VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, OidSha256>>
type TranscriptHash = CoreWrapper<CtVariableCoreWrapper<Sha256VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, OidSha256>>
Transcript hash
source§fn const_m() -> c2_Element
fn const_m() -> c2_Element
m
constantsource§fn const_n() -> c2_Element
fn const_n() -> c2_Element
n
constantsource§fn const_s() -> c2_Element
fn const_s() -> c2_Element
s
constantsource§fn hash_to_scalar(s: &[u8]) -> c2_Scalar
fn hash_to_scalar(s: &[u8]) -> c2_Scalar
Hash to scalar
source§fn random_scalar<T>(cspring: &mut T) -> c2_Scalarwhere
T: RngCore + CryptoRng,
fn random_scalar<T>(cspring: &mut T) -> c2_Scalarwhere T: RngCore + CryptoRng,
Generate a random scalar
source§fn scalar_neg(s: &c2_Scalar) -> c2_Scalar
fn scalar_neg(s: &c2_Scalar) -> c2_Scalar
Scalar negation
source§fn element_to_bytes(s: &c2_Element) -> Vec<u8> ⓘ
fn element_to_bytes(s: &c2_Element) -> Vec<u8> ⓘ
Convert base field element to bytes
source§fn element_length() -> usize
fn element_length() -> usize
Length of a base field element
source§fn bytes_to_element(b: &[u8]) -> Option<c2_Element>
fn bytes_to_element(b: &[u8]) -> Option<c2_Element>
Convert bytes to base field element
source§fn basepoint_mult(s: &c2_Scalar) -> c2_Element
fn basepoint_mult(s: &c2_Scalar) -> c2_Element
Fixed-base scalar multiplication
source§fn scalarmult(e: &c2_Element, s: &c2_Scalar) -> c2_Element
fn scalarmult(e: &c2_Element, s: &c2_Scalar) -> c2_Element
Variable-base scalar multiplication
source§fn add(a: &c2_Element, b: &c2_Element) -> c2_Element
fn add(a: &c2_Element, b: &c2_Element) -> c2_Element
Group operation
source§impl PartialEq<Ed25519Group> for Ed25519Group
impl PartialEq<Ed25519Group> for Ed25519Group
source§fn eq(&self, other: &Ed25519Group) -> bool
fn eq(&self, other: &Ed25519Group) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for Ed25519Group
impl StructuralEq for Ed25519Group
impl StructuralPartialEq for Ed25519Group
Auto Trait Implementations§
impl RefUnwindSafe for Ed25519Group
impl Send for Ed25519Group
impl Sync for Ed25519Group
impl Unpin for Ed25519Group
impl UnwindSafe for Ed25519Group
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more