Expand description
This crate provides traits for working with finite fields.
Structs§
Enums§
- Legendre
Symbol - Prime
Field Decoding Error - An error that may occur when trying to interpret a
PrimeFieldRepr
as aPrimeField
element.
Traits§
- Field
- This trait represents an element of a field.
- Prime
Field - This represents an element of a prime field.
- Prime
Field Repr - This trait represents a wrapper around a biginteger which can encode any element of a particular
prime field. It is a smart wrapper around a sequence of
u64
limbs, least-significant digit first. - Scalar
Engine - An “engine” is a collection of types (fields, elliptic curve groups, etc.) with well-defined relationships. Specific relationships (for example, a pairing-friendly curve) can be defined in a subtrait.
- Sqrt
Field - This trait represents an element of a field that has a square root operation described for it.
Functions§
- adc
- Calculate a + b + carry, returning the sum and modifying the carry value.
- mac_
with_ carry - Calculate a + (b * c) + carry, returning the least significant digit and setting carry to the most significant digit.
- mod_
mul_ 4w_ assign - sbb
- Calculate a - b - borrow, returning the result and modifying the borrow value.