[−][src]Struct salty::Scalar
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]
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 Debug for Scalar
[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.
fn mul(self, point: &'b CurvePoint) -> CurvePoint
[src]
impl StructuralPartialEq for Scalar
[src]
impl Default for Scalar
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,