Struct spake2::Ed25519Group

source ·
pub struct Ed25519Group;
Expand description

Ed25519 elliptic curve group.

Trait Implementations§

source§

impl Debug for Ed25519Group

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Group for Ed25519Group

§

type Scalar = Scalar

Scalar element
§

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>>

Transcript hash
source§

fn name() -> &'static str

Name
source§

fn const_m() -> c2_Element

m constant
source§

fn const_n() -> c2_Element

n constant
source§

fn const_s() -> c2_Element

s constant
source§

fn hash_to_scalar(s: &[u8]) -> c2_Scalar

Hash to scalar
source§

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

Scalar negation
source§

fn element_to_bytes(s: &c2_Element) -> Vec<u8>

Convert base field element to bytes
source§

fn element_length() -> usize

Length of a base field element
source§

fn bytes_to_element(b: &[u8]) -> Option<c2_Element>

Convert bytes to base field element
source§

fn basepoint_mult(s: &c2_Scalar) -> c2_Element

Fixed-base scalar multiplication
source§

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

Group operation
source§

impl PartialEq<Ed25519Group> for Ed25519Group

source§

fn eq(&self, other: &Ed25519Group) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for Ed25519Group

source§

impl StructuralEq for Ed25519Group

source§

impl StructuralPartialEq for Ed25519Group

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.