[−][src]Struct salty::scalar::TweetNaclScalar
NB: The buffer is assumed to be zero from
byte 32 onward - each operation should call
clear_upper_half
to ensure this.
Technically, in TweetNaCl, there's an operation (a, b, c) -> a*b + c, which needs only one call to clear upper half, but I think we can live with this slight inefficiency - if scalar ring operations become a bottleneck, there should be bigger improvements achievable by other means.
Methods
impl TweetNaclScalar
[src]
pub(crate) fn clear_upper_half(&mut self)
[src]
pub(crate) fn reduce_modulo_ell(&mut self) -> Scalar
[src]
Trait Implementations
impl<'_> From<&'_ [u8; 64]> for TweetNaclScalar
[src]
fn from(bytes: &[u8; 64]) -> TweetNaclScalar
[src]
impl From<Scalar> for TweetNaclScalar
[src]
fn from(scalar: Scalar) -> TweetNaclScalar
[src]
impl<'_> From<&'_ Scalar> for TweetNaclScalar
[src]
fn from(scalar: &Scalar) -> TweetNaclScalar
[src]
impl<'a, 'b> Add<&'b TweetNaclScalar> for &'a TweetNaclScalar
[src]
type Output = TweetNaclScalar
The resulting type after applying the +
operator.
fn add(self, other: &'b TweetNaclScalar) -> TweetNaclScalar
[src]
impl<'a, 'b> Mul<&'b TweetNaclScalar> for &'a TweetNaclScalar
[src]
type Output = TweetNaclScalar
The resulting type after applying the *
operator.
fn mul(self, other: &'b TweetNaclScalar) -> TweetNaclScalar
[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 = Infallible
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,