Struct dusk_jubjub::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

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

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.

Constructs an extended point (with Z = 1) from an affine point using the map (x, y) => (x, y, 1, x, y).

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

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

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

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.

Performs the conversion.

Parse a string slice as bytes hex representation and returns `

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. 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)

recently added

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.