[−][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][+]
impl From<Scalar> for TweetNaclScalar
[src][+]
impl<'_> From<&'_ Scalar> for TweetNaclScalar
[src][+]
impl<'a, 'b> Add<&'b TweetNaclScalar> for &'a TweetNaclScalar
[src][+]
impl<'a, 'b> Mul<&'b TweetNaclScalar> for &'a 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>,
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>,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,