Struct generic_ec::NonZero

source ·
pub struct NonZero<T>(/* private fields */);
Expand description

Non zero Point or Scalar

Implementations§

source§

impl<T> NonZero<T>

source

pub fn into_inner(self) -> T

Returns wrapped value

source§

impl<E: Curve> NonZero<Point<E>>

source

pub fn from_point(point: Point<E>) -> Option<Self>

Constructs non-zero point

Returns None if point is zero

source

pub fn ct_from_point(point: Point<E>) -> CtOption<Self>

Constructs non-zero point (constant time)

Returns None if point is zero

source§

impl<E: Curve> NonZero<Scalar<E>>

source

pub fn random<R: RngCore>(rng: &mut R) -> Self

Generates random non-zero scalar

Algorithm is based on rejection sampling: we sample a scalar, if it’s zero try again. It may be considered constant-time as zero scalar appears with $2^{-256}$ probability which is considered to be negligible.

§Panics

Panics if randomness source returned 100 zero scalars in a row. It happens with $2^{-25600}$ probability, which practically means that randomness source is broken.

source

pub fn one() -> Self

Constructs $S = 1$

source

pub fn from_scalar(scalar: Scalar<E>) -> Option<Self>

Constructs non-zero scalar

Returns None if scalar is zero

source

pub fn ct_from_scalar(scalar: Scalar<E>) -> CtOption<Self>

Constructs non-zero scalar (constant time)

Returns None if scalar is zero

source

pub fn invert(&self) -> NonZero<Scalar<E>>

Returns scalar inverse $S^{-1}$

Similar to Scalar::invert, but this function is always defined as inverse is defined for all non-zero scalars

Trait Implementations§

source§

impl<E: Curve> Add<&NonZero<Point<E>>> for &NonZero<Point<E>>

§

type Output = Point<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<&NonZero<Point<E>>> for &Point<E>

§

type Output = Point<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<&NonZero<Point<E>>> for NonZero<Point<E>>

§

type Output = Point<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<&NonZero<Point<E>>> for Point<E>

§

type Output = Point<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<&NonZero<Scalar<E>>> for &NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<&NonZero<Scalar<E>>> for &Scalar<E>

§

type Output = Scalar<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<&NonZero<Scalar<E>>> for &SecretScalar<E>

§

type Output = Scalar<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<&NonZero<Scalar<E>>> for NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<&NonZero<Scalar<E>>> for Scalar<E>

§

type Output = Scalar<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<&NonZero<Scalar<E>>> for SecretScalar<E>

§

type Output = Scalar<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<&Point<E>> for &NonZero<Point<E>>

§

type Output = Point<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &Point<E>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<&Point<E>> for NonZero<Point<E>>

§

type Output = Point<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &Point<E>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<&Scalar<E>> for &NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &Scalar<E>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<&Scalar<E>> for NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &Scalar<E>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<&SecretScalar<E>> for &NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &SecretScalar<E>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<&SecretScalar<E>> for NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &SecretScalar<E>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<NonZero<Point<E>>> for &NonZero<Point<E>>

§

type Output = Point<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<NonZero<Point<E>>> for &Point<E>

§

type Output = Point<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<NonZero<Point<E>>> for Point<E>

§

type Output = Point<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<NonZero<Scalar<E>>> for &NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<NonZero<Scalar<E>>> for &Scalar<E>

§

type Output = Scalar<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<NonZero<Scalar<E>>> for &SecretScalar<E>

§

type Output = Scalar<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<NonZero<Scalar<E>>> for Scalar<E>

§

type Output = Scalar<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<NonZero<Scalar<E>>> for SecretScalar<E>

§

type Output = Scalar<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<Point<E>> for &NonZero<Point<E>>

§

type Output = Point<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: Point<E>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<Point<E>> for NonZero<Point<E>>

§

type Output = Point<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: Point<E>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<Scalar<E>> for &NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: Scalar<E>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<Scalar<E>> for NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: Scalar<E>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<SecretScalar<E>> for &NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: SecretScalar<E>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add<SecretScalar<E>> for NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: SecretScalar<E>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add for NonZero<Point<E>>

§

type Output = Point<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> Add for NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the + operator.
source§

fn add(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the + operation. Read more
source§

impl<E: Curve> AlwaysHasAffineX<E> for NonZero<Point<E>>
where Point<E>: HasAffineX<E>,

source§

fn x(&self) -> Coordinate<E>

Retrieves affine $x$ coordinate of a point
source§

impl<E: Curve> AlwaysHasAffineXY<E> for NonZero<Point<E>>
where Point<E>: HasAffineXY<E>,

source§

fn from_coords(coords: &Coordinates<E>) -> Option<Self>

Constructs a point from affine coordinates Read more
source§

impl<E: Curve> AlwaysHasAffineY<E> for NonZero<Point<E>>
where Point<E>: HasAffineY<E>,

source§

fn y(&self) -> Coordinate<E>

Retrieves affine $y$ coordinate
source§

impl<T> AsRef<T> for NonZero<T>

source§

fn as_ref(&self) -> &T

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T: Clone> Clone for NonZero<T>

source§

fn clone(&self) -> NonZero<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for NonZero<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> Deref for NonZero<T>

§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<'de, T> Deserialize<'de> for NonZero<T>
where NonZero<T>: TryFrom<T>, <NonZero<T> as TryFrom<T>>::Error: Display, T: Deserialize<'de>,

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<T> Digestable for NonZero<T>
where T: Digestable,

source§

fn unambiguously_encode<B>(&self, encoder: EncodeValue<'_, B>)
where B: Buffer,

Unambiguously encodes the value
source§

impl<E: Curve> From<Generator<E>> for NonZero<Point<E>>

source§

fn from(g: Generator<E>) -> Self

Converts to this type from the input type.
source§

impl<E: Curve> From<NonZero<Point<E>>> for Point<E>

source§

fn from(point: NonZero<Point<E>>) -> Self

Converts to this type from the input type.
source§

impl<E: Curve> From<NonZero<Scalar<E>>> for Scalar<E>

source§

fn from(scalar: NonZero<Scalar<E>>) -> Self

Converts to this type from the input type.
source§

impl<T: Hash> Hash for NonZero<T>

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<T> IsZero for NonZero<T>

source§

fn is_zero(&self) -> bool

Returns false as NonZero<T> cannot be zero

source§

impl<E: Curve> Mul<&Generator<E>> for &NonZero<Scalar<E>>

§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Generator<E>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&Generator<E>> for NonZero<Scalar<E>>

§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Generator<E>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&NonZero<Point<E>>> for &NonZero<Scalar<E>>

§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&NonZero<Point<E>>> for &Scalar<E>

§

type Output = Point<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&NonZero<Point<E>>> for &SecretScalar<E>

§

type Output = Point<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&NonZero<Point<E>>> for NonZero<Scalar<E>>

§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&NonZero<Point<E>>> for Scalar<E>

§

type Output = Point<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&NonZero<Point<E>>> for SecretScalar<E>

§

type Output = Point<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&NonZero<Scalar<E>>> for &Generator<E>

§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&NonZero<Scalar<E>>> for &NonZero<Point<E>>

§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&NonZero<Scalar<E>>> for &NonZero<Scalar<E>>

§

type Output = NonZero<Scalar<E>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&NonZero<Scalar<E>>> for &Point<E>

§

type Output = Point<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&NonZero<Scalar<E>>> for &Scalar<E>

§

type Output = Scalar<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&NonZero<Scalar<E>>> for &SecretScalar<E>

§

type Output = Scalar<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&NonZero<Scalar<E>>> for Generator<E>

§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&NonZero<Scalar<E>>> for NonZero<Point<E>>

§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&NonZero<Scalar<E>>> for NonZero<Scalar<E>>

§

type Output = NonZero<Scalar<E>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&NonZero<Scalar<E>>> for Point<E>

§

type Output = Point<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&NonZero<Scalar<E>>> for Scalar<E>

§

type Output = Scalar<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&NonZero<Scalar<E>>> for SecretScalar<E>

§

type Output = Scalar<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&Point<E>> for &NonZero<Scalar<E>>

§

type Output = Point<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Point<E>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&Point<E>> for NonZero<Scalar<E>>

§

type Output = Point<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Point<E>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&Scalar<E>> for &NonZero<Point<E>>

§

type Output = Point<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Scalar<E>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&Scalar<E>> for &NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Scalar<E>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&Scalar<E>> for NonZero<Point<E>>

§

type Output = Point<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Scalar<E>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&Scalar<E>> for NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Scalar<E>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&SecretScalar<E>> for &NonZero<Point<E>>

§

type Output = Point<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &SecretScalar<E>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&SecretScalar<E>> for &NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &SecretScalar<E>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&SecretScalar<E>> for NonZero<Point<E>>

§

type Output = Point<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &SecretScalar<E>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<&SecretScalar<E>> for NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &SecretScalar<E>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<Generator<E>> for &NonZero<Scalar<E>>

§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Generator<E>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<Generator<E>> for NonZero<Scalar<E>>

§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Generator<E>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<NonZero<Point<E>>> for &NonZero<Scalar<E>>

§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<NonZero<Point<E>>> for &Scalar<E>

§

type Output = Point<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<NonZero<Point<E>>> for &SecretScalar<E>

§

type Output = Point<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<NonZero<Point<E>>> for NonZero<Scalar<E>>

§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<NonZero<Point<E>>> for Scalar<E>

§

type Output = Point<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<NonZero<Point<E>>> for SecretScalar<E>

§

type Output = Point<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<NonZero<Scalar<E>>> for &Generator<E>

§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<NonZero<Scalar<E>>> for &NonZero<Point<E>>

§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<NonZero<Scalar<E>>> for &NonZero<Scalar<E>>

§

type Output = NonZero<Scalar<E>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<NonZero<Scalar<E>>> for &Point<E>

§

type Output = Point<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<NonZero<Scalar<E>>> for &Scalar<E>

§

type Output = Scalar<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<NonZero<Scalar<E>>> for &SecretScalar<E>

§

type Output = Scalar<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<NonZero<Scalar<E>>> for Generator<E>

§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<NonZero<Scalar<E>>> for NonZero<Point<E>>

§

type Output = NonZero<Point<E>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<NonZero<Scalar<E>>> for Point<E>

§

type Output = Point<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<NonZero<Scalar<E>>> for Scalar<E>

§

type Output = Scalar<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<NonZero<Scalar<E>>> for SecretScalar<E>

§

type Output = Scalar<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<Point<E>> for &NonZero<Scalar<E>>

§

type Output = Point<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Point<E>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<Point<E>> for NonZero<Scalar<E>>

§

type Output = Point<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Point<E>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<Scalar<E>> for &NonZero<Point<E>>

§

type Output = Point<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Scalar<E>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<Scalar<E>> for &NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Scalar<E>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<Scalar<E>> for NonZero<Point<E>>

§

type Output = Point<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Scalar<E>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<Scalar<E>> for NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Scalar<E>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<SecretScalar<E>> for &NonZero<Point<E>>

§

type Output = Point<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: SecretScalar<E>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<SecretScalar<E>> for &NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: SecretScalar<E>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<SecretScalar<E>> for NonZero<Point<E>>

§

type Output = Point<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: SecretScalar<E>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul<SecretScalar<E>> for NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: SecretScalar<E>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Mul for NonZero<Scalar<E>>

§

type Output = NonZero<Scalar<E>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: Curve> Neg for &NonZero<Point<E>>

§

type Output = NonZero<Point<E>>

The resulting type after applying the - operator.
source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
source§

impl<E: Curve> Neg for &NonZero<Scalar<E>>

§

type Output = NonZero<Scalar<E>>

The resulting type after applying the - operator.
source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
source§

impl<E: Curve> Neg for NonZero<Point<E>>

§

type Output = NonZero<Point<E>>

The resulting type after applying the - operator.
source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
source§

impl<E: Curve> Neg for NonZero<Scalar<E>>

§

type Output = NonZero<Scalar<E>>

The resulting type after applying the - operator.
source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
source§

impl<E: Curve> One for NonZero<Scalar<E>>

source§

fn one() -> Self

source§

fn is_one(x: &Self) -> Choice

source§

impl<T: Ord> Ord for NonZero<T>

source§

fn cmp(&self, other: &NonZero<T>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<T: PartialEq> PartialEq for NonZero<T>

source§

fn eq(&self, other: &NonZero<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: PartialOrd> PartialOrd for NonZero<T>

source§

fn partial_cmp(&self, other: &NonZero<T>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<'s, E: Curve> Product<&'s NonZero<Scalar<E>>> for NonZero<Scalar<E>>

source§

fn product<I: Iterator<Item = &'s NonZero<Scalar<E>>>>(iter: I) -> Self

Method which takes an iterator and generates Self from the elements by multiplying the items.
source§

impl<E: Curve> Product for NonZero<Scalar<E>>

source§

fn product<I: Iterator<Item = NonZero<Scalar<E>>>>(iter: I) -> Self

Method which takes an iterator and generates Self from the elements by multiplying the items.
source§

impl<E: Curve> Samplable for NonZero<Scalar<E>>

source§

fn random<R: RngCore>(rng: &mut R) -> Self

source§

impl<T> Serialize for NonZero<T>
where T: From<NonZero<T>> + Clone + Serialize,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<E: Curve> Sub<&NonZero<Point<E>>> for &NonZero<Point<E>>

§

type Output = Point<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<&NonZero<Point<E>>> for &Point<E>

§

type Output = Point<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<&NonZero<Point<E>>> for NonZero<Point<E>>

§

type Output = Point<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<&NonZero<Point<E>>> for Point<E>

§

type Output = Point<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &NonZero<Point<E>>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<&NonZero<Scalar<E>>> for &NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<&NonZero<Scalar<E>>> for &Scalar<E>

§

type Output = Scalar<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<&NonZero<Scalar<E>>> for &SecretScalar<E>

§

type Output = Scalar<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<&NonZero<Scalar<E>>> for NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<&NonZero<Scalar<E>>> for Scalar<E>

§

type Output = Scalar<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<&NonZero<Scalar<E>>> for SecretScalar<E>

§

type Output = Scalar<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &NonZero<Scalar<E>>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<&Point<E>> for &NonZero<Point<E>>

§

type Output = Point<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &Point<E>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<&Point<E>> for NonZero<Point<E>>

§

type Output = Point<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &Point<E>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<&Scalar<E>> for &NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &Scalar<E>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<&Scalar<E>> for NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &Scalar<E>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<&SecretScalar<E>> for &NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &SecretScalar<E>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<&SecretScalar<E>> for NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &SecretScalar<E>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<NonZero<Point<E>>> for &NonZero<Point<E>>

§

type Output = Point<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<NonZero<Point<E>>> for &Point<E>

§

type Output = Point<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<NonZero<Point<E>>> for Point<E>

§

type Output = Point<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<NonZero<Scalar<E>>> for &NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<NonZero<Scalar<E>>> for &Scalar<E>

§

type Output = Scalar<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<NonZero<Scalar<E>>> for &SecretScalar<E>

§

type Output = Scalar<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<NonZero<Scalar<E>>> for Scalar<E>

§

type Output = Scalar<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<NonZero<Scalar<E>>> for SecretScalar<E>

§

type Output = Scalar<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<Point<E>> for &NonZero<Point<E>>

§

type Output = Point<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Point<E>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<Point<E>> for NonZero<Point<E>>

§

type Output = Point<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Point<E>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<Scalar<E>> for &NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Scalar<E>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<Scalar<E>> for NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Scalar<E>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<SecretScalar<E>> for &NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: SecretScalar<E>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub<SecretScalar<E>> for NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: SecretScalar<E>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub for NonZero<Point<E>>

§

type Output = Point<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: NonZero<Point<E>>) -> Self::Output

Performs the - operation. Read more
source§

impl<E: Curve> Sub for NonZero<Scalar<E>>

§

type Output = Scalar<E>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: NonZero<Scalar<E>>) -> Self::Output

Performs the - operation. Read more
source§

impl<'s, E: Curve> Sum<&'s NonZero<Scalar<E>>> for Scalar<E>

source§

fn sum<I: Iterator<Item = &'s NonZero<Scalar<E>>>>(iter: I) -> Self

Method which takes an iterator and generates Self from the elements by “summing up” the items.
source§

impl<E: Curve> Sum<NonZero<Scalar<E>>> for Scalar<E>

source§

fn sum<I: Iterator<Item = NonZero<Scalar<E>>>>(iter: I) -> Self

Method which takes an iterator and generates Self from the elements by “summing up” the items.
source§

impl<E: Curve> TryFrom<Point<E>> for NonZero<Point<E>>

§

type Error = ZeroPoint

The type returned in the event of a conversion error.
source§

fn try_from(point: Point<E>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<E: Curve> TryFrom<Scalar<E>> for NonZero<Scalar<E>>

§

type Error = ZeroScalar

The type returned in the event of a conversion error.
source§

fn try_from(scalar: Scalar<E>) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<T> Zeroize for NonZero<T>
where T: Zeroize,

source§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler.
source§

impl<T: Copy> Copy for NonZero<T>

source§

impl<T: Eq> Eq for NonZero<T>

source§

impl<T> StructuralPartialEq for NonZero<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for NonZero<T>
where T: RefUnwindSafe,

§

impl<T> Send for NonZero<T>
where T: Send,

§

impl<T> Sync for NonZero<T>
where T: Sync,

§

impl<T> Unpin for NonZero<T>
where T: Unpin,

§

impl<T> UnwindSafe for NonZero<T>
where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,