Skip to main content

SecretPoint

Struct SecretPoint 

Source
pub struct SecretPoint<E: Curve>(/* private fields */);
Expand description

Point representing sensitive information (like a derived secret)

Secret point should be treated with an extra care. You shouldn’t do any branching (e.g. Eq, Ord) on the secret to avoid timing side-channel attacks, so it implements only constant time traits (like ConstantTimeEq).

Also, when alloc feature is enabled, we enforce extra measures:

  • Secret point leaves no trace in RAM after it’s dropped
    Memory is zeroized after use
  • All clones of a secret point refer to the same region in the memory
    I.e. there will always be only one instance of the point in the memory no matter how many clones you make

All these guarantees can be bypassed by calling .as_ref() and obtaining &Point<E> that is not protected from timing attacks, leaving traces in the memory, etc.

Implementations§

Source§

impl<E: Curve> SecretPoint<E>

Source

pub fn new(point: &mut Point<E>) -> Self

Constructs a new secret point

Takes the original point by mutable reference instead of taking by value to avoid leaving copies of the point on stack. Point behind the reference will be zeroized after the function has returned.

Source

pub fn generator() -> Self

Returns the generator defined in the curve specs

Source

pub fn zero() -> Self

Returns identity point $\O$

Source

pub fn as_nonsecret(&self) -> &Point<E>

Obtain the reference to the point, which you can use for any operations necessary. This bypasses all the secrecy guarantees, so be careful when handling the resulting value; ideally this reference should not be held for longer than one expression

The AsRef impl uses this method under the hood, and is provided as a less explicit but very convenient alternative

Source

pub fn to_bytes(&self, compressed: bool) -> EncodedSecretPoint<E>

Encodes a point as bytes

Source

pub fn from_bytes(bytes: &[u8]) -> Result<Self, InvalidPoint>

Decodes a point from bytes

Trait Implementations§

Source§

impl<E: Curve> Add<&Generator<E>> for SecretPoint<E>

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&Generator<E>> for &SecretPoint<E>

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

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 &SecretPoint<E>

Source§

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<SecretPoint<E>>> for SecretPoint<E>

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

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 &SecretPoint<E>

Source§

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<&SecretPoint<E>> for Point<E>

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&SecretPoint<E>> for Generator<E>

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<E: Curve> Add<&SecretPoint<E>> for &Generator<E>

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<E: Curve> Add<Generator<E>> for SecretPoint<E>

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<E: Curve> Add<Generator<E>> for &SecretPoint<E>

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

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 &SecretPoint<E>

Source§

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<SecretPoint<E>>> for SecretPoint<E>

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

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 &SecretPoint<E>

Source§

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<SecretPoint<E>> for Point<E>

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<E: Curve> Add<SecretPoint<E>> for Generator<E>

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<E: Curve> Add<SecretPoint<E>> for &Generator<E>

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<E: Curve> AddAssign<&SecretPoint<E>> for Point<E>

Source§

fn add_assign(&mut self, rhs: &SecretPoint<E>)

Performs the += operation. Read more
Source§

impl<E: Curve> AddAssign<SecretPoint<E>> for Point<E>

Source§

fn add_assign(&mut self, rhs: SecretPoint<E>)

Performs the += operation. Read more
Source§

impl<E: Curve> AsRef<Point<E>> for SecretPoint<E>

Source§

fn as_ref(&self) -> &Point<E>

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

impl<E: Curve> Clone for SecretPoint<E>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<E: Curve> ConstantTimeEq for SecretPoint<E>

Source§

fn ct_eq(&self, other: &Self) -> Choice

Determine if two items are equal. Read more
Source§

fn ct_ne(&self, other: &Self) -> Choice

Determine if two items are NOT equal. Read more
Source§

impl<E: Curve> Debug for SecretPoint<E>

Source§

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

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

impl<'de, E: Curve> Deserialize<'de> for SecretPoint<E>

Available on crate feature serde only.
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<'de, E: Curve> DeserializeAs<'de, SecretPoint<E>> for Compact

Available on crate feature serde only.
Source§

fn deserialize_as<D>(deserializer: D) -> Result<SecretPoint<E>, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer.
Source§

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

Source§

fn from(secret_point: NonZero<SecretPoint<E>>) -> Self

Converts to this type from the input type.
Source§

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

Source§

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 &SecretPoint<E>

Source§

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<&Scalar<E>> for SecretPoint<E>

Source§

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 &SecretPoint<E>

Source§

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<&SecretPoint<E>> for Scalar<E>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

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

Source§

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 &SecretPoint<E>

Source§

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<Scalar<E>> for SecretPoint<E>

Source§

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 &SecretPoint<E>

Source§

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<SecretPoint<E>> for Scalar<E>

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<E: Curve> Serialize for SecretPoint<E>

Available on crate feature serde only.
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> SerializeAs<SecretPoint<E>> for Compact

Available on crate feature serde only.
Source§

fn serialize_as<S>( source: &SecretPoint<E>, serializer: S, ) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer.
Source§

impl<E: Curve> Sub<&Generator<E>> for SecretPoint<E>

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&Generator<E>> for &SecretPoint<E>

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

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 &SecretPoint<E>

Source§

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<SecretPoint<E>>> for SecretPoint<E>

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

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 &SecretPoint<E>

Source§

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<&SecretPoint<E>> for Point<E>

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&SecretPoint<E>> for Generator<E>

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<&SecretPoint<E>> for &Generator<E>

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<Generator<E>> for SecretPoint<E>

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<Generator<E>> for &SecretPoint<E>

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

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 &SecretPoint<E>

Source§

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<SecretPoint<E>>> for SecretPoint<E>

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

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 &SecretPoint<E>

Source§

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<SecretPoint<E>> for Point<E>

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<SecretPoint<E>> for Generator<E>

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<E: Curve> Sub<SecretPoint<E>> for &Generator<E>

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

type Output = Point<E>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<E: Curve> SubAssign<&SecretPoint<E>> for Point<E>

Source§

fn sub_assign(&mut self, rhs: &SecretPoint<E>)

Performs the -= operation. Read more
Source§

impl<E: Curve> SubAssign<SecretPoint<E>> for Point<E>

Source§

fn sub_assign(&mut self, rhs: SecretPoint<E>)

Performs the -= operation. Read more
Source§

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

Source§

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

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<'s, E: Curve> Sum<&'s SecretPoint<E>> for Point<E>

Source§

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

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

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

Source§

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

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<E: Curve> Sum<SecretPoint<E>> for Point<E>

Source§

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

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

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

Source§

type Error = ZeroPoint

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

fn try_from(secret_point: SecretPoint<E>) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl<E> Freeze for SecretPoint<E>

§

impl<E> RefUnwindSafe for SecretPoint<E>
where <E as Curve>::Point: RefUnwindSafe,

§

impl<E> Send for SecretPoint<E>

§

impl<E> Sync for SecretPoint<E>

§

impl<E> Unpin for SecretPoint<E>

§

impl<E> UnsafeUnpin for SecretPoint<E>

§

impl<E> UnwindSafe for SecretPoint<E>
where <E as Curve>::Point: RefUnwindSafe,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

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

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

Source§

type Output = T

Should always be Self
Source§

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

Source§

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>,

Source§

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>,

Source§

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.