pub struct ProjectivePoint { /* private fields */ }Available on crate feature
arithmetic only.Expand description
A point on the secp256k1 curve in projective coordinates.
Implementations§
Source§impl ProjectivePoint
impl ProjectivePoint
Sourcepub fn mul_by_generator(k: &Scalar) -> ProjectivePoint
pub fn mul_by_generator(k: &Scalar) -> ProjectivePoint
Calculates k * G, where G is the generator.
Sourcepub fn mul_by_generator_vartime(k: &Scalar) -> ProjectivePoint
pub fn mul_by_generator_vartime(k: &Scalar) -> ProjectivePoint
Calculates k * G in variable-time, where G is the generator.
Source§impl ProjectivePoint
impl ProjectivePoint
Sourcepub fn to_affine(&self) -> AffinePoint
pub fn to_affine(&self) -> AffinePoint
Returns the affine representation of this point.
Sourcepub fn double(&self) -> ProjectivePoint
pub fn double(&self) -> ProjectivePoint
Doubles this point.
Sourcepub fn double_in_place(&mut self)
pub fn double_in_place(&mut self)
Doubles this point in-place.
Sourcepub fn endomorphism(&self) -> Self
pub fn endomorphism(&self) -> Self
Calculates SECP256k1 endomorphism: self * lambda.
Sourcepub fn eq_affine(&self, other: &AffinePoint) -> Choice
pub fn eq_affine(&self, other: &AffinePoint) -> Choice
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
comparison. It is a little bit faster than converting other to a ProjectivePoint first.
Trait Implementations§
Source§impl Add for ProjectivePoint
impl Add for ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
+ operator.Source§fn add(self, rhs: ProjectivePoint) -> ProjectivePoint
fn add(self, rhs: ProjectivePoint) -> ProjectivePoint
Performs the
+ operation. Read moreSource§impl Add<&AffinePoint> for &ProjectivePoint
impl Add<&AffinePoint> for &ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
+ operator.Source§fn add(self, rhs: &AffinePoint) -> ProjectivePoint
fn add(self, rhs: &AffinePoint) -> ProjectivePoint
Performs the
+ operation. Read moreSource§impl Add<&AffinePoint> for ProjectivePoint
impl Add<&AffinePoint> for ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
+ operator.Source§fn add(self, rhs: &AffinePoint) -> ProjectivePoint
fn add(self, rhs: &AffinePoint) -> ProjectivePoint
Performs the
+ operation. Read moreSource§impl Add<&ProjectivePoint> for &ProjectivePoint
impl Add<&ProjectivePoint> for &ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
+ operator.Source§fn add(self, rhs: &ProjectivePoint) -> ProjectivePoint
fn add(self, rhs: &ProjectivePoint) -> ProjectivePoint
Performs the
+ operation. Read moreSource§impl Add<&ProjectivePoint> for ProjectivePoint
impl Add<&ProjectivePoint> for ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
+ operator.Source§fn add(self, rhs: &ProjectivePoint) -> ProjectivePoint
fn add(self, rhs: &ProjectivePoint) -> ProjectivePoint
Performs the
+ operation. Read moreSource§impl Add<AffinePoint> for ProjectivePoint
impl Add<AffinePoint> for ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
+ operator.Source§fn add(self, rhs: AffinePoint) -> ProjectivePoint
fn add(self, rhs: AffinePoint) -> ProjectivePoint
Performs the
+ operation. Read moreSource§impl AddAssign for ProjectivePoint
impl AddAssign for ProjectivePoint
Source§fn add_assign(&mut self, rhs: ProjectivePoint)
fn add_assign(&mut self, rhs: ProjectivePoint)
Performs the
+= operation. Read moreSource§impl AddAssign<&AffinePoint> for ProjectivePoint
impl AddAssign<&AffinePoint> for ProjectivePoint
Source§fn add_assign(&mut self, rhs: &AffinePoint)
fn add_assign(&mut self, rhs: &AffinePoint)
Performs the
+= operation. Read moreSource§impl AddAssign<&ProjectivePoint> for ProjectivePoint
impl AddAssign<&ProjectivePoint> for ProjectivePoint
Source§fn add_assign(&mut self, rhs: &ProjectivePoint)
fn add_assign(&mut self, rhs: &ProjectivePoint)
Performs the
+= operation. Read moreSource§impl AddAssign<AffinePoint> for ProjectivePoint
impl AddAssign<AffinePoint> for ProjectivePoint
Source§fn add_assign(&mut self, rhs: AffinePoint)
fn add_assign(&mut self, rhs: AffinePoint)
Performs the
+= operation. Read moreSource§impl<U: ArraySize> BatchNormalize<Array<ProjectivePoint, U>> for ProjectivePoint
impl<U: ArraySize> BatchNormalize<Array<ProjectivePoint, U>> for ProjectivePoint
Source§type Output = Array<AffinePoint, U>
type Output = Array<AffinePoint, U>
The output of the batch normalization; a container of affine points.
Source§fn batch_normalize(points: &Array<Self, U>) -> Array<AffinePoint, U>
fn batch_normalize(points: &Array<Self, U>) -> Array<AffinePoint, U>
Perform a batched conversion to affine representation on a sequence of projective points
at an amortized cost that should be practically as efficient as a single conversion.
Internally, implementors should rely upon
InvertBatch.Source§fn batch_normalize_vartime(points: &Array<Self, U>) -> Array<AffinePoint, U>
fn batch_normalize_vartime(points: &Array<Self, U>) -> Array<AffinePoint, U>
Perform a batched conversion to affine representation on a sequence of projective points
in variable-time. Read more
Source§impl<const N: usize> BatchNormalize<[ProjectivePoint; N]> for ProjectivePoint
impl<const N: usize> BatchNormalize<[ProjectivePoint; N]> for ProjectivePoint
Source§type Output = [AffinePoint; N]
type Output = [AffinePoint; N]
The output of the batch normalization; a container of affine points.
Source§fn batch_normalize(points: &[Self; N]) -> [AffinePoint; N]
fn batch_normalize(points: &[Self; N]) -> [AffinePoint; N]
Perform a batched conversion to affine representation on a sequence of projective points
at an amortized cost that should be practically as efficient as a single conversion.
Internally, implementors should rely upon
InvertBatch.Source§fn batch_normalize_vartime(points: &[Self; N]) -> [AffinePoint; N]
fn batch_normalize_vartime(points: &[Self; N]) -> [AffinePoint; N]
Perform a batched conversion to affine representation on a sequence of projective points
in variable-time. Read more
Source§impl BatchNormalize<[ProjectivePoint]> for ProjectivePoint
Available on crate feature alloc only.
impl BatchNormalize<[ProjectivePoint]> for ProjectivePoint
Available on crate feature
alloc only.Source§type Output = Vec<AffinePoint>
type Output = Vec<AffinePoint>
The output of the batch normalization; a container of affine points.
Source§fn batch_normalize(points: &[Self]) -> Vec<AffinePoint>
fn batch_normalize(points: &[Self]) -> Vec<AffinePoint>
Perform a batched conversion to affine representation on a sequence of projective points
at an amortized cost that should be practically as efficient as a single conversion.
Internally, implementors should rely upon
InvertBatch.Source§fn batch_normalize_vartime(points: &[Self]) -> Vec<AffinePoint>
fn batch_normalize_vartime(points: &[Self]) -> Vec<AffinePoint>
Perform a batched conversion to affine representation on a sequence of projective points
in variable-time. Read more
Source§impl Clone for ProjectivePoint
impl Clone for ProjectivePoint
Source§fn clone(&self) -> ProjectivePoint
fn clone(&self) -> ProjectivePoint
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CofactorGroup for ProjectivePoint
secp256k1 has a cofactor of 1.
impl CofactorGroup for ProjectivePoint
secp256k1 has a cofactor of 1.
Source§type Subgroup = ProjectivePoint
type Subgroup = ProjectivePoint
The large prime-order subgroup in which cryptographic operations are performed.
If
Self implements PrimeGroup, then Self::Subgroup may be Self.Source§fn clear_cofactor(&self) -> Self::Subgroup
fn clear_cofactor(&self) -> Self::Subgroup
Maps
self to the prime-order subgroup by multiplying this element by some
k-multiple of the cofactor. Read moreSource§fn into_subgroup(self) -> CtOption<Self::Subgroup>
fn into_subgroup(self) -> CtOption<Self::Subgroup>
Returns
self if it is contained in the prime-order subgroup. Read moreSource§fn is_torsion_free(&self) -> Choice
fn is_torsion_free(&self) -> Choice
Determines if this element is “torsion free”, i.e., is contained in the
prime-order subgroup. Read more
Source§fn is_small_order(&self) -> Choice
fn is_small_order(&self) -> Choice
Determines if this element is of small order. Read more
Source§impl ConditionallySelectable for ProjectivePoint
impl ConditionallySelectable for ProjectivePoint
Source§fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
Source§fn conditional_assign(&mut self, other: &Self, choice: Choice)
fn conditional_assign(&mut self, other: &Self, choice: Choice)
Source§fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
Conditionally swap
self and other if choice == 1; otherwise,
reassign both unto themselves. Read moreSource§impl ConstantTimeEq for ProjectivePoint
impl ConstantTimeEq for ProjectivePoint
impl Copy for ProjectivePoint
Source§impl CtEq for ProjectivePoint
impl CtEq for ProjectivePoint
Source§impl CtSelect for ProjectivePoint
impl CtSelect for ProjectivePoint
Source§impl Curve for ProjectivePoint
impl Curve for ProjectivePoint
Source§type Affine = AffinePoint
type Affine = AffinePoint
The affine representation for this elliptic curve.
Source§fn to_affine(&self) -> AffinePoint
fn to_affine(&self) -> AffinePoint
Converts this element into its affine representation.
Source§fn batch_normalize(projective: &[Self], affine: &mut [Self::Affine])
fn batch_normalize(projective: &[Self], affine: &mut [Self::Affine])
Converts a batch of projective elements into affine elements. This function will
panic if
p.len() != q.len().Source§impl Debug for ProjectivePoint
impl Debug for ProjectivePoint
Source§impl Default for ProjectivePoint
impl Default for ProjectivePoint
impl DefaultIsZeroes for ProjectivePoint
Source§impl Double for ProjectivePoint
impl Double for ProjectivePoint
impl Eq for ProjectivePoint
Source§impl From<&AffinePoint> for ProjectivePoint
impl From<&AffinePoint> for ProjectivePoint
Source§fn from(p: &AffinePoint) -> Self
fn from(p: &AffinePoint) -> Self
Converts to this type from the input type.
Source§impl From<&ProjectivePoint> for AffinePoint
impl From<&ProjectivePoint> for AffinePoint
Source§fn from(p: &ProjectivePoint) -> AffinePoint
fn from(p: &ProjectivePoint) -> AffinePoint
Converts to this type from the input type.
Source§impl From<&PublicKey<Secp256k1>> for ProjectivePoint
impl From<&PublicKey<Secp256k1>> for ProjectivePoint
Source§fn from(public_key: &PublicKey) -> ProjectivePoint
fn from(public_key: &PublicKey) -> ProjectivePoint
Converts to this type from the input type.
Source§impl From<AffinePoint> for ProjectivePoint
impl From<AffinePoint> for ProjectivePoint
Source§fn from(p: AffinePoint) -> Self
fn from(p: AffinePoint) -> Self
Converts to this type from the input type.
Source§impl From<NonIdentity<ProjectivePoint>> for ProjectivePoint
impl From<NonIdentity<ProjectivePoint>> for ProjectivePoint
Source§fn from(p: NonIdentity<ProjectivePoint>) -> Self
fn from(p: NonIdentity<ProjectivePoint>) -> Self
Converts to this type from the input type.
Source§impl From<ProjectivePoint> for AffinePoint
impl From<ProjectivePoint> for AffinePoint
Source§fn from(p: ProjectivePoint) -> AffinePoint
fn from(p: ProjectivePoint) -> AffinePoint
Converts to this type from the input type.
Source§impl From<PublicKey<Secp256k1>> for ProjectivePoint
impl From<PublicKey<Secp256k1>> for ProjectivePoint
Source§fn from(public_key: PublicKey) -> ProjectivePoint
fn from(public_key: PublicKey) -> ProjectivePoint
Converts to this type from the input type.
Source§impl FromSec1Point<Secp256k1> for ProjectivePoint
impl FromSec1Point<Secp256k1> for ProjectivePoint
Source§fn from_sec1_bytes(bytes: &[u8]) -> Result<Self, Error>
fn from_sec1_bytes(bytes: &[u8]) -> Result<Self, Error>
Decode curve point from the provided SEC1 encoding (compressed, uncompressed, or
identity) using the
Octet-String-to-Elliptic-Curve-Point conversion. Read moreSource§fn from_encoded_point(
point: &EncodedPoint<<C as Curve>::FieldBytesSize>,
) -> CtOption<Self>
fn from_encoded_point( point: &EncodedPoint<<C as Curve>::FieldBytesSize>, ) -> CtOption<Self>
👎Deprecated since 0.14.0:
use FromSec1Point::from_sec1_point instead
DEPRECATED: legacy name for
FromSec1Point::from_sec1_point.Source§impl Generate for ProjectivePoint
impl Generate for ProjectivePoint
Source§fn try_generate_from_rng<R: TryCryptoRng + ?Sized>(
rng: &mut R,
) -> Result<Self, R::Error>
fn try_generate_from_rng<R: TryCryptoRng + ?Sized>( rng: &mut R, ) -> Result<Self, R::Error>
Generate random key using the provided
TryCryptoRng. Read moreSource§fn generate_from_rng<R>(rng: &mut R) -> Self
fn generate_from_rng<R>(rng: &mut R) -> Self
Generate random key using the provided
CryptoRng.Source§impl Group for ProjectivePoint
impl Group for ProjectivePoint
Source§fn try_random<R: TryRng + ?Sized>(rng: &mut R) -> Result<Self, R::Error>
fn try_random<R: TryRng + ?Sized>(rng: &mut R) -> Result<Self, R::Error>
Returns an element chosen uniformly at random from the non-identity elements of
this group using a user-provided fallible RNG. Read more
Source§fn is_identity(&self) -> Choice
fn is_identity(&self) -> Choice
Determines if this point is the identity.
Source§fn mul_by_generator(k: &Scalar) -> Self
fn mul_by_generator(k: &Scalar) -> Self
Multiply by the generator of the prime-order subgroup.
Source§impl GroupEncoding for ProjectivePoint
impl GroupEncoding for ProjectivePoint
Source§type Repr = Array<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B1>>
type Repr = Array<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B1>>
The encoding of group elements. Read more
Source§fn from_bytes(bytes: &Self::Repr) -> CtOption<Self>
fn from_bytes(bytes: &Self::Repr) -> CtOption<Self>
Attempts to deserialize a group element from its encoding.
Source§impl<const N: usize> LinearCombination<[(ProjectivePoint, Scalar); N]> for ProjectivePoint
impl<const N: usize> LinearCombination<[(ProjectivePoint, Scalar); N]> for ProjectivePoint
Source§fn lincomb(points_and_scalars: &[(ProjectivePoint, Scalar); N]) -> Self
fn lincomb(points_and_scalars: &[(ProjectivePoint, Scalar); N]) -> Self
Calculates
x1 * k1 + ... + xn * kn.Source§fn lincomb_vartime(points_and_scalars: &[(ProjectivePoint, Scalar); N]) -> Self
fn lincomb_vartime(points_and_scalars: &[(ProjectivePoint, Scalar); N]) -> Self
Calculates
x1 * k1 + ... + xn * kn. Read moreSource§impl LinearCombination<[(ProjectivePoint, Scalar)]> for ProjectivePoint
impl LinearCombination<[(ProjectivePoint, Scalar)]> for ProjectivePoint
Source§fn lincomb(points_and_scalars: &[(ProjectivePoint, Scalar)]) -> Self
fn lincomb(points_and_scalars: &[(ProjectivePoint, Scalar)]) -> Self
Calculates
x1 * k1 + ... + xn * kn.Source§fn lincomb_vartime(points_and_scalars: &[(ProjectivePoint, Scalar)]) -> Self
fn lincomb_vartime(points_and_scalars: &[(ProjectivePoint, Scalar)]) -> Self
Calculates
x1 * k1 + ... + xn * kn. Read moreSource§impl Mul<&Scalar> for &ProjectivePoint
impl Mul<&Scalar> for &ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
* operator.Source§impl Mul<&Scalar> for ProjectivePoint
impl Mul<&Scalar> for ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
* operator.Source§impl Mul<Scalar> for ProjectivePoint
impl Mul<Scalar> for ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
* operator.Source§impl MulAssign<&Scalar> for ProjectivePoint
impl MulAssign<&Scalar> for ProjectivePoint
Source§fn mul_assign(&mut self, rhs: &Scalar)
fn mul_assign(&mut self, rhs: &Scalar)
Performs the
*= operation. Read moreSource§impl MulAssign<Scalar> for ProjectivePoint
impl MulAssign<Scalar> for ProjectivePoint
Source§fn mul_assign(&mut self, rhs: Scalar)
fn mul_assign(&mut self, rhs: Scalar)
Performs the
*= operation. Read moreSource§impl MulByGeneratorVartime for ProjectivePoint
impl MulByGeneratorVartime for ProjectivePoint
Source§fn mul_by_generator_vartime(k: &Scalar) -> ProjectivePoint
fn mul_by_generator_vartime(k: &Scalar) -> ProjectivePoint
Multiply by the generator of the prime-order subgroup. Read more
Source§impl MulVartime<&Scalar> for &ProjectivePoint
impl MulVartime<&Scalar> for &ProjectivePoint
Source§fn mul_vartime(self, other: &Scalar) -> ProjectivePoint
fn mul_vartime(self, other: &Scalar) -> ProjectivePoint
Multiply
self by rhs in variable-time.Source§impl MulVartime<&Scalar> for ProjectivePoint
impl MulVartime<&Scalar> for ProjectivePoint
Source§fn mul_vartime(self, other: &Scalar) -> ProjectivePoint
fn mul_vartime(self, other: &Scalar) -> ProjectivePoint
Multiply
self by rhs in variable-time.Source§impl MulVartime<Scalar> for ProjectivePoint
impl MulVartime<Scalar> for ProjectivePoint
Source§fn mul_vartime(self, other: Scalar) -> ProjectivePoint
fn mul_vartime(self, other: Scalar) -> ProjectivePoint
Multiply
self by rhs in variable-time.Source§impl Neg for ProjectivePoint
impl Neg for ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
- operator.Source§fn neg(self) -> ProjectivePoint
fn neg(self) -> ProjectivePoint
Performs the unary
- operation. Read moreSource§impl Neg for &ProjectivePoint
impl Neg for &ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
- operator.Source§fn neg(self) -> ProjectivePoint
fn neg(self) -> ProjectivePoint
Performs the unary
- operation. Read moreSource§impl PartialEq for ProjectivePoint
impl PartialEq for ProjectivePoint
Source§impl PartialEq<AffinePoint> for ProjectivePoint
impl PartialEq<AffinePoint> for ProjectivePoint
Source§fn eq(&self, other: &AffinePoint) -> bool
fn eq(&self, other: &AffinePoint) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialEq<ProjectivePoint> for AffinePoint
impl PartialEq<ProjectivePoint> for AffinePoint
Source§fn eq(&self, other: &ProjectivePoint) -> bool
fn eq(&self, other: &ProjectivePoint) -> bool
Tests for
self and other values to be equal, and is used by ==.impl PrimeCurve for ProjectivePoint
impl PrimeGroup for ProjectivePoint
Source§impl Sub for ProjectivePoint
impl Sub for ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
- operator.Source§fn sub(self, rhs: ProjectivePoint) -> ProjectivePoint
fn sub(self, rhs: ProjectivePoint) -> ProjectivePoint
Performs the
- operation. Read moreSource§impl Sub<&AffinePoint> for &ProjectivePoint
impl Sub<&AffinePoint> for &ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
- operator.Source§fn sub(self, rhs: &AffinePoint) -> ProjectivePoint
fn sub(self, rhs: &AffinePoint) -> ProjectivePoint
Performs the
- operation. Read moreSource§impl Sub<&AffinePoint> for ProjectivePoint
impl Sub<&AffinePoint> for ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
- operator.Source§fn sub(self, rhs: &AffinePoint) -> ProjectivePoint
fn sub(self, rhs: &AffinePoint) -> ProjectivePoint
Performs the
- operation. Read moreSource§impl Sub<&ProjectivePoint> for &ProjectivePoint
impl Sub<&ProjectivePoint> for &ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
- operator.Source§fn sub(self, rhs: &ProjectivePoint) -> ProjectivePoint
fn sub(self, rhs: &ProjectivePoint) -> ProjectivePoint
Performs the
- operation. Read moreSource§impl Sub<&ProjectivePoint> for ProjectivePoint
impl Sub<&ProjectivePoint> for ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
- operator.Source§fn sub(self, rhs: &ProjectivePoint) -> ProjectivePoint
fn sub(self, rhs: &ProjectivePoint) -> ProjectivePoint
Performs the
- operation. Read moreSource§impl Sub<AffinePoint> for ProjectivePoint
impl Sub<AffinePoint> for ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
- operator.Source§fn sub(self, rhs: AffinePoint) -> ProjectivePoint
fn sub(self, rhs: AffinePoint) -> ProjectivePoint
Performs the
- operation. Read moreSource§impl SubAssign for ProjectivePoint
impl SubAssign for ProjectivePoint
Source§fn sub_assign(&mut self, rhs: ProjectivePoint)
fn sub_assign(&mut self, rhs: ProjectivePoint)
Performs the
-= operation. Read moreSource§impl SubAssign<&AffinePoint> for ProjectivePoint
impl SubAssign<&AffinePoint> for ProjectivePoint
Source§fn sub_assign(&mut self, rhs: &AffinePoint)
fn sub_assign(&mut self, rhs: &AffinePoint)
Performs the
-= operation. Read moreSource§impl SubAssign<&ProjectivePoint> for ProjectivePoint
impl SubAssign<&ProjectivePoint> for ProjectivePoint
Source§fn sub_assign(&mut self, rhs: &ProjectivePoint)
fn sub_assign(&mut self, rhs: &ProjectivePoint)
Performs the
-= operation. Read moreSource§impl SubAssign<AffinePoint> for ProjectivePoint
impl SubAssign<AffinePoint> for ProjectivePoint
Source§fn sub_assign(&mut self, rhs: AffinePoint)
fn sub_assign(&mut self, rhs: AffinePoint)
Performs the
-= operation. Read moreSource§impl Sum for ProjectivePoint
impl Sum for ProjectivePoint
Source§impl<'a> Sum<&'a ProjectivePoint> for ProjectivePoint
impl<'a> Sum<&'a ProjectivePoint> for ProjectivePoint
Source§fn sum<I: Iterator<Item = &'a ProjectivePoint>>(iter: I) -> Self
fn sum<I: Iterator<Item = &'a ProjectivePoint>>(iter: I) -> Self
Takes an iterator and generates
Self from the elements by “summing up”
the items.Source§impl ToSec1Point<Secp256k1> for ProjectivePoint
impl ToSec1Point<Secp256k1> for ProjectivePoint
Source§fn to_sec1_point(&self, compress: bool) -> Sec1Point
fn to_sec1_point(&self, compress: bool) -> Sec1Point
Serialize curve point as a SEC1
Sec1Point, optionally applying point compression
according to the compress flag.Source§fn to_sec1_bytes(&self) -> Box<[u8]>where
C: PointCompression,
fn to_sec1_bytes(&self) -> Box<[u8]>where
C: PointCompression,
Available on crate feature
alloc only.Encode curve point using the
Elliptic-Curve-Point-to-Octet-String conversion and the
point compression default for this curve as specified by the PointCompression trait.Source§fn to_compressed_point(
&self,
) -> Array<u8, <<C as Curve>::FieldBytesSize as ModulusSize>::CompressedPointSize>
fn to_compressed_point( &self, ) -> Array<u8, <<C as Curve>::FieldBytesSize as ModulusSize>::CompressedPointSize>
Serialize curve point as a
CompressedPoint.Source§fn to_uncompressed_point(
&self,
) -> Array<u8, <<C as Curve>::FieldBytesSize as ModulusSize>::UncompressedPointSize>
fn to_uncompressed_point( &self, ) -> Array<u8, <<C as Curve>::FieldBytesSize as ModulusSize>::UncompressedPointSize>
Serialize curve point as a
CompressedPoint.Source§fn to_encoded_point(
&self,
compress: bool,
) -> EncodedPoint<<C as Curve>::FieldBytesSize>
fn to_encoded_point( &self, compress: bool, ) -> EncodedPoint<<C as Curve>::FieldBytesSize>
👎Deprecated since 0.14.0:
use ToSec1Point::to_sec1_point instead
DEPRECATED: legacy name for
ToSec1Point::to_sec1_point.Source§impl TryFrom<&ProjectivePoint> for PublicKey
impl TryFrom<&ProjectivePoint> for PublicKey
Source§impl TryFrom<ProjectivePoint> for NonIdentity<ProjectivePoint>
The constant-time alternative is available at NonIdentity::new().
impl TryFrom<ProjectivePoint> for NonIdentity<ProjectivePoint>
The constant-time alternative is available at NonIdentity::new().
Auto Trait Implementations§
impl Freeze for ProjectivePoint
impl RefUnwindSafe for ProjectivePoint
impl Send for ProjectivePoint
impl Sync for ProjectivePoint
impl Unpin for ProjectivePoint
impl UnsafeUnpin for ProjectivePoint
impl UnwindSafe for ProjectivePoint
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more