pub struct Projective<P: SWCurveConfig> {
    pub x: P::BaseField,
    pub y: P::BaseField,
    pub z: P::BaseField,
}
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

X / Z projection of the affine X

y: P::BaseField

Y / Z projection of the affine Y

z: P::BaseField

Projective multiplicative inverse. Will be 0 only at infinity.

Implementations

Constructs a new group element without checking whether the coordinates specify a point in the subgroup.

Constructs a new group element in a way while enforcing that points are in the prime-order subgroup.

Trait Implementations

The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
The general deserialize method that takes in customization flags.
The general serialize method that takes in customization flags.
Returns a copy of the value. Read more
Performs copy-assignment from source. 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)

The field over which this curve is defined.
The affine representation of this element.
Type representing an element of the full elliptic curve group, not just the prime order subgroup. Read more
Converts self into the affine representation.
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Formats the value using the given formatter. Read more

Generates a uniformly random instance of the curve.

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Create a distribution of values of ‘S’ by mapping the output of Self through the closure F Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.

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:

The scalar field F_r, where r is the order of this group.
Returns a fixed generator of this group.
Performs scalar multiplication of this element.
Doubles self.
Computes other * self, where other is a big-endian bit representation of some integer. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more

Constructs a new map if P represents a valid map.

Map an arbitrary base field element to a curve point. Based on https://github.com/zcash/pasta_curves/blob/main/src/hashtocurve.rs.

Constructs a new map if P represents a valid map.

Map random field point to a random curve point inspired from https://github.com/zcash/pasta_curves/blob/main/src/hashtocurve.rs

The resulting type after applying the * operator.
Performs the * operation. Read more
Performs the *= operation. Read more
The resulting type after applying the - operator.
Performs the unary - operation. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Method which takes an iterator and generates Self from the elements by “summing up” the items. Read more
Method which takes an iterator and generates Self from the elements by “summing up” the items. Read more
Method which takes an iterator and generates Self from the elements by “summing up” the items. Read more
Computes an inner product between the PrimeField elements in scalars and the corresponding group elements in bases. Read more
Performs multi-scalar multiplication, without checking that bases.len() == scalars.len(). Read more
Optimized implementation of multi-scalar multiplication.
Streaming multi-scalar multiplication algorithm with hard-coded chunk size. Read more

Returns the point at infinity, which always has Z = 0.

Checks whether self.z.is_zero().

Sets self to the additive identity element of Self, 0.
Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.