Struct elliptic_curve::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
Decode a `NonZeroScalar from a serialized field element
Create a NonZeroScalar
from a scalar.
Trait Implementations
impl<C> AsRef<<C as ScalarArithmetic>::Scalar> for NonZeroScalar<C> where
C: Curve + ProjectiveArithmetic,
[src]
impl<C> AsRef<<C as ScalarArithmetic>::Scalar> for NonZeroScalar<C> where
C: Curve + ProjectiveArithmetic,
[src]Performs the conversion.
Performs the conversion.
Performs the conversion.
This is supported on crate feature
zeroize
only.Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
This is supported on crate feature
zeroize
only.Performs the conversion.
Performs the conversion.
impl<C> Zeroize for NonZeroScalar<C> where
C: Curve + ProjectiveArithmetic,
Scalar<C>: Zeroize,
[src]
impl<C> Zeroize for NonZeroScalar<C> where
C: Curve + ProjectiveArithmetic,
Scalar<C>: Zeroize,
[src]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
type Output = T
type Output = T
Should always be Self