Struct elliptic_curve_flow::NonZeroScalar [−][src]
pub struct NonZeroScalar<C> where
C: Curve + ProjectiveArithmetic, { /* fields omitted */ }
This is supported on crate feature
arithmetic
only.Expand description
Non-zero scalar type.
This type ensures that its value is not zero, ala core::num::NonZero*
.
To do this, the generic S
type must impl both Default
and
ConstantTimeEq
, with the requirement that S::default()
returns 0.
In the context of ECC, it’s useful for ensuring that scalar multiplication cannot result in the point at infinity.
Implementations
Create a NonZeroScalar
from a scalar.
Decode a NonZeroScalar
from a big endian-serialized field element.
Trait Implementations
impl<C> AsRef<<C as ScalarArithmetic>::Scalar> for NonZeroScalar<C> where
C: Curve + ProjectiveArithmetic,
impl<C> AsRef<<C as ScalarArithmetic>::Scalar> for NonZeroScalar<C> where
C: Curve + ProjectiveArithmetic,
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl<C> RefUnwindSafe for NonZeroScalar<C> where
<C as ScalarArithmetic>::Scalar: RefUnwindSafe,
impl<C> Send for NonZeroScalar<C>
impl<C> Sync for NonZeroScalar<C>
impl<C> Unpin for NonZeroScalar<C> where
<C as ScalarArithmetic>::Scalar: Unpin,
impl<C> UnwindSafe for NonZeroScalar<C> where
<C as ScalarArithmetic>::Scalar: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more