Trait snarkvm_curves::traits::pairing_engine::ProjectiveCurve [−][src]
pub trait ProjectiveCurve: Eq + Sized + ToBytes + FromBytes + CanonicalSerialize + ConstantSerializedSize + CanonicalDeserialize + Copy + Clone + Default + Send + Sync + Hash + Debug + Display + UniformRand + Zero + 'static + Neg<Output = Self> + for<'a> Add<&'a Self, Output = Self> + for<'a> Sub<&'a Self, Output = Self> + for<'a> AddAssign<&'a Self> + for<'a> SubAssign<&'a Self> + From<Self::Affine> { type ScalarField: PrimeField + SquareRootField + Into<<Self::ScalarField as PrimeField>::BigInteger>; type BaseField: Field; type Affine: AffineCurve<Projective = Self, ScalarField = Self::ScalarField> + From<Self> + Into<Self>; #[must_use] fn prime_subgroup_generator() -> Self; fn batch_normalization(v: &mut [Self]); #[must_use] fn is_normalized(&self) -> bool; fn double_in_place(&mut self) -> &mut Self; fn add_assign_mixed(&mut self, other: &Self::Affine); fn mul_assign<S: Into<<Self::ScalarField as PrimeField>::BigInteger>>(
&mut self,
other: S
); #[must_use] fn into_affine(&self) -> Self::Affine; #[must_use] fn recommended_wnaf_for_scalar(
scalar: <Self::ScalarField as PrimeField>::BigInteger
) -> usize; #[must_use] fn recommended_wnaf_for_num_scalars(num_scalars: usize) -> usize; fn batch_normalization_into_affine(v: Vec<Self>) -> Vec<Self::Affine> { ... } #[must_use] fn double(&self) -> Self { ... } }
Expand description
Projective representation of an elliptic curve point guaranteed to be in the correct prime order subgroup.
Associated Types
type ScalarField: PrimeField + SquareRootField + Into<<Self::ScalarField as PrimeField>::BigInteger>
[src]
type BaseField: Field
[src]
type Affine: AffineCurve<Projective = Self, ScalarField = Self::ScalarField> + From<Self> + Into<Self>
[src]
Required methods
#[must_use]fn prime_subgroup_generator() -> Self
[src]
#[must_use]fn prime_subgroup_generator() -> Self
[src]Returns a fixed generator of unknown exponent.
fn batch_normalization(v: &mut [Self])
[src]
fn batch_normalization(v: &mut [Self])
[src]Normalizes a slice of projective elements so that conversion to affine is cheap.
#[must_use]fn is_normalized(&self) -> bool
[src]
#[must_use]fn is_normalized(&self) -> bool
[src]Checks if the point is already “normalized” so that cheap affine conversion is possible.
fn double_in_place(&mut self) -> &mut Self
[src]
fn add_assign_mixed(&mut self, other: &Self::Affine)
[src]
fn add_assign_mixed(&mut self, other: &Self::Affine)
[src]Adds an affine element to this element.
fn mul_assign<S: Into<<Self::ScalarField as PrimeField>::BigInteger>>(
&mut self,
other: S
)
[src]
fn mul_assign<S: Into<<Self::ScalarField as PrimeField>::BigInteger>>(
&mut self,
other: S
)
[src]Performs scalar multiplication of this element.
#[must_use]fn into_affine(&self) -> Self::Affine
[src]
#[must_use]fn into_affine(&self) -> Self::Affine
[src]Converts this element into its affine representation.
#[must_use]fn recommended_wnaf_for_scalar(
scalar: <Self::ScalarField as PrimeField>::BigInteger
) -> usize
[src]
#[must_use]fn recommended_wnaf_for_scalar(
scalar: <Self::ScalarField as PrimeField>::BigInteger
) -> usize
[src]Recommends a wNAF window table size given a scalar. Always returns a number between 2 and 22, inclusive.
#[must_use]fn recommended_wnaf_for_num_scalars(num_scalars: usize) -> usize
[src]
#[must_use]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 batch_normalization_into_affine(v: Vec<Self>) -> Vec<Self::Affine>
[src]
fn batch_normalization_into_affine(v: Vec<Self>) -> Vec<Self::Affine>
[src]Normalizes a slice of projective elements and outputs a vector containing the affine equivalents.
Implementors
impl<P: Parameters> ProjectiveCurve for snarkvm_curves::templates::short_weierstrass::short_weierstrass_jacobian::GroupProjective<P>
[src]
impl<P: Parameters> ProjectiveCurve for snarkvm_curves::templates::short_weierstrass::short_weierstrass_jacobian::GroupProjective<P>
[src]type Affine = GroupAffine<P>
type BaseField = P::BaseField
type ScalarField = P::ScalarField
fn prime_subgroup_generator() -> Self
[src]
fn is_normalized(&self) -> bool
[src]
fn batch_normalization(v: &mut [Self])
[src]
fn double_in_place(&mut self) -> &mut Self
[src]
fn add_assign_mixed(&mut self, other: &Self::Affine)
[src]
fn mul_assign<S: Into<<Self::ScalarField as PrimeField>::BigInteger>>(
&mut self,
other: S
)
[src]
&mut self,
other: S
)
fn into_affine(&self) -> GroupAffine<P>
[src]
fn recommended_wnaf_for_scalar(
scalar: <Self::ScalarField as PrimeField>::BigInteger
) -> usize
[src]
scalar: <Self::ScalarField as PrimeField>::BigInteger
) -> usize
fn recommended_wnaf_for_num_scalars(num_scalars: usize) -> usize
[src]
impl<P: Parameters> ProjectiveCurve for snarkvm_curves::templates::short_weierstrass::short_weierstrass_projective::GroupProjective<P>
[src]
impl<P: Parameters> ProjectiveCurve for snarkvm_curves::templates::short_weierstrass::short_weierstrass_projective::GroupProjective<P>
[src]type Affine = GroupAffine<P>
type BaseField = P::BaseField
type ScalarField = P::ScalarField
fn prime_subgroup_generator() -> Self
[src]
fn is_normalized(&self) -> bool
[src]
fn batch_normalization(v: &mut [Self])
[src]
fn double_in_place(&mut self) -> &mut Self
[src]
fn add_assign_mixed(&mut self, other: &Self::Affine)
[src]
fn mul_assign<S: Into<<Self::ScalarField as PrimeField>::BigInteger>>(
&mut self,
other: S
)
[src]
&mut self,
other: S
)
fn into_affine(&self) -> GroupAffine<P>
[src]
fn recommended_wnaf_for_scalar(
scalar: <Self::ScalarField as PrimeField>::BigInteger
) -> usize
[src]
scalar: <Self::ScalarField as PrimeField>::BigInteger
) -> usize
fn recommended_wnaf_for_num_scalars(num_scalars: usize) -> usize
[src]
impl<P: Parameters> ProjectiveCurve for snarkvm_curves::templates::twisted_edwards_extended::GroupProjective<P>
[src]
impl<P: Parameters> ProjectiveCurve for snarkvm_curves::templates::twisted_edwards_extended::GroupProjective<P>
[src]type Affine = GroupAffine<P>
type BaseField = P::BaseField
type ScalarField = P::ScalarField
fn prime_subgroup_generator() -> Self
[src]
fn is_normalized(&self) -> bool
[src]
fn batch_normalization(v: &mut [Self])
[src]
fn double_in_place(&mut self) -> &mut Self
[src]
fn add_assign_mixed(&mut self, other: &Self::Affine)
[src]
fn mul_assign<S: Into<<Self::ScalarField as PrimeField>::BigInteger>>(
&mut self,
other: S
)
[src]
&mut self,
other: S
)
fn into_affine(&self) -> GroupAffine<P>
[src]
fn recommended_wnaf_for_scalar(
scalar: <Self::ScalarField as PrimeField>::BigInteger
) -> usize
[src]
scalar: <Self::ScalarField as PrimeField>::BigInteger
) -> usize