Trait pairing_ce::CurveProjective [−][src]
Projective representation of an elliptic curve point guaranteed to be in the correct prime order subgroup.
Associated Types
type Engine: Engine<Fr = Self::Scalar>
[src]
type Scalar: PrimeField + SqrtField
[src]
type Base: SqrtField
[src]
type Affine: CurveAffine<Projective = Self, Scalar = Self::Scalar>
[src]
Required methods
fn zero() -> Self
[src]
Returns the additive identity.
fn one() -> Self
[src]
Returns a fixed generator of unknown exponent.
fn is_zero(&self) -> bool
[src]
Determines if this point is the point at infinity.
fn batch_normalization(v: &mut [Self])
[src]
Normalizes a slice of projective elements so that conversion to affine is cheap.
fn is_normalized(&self) -> bool
[src]
Checks if the point is already “normalized” so that cheap affine conversion is possible.
fn double(&mut self)
[src]
Doubles this element.
fn add_assign(&mut self, other: &Self)
[src]
Adds another element to this element.
fn add_assign_mixed(&mut self, other: &Self::Affine)
[src]
Adds an affine element to this element.
fn negate(&mut self)
[src]
Negates this element.
fn mul_assign<S: Into<<Self::Scalar as PrimeField>::Repr>>(&mut self, other: S)
[src]
Performs scalar multiplication of this element.
fn into_affine(&self) -> Self::Affine
[src]
Converts this element into its affine representation.
fn recommended_wnaf_for_scalar(
scalar: <Self::Scalar as PrimeField>::Repr
) -> usize
[src]
scalar: <Self::Scalar as PrimeField>::Repr
) -> usize
Recommends a wNAF window table size given a scalar. Always returns a number between 2 and 22, inclusive.
fn recommended_wnaf_for_num_scalars(num_scalars: usize) -> usize
[src]
Recommends a wNAF window size given the number of scalars you intend to multiply a base by. Always returns a number between 2 and 22, inclusive.
Provided methods
fn sub_assign(&mut self, other: &Self)
[src]
Subtracts another element from this element.
fn as_xyz(&self) -> (&Self::Base, &Self::Base, &Self::Base)
[src]
Returns references to underlying X, Y and Z coordinates. Users should check for infinity outside of this call
fn into_xyz_unchecked(self) -> (Self::Base, Self::Base, Self::Base)
[src]
Returns underlying X, Y and Z coordinates. Users should check for infinity outside of this call
fn from_xyz_unchecked(_x: Self::Base, _y: Self::Base, _z: Self::Base) -> Self
[src]
Creates a point from raw X, Y and Z coordinates. Point of infinity is encoded as (0,1,0) by default. On-curve check is NOT performed
fn from_xyz_checked(
_x: Self::Base,
_y: Self::Base,
_z: Self::Base
) -> Result<Self, GroupDecodingError>
[src]
_x: Self::Base,
_y: Self::Base,
_z: Self::Base
) -> Result<Self, GroupDecodingError>
Creates a point from raw X, Y and Z coordinates. Point of infinity is encoded as (0,1,0) by default. On-curve check is performed
Implementors
impl CurveProjective for pairing_ce::bls12_381::G1
[src]
type Engine = Bls12
type Scalar = Fr
type Base = Fq
type Affine = G1Affine
fn zero() -> Self
[src]
fn one() -> Self
[src]
fn is_zero(&self) -> bool
[src]
fn is_normalized(&self) -> bool
[src]
fn batch_normalization(v: &mut [Self])
[src]
fn double(&mut self)
[src]
fn add_assign(&mut self, other: &Self)
[src]
fn add_assign_mixed(&mut self, other: &Self::Affine)
[src]
fn negate(&mut self)
[src]
fn mul_assign<S: Into<<Self::Scalar as PrimeField>::Repr>>(&mut self, other: S)
[src]
fn into_affine(&self) -> G1Affine
[src]
fn recommended_wnaf_for_scalar(
scalar: <Self::Scalar as PrimeField>::Repr
) -> usize
[src]
scalar: <Self::Scalar as PrimeField>::Repr
) -> usize
fn recommended_wnaf_for_num_scalars(num_scalars: usize) -> usize
[src]
fn as_xyz(&self) -> (&Self::Base, &Self::Base, &Self::Base)
[src]
fn into_xyz_unchecked(self) -> (Self::Base, Self::Base, Self::Base)
[src]
fn from_xyz_unchecked(x: Self::Base, y: Self::Base, z: Self::Base) -> Self
[src]
fn from_xyz_checked(
_x: Self::Base,
_y: Self::Base,
_z: Self::Base
) -> Result<Self, GroupDecodingError>
[src]
_x: Self::Base,
_y: Self::Base,
_z: Self::Base
) -> Result<Self, GroupDecodingError>
impl CurveProjective for pairing_ce::bls12_381::G2
[src]
type Engine = Bls12
type Scalar = Fr
type Base = Fq2
type Affine = G2Affine
fn zero() -> Self
[src]
fn one() -> Self
[src]
fn is_zero(&self) -> bool
[src]
fn is_normalized(&self) -> bool
[src]
fn batch_normalization(v: &mut [Self])
[src]
fn double(&mut self)
[src]
fn add_assign(&mut self, other: &Self)
[src]
fn add_assign_mixed(&mut self, other: &Self::Affine)
[src]
fn negate(&mut self)
[src]
fn mul_assign<S: Into<<Self::Scalar as PrimeField>::Repr>>(&mut self, other: S)
[src]
fn into_affine(&self) -> G2Affine
[src]
fn recommended_wnaf_for_scalar(
scalar: <Self::Scalar as PrimeField>::Repr
) -> usize
[src]
scalar: <Self::Scalar as PrimeField>::Repr
) -> usize
fn recommended_wnaf_for_num_scalars(num_scalars: usize) -> usize
[src]
fn as_xyz(&self) -> (&Self::Base, &Self::Base, &Self::Base)
[src]
fn into_xyz_unchecked(self) -> (Self::Base, Self::Base, Self::Base)
[src]
fn from_xyz_unchecked(x: Self::Base, y: Self::Base, z: Self::Base) -> Self
[src]
fn from_xyz_checked(
_x: Self::Base,
_y: Self::Base,
_z: Self::Base
) -> Result<Self, GroupDecodingError>
[src]
_x: Self::Base,
_y: Self::Base,
_z: Self::Base
) -> Result<Self, GroupDecodingError>
impl CurveProjective for pairing_ce::bn256::G1
[src]
type Engine = Bn256
type Scalar = Fr
type Base = Fq
type Affine = G1Affine
fn zero() -> Self
[src]
fn one() -> Self
[src]
fn is_zero(&self) -> bool
[src]
fn is_normalized(&self) -> bool
[src]
fn batch_normalization(v: &mut [Self])
[src]
fn double(&mut self)
[src]
fn add_assign(&mut self, other: &Self)
[src]
fn add_assign_mixed(&mut self, other: &Self::Affine)
[src]
fn negate(&mut self)
[src]
fn mul_assign<S: Into<<Self::Scalar as PrimeField>::Repr>>(&mut self, other: S)
[src]
fn into_affine(&self) -> G1Affine
[src]
fn recommended_wnaf_for_scalar(
scalar: <Self::Scalar as PrimeField>::Repr
) -> usize
[src]
scalar: <Self::Scalar as PrimeField>::Repr
) -> usize
fn recommended_wnaf_for_num_scalars(num_scalars: usize) -> usize
[src]
fn as_xyz(&self) -> (&Self::Base, &Self::Base, &Self::Base)
[src]
fn into_xyz_unchecked(self) -> (Self::Base, Self::Base, Self::Base)
[src]
fn from_xyz_unchecked(x: Self::Base, y: Self::Base, z: Self::Base) -> Self
[src]
fn from_xyz_checked(
_x: Self::Base,
_y: Self::Base,
_z: Self::Base
) -> Result<Self, GroupDecodingError>
[src]
_x: Self::Base,
_y: Self::Base,
_z: Self::Base
) -> Result<Self, GroupDecodingError>
impl CurveProjective for pairing_ce::bn256::G2
[src]
type Engine = Bn256
type Scalar = Fr
type Base = Fq2
type Affine = G2Affine
fn zero() -> Self
[src]
fn one() -> Self
[src]
fn is_zero(&self) -> bool
[src]
fn is_normalized(&self) -> bool
[src]
fn batch_normalization(v: &mut [Self])
[src]
fn double(&mut self)
[src]
fn add_assign(&mut self, other: &Self)
[src]
fn add_assign_mixed(&mut self, other: &Self::Affine)
[src]
fn negate(&mut self)
[src]
fn mul_assign<S: Into<<Self::Scalar as PrimeField>::Repr>>(&mut self, other: S)
[src]
fn into_affine(&self) -> G2Affine
[src]
fn recommended_wnaf_for_scalar(
scalar: <Self::Scalar as PrimeField>::Repr
) -> usize
[src]
scalar: <Self::Scalar as PrimeField>::Repr
) -> usize
fn recommended_wnaf_for_num_scalars(num_scalars: usize) -> usize
[src]
fn as_xyz(&self) -> (&Self::Base, &Self::Base, &Self::Base)
[src]
fn into_xyz_unchecked(self) -> (Self::Base, Self::Base, Self::Base)
[src]
fn from_xyz_unchecked(x: Self::Base, y: Self::Base, z: Self::Base) -> Self
[src]
fn from_xyz_checked(
_x: Self::Base,
_y: Self::Base,
_z: Self::Base
) -> Result<Self, GroupDecodingError>
[src]
_x: Self::Base,
_y: Self::Base,
_z: Self::Base
) -> Result<Self, GroupDecodingError>
impl CurveProjective for pairing_ce::compact_bn256::G1
[src]
type Engine = Bn256
type Scalar = Fr
type Base = Fq
type Affine = G1Affine
fn zero() -> Self
[src]
fn one() -> Self
[src]
fn is_zero(&self) -> bool
[src]
fn is_normalized(&self) -> bool
[src]
fn batch_normalization(v: &mut [Self])
[src]
fn double(&mut self)
[src]
fn add_assign(&mut self, other: &Self)
[src]
fn add_assign_mixed(&mut self, other: &Self::Affine)
[src]
fn negate(&mut self)
[src]
fn mul_assign<S: Into<<Self::Scalar as PrimeField>::Repr>>(&mut self, other: S)
[src]
fn into_affine(&self) -> G1Affine
[src]
fn recommended_wnaf_for_scalar(
scalar: <Self::Scalar as PrimeField>::Repr
) -> usize
[src]
scalar: <Self::Scalar as PrimeField>::Repr
) -> usize
fn recommended_wnaf_for_num_scalars(num_scalars: usize) -> usize
[src]
fn as_xyz(&self) -> (&Self::Base, &Self::Base, &Self::Base)
[src]
fn into_xyz_unchecked(self) -> (Self::Base, Self::Base, Self::Base)
[src]
fn from_xyz_unchecked(x: Self::Base, y: Self::Base, z: Self::Base) -> Self
[src]
fn from_xyz_checked(
_x: Self::Base,
_y: Self::Base,
_z: Self::Base
) -> Result<Self, GroupDecodingError>
[src]
_x: Self::Base,
_y: Self::Base,
_z: Self::Base
) -> Result<Self, GroupDecodingError>
impl CurveProjective for pairing_ce::compact_bn256::G2
[src]
type Engine = Bn256
type Scalar = Fr
type Base = Fq2
type Affine = G2Affine
fn zero() -> Self
[src]
fn one() -> Self
[src]
fn is_zero(&self) -> bool
[src]
fn is_normalized(&self) -> bool
[src]
fn batch_normalization(v: &mut [Self])
[src]
fn double(&mut self)
[src]
fn add_assign(&mut self, other: &Self)
[src]
fn add_assign_mixed(&mut self, other: &Self::Affine)
[src]
fn negate(&mut self)
[src]
fn mul_assign<S: Into<<Self::Scalar as PrimeField>::Repr>>(&mut self, other: S)
[src]
fn into_affine(&self) -> G2Affine
[src]
fn recommended_wnaf_for_scalar(
scalar: <Self::Scalar as PrimeField>::Repr
) -> usize
[src]
scalar: <Self::Scalar as PrimeField>::Repr
) -> usize
fn recommended_wnaf_for_num_scalars(num_scalars: usize) -> usize
[src]
fn as_xyz(&self) -> (&Self::Base, &Self::Base, &Self::Base)
[src]
fn into_xyz_unchecked(self) -> (Self::Base, Self::Base, Self::Base)
[src]
fn from_xyz_unchecked(x: Self::Base, y: Self::Base, z: Self::Base) -> Self
[src]
fn from_xyz_checked(
_x: Self::Base,
_y: Self::Base,
_z: Self::Base
) -> Result<Self, GroupDecodingError>
[src]
_x: Self::Base,
_y: Self::Base,
_z: Self::Base
) -> Result<Self, GroupDecodingError>