Struct snarkvm_fields::Fp256

source ·
pub struct Fp256<P>(pub BigInteger, _);

Tuple Fields

0: BigInteger

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
Performs the += operation. Read more
Performs the += operation. Read more
Reads Self and Flags from reader. Returns empty flags by default. Read more
Serializes self and flags into writer.
Serializes self and flags into writer.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Deserialize this value from the given Serde deserializer. Read more
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
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
Returns the 2^s root of unity.
Returns the 2^s * small_subgroup_base^small_subgroup_base_adicity root of unity if a small subgroup is defined. Read more
Returns the multiplicative generator of char() - 1 order.
Returns the root of unity of order n, if one exists. If no small multiplicative subgroup is defined, this is the 2-adic root of unity of order n (for n a power of 2). If a small multiplicative subgroup is defined, this is the root of unity of order n for the larger subgroup generated by FftParams::LARGE_SUBGROUP_ROOT_OF_UNITY (for n = 2^i * FftParams::SMALL_SUBGROUP_BASE^j for some i, j). Read more
Calculates the k-adicity of n, i.e., the number of trailing 0s in a base-k representation. Read more

Returns the constant 2^{-1}.

Returns a field element with an extra sign bit used for group parsing if the set of bytes forms a valid field element, otherwise returns None. This function is primarily intended for sampling random field elements from a hash-function or RNG output. Read more
Constructs an element of Self from an element of the base prime field. Read more
Returns self + self.
Doubles self in place.
Returns the characteristic of the field.
Returns self * self.
Squares self in place.
Computes the multiplicative inverse of self if self is nonzero.
Sets self to self’s inverse if it exists. Otherwise it is a no-op.
Exponentiates this element by a power of the base prime modulus via the Frobenius automorphism. Read more
Exponentiates this element by a number represented with u64 limbs, least significant limb first. Read more
Returns a field element if the set of bytes forms a valid field element, otherwise returns None. This function is primarily intended for sampling random field elements from a hash-function or RNG output. Read more

Attempts to convert an integer into a field element. Panics if the provided integer is invalid (e.g. larger than the field modulus).

Attempts to convert an integer into a field element. Panics if the provided integer is invalid (e.g. larger than the field modulus).

Attempts to convert an integer into a field element. Panics if the provided integer is invalid (e.g. larger than the field modulus).

Attempts to convert an integer into a field element. Panics if the provided integer is invalid (e.g. larger than the field modulus).

Attempts to convert an integer into a field element. Panics if the provided integer is invalid (e.g. larger than the field modulus).

Reads Self from reader as little-endian bytes.
Returns Self from a byte array in little-endian order.

Interpret a string of numbers as a (congruent) prime field element. Does not accept unnecessary leading zeroes or a blank string.

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
Converts this type into the (usually inferred) input type.
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 resulting type after applying the - operator.
Performs the unary - operation. Read more
Returns the multiplicative identity element of Self, 1. Read more
Returns true if self is equal to the multiplicative identity. Read more
Sets self to the multiplicative identity element of Self, 1.

Fp elements are ordered lexicographically.

This method returns an Ordering between self and other. Read more
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. 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 returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Obtain the default Poseidon parameters for this rate and for this prime field, with a specific optimization goal. Read more
Constructs a PrimeField element given a human-readable Self::BigInteger.
Returns a human-readable Self::BigInteger in the range 0..(Self::MODULUS - 1).
Returns the decomposition of the scalar.
Returns the field size in bits.
Returns the field capacity for data bits.
Returns the field size in bits.
Returns the capacity size for data bits.
Returns the modulus.
Returns the modulus minus one divided by two.
Returns the trace.
Returns the trace minus one divided by two.
Reads bytes in big-endian, and converts them to a field element. If the bytes are larger than the modulus, it will reduce them. Read more
Reads bytes in little-endian, and converts them to a field element. If the bytes are larger than the modulus, it will reduce them. Read more
Method which takes an iterator and generates Self from the elements by multiplying the items. Read more
Method which takes an iterator and generates Self from the elements by multiplying the items. Read more
Serialize this value into the given Serde serializer. Read more
Returns the Legendre symbol.
Returns the square root of self, if it exists.
Sets self to be the square root of self, if it exists.
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
Returns self as a boolean array in little-endian order.
Returns self as a boolean array in big-endian order.
Writes self into writer as little-endian bytes.
Returns self as a byte array in little-endian order.

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 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
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.