pub struct Group<E: Environment> { /* private fields */ }

Implementations§

Attempts to recover an affine group element from a given x-coordinate field element. For safety, the resulting point is always enforced to be on the curve and in the correct subgroup.

Initializes a new group from the (x, y) affine coordinates.

Initializes a new group from the (x, y) affine coordinates. Note: The resulting point is not enforced to be on the curve or in the subgroup.

Returns the x-coordinate in the affine coordinates of the group.

Returns the x-coordinate and y-coordinate in the affine coordinates of the group.

Returns the y-coordinate in the affine coordinates of the group.

The coefficient A for the twisted Edwards curve equation.

The coefficient D for the twisted Edwards curve equation.

The coefficient A for the Montgomery curve equation.

The coefficient B for the Montgomery curve equation.

Initializes a new group.

Returns the prime subgroup generator.

Returns self * COFACTOR.

Returns self / COFACTOR.

Trait Implementations§

Returns the sum of self and other.

The resulting type after applying the + operator.

Returns the sum of self and other.

The resulting type after applying the + operator.

Adds other to self.

Adds other to self.

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Dereferences the value.

Deserializes the group from a string or bytes.

Formats the value using the given formatter. Read more
Generate a random value of T, using rng as the source of randomness.
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

Returns the double of self.

Returns true if self and other are equal.

Returns true if self and other are not equal.

Initializes a new group by recovering the x-coordinate of an affine group from a list of little-endian bits.

Initializes a new group by recovering the x-coordinate of an affine group from a list of big-endian bits.

Reads the group from a buffer.

Returns Self from a byte array in little-endian order.

Initializes a new group by recovering the x-coordinate of an affine group from a field element.

Initializes a new group by recovering the x-coordinate of an affine group from a field element.

Parses a string into a group.

The associated error which can be returned from parsing.
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more

Returns the product of self and other.

The resulting type after applying the * operator.

Returns the product of self and other.

The resulting type after applying the * operator.

Returns the product of self and other.

The resulting type after applying the * operator.

Returns the product of self and other.

The resulting type after applying the * operator.

Multiplies self by other.

Multiplies self by other.

Returns the negation of self.

The resulting type after applying the - operator.

Parses a string into a group circuit.

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

Serializes the group into a string or as bytes.

Returns the group size in bits.

Returns the group size in bytes.

Returns the difference of self and other.

The resulting type after applying the - operator.

Returns the difference of self and other.

The resulting type after applying the - operator.

Subtracts other from self.

Subtracts other from self.

Returns the sum of self and other.

Returns the sum of self and other.

Returns first if condition is true, otherwise returns second.

Outputs the little-endian bit representation of self.to_x_coordinate() without trailing zeros.

Outputs the big-endian bit representation of self.to_x_coordinate() without leading zeros.

Writes the group to a buffer.

Returns self as a byte array in little-endian order.

Returns the group as a field element.

Returns the group as field elements.

Returns the type name as a string.

Returns the number of field elements to encode self.

Returns the 0 element of the group.

Returns true if the element is zero.

Sets self to the additive identity element of Self, 0.

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.

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.
Samples a random value from a uniform distribution.