Struct ark_ec::models::short_weierstrass_jacobian::GroupProjective [−][src]
#[must_use]pub struct GroupProjective<P: Parameters> { pub x: P::BaseField, pub y: P::BaseField, pub z: P::BaseField, // some fields omitted }
Expand description
Jacobian coordinates for a point on an elliptic curve in short Weierstrass form,
over the base field P::BaseField
. This struct implements arithmetic
via the Jacobian formulae
Fields
x: P::BaseField
y: P::BaseField
z: P::BaseField
Implementations
Trait Implementations
Performs the +=
operation. Read more
Performs the +=
operation. Read more
Performs the +=
operation. Read more
Reads Self
from reader
.
Reads Self
from reader
without compression.
Reads self
from reader
without compression, and without performing
validity checks. Should be used only when the input is trusted. Read more
Serializes self
into writer
.
It is left up to a particular type for how it strikes the
serialization efficiency vs compression tradeoff.
For standard types (e.g. bool
, lengths, etc.) typically an uncompressed
form is used, whereas for algebraic types compressed forms are used. Read more
Serializes self
into writer
without compression.
Serializes self
into writer
without compression, and without
performing validity checks. Should be used only when there is no
danger of adversarial manipulation of the output. Read more
Performs the conversion.
Performs the conversion.
Performs the *=
operation. Read more
Normalizes a slice of projective elements so that conversion to affine is cheap.
In more detail, this method converts a curve point in Jacobian coordinates (x, y, z) into an equivalent representation (x/z^2, y/z^3, 1).
For N = v.len()
, this costs 1 inversion + 6N field multiplications + N field squarings.
(Where batch inversion comprises 3N field multiplications + 1 inversion of these operations)
Sets self = 2 * self
. Note that Jacobian formulae are incomplete, and
so doubling cannot be computed as self + self
. Instead, this implementation
uses the following specialized doubling formulae:
When other.is_normalized()
(i.e., other.z == 1
), we can use a more efficient
formula
to compute self + other
.
type ScalarField = P::ScalarField
type Affine = GroupAffine<P>
Returns a fixed generator of unknown exponent.
Checks if the point is already “normalized” so that cheap affine conversion is possible. Read more
Normalizes a slice of projective elements and outputs a vector containing the affine equivalents. Read more
Converts self into the affine representation.
Set self
to be self + other
, where other: Self::Affine
.
This is usually faster than adding other
in projective form. Read more
Performs the -=
operation. Read more
Performs the -=
operation. Read more
Performs the -=
operation. Read more
impl<M: Parameters, ConstraintF: Field> ToConstraintField<ConstraintF> for GroupProjective<M> where
M::BaseField: ToConstraintField<ConstraintF>,
[src]
impl<M: Parameters, ConstraintF: Field> ToConstraintField<ConstraintF> for GroupProjective<M> where
M::BaseField: ToConstraintField<ConstraintF>,
[src]Auto Trait Implementations
impl<P> Send for GroupProjective<P>
impl<P> Sync for GroupProjective<P>
impl<P> Unpin for GroupProjective<P> where
P: Unpin,
<P as ModelParameters>::BaseField: Unpin,
Blanket Implementations
Mutably borrows from an owned value. Read more
fn hash_uncompressed<H>(&self) -> GenericArray<u8, <H as Digest>::OutputSize> where
H: Digest,
[src]type ScalarField = <C as ProjectiveCurve>::ScalarField
Sets self := self + self
.
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V