pub struct ProjectivePoint<C: PrimeCurveParams> {
pub(crate) x: C::FieldElement,
pub(crate) y: C::FieldElement,
pub(crate) z: C::FieldElement,
}Expand description
Point on a Weierstrass curve in projective coordinates.
Fields§
§x: C::FieldElement§y: C::FieldElement§z: C::FieldElementImplementations§
Source§impl<C> ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> ProjectivePoint<C>where
C: PrimeCurveParams,
Sourcepub fn to_affine(&self) -> AffinePoint<C>
pub fn to_affine(&self) -> AffinePoint<C>
Returns the affine representation of this point, or None if it is the identity.
pub(crate) fn to_affine_internal(self, zinv: C::FieldElement) -> AffinePoint<C>
Sourcefn add_mixed(&self, other: &AffinePoint<C>) -> Self
fn add_mixed(&self, other: &AffinePoint<C>) -> Self
Returns self + other.
Sourcefn sub_mixed(&self, other: &AffinePoint<C>) -> Self
fn sub_mixed(&self, other: &AffinePoint<C>) -> Self
Returns self - other.
Sourcepub fn mul_vartime(&self, k: &Scalar<C>) -> Self
pub fn mul_vartime(&self, k: &Scalar<C>) -> Self
Returns [k] self computed in variable time.
Trait Implementations§
Source§impl<C> Add<&AffinePoint<C>> for &ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> Add<&AffinePoint<C>> for &ProjectivePoint<C>where
C: PrimeCurveParams,
Source§type Output = ProjectivePoint<C>
type Output = ProjectivePoint<C>
The resulting type after applying the
+ operator.Source§fn add(self, other: &AffinePoint<C>) -> ProjectivePoint<C>
fn add(self, other: &AffinePoint<C>) -> ProjectivePoint<C>
Performs the
+ operation. Read moreSource§impl<C> Add<&AffinePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> Add<&AffinePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§type Output = ProjectivePoint<C>
type Output = ProjectivePoint<C>
The resulting type after applying the
+ operator.Source§fn add(self, other: &AffinePoint<C>) -> ProjectivePoint<C>
fn add(self, other: &AffinePoint<C>) -> ProjectivePoint<C>
Performs the
+ operation. Read moreSource§impl<C> Add<&ProjectivePoint<C>> for &ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> Add<&ProjectivePoint<C>> for &ProjectivePoint<C>where
C: PrimeCurveParams,
Source§type Output = ProjectivePoint<C>
type Output = ProjectivePoint<C>
The resulting type after applying the
+ operator.Source§fn add(self, other: &ProjectivePoint<C>) -> ProjectivePoint<C>
fn add(self, other: &ProjectivePoint<C>) -> ProjectivePoint<C>
Performs the
+ operation. Read moreSource§impl<C> Add<&ProjectivePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> Add<&ProjectivePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§type Output = ProjectivePoint<C>
type Output = ProjectivePoint<C>
The resulting type after applying the
+ operator.Source§fn add(self, other: &ProjectivePoint<C>) -> ProjectivePoint<C>
fn add(self, other: &ProjectivePoint<C>) -> ProjectivePoint<C>
Performs the
+ operation. Read moreSource§impl<C> Add<AffinePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> Add<AffinePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§type Output = ProjectivePoint<C>
type Output = ProjectivePoint<C>
The resulting type after applying the
+ operator.Source§fn add(self, other: AffinePoint<C>) -> ProjectivePoint<C>
fn add(self, other: AffinePoint<C>) -> ProjectivePoint<C>
Performs the
+ operation. Read moreSource§impl<C> Add for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> Add for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§type Output = ProjectivePoint<C>
type Output = ProjectivePoint<C>
The resulting type after applying the
+ operator.Source§fn add(self, other: ProjectivePoint<C>) -> ProjectivePoint<C>
fn add(self, other: ProjectivePoint<C>) -> ProjectivePoint<C>
Performs the
+ operation. Read moreSource§impl<C> AddAssign<&AffinePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> AddAssign<&AffinePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§fn add_assign(&mut self, rhs: &AffinePoint<C>)
fn add_assign(&mut self, rhs: &AffinePoint<C>)
Performs the
+= operation. Read moreSource§impl<C> AddAssign<&ProjectivePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> AddAssign<&ProjectivePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§fn add_assign(&mut self, rhs: &ProjectivePoint<C>)
fn add_assign(&mut self, rhs: &ProjectivePoint<C>)
Performs the
+= operation. Read moreSource§impl<C> AddAssign<AffinePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> AddAssign<AffinePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§fn add_assign(&mut self, rhs: AffinePoint<C>)
fn add_assign(&mut self, rhs: AffinePoint<C>)
Performs the
+= operation. Read moreSource§impl<C> AddAssign for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> AddAssign for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§fn add_assign(&mut self, rhs: ProjectivePoint<C>)
fn add_assign(&mut self, rhs: ProjectivePoint<C>)
Performs the
+= operation. Read moreSource§impl<C> BatchNormalize<[ProjectivePoint<C>]> for ProjectivePoint<C>where
C: PrimeCurveParams,
Available on crate feature alloc only.
impl<C> BatchNormalize<[ProjectivePoint<C>]> for ProjectivePoint<C>where
C: PrimeCurveParams,
Available on crate feature
alloc only.Source§type Output = Vec<<ProjectivePoint<C> as Curve>::Affine>
type Output = Vec<<ProjectivePoint<C> as Curve>::Affine>
The output of the batch normalization; a container of affine points.
Source§fn batch_normalize(points: &[Self]) -> Vec<<Self as CurveGroup>::Affine>
fn batch_normalize(points: &[Self]) -> Vec<<Self as CurveGroup>::Affine>
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§impl<const N: usize, C> BatchNormalize<[ProjectivePoint<C>; N]> for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<const N: usize, C> BatchNormalize<[ProjectivePoint<C>; N]> for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§type Output = [<ProjectivePoint<C> as Curve>::Affine; N]
type Output = [<ProjectivePoint<C> as Curve>::Affine; N]
The output of the batch normalization; a container of affine points.
Source§fn batch_normalize(points: &[Self; N]) -> [<Self as CurveGroup>::Affine; N]
fn batch_normalize(points: &[Self; N]) -> [<Self as CurveGroup>::Affine; 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§impl<C: Clone + PrimeCurveParams> Clone for ProjectivePoint<C>where
C::FieldElement: Clone,
impl<C: Clone + PrimeCurveParams> Clone for ProjectivePoint<C>where
C::FieldElement: Clone,
Source§fn clone(&self) -> ProjectivePoint<C>
fn clone(&self) -> ProjectivePoint<C>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<C> CofactorGroup for ProjectivePoint<C>where
C: PrimeCurveParams,
Prime order elliptic curves have a cofactor of 1.
impl<C> CofactorGroup for ProjectivePoint<C>where
C: PrimeCurveParams,
Prime order elliptic curves have a cofactor of 1.
Source§type Subgroup = ProjectivePoint<C>
type Subgroup = ProjectivePoint<C>
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<C> ConditionallySelectable for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> ConditionallySelectable for ProjectivePoint<C>where
C: PrimeCurveParams,
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<C> ConstantTimeEq for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> ConstantTimeEq for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§impl<C> CtEq for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> CtEq for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§impl<C> CtSelect for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> CtSelect for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§impl<C> Curve for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> Curve for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§type Affine = AffinePoint<C>
type Affine = AffinePoint<C>
The affine representation for this elliptic curve.
Source§fn to_affine(&self) -> AffinePoint<C>
fn to_affine(&self) -> AffinePoint<C>
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<C: Debug + PrimeCurveParams> Debug for ProjectivePoint<C>where
C::FieldElement: Debug,
impl<C: Debug + PrimeCurveParams> Debug for ProjectivePoint<C>where
C::FieldElement: Debug,
Source§impl<C> Default for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> Default for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§impl<C: PrimeCurveParams> Double for ProjectivePoint<C>
impl<C: PrimeCurveParams> Double for ProjectivePoint<C>
Source§impl<C> From<&AffinePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> From<&AffinePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§fn from(p: &AffinePoint<C>) -> Self
fn from(p: &AffinePoint<C>) -> Self
Converts to this type from the input type.
Source§impl<C> From<&ProjectivePoint<C>> for AffinePoint<C>where
C: PrimeCurveParams,
impl<C> From<&ProjectivePoint<C>> for AffinePoint<C>where
C: PrimeCurveParams,
Source§fn from(p: &ProjectivePoint<C>) -> AffinePoint<C>
fn from(p: &ProjectivePoint<C>) -> AffinePoint<C>
Converts to this type from the input type.
Source§impl<C> From<&PublicKey<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> From<&PublicKey<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§fn from(public_key: &PublicKey<C>) -> ProjectivePoint<C>
fn from(public_key: &PublicKey<C>) -> ProjectivePoint<C>
Converts to this type from the input type.
Source§impl<C> From<AffinePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> From<AffinePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§fn from(p: AffinePoint<C>) -> Self
fn from(p: AffinePoint<C>) -> Self
Converts to this type from the input type.
Source§impl<C> From<NonIdentity<ProjectivePoint<C>>> for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> From<NonIdentity<ProjectivePoint<C>>> for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§fn from(p: NonIdentity<ProjectivePoint<C>>) -> Self
fn from(p: NonIdentity<ProjectivePoint<C>>) -> Self
Converts to this type from the input type.
Source§impl<C> From<ProjectivePoint<C>> for AffinePoint<C>where
C: PrimeCurveParams,
impl<C> From<ProjectivePoint<C>> for AffinePoint<C>where
C: PrimeCurveParams,
Source§fn from(p: ProjectivePoint<C>) -> AffinePoint<C>
fn from(p: ProjectivePoint<C>) -> AffinePoint<C>
Converts to this type from the input type.
Source§impl<C> From<PublicKey<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> From<PublicKey<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§fn from(public_key: PublicKey<C>) -> ProjectivePoint<C>
fn from(public_key: PublicKey<C>) -> ProjectivePoint<C>
Converts to this type from the input type.
Source§impl<C> FromSec1Point<C> for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> FromSec1Point<C> for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§fn from_sec1_point(p: &Sec1Point<C>) -> CtOption<Self>
fn from_sec1_point(p: &Sec1Point<C>) -> CtOption<Self>
Decode curve point from a SEC1
Sec1Point.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 insteadDEPRECATED: legacy name for
FromSec1Point::from_sec1_point.Source§impl<C> Generate for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> Generate for ProjectivePoint<C>where
C: PrimeCurveParams,
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<C> Group for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> Group for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§type Scalar = <C as CurveArithmetic>::Scalar
type Scalar = <C as CurveArithmetic>::Scalar
Scalars modulo the order of this group’s scalar field.
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(scalar: &Self::Scalar) -> Self
fn mul_by_generator(scalar: &Self::Scalar) -> Self
Multiply by the generator of the prime-order subgroup.
Source§impl<C> GroupEncoding for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> GroupEncoding for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§type Repr = Array<u8, <<C as Curve>::FieldBytesSize as ModulusSize>::CompressedPointSize>
type Repr = Array<u8, <<C as Curve>::FieldBytesSize as ModulusSize>::CompressedPointSize>
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<C> LinearCombination<[(ProjectivePoint<C>, <C as CurveArithmetic>::Scalar)]> for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> LinearCombination<[(ProjectivePoint<C>, <C as CurveArithmetic>::Scalar)]> for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§impl<C, const N: usize> LinearCombination<[(ProjectivePoint<C>, <C as CurveArithmetic>::Scalar); N]> for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C, const N: usize> LinearCombination<[(ProjectivePoint<C>, <C as CurveArithmetic>::Scalar); N]> for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§impl<C> Mul<&<C as CurveArithmetic>::Scalar> for &ProjectivePoint<C>
impl<C> Mul<&<C as CurveArithmetic>::Scalar> for &ProjectivePoint<C>
Source§type Output = ProjectivePoint<C>
type Output = ProjectivePoint<C>
The resulting type after applying the
* operator.Source§impl<C, S> Mul<S> for &ProjectivePoint<C>
impl<C, S> Mul<S> for &ProjectivePoint<C>
Source§type Output = ProjectivePoint<C>
type Output = ProjectivePoint<C>
The resulting type after applying the
* operator.Source§fn mul(self, scalar: S) -> ProjectivePoint<C>
fn mul(self, scalar: S) -> ProjectivePoint<C>
Performs the
* operation. Read moreSource§impl<C, S> Mul<S> for ProjectivePoint<C>
impl<C, S> Mul<S> for ProjectivePoint<C>
Source§impl<C, S> MulAssign<S> for ProjectivePoint<C>
impl<C, S> MulAssign<S> for ProjectivePoint<C>
Source§fn mul_assign(&mut self, scalar: S)
fn mul_assign(&mut self, scalar: S)
Performs the
*= operation. Read moreSource§impl<C> MulByGeneratorVartime for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> MulByGeneratorVartime for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§fn mul_by_generator_vartime(scalar: &Scalar<C>) -> Self
fn mul_by_generator_vartime(scalar: &Scalar<C>) -> Self
Multiply by the generator of the prime-order subgroup. Read more
Source§impl<C> MulVartime<&<C as CurveArithmetic>::Scalar> for &ProjectivePoint<C>
impl<C> MulVartime<&<C as CurveArithmetic>::Scalar> for &ProjectivePoint<C>
Source§fn mul_vartime(self, scalar: &Scalar<C>) -> ProjectivePoint<C>
fn mul_vartime(self, scalar: &Scalar<C>) -> ProjectivePoint<C>
Multiply
self by rhs in variable-time.Source§impl<C, S> MulVartime<S> for &ProjectivePoint<C>
impl<C, S> MulVartime<S> for &ProjectivePoint<C>
Source§fn mul_vartime(self, scalar: S) -> ProjectivePoint<C>
fn mul_vartime(self, scalar: S) -> ProjectivePoint<C>
Multiply
self by rhs in variable-time.Source§impl<C, S> MulVartime<S> for ProjectivePoint<C>
impl<C, S> MulVartime<S> for ProjectivePoint<C>
Source§fn mul_vartime(self, scalar: S) -> Self
fn mul_vartime(self, scalar: S) -> Self
Multiply
self by rhs in variable-time.Source§impl<C> Neg for &ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> Neg for &ProjectivePoint<C>where
C: PrimeCurveParams,
Source§type Output = ProjectivePoint<C>
type Output = ProjectivePoint<C>
The resulting type after applying the
- operator.Source§fn neg(self) -> ProjectivePoint<C>
fn neg(self) -> ProjectivePoint<C>
Performs the unary
- operation. Read moreSource§impl<C> Neg for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> Neg for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§type Output = ProjectivePoint<C>
type Output = ProjectivePoint<C>
The resulting type after applying the
- operator.Source§fn neg(self) -> ProjectivePoint<C>
fn neg(self) -> ProjectivePoint<C>
Performs the unary
- operation. Read moreSource§impl<C> PartialEq for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> PartialEq for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§impl<C> Sub<&AffinePoint<C>> for &ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> Sub<&AffinePoint<C>> for &ProjectivePoint<C>where
C: PrimeCurveParams,
Source§type Output = ProjectivePoint<C>
type Output = ProjectivePoint<C>
The resulting type after applying the
- operator.Source§fn sub(self, other: &AffinePoint<C>) -> ProjectivePoint<C>
fn sub(self, other: &AffinePoint<C>) -> ProjectivePoint<C>
Performs the
- operation. Read moreSource§impl<C> Sub<&AffinePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> Sub<&AffinePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§type Output = ProjectivePoint<C>
type Output = ProjectivePoint<C>
The resulting type after applying the
- operator.Source§fn sub(self, other: &AffinePoint<C>) -> ProjectivePoint<C>
fn sub(self, other: &AffinePoint<C>) -> ProjectivePoint<C>
Performs the
- operation. Read moreSource§impl<C> Sub<&ProjectivePoint<C>> for &ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> Sub<&ProjectivePoint<C>> for &ProjectivePoint<C>where
C: PrimeCurveParams,
Source§type Output = ProjectivePoint<C>
type Output = ProjectivePoint<C>
The resulting type after applying the
- operator.Source§fn sub(self, other: &ProjectivePoint<C>) -> ProjectivePoint<C>
fn sub(self, other: &ProjectivePoint<C>) -> ProjectivePoint<C>
Performs the
- operation. Read moreSource§impl<C> Sub<&ProjectivePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> Sub<&ProjectivePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§type Output = ProjectivePoint<C>
type Output = ProjectivePoint<C>
The resulting type after applying the
- operator.Source§fn sub(self, other: &ProjectivePoint<C>) -> ProjectivePoint<C>
fn sub(self, other: &ProjectivePoint<C>) -> ProjectivePoint<C>
Performs the
- operation. Read moreSource§impl<C> Sub<AffinePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> Sub<AffinePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§type Output = ProjectivePoint<C>
type Output = ProjectivePoint<C>
The resulting type after applying the
- operator.Source§fn sub(self, other: AffinePoint<C>) -> ProjectivePoint<C>
fn sub(self, other: AffinePoint<C>) -> ProjectivePoint<C>
Performs the
- operation. Read moreSource§impl<C> Sub for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> Sub for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§type Output = ProjectivePoint<C>
type Output = ProjectivePoint<C>
The resulting type after applying the
- operator.Source§fn sub(self, other: ProjectivePoint<C>) -> ProjectivePoint<C>
fn sub(self, other: ProjectivePoint<C>) -> ProjectivePoint<C>
Performs the
- operation. Read moreSource§impl<C> SubAssign<&AffinePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> SubAssign<&AffinePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§fn sub_assign(&mut self, rhs: &AffinePoint<C>)
fn sub_assign(&mut self, rhs: &AffinePoint<C>)
Performs the
-= operation. Read moreSource§impl<C> SubAssign<&ProjectivePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> SubAssign<&ProjectivePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§fn sub_assign(&mut self, rhs: &ProjectivePoint<C>)
fn sub_assign(&mut self, rhs: &ProjectivePoint<C>)
Performs the
-= operation. Read moreSource§impl<C> SubAssign<AffinePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> SubAssign<AffinePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§fn sub_assign(&mut self, rhs: AffinePoint<C>)
fn sub_assign(&mut self, rhs: AffinePoint<C>)
Performs the
-= operation. Read moreSource§impl<C> SubAssign for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> SubAssign for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§fn sub_assign(&mut self, rhs: ProjectivePoint<C>)
fn sub_assign(&mut self, rhs: ProjectivePoint<C>)
Performs the
-= operation. Read moreSource§impl<'a, C> Sum<&'a ProjectivePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<'a, C> Sum<&'a ProjectivePoint<C>> for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§fn sum<I: Iterator<Item = &'a ProjectivePoint<C>>>(iter: I) -> Self
fn sum<I: Iterator<Item = &'a ProjectivePoint<C>>>(iter: I) -> Self
Takes an iterator and generates
Self from the elements by “summing up”
the items.Source§impl<C> Sum for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> Sum for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§impl<C> ToSec1Point<C> for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> ToSec1Point<C> for ProjectivePoint<C>where
C: PrimeCurveParams,
Source§fn to_sec1_point(&self, compress: bool) -> Sec1Point<C>
fn to_sec1_point(&self, compress: bool) -> Sec1Point<C>
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,
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 insteadDEPRECATED: legacy name for
ToSec1Point::to_sec1_point.Source§impl<C> TryFrom<&ProjectivePoint<C>> for PublicKey<C>where
C: PrimeCurveParams,
impl<C> TryFrom<&ProjectivePoint<C>> for PublicKey<C>where
C: PrimeCurveParams,
Source§impl<C> TryFrom<ProjectivePoint<C>> for NonIdentity<ProjectivePoint<C>>where
C: PrimeCurveParams,
The constant-time alternative is available at NonIdentity::new().
impl<C> TryFrom<ProjectivePoint<C>> for NonIdentity<ProjectivePoint<C>>where
C: PrimeCurveParams,
The constant-time alternative is available at NonIdentity::new().
Source§impl<C> TryFrom<ProjectivePoint<C>> for PublicKey<C>where
C: PrimeCurveParams,
impl<C> TryFrom<ProjectivePoint<C>> for PublicKey<C>where
C: PrimeCurveParams,
impl<C: Copy + PrimeCurveParams> Copy for ProjectivePoint<C>where
C::FieldElement: Copy,
impl<C> DefaultIsZeroes for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> Eq for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> PrimeCurve for ProjectivePoint<C>where
C: PrimeCurveParams,
impl<C> PrimeGroup for ProjectivePoint<C>where
C: PrimeCurveParams,
Auto Trait Implementations§
impl<C> Freeze for ProjectivePoint<C>where
<C as FieldArithmetic>::FieldElement: Sized + Freeze,
<C as CurveArithmetic>::Scalar: Sized,
<C as Curve>::FieldBytesSize: Sized,
impl<C> RefUnwindSafe for ProjectivePoint<C>where
<C as FieldArithmetic>::FieldElement: Sized + RefUnwindSafe,
<C as CurveArithmetic>::Scalar: Sized,
<C as Curve>::FieldBytesSize: Sized,
impl<C> Send for ProjectivePoint<C>where
<C as FieldArithmetic>::FieldElement: Sized,
<C as CurveArithmetic>::Scalar: Sized,
<C as Curve>::FieldBytesSize: Sized,
impl<C> Sync for ProjectivePoint<C>where
<C as FieldArithmetic>::FieldElement: Sized,
<C as CurveArithmetic>::Scalar: Sized,
<C as Curve>::FieldBytesSize: Sized,
impl<C> Unpin for ProjectivePoint<C>where
<C as FieldArithmetic>::FieldElement: Sized + Unpin,
<C as CurveArithmetic>::Scalar: Sized,
<C as Curve>::FieldBytesSize: Sized,
impl<C> UnsafeUnpin for ProjectivePoint<C>where
<C as FieldArithmetic>::FieldElement: Sized + UnsafeUnpin,
<C as CurveArithmetic>::Scalar: Sized,
<C as Curve>::FieldBytesSize: Sized,
impl<C> UnwindSafe for ProjectivePoint<C>where
<C as FieldArithmetic>::FieldElement: Sized + UnwindSafe,
<C as CurveArithmetic>::Scalar: Sized,
<C as Curve>::FieldBytesSize: Sized,
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