Struct plonk_pallet::JubJubAffine[][src]

pub struct JubJubAffine { /* fields omitted */ }
Expand description

This represents a Jubjub point in the affine (x, y) coordinates.

Implementations

Constructs the neutral element (0, 1).

Multiplies this point by the cofactor, producing an JubJubExtended

Determines if this point is of small order.

Determines if this point is torsion free and so is in the prime order subgroup.

Determines if this point is prime order, or in other words that the smallest scalar multiplied by this point that produces the identity is r. This is equivalent to checking that the point is both torsion free and not the identity.

Returns the x-coordinate of this point.

Returns the y-coordinate of this point.

Performs a pre-processing step that produces an AffineNielsPoint for use in multiple additions.

Constructs an JubJubAffine given x and y without checking that the point is on the curve.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Select a or b according to choice. Read more

Conditionally assign other to self, according to choice. Read more

Conditionally swap self and other if choice == 1; otherwise, reassign both unto themselves. Read more

Determine if two items are equal. Read more

Formats the value using the given formatter. Read more

Returns the identity.

Constructs an affine point from an extended point using the map (X, Y, Z, T1, T2) => (XZ, Y/Z) as Z is always nonzero. This requires a field inversion and so it is recommended to perform these in a batch using batch_normalize instead.

Performs the conversion.

Performs the conversion.

This computes the negation of a point P = (x, y) as -P = (-x, y).

The resulting type after applying the - operator.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Converts this element into its byte representation.

Attempts to interpret a byte representation of an affine point, failing if the element is not on the curve or non-canonical.

NOTE: ZIP 216 is enabled by default and the only way to interact with serialization. See: https://zips.z.cash/zip-0216 for more details.

The type returned in the event of a conversion error.

The size of

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

Convert from a value of T into an equivalent instance of Option<Self>. Read more

Consume self to return Some equivalent value of Option<T>. Read more

Deserialize a slice of u8 into [Self]

Deserialize the type reading the bytes from a reader. The bytes read are removed from the reader. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Cast reference.

Cast reference.

Cast mutable reference.

Cast mutable reference.

Get a reference to the inner from the outer.

Get a mutable reference to the inner from the outer.

Parse a string slice as bytes hex representation and returns `

Should always be Self

Convert from a value of T into an equivalent instance of Self. Read more

Consume self to return an equivalent value of T. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. 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.

The counterpart to unchecked_from.

Consume self to return an equivalent value of T.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more