pub struct EllipticCurve<const MODULUS_SIZE: usize, const PRIME_ORDER_SIZE: usize> {
    pub coef_sign: Sign,
    pub coef: [u32; MODULUS_SIZE],
    pub modulus: [u32; MODULUS_SIZE],
    pub base_point_x: [u32; MODULUS_SIZE],
    pub base_point_y: [u32; MODULUS_SIZE],
    pub prime_order: [u32; PRIME_ORDER_SIZE],
}
Expand description

Elliptic curve.

Used to ECDSA signing and verification.

Fields§

§coef_sign: Sign

Curve coefficient a sign.

Note: 0 for positive, 1 for negative.

§coef: [u32; MODULUS_SIZE]

Curve coefficient |a|.

Note: Absolute value, |a| < p.

§modulus: [u32; MODULUS_SIZE]

Curve modulus value p.

Note: Odd integer prime, 0 < p < 2640

§base_point_x: [u32; MODULUS_SIZE]

Curve base point G coordinate x.

Note: x < p

§base_point_y: [u32; MODULUS_SIZE]

Curve base point G coordinate y.

Note: y < p

§prime_order: [u32; PRIME_ORDER_SIZE]

Curve prime order n.

Note: Integer prime.

Trait Implementations§

source§

impl<const MODULUS_SIZE: usize, const PRIME_ORDER_SIZE: usize> Debug for EllipticCurve<MODULUS_SIZE, PRIME_ORDER_SIZE>

source§

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

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

impl<const MODULUS_SIZE: usize, const PRIME_ORDER_SIZE: usize> PartialEq for EllipticCurve<MODULUS_SIZE, PRIME_ORDER_SIZE>

source§

fn eq(&self, other: &EllipticCurve<MODULUS_SIZE, PRIME_ORDER_SIZE>) -> 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<const MODULUS_SIZE: usize, const PRIME_ORDER_SIZE: usize> Eq for EllipticCurve<MODULUS_SIZE, PRIME_ORDER_SIZE>

source§

impl<const MODULUS_SIZE: usize, const PRIME_ORDER_SIZE: usize> StructuralEq for EllipticCurve<MODULUS_SIZE, PRIME_ORDER_SIZE>

source§

impl<const MODULUS_SIZE: usize, const PRIME_ORDER_SIZE: usize> StructuralPartialEq for EllipticCurve<MODULUS_SIZE, PRIME_ORDER_SIZE>

Auto Trait Implementations§

§

impl<const MODULUS_SIZE: usize, const PRIME_ORDER_SIZE: usize> RefUnwindSafe for EllipticCurve<MODULUS_SIZE, PRIME_ORDER_SIZE>

§

impl<const MODULUS_SIZE: usize, const PRIME_ORDER_SIZE: usize> Send for EllipticCurve<MODULUS_SIZE, PRIME_ORDER_SIZE>

§

impl<const MODULUS_SIZE: usize, const PRIME_ORDER_SIZE: usize> Sync for EllipticCurve<MODULUS_SIZE, PRIME_ORDER_SIZE>

§

impl<const MODULUS_SIZE: usize, const PRIME_ORDER_SIZE: usize> Unpin for EllipticCurve<MODULUS_SIZE, PRIME_ORDER_SIZE>

§

impl<const MODULUS_SIZE: usize, const PRIME_ORDER_SIZE: usize> UnwindSafe for EllipticCurve<MODULUS_SIZE, PRIME_ORDER_SIZE>

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