Crate blstrs[−][src]
blstrs
An implementation of the BLS12-381 pairing-friendly elliptic curve construction.
Structs
BitIterator | |
Bls12 | Bls12-381 engine |
Fp |
|
Fp2 | |
Fp6 | This represents an element $c_0 + c_1 v + c_2 v^2$ of $\mathbb{F}{p^6} = \mathbb{F}{p^2} / v^3 - u - 1$. |
Fp12 | This represents an element $c_0 + c_1 w$ of $\mathbb{F}{p^12} = \mathbb{F}{p^6} / w^2 - v$. |
FpRepr | Representation of a |
G1Affine | This is an element of $\mathbb{G}_1$ represented in the affine coordinate space. It is ideal to keep elements in this representation to reduce memory usage and improve performance through the use of mixed curve model arithmetic. |
G1Compressed | |
G1Projective | This is an element of $\mathbb{G}_1$ represented in the projective coordinate space. |
G1Uncompressed | |
G2Affine | This is an element of $\mathbb{G}_2$ represented in the affine coordinate space. It is ideal to keep elements in this representation to reduce memory usage and improve performance through the use of mixed curve model arithmetic. |
G2Compressed | |
G2Prepared | |
G2Projective | This is an element of $\mathbb{G}_2$ represented in the projective coordinate space. |
G2Uncompressed | |
PairingG1G2 | Aggregate pairings efficiently. |
PairingG2G1 | Aggregate pairings efficiently. |
Scalar | Represents an element of the scalar field $\mathbb{F}_q$ of the BLS12-381 elliptic curve construction. |
ScalarRepr | Representation of a |
Enums
LegendreSymbol | |
PrimeFieldDecodingError | An error that may occur when trying to interpret a |
Constants
SCALAR_S |
Traits
Engine | with well-defined relationships. In particular, the G1/G2 curve groups are
of prime order |
Field | This trait represents an element of a field. |
PairingCurveAffine | Affine representation of an elliptic curve point that can be used to perform pairings. |
PrimeField | This represents an element of a prime field. |
PrimeFieldRepr | 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 |
ScalarEngine | 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. |
SqrtField | 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. |
pairing | Execute a complete pairing operation |
sbb | Calculate a - b - borrow, returning the result and modifying the borrow value. |
unique_messages | Returns true if all provided messages are distinctly unique, false otherwise. |