pub struct Projective<P>where
P: DOCurveConfig,{
pub e: <P as CurveConfig>::BaseField,
pub z: <P as CurveConfig>::BaseField,
pub u: <P as CurveConfig>::BaseField,
pub t: <P as CurveConfig>::BaseField,
}Expand description
Fractional coordinates as utilised in https://doubleodd.group/doubleodd-jq.pdf, but first defined in https://www.sciencedirect.com/science/article/pii/S0020019007001433. Affine point (e,u) is represented as (E:Z:U:T) such that:
- Z != 0
- e = E/Z
- u = U/Z
- u**2 / T/Z
Fields§
§e: <P as CurveConfig>::BaseFieldE / Z projection of the affine e
z: <P as CurveConfig>::BaseFieldProjective multiplicative inverse.
u: <P as CurveConfig>::BaseFieldU / Z projection of the affine u
t: <P as CurveConfig>::BaseFieldAdditional formula for faster addition: T = U^2/Z
Implementations§
Source§impl<P> Projective<P>where
P: DOCurveConfig,
impl<P> Projective<P>where
P: DOCurveConfig,
Sourcepub const fn new_unchecked(
e: <P as CurveConfig>::BaseField,
z: <P as CurveConfig>::BaseField,
u: <P as CurveConfig>::BaseField,
t: <P as CurveConfig>::BaseField,
) -> Projective<P>
pub const fn new_unchecked( e: <P as CurveConfig>::BaseField, z: <P as CurveConfig>::BaseField, u: <P as CurveConfig>::BaseField, t: <P as CurveConfig>::BaseField, ) -> Projective<P>
Constructs a new group element without checking whether the coordinates specify a point in the subgroup.
Sourcepub fn new(
e: <P as CurveConfig>::BaseField,
z: <P as CurveConfig>::BaseField,
u: <P as CurveConfig>::BaseField,
t: <P as CurveConfig>::BaseField,
) -> Projective<P>
pub fn new( e: <P as CurveConfig>::BaseField, z: <P as CurveConfig>::BaseField, u: <P as CurveConfig>::BaseField, t: <P as CurveConfig>::BaseField, ) -> Projective<P>
Constructs a new group element in a way while enforcing that points are in the prime-order subgroup.
Trait Implementations§
Source§impl<'a, 'b, P> Add<&'a Projective<P>> for &'b Projective<P>where
P: DOCurveConfig,
impl<'a, 'b, P> Add<&'a Projective<P>> for &'b Projective<P>where
P: DOCurveConfig,
Source§type Output = Projective<P>
type Output = Projective<P>
+ operator.Source§fn add(self, other: &'a Projective<P>) -> Projective<P>
fn add(self, other: &'a Projective<P>) -> Projective<P>
+ operation. Read moreSource§impl<'a, P> Add<&'a Projective<P>> for Affine<P>where
P: DOCurveConfig,
impl<'a, P> Add<&'a Projective<P>> for Affine<P>where
P: DOCurveConfig,
Source§type Output = Projective<P>
type Output = Projective<P>
+ operator.Source§fn add(self, other: &'a Projective<P>) -> Projective<P>
fn add(self, other: &'a Projective<P>) -> Projective<P>
+ operation. Read moreSource§impl<'a, P> Add<&'a Projective<P>> for Projective<P>where
P: DOCurveConfig,
impl<'a, P> Add<&'a Projective<P>> for Projective<P>where
P: DOCurveConfig,
Source§type Output = Projective<P>
type Output = Projective<P>
+ operator.Source§fn add(self, other: &'a Projective<P>) -> Projective<P>
fn add(self, other: &'a Projective<P>) -> Projective<P>
+ operation. Read moreSource§impl<'a, 'b, P> Add<&'a mut Projective<P>> for &'b Projective<P>where
P: DOCurveConfig,
impl<'a, 'b, P> Add<&'a mut Projective<P>> for &'b Projective<P>where
P: DOCurveConfig,
Source§type Output = Projective<P>
type Output = Projective<P>
+ operator.Source§fn add(self, other: &'a mut Projective<P>) -> Projective<P>
fn add(self, other: &'a mut Projective<P>) -> Projective<P>
+ operation. Read moreSource§impl<'a, P> Add<&'a mut Projective<P>> for Projective<P>where
P: DOCurveConfig,
impl<'a, P> Add<&'a mut Projective<P>> for Projective<P>where
P: DOCurveConfig,
Source§type Output = Projective<P>
type Output = Projective<P>
+ operator.Source§fn add(self, other: &'a mut Projective<P>) -> Projective<P>
fn add(self, other: &'a mut Projective<P>) -> Projective<P>
+ operation. Read moreSource§impl<'b, P> Add<Projective<P>> for &'b Projective<P>where
P: DOCurveConfig,
impl<'b, P> Add<Projective<P>> for &'b Projective<P>where
P: DOCurveConfig,
Source§type Output = Projective<P>
type Output = Projective<P>
+ operator.Source§fn add(self, other: Projective<P>) -> Projective<P>
fn add(self, other: Projective<P>) -> Projective<P>
+ operation. Read moreSource§impl<P> Add<Projective<P>> for Affine<P>where
P: DOCurveConfig,
impl<P> Add<Projective<P>> for Affine<P>where
P: DOCurveConfig,
Source§type Output = Projective<P>
type Output = Projective<P>
+ operator.Source§fn add(self, other: Projective<P>) -> Projective<P>
fn add(self, other: Projective<P>) -> Projective<P>
+ operation. Read moreSource§impl<P, T> Add<T> for Projective<P>
impl<P, T> Add<T> for Projective<P>
Source§type Output = Projective<P>
type Output = Projective<P>
+ operator.Source§fn add(self, other: T) -> Projective<P>
fn add(self, other: T) -> Projective<P>
+ operation. Read moreSource§impl<P> Add for Projective<P>where
P: DOCurveConfig,
impl<P> Add for Projective<P>where
P: DOCurveConfig,
Source§type Output = Projective<P>
type Output = Projective<P>
+ operator.Source§fn add(self, other: Projective<P>) -> Projective<P>
fn add(self, other: Projective<P>) -> Projective<P>
+ operation. Read moreSource§impl<'a, P> AddAssign<&'a Projective<P>> for Projective<P>where
P: DOCurveConfig,
impl<'a, P> AddAssign<&'a Projective<P>> for Projective<P>where
P: DOCurveConfig,
Source§fn add_assign(&mut self, other: &'a Projective<P>)
fn add_assign(&mut self, other: &'a Projective<P>)
Using Algorithm 3 from https://doubleodd.group/doubleodd-jq.pdf.
Source§impl<'a, P> AddAssign<&'a mut Projective<P>> for Projective<P>where
P: DOCurveConfig,
impl<'a, P> AddAssign<&'a mut Projective<P>> for Projective<P>where
P: DOCurveConfig,
Source§fn add_assign(&mut self, other: &'a mut Projective<P>)
fn add_assign(&mut self, other: &'a mut Projective<P>)
+= operation. Read moreSource§impl<P, T> AddAssign<T> for Projective<P>
impl<P, T> AddAssign<T> for Projective<P>
Source§fn add_assign(&mut self, other: T)
fn add_assign(&mut self, other: T)
Using Algorithm 3 from https://doubleodd.group/doubleodd-jq.pdf, simplified because the second point is affine (n2 = Z1, n5 = Z1*T2 + T1).
Source§impl<P> AddAssign for Projective<P>where
P: DOCurveConfig,
impl<P> AddAssign for Projective<P>where
P: DOCurveConfig,
Source§fn add_assign(&mut self, other: Projective<P>)
fn add_assign(&mut self, other: Projective<P>)
+= operation. Read moreSource§impl<P> AdditiveGroup for Projective<P>where
P: DOCurveConfig,
impl<P> AdditiveGroup for Projective<P>where
P: DOCurveConfig,
Source§const ZERO: Projective<P>
const ZERO: Projective<P>
type Scalar = <P as CurveConfig>::ScalarField
Source§fn double_in_place(&mut self) -> &mut Projective<P>
fn double_in_place(&mut self) -> &mut Projective<P>
self in place.Source§fn neg_in_place(&mut self) -> &mut Self
fn neg_in_place(&mut self) -> &mut Self
self in place.Source§impl<P> CanonicalDeserialize for Projective<P>where
P: DOCurveConfig,
impl<P> CanonicalDeserialize for Projective<P>where
P: DOCurveConfig,
Source§fn deserialize_with_mode<R>(
reader: R,
compress: Compress,
validate: Validate,
) -> Result<Projective<P>, SerializationError>where
R: Read,
fn deserialize_with_mode<R>(
reader: R,
compress: Compress,
validate: Validate,
) -> Result<Projective<P>, SerializationError>where
R: Read,
Source§fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
Self from reader using the compressed form if applicable.
Performs validation if applicable.Source§fn deserialize_compressed_unchecked<R>(
reader: R,
) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_compressed_unchecked<R>(
reader: R,
) -> Result<Self, SerializationError>where
R: Read,
Self from reader using the compressed form if applicable, without validating the
deserialized value. Read moreSource§fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
Self from reader using the uncompressed form. Performs validation if applicable.Source§fn deserialize_uncompressed_unchecked<R>(
reader: R,
) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_uncompressed_unchecked<R>(
reader: R,
) -> Result<Self, SerializationError>where
R: Read,
Self from reader using the uncompressed form, without validating the deserialized
value. Read moreSource§impl<P> CanonicalSerialize for Projective<P>where
P: DOCurveConfig,
impl<P> CanonicalSerialize for Projective<P>where
P: DOCurveConfig,
Source§fn serialize_with_mode<W>(
&self,
writer: W,
compress: Compress,
) -> Result<(), SerializationError>where
W: Write,
fn serialize_with_mode<W>(
&self,
writer: W,
compress: Compress,
) -> Result<(), SerializationError>where
W: Write,
Source§fn serialized_size(&self, compress: Compress) -> usize
fn serialized_size(&self, compress: Compress) -> usize
self with the given compression mode.Source§fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
self into writer using the compressed form if applicable.Source§fn compressed_size(&self) -> usize
fn compressed_size(&self) -> usize
self.Source§fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
self into writer using the uncompressed form.Source§fn uncompressed_size(&self) -> usize
fn uncompressed_size(&self) -> usize
self.Source§impl<P> Clone for Projective<P>
impl<P> Clone for Projective<P>
Source§fn clone(&self) -> Projective<P>
fn clone(&self) -> Projective<P>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<P> CurveGroup for Projective<P>where
P: DOCurveConfig,
impl<P> CurveGroup for Projective<P>where
P: DOCurveConfig,
type Config = P
Source§type BaseField = <P as CurveConfig>::BaseField
type BaseField = <P as CurveConfig>::BaseField
Source§type FullGroup = Affine<P>
type FullGroup = Affine<P>
Source§fn normalize_batch(
v: &[Projective<P>],
) -> Vec<<Projective<P> as CurveGroup>::Affine>
fn normalize_batch( v: &[Projective<P>], ) -> Vec<<Projective<P> as CurveGroup>::Affine>
Source§fn into_affine(self) -> Self::Affine
fn into_affine(self) -> Self::Affine
self into the affine representation.Source§impl<P> Debug for Projective<P>where
P: DOCurveConfig,
impl<P> Debug for Projective<P>where
P: DOCurveConfig,
Source§impl<P> Default for Projective<P>where
P: DOCurveConfig,
impl<P> Default for Projective<P>where
P: DOCurveConfig,
Source§fn default() -> Projective<P>
fn default() -> Projective<P>
Source§impl<P> Display for Projective<P>where
P: DOCurveConfig,
impl<P> Display for Projective<P>where
P: DOCurveConfig,
Source§impl<P> From<Affine<P>> for Projective<P>where
P: DOCurveConfig,
impl<P> From<Affine<P>> for Projective<P>where
P: DOCurveConfig,
Source§fn from(p: Affine<P>) -> Projective<P>
fn from(p: Affine<P>) -> Projective<P>
Source§impl<P> From<Projective<P>> for Affine<P>where
P: DOCurveConfig,
impl<P> From<Projective<P>> for Affine<P>where
P: DOCurveConfig,
Source§fn from(p: Projective<P>) -> Affine<P>
fn from(p: Projective<P>) -> Affine<P>
Source§impl<P> Hash for Projective<P>where
P: DOCurveConfig,
impl<P> Hash for Projective<P>where
P: DOCurveConfig,
Source§impl<P, T> Mul<T> for Projective<P>
impl<P, T> Mul<T> for Projective<P>
Source§type Output = Projective<P>
type Output = Projective<P>
* operator.Source§fn mul(self, other: T) -> Projective<P>
fn mul(self, other: T) -> Projective<P>
* operation. Read moreSource§impl<P, T> MulAssign<T> for Projective<P>
impl<P, T> MulAssign<T> for Projective<P>
Source§fn mul_assign(&mut self, other: T)
fn mul_assign(&mut self, other: T)
*= operation. Read moreSource§impl<P> Neg for Projective<P>where
P: DOCurveConfig,
impl<P> Neg for Projective<P>where
P: DOCurveConfig,
Source§type Output = Projective<P>
type Output = Projective<P>
- operator.Source§fn neg(self) -> Projective<P>
fn neg(self) -> Projective<P>
- operation. Read moreSource§impl<P> PartialEq<Affine<P>> for Projective<P>where
P: DOCurveConfig,
impl<P> PartialEq<Affine<P>> for Projective<P>where
P: DOCurveConfig,
Source§impl<P> PartialEq<Projective<P>> for Affine<P>where
P: DOCurveConfig,
impl<P> PartialEq<Projective<P>> for Affine<P>where
P: DOCurveConfig,
Source§impl<P> PartialEq for Projective<P>where
P: DOCurveConfig,
impl<P> PartialEq for Projective<P>where
P: DOCurveConfig,
Source§impl<P> PrimeGroup for Projective<P>where
P: DOCurveConfig,
impl<P> PrimeGroup for Projective<P>where
P: DOCurveConfig,
Source§type ScalarField = <P as CurveConfig>::ScalarField
type ScalarField = <P as CurveConfig>::ScalarField
F_r, where r is the order of this group.Source§fn generator() -> Projective<P>
fn generator() -> Projective<P>
Source§fn mul_bigint(&self, other: impl AsRef<[u64]>) -> Projective<P>
fn mul_bigint(&self, other: impl AsRef<[u64]>) -> Projective<P>
Source§fn mul_bits_be(&self, other: impl Iterator<Item = bool>) -> Self
fn mul_bits_be(&self, other: impl Iterator<Item = bool>) -> Self
other * self, where other is a big-endian
bit representation of some integer.Source§impl<P> ScalarMul for Projective<P>where
P: DOCurveConfig,
impl<P> ScalarMul for Projective<P>where
P: DOCurveConfig,
const NEGATION_IS_CHEAP: bool = true
type MulBase = Affine<P>
fn batch_convert_to_mul_base( bases: &[Projective<P>], ) -> Vec<<Projective<P> as ScalarMul>::MulBase>
Source§fn batch_mul(self, v: &[Self::ScalarField]) -> Vec<Self::MulBase>
fn batch_mul(self, v: &[Self::ScalarField]) -> Vec<Self::MulBase>
Source§fn batch_mul_with_preprocessing(
table: &BatchMulPreprocessing<Self>,
v: &[Self::ScalarField],
) -> Vec<Self::MulBase>
fn batch_mul_with_preprocessing( table: &BatchMulPreprocessing<Self>, v: &[Self::ScalarField], ) -> Vec<Self::MulBase>
Source§impl<'a, 'b, P> Sub<&'a Projective<P>> for &'b Projective<P>where
P: DOCurveConfig,
impl<'a, 'b, P> Sub<&'a Projective<P>> for &'b Projective<P>where
P: DOCurveConfig,
Source§type Output = Projective<P>
type Output = Projective<P>
- operator.Source§fn sub(self, other: &'a Projective<P>) -> Projective<P>
fn sub(self, other: &'a Projective<P>) -> Projective<P>
- operation. Read moreSource§impl<'a, P> Sub<&'a Projective<P>> for Affine<P>where
P: DOCurveConfig,
impl<'a, P> Sub<&'a Projective<P>> for Affine<P>where
P: DOCurveConfig,
Source§type Output = Projective<P>
type Output = Projective<P>
- operator.Source§fn sub(self, other: &'a Projective<P>) -> Projective<P>
fn sub(self, other: &'a Projective<P>) -> Projective<P>
- operation. Read moreSource§impl<'a, P> Sub<&'a Projective<P>> for Projective<P>where
P: DOCurveConfig,
impl<'a, P> Sub<&'a Projective<P>> for Projective<P>where
P: DOCurveConfig,
Source§type Output = Projective<P>
type Output = Projective<P>
- operator.Source§fn sub(self, other: &'a Projective<P>) -> Projective<P>
fn sub(self, other: &'a Projective<P>) -> Projective<P>
- operation. Read moreSource§impl<'a, 'b, P> Sub<&'a mut Projective<P>> for &'b Projective<P>where
P: DOCurveConfig,
impl<'a, 'b, P> Sub<&'a mut Projective<P>> for &'b Projective<P>where
P: DOCurveConfig,
Source§type Output = Projective<P>
type Output = Projective<P>
- operator.Source§fn sub(self, other: &'a mut Projective<P>) -> Projective<P>
fn sub(self, other: &'a mut Projective<P>) -> Projective<P>
- operation. Read moreSource§impl<'a, P> Sub<&'a mut Projective<P>> for Projective<P>where
P: DOCurveConfig,
impl<'a, P> Sub<&'a mut Projective<P>> for Projective<P>where
P: DOCurveConfig,
Source§type Output = Projective<P>
type Output = Projective<P>
- operator.Source§fn sub(self, other: &'a mut Projective<P>) -> Projective<P>
fn sub(self, other: &'a mut Projective<P>) -> Projective<P>
- operation. Read moreSource§impl<'b, P> Sub<Projective<P>> for &'b Projective<P>where
P: DOCurveConfig,
impl<'b, P> Sub<Projective<P>> for &'b Projective<P>where
P: DOCurveConfig,
Source§type Output = Projective<P>
type Output = Projective<P>
- operator.Source§fn sub(self, other: Projective<P>) -> Projective<P>
fn sub(self, other: Projective<P>) -> Projective<P>
- operation. Read moreSource§impl<P> Sub<Projective<P>> for Affine<P>where
P: DOCurveConfig,
impl<P> Sub<Projective<P>> for Affine<P>where
P: DOCurveConfig,
Source§type Output = Projective<P>
type Output = Projective<P>
- operator.Source§fn sub(self, other: Projective<P>) -> Projective<P>
fn sub(self, other: Projective<P>) -> Projective<P>
- operation. Read moreSource§impl<P, T> Sub<T> for Projective<P>
impl<P, T> Sub<T> for Projective<P>
Source§type Output = Projective<P>
type Output = Projective<P>
- operator.Source§fn sub(self, other: T) -> Projective<P>
fn sub(self, other: T) -> Projective<P>
- operation. Read moreSource§impl<P> Sub for Projective<P>where
P: DOCurveConfig,
impl<P> Sub for Projective<P>where
P: DOCurveConfig,
Source§type Output = Projective<P>
type Output = Projective<P>
- operator.Source§fn sub(self, other: Projective<P>) -> Projective<P>
fn sub(self, other: Projective<P>) -> Projective<P>
- operation. Read moreSource§impl<'a, P> SubAssign<&'a Projective<P>> for Projective<P>where
P: DOCurveConfig,
impl<'a, P> SubAssign<&'a Projective<P>> for Projective<P>where
P: DOCurveConfig,
Source§fn sub_assign(&mut self, other: &'a Projective<P>)
fn sub_assign(&mut self, other: &'a Projective<P>)
-= operation. Read moreSource§impl<'a, P> SubAssign<&'a mut Projective<P>> for Projective<P>where
P: DOCurveConfig,
impl<'a, P> SubAssign<&'a mut Projective<P>> for Projective<P>where
P: DOCurveConfig,
Source§fn sub_assign(&mut self, other: &'a mut Projective<P>)
fn sub_assign(&mut self, other: &'a mut Projective<P>)
-= operation. Read moreSource§impl<P, T> SubAssign<T> for Projective<P>
impl<P, T> SubAssign<T> for Projective<P>
Source§fn sub_assign(&mut self, other: T)
fn sub_assign(&mut self, other: T)
-= operation. Read moreSource§impl<P> SubAssign for Projective<P>where
P: DOCurveConfig,
impl<P> SubAssign for Projective<P>where
P: DOCurveConfig,
Source§fn sub_assign(&mut self, other: Projective<P>)
fn sub_assign(&mut self, other: Projective<P>)
-= operation. Read moreSource§impl<'a, P> Sum<&'a Projective<P>> for Projective<P>where
P: DOCurveConfig,
impl<'a, P> Sum<&'a Projective<P>> for Projective<P>where
P: DOCurveConfig,
Source§fn sum<I>(iter: I) -> Projective<P>where
I: Iterator<Item = &'a Projective<P>>,
fn sum<I>(iter: I) -> Projective<P>where
I: Iterator<Item = &'a Projective<P>>,
Self from the elements by “summing up”
the items.Source§impl<P, T> Sum<T> for Projective<P>
impl<P, T> Sum<T> for Projective<P>
Source§fn sum<I>(iter: I) -> Projective<P>where
I: Iterator<Item = T>,
fn sum<I>(iter: I) -> Projective<P>where
I: Iterator<Item = T>,
Self from the elements by “summing up”
the items.Source§impl<P> Sum for Projective<P>where
P: DOCurveConfig,
impl<P> Sum for Projective<P>where
P: DOCurveConfig,
Source§fn sum<I>(iter: I) -> Projective<P>where
I: Iterator<Item = Projective<P>>,
fn sum<I>(iter: I) -> Projective<P>where
I: Iterator<Item = Projective<P>>,
Self from the elements by “summing up”
the items.Source§impl<M, ConstraintF> ToConstraintField<ConstraintF> for Projective<M>where
M: DOCurveConfig,
ConstraintF: Field,
<M as CurveConfig>::BaseField: ToConstraintField<ConstraintF>,
impl<M, ConstraintF> ToConstraintField<ConstraintF> for Projective<M>where
M: DOCurveConfig,
ConstraintF: Field,
<M as CurveConfig>::BaseField: ToConstraintField<ConstraintF>,
fn to_field_elements(&self) -> Option<Vec<ConstraintF>>
Source§impl<P> Valid for Projective<P>where
P: DOCurveConfig,
impl<P> Valid for Projective<P>where
P: DOCurveConfig,
Source§fn check(&self) -> Result<(), SerializationError>
fn check(&self) -> Result<(), SerializationError>
self is valid. If self is valid, returns Ok(()). Otherwise, returns
an error describing the failure.
This method is called by deserialize_with_mode if validate is Validate::Yes.Source§fn batch_check<'a>(
batch: impl Iterator<Item = &'a Projective<P>> + Send,
) -> Result<(), SerializationError>where
Projective<P>: 'a,
fn batch_check<'a>(
batch: impl Iterator<Item = &'a Projective<P>> + Send,
) -> Result<(), SerializationError>where
Projective<P>: 'a,
batch are valid. If all items are valid, returns Ok(()).
Otherwise, returns an error describing the first failure.Source§const TRIVIAL_CHECK: bool = false
const TRIVIAL_CHECK: bool = false
check method is trivial (i.e. always returns Ok(())). If this is true,
the batch_check method will skip all checks and return Ok(()).
This should be set to true for types where check is trivial, e.g.
integers, field elements, etc.
This is false by default.
This is primarily an optimization to skip unnecessary checks in batch_check.Source§impl<P> VariableBaseMSM for Projective<P>where
P: DOCurveConfig,
impl<P> VariableBaseMSM for Projective<P>where
P: DOCurveConfig,
const ZERO_BUCKET: Projective<P> = Self::ZERO
type Bucket = Projective<P>
Source§fn msm(
bases: &[<Projective<P> as ScalarMul>::MulBase],
bigints: &[<Projective<P> as PrimeGroup>::ScalarField],
) -> Result<Projective<P>, usize>
fn msm( bases: &[<Projective<P> as ScalarMul>::MulBase], bigints: &[<Projective<P> as PrimeGroup>::ScalarField], ) -> Result<Projective<P>, usize>
Source§fn msm_unchecked(bases: &[Self::MulBase], scalars: &[Self::ScalarField]) -> Self
fn msm_unchecked(bases: &[Self::MulBase], scalars: &[Self::ScalarField]) -> Self
PrimeField elements in scalars
and the corresponding group elements in bases. Read moreSource§fn msm_bigint(
bases: &[Self::MulBase],
bigints: &[<Self::ScalarField as PrimeField>::BigInt],
) -> Self
fn msm_bigint( bases: &[Self::MulBase], bigints: &[<Self::ScalarField as PrimeField>::BigInt], ) -> Self
Source§fn msm_u1(bases: &[Self::MulBase], scalars: &[bool]) -> Self
fn msm_u1(bases: &[Self::MulBase], scalars: &[bool]) -> Self
Self::msm_bigint.Source§fn msm_u8(bases: &[Self::MulBase], scalars: &[u8]) -> Self
fn msm_u8(bases: &[Self::MulBase], scalars: &[u8]) -> Self
u8-sized.
The default implementation is faster than Self::msm_bigint.Source§fn msm_u16(bases: &[Self::MulBase], scalars: &[u16]) -> Self
fn msm_u16(bases: &[Self::MulBase], scalars: &[u16]) -> Self
u16-sized.
The default implementation is faster than Self::msm_bigint.Source§fn msm_u32(bases: &[Self::MulBase], scalars: &[u32]) -> Self
fn msm_u32(bases: &[Self::MulBase], scalars: &[u32]) -> Self
u32-sized.
The default implementation is faster than Self::msm_bigint.Source§impl<P> Zero for Projective<P>where
P: DOCurveConfig,
impl<P> Zero for Projective<P>where
P: DOCurveConfig,
Source§fn zero() -> Projective<P>
fn zero() -> Projective<P>
Returns one of the representants for the identity, namely the point-at-infinity (1,1,0,0).
The other representant N=(-1,1,0,0) of the identity could also be returned, but the
implementation of formulas only requires one representant.
Source§impl<P> Zeroize for Projective<P>where
P: DOCurveConfig,
impl<P> Zeroize for Projective<P>where
P: DOCurveConfig,
impl<P> Copy for Projective<P>
impl<P> Eq for Projective<P>where
P: DOCurveConfig,
Auto Trait Implementations§
impl<P> Freeze for Projective<P>
impl<P> RefUnwindSafe for Projective<P>
impl<P> Send for Projective<P>
impl<P> Sync for Projective<P>
impl<P> Unpin for Projective<P>
impl<P> UnsafeUnpin for Projective<P>
impl<P> UnwindSafe for Projective<P>
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
Source§impl<T> CanonicalSerializeHashExt for Twhere
T: CanonicalSerialize,
impl<T> CanonicalSerializeHashExt for Twhere
T: CanonicalSerialize,
fn hash<H>(&self) -> GenericArray<u8, <H as OutputSizeUser>::OutputSize>where
H: Digest,
fn hash_uncompressed<H>(
&self,
) -> GenericArray<u8, <H as OutputSizeUser>::OutputSize>where
H: Digest,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more