[][src]Struct salty::Scalar

#[repr(C)]
pub struct Scalar(pub [u8; 32]);

Since the curve is an abelian group, it has a module structure, consisting of these scalars. They are the integers modulo "ell", where "ell" is 2**252 + something something.

Methods

impl Scalar[src]

const L: [u8; 32][src]

pub fn ell() -> [u8; 32][src]

The order of the group, 2**252 + something something

pub fn from_bytes(bytes: &[u8; 32]) -> Self[src]

pub fn as_bytes(&self) -> &[u8; 32][src]

pub fn to_bytes(&self) -> [u8; 32][src]

pub fn from_u256_le(x: &[u8; 32]) -> Scalar[src]

pub fn from_u512_le(x: &[u8; 64]) -> Scalar[src]

Trait Implementations

impl<'_> From<&'_ [u8; 32]> for Scalar[src]

impl From<Scalar> for TweetNaclScalar[src]

impl<'_> From<&'_ Scalar> for TweetNaclScalar[src]

impl PartialEq<Scalar> for Scalar[src]

impl<'a, 'b> Mul<&'b CurvePoint> for &'a Scalar[src]

type Output = CurvePoint

The resulting type after applying the * operator.

impl Debug for Scalar[src]

impl Default for Scalar[src]

Auto Trait Implementations

impl Unpin for Scalar

impl Send for Scalar

impl Sync for Scalar

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]