pub struct BlindedScalar<C>where
C: CurveArithmetic,{ /* private fields */ }
Expand description
Scalar blinded with a randomly generated masking value.
This provides a randomly blinded impl of Invert
which is useful for
e.g. ECDSA ephemeral (k
) scalars.
It implements masked variable-time inversions using Stein’s algorithm, which may be helpful for performance on embedded platforms.
Implementations§
source§impl<C> BlindedScalar<C>where
C: CurveArithmetic,
impl<C> BlindedScalar<C>where
C: CurveArithmetic,
sourcepub fn new(scalar: Scalar<C>, rng: &mut impl CryptoRngCore) -> Self
pub fn new(scalar: Scalar<C>, rng: &mut impl CryptoRngCore) -> Self
Create a new BlindedScalar
from a scalar and a CryptoRngCore
.
Trait Implementations§
source§impl<C> AsRef<<C as CurveArithmetic>::Scalar> for BlindedScalar<C>where
C: CurveArithmetic,
impl<C> AsRef<<C as CurveArithmetic>::Scalar> for BlindedScalar<C>where
C: CurveArithmetic,
source§impl<C> Clone for BlindedScalar<C>where
C: CurveArithmetic + Clone,
impl<C> Clone for BlindedScalar<C>where
C: CurveArithmetic + Clone,
source§fn clone(&self) -> BlindedScalar<C>
fn clone(&self) -> BlindedScalar<C>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<C> Drop for BlindedScalar<C>where
C: CurveArithmetic,
impl<C> Drop for BlindedScalar<C>where
C: CurveArithmetic,
source§impl<C> Invert for BlindedScalar<C>where
C: CurveArithmetic,
impl<C> Invert for BlindedScalar<C>where
C: CurveArithmetic,
Auto Trait Implementations§
impl<C> Freeze for BlindedScalar<C>
impl<C> RefUnwindSafe for BlindedScalar<C>
impl<C> Send for BlindedScalar<C>
impl<C> Sync for BlindedScalar<C>
impl<C> Unpin for BlindedScalar<C>
impl<C> UnwindSafe for BlindedScalar<C>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)