Struct k256::ProjectivePoint

source ·
pub struct ProjectivePoint { /* private fields */ }
Available on crate feature arithmetic only.
Expand description

A point on the secp256k1 curve in projective coordinates.

Implementations§

Available on crate feature precomputed-tables only.

Calculates k * G, where G is the generator.

Additive identity of the group: the point at infinity.

Base point of secp256k1.

👎Deprecated since 0.10.2: use ProjectivePoint::IDENTITY instead

Returns the additive identity of SECP256k1, also known as the “neutral element” or “point at infinity”.

👎Deprecated since 0.10.2: use ProjectivePoint::GENERATOR instead

Returns the base point of SECP256k1.

Returns the affine representation of this point, or None if it is the identity.

Doubles this point.

Calculates SECP256k1 endomorphism: self * lambda.

Check whether self is equal to an affine point.

This is a lot faster than first converting self to an AffinePoint and then doing the comparision. It is a little bit faster than converting other to a ProjectivePoint first.

Trait Implementations§

The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Select a or b according to choice. Read more
Conditionally assign other to self, according to choice. Read more
Conditionally swap self and other if choice == 1; otherwise, reassign both unto themselves. Read more
Determine if two items are equal. Read more
The affine representation for this elliptic curve.
Converts this element into its affine representation.
Converts a batch of projective elements into affine elements. This function will panic if p.len() != q.len().
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Deserialize the type this trait is impl’d on from an EncodedPoint.
Scalars modulo the order of this group’s scalar field.
Returns an element chosen uniformly at random from the non-identity elements of this group. Read more
Returns the additive identity, also known as the “neutral element”.
Returns a fixed generator of the prime-order subgroup.
Determines if this point is the identity.
Doubles this element.
The encoding of group elements. Read more
Attempts to deserialize a group element from its encoding.
Attempts to deserialize a group element, not checking if the element is valid. Read more
Converts this element into its byte encoding. This may or may not support encoding the identity.
Calculates x * k + y * l.
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
The resulting type after applying the - operator.
Performs the unary - operation. Read more
The resulting type after applying the - operator.
Performs the unary - operation. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Method which takes an iterator and generates Self from the elements by “summing up” the items.
Method which takes an iterator and generates Self from the elements by “summing up” the items.
Serialize this value as a SEC1 EncodedPoint, optionally applying point compression.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Negate self if choice == Choice(1); otherwise, leave it unchanged. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler.