Expand description
§blstrs
An implementation of the BLS12-381 pairing-friendly elliptic curve construction.
Re-exports§
pub use bls12_381::unique_messages;pub use bls12_381::Bls12;pub use bls12_381::Fp;pub use bls12_381::Fq;pub use bls12_381::G1Affine;pub use bls12_381::G1Projective;pub use bls12_381::G2Affine;pub use bls12_381::G2Prepared;pub use bls12_381::G2Projective;pub use bls12_381::Gt;pub use bls12_381::MillerLoopResult;pub use bls12_381::PairingG1G2;pub use bls12_381::PairingG2G1;pub use bls12_381::A;pub use bls12_381::B;pub use crate::Fq as BlsScalar;pub use crate::Fr;pub use pairing;
Modules§
- bls12_
381 - BLS12-381 pairing-friendly elliptic curve implementation.
- ff_ext
- Field extension traits and utilities.
- fft
- hash_
to_ curve - msm
- secp256k1
- Secp256k1 elliptic curve implementation.
- serde
- serde_
traits - Serialization traits for curve elements and field elements.
Macros§
- extend_
field_ legendre - field_
bits - impl_
add_ binop_ specify_ output - impl_
binops_ additive - impl_
binops_ additive_ specify_ output - impl_
binops_ calls - impl_
binops_ multiplicative - impl_
binops_ multiplicative_ mixed - impl_
cyclotomic_ square - impl_
from_ bool - impl_
from_ u64 - impl_gt
- impl_
miller_ loop_ components - impl_
sub_ binop_ specify_ output - impl_
sum_ prod - impl_
tower2 - impl_
tower2_ from_ uniform_ bytes - new_
curve_ impl - serialize_
deserialize_ primefield - A macro to help define serialization and deserialization for prime field implementations that use `$field::Repr`` representations. This assumes the concerned type implements PrimeField (for from_repr, to_repr).
Structs§
- Coordinates
- The affine coordinates of a point on an elliptic curve.
- Extended
Niels Point - This is a pre-processed version of an extended point
(U, V, Z, T1, T2)in the form(V + U, V - U, Z, T1 * T2 * 2d). - Fr
- Represents an element of the scalar field $\mathbb{F}_r$ of the Jubjub elliptic curve construction.
- Jubjub
Affine - This represents a Jubjub point in the affine
(u, v)coordinates. - Jubjub
Affine Niels - This is a pre-processed version of an affine point
(u, v)in the form(v + u, v - u, u * v * 2d). This can be added to an JubjubExtended. - Jubjub
Extended - This represents an extended point
(U, V, Z, T1, T2)withZnonzero, corresponding to the affine point(U/Z, V/Z). We always haveT1 * T2 = UV/Z. - Jubjub
Subgroup - This represents a point in the prime-order subgroup of Jubjub, in extended coordinates.
Constants§
- EDWARDS_
D - D constant for an Twisted Edwards curve.
- MODULUS
- Constant representing the modulus r = 0x0e7db4ea6533afa906673b0101343b00a6682093ccc81082d0970e5ed6f72cb7
Traits§
- Curve
Affine - This trait is the affine counterpart to
Curveand is used for serialization, storage in memory, and inspection of $x$ and $y$ coordinates. - Curve
Ext - This trait is a common interface for dealing with elements of an elliptic curve group in a “projective” form, where that arithmetic is usually more efficient.
Functions§
- batch_
normalize - This takes a mutable slice of
ExtendedPoints and “normalizes” them using only a single inversion for the entire batch. This normalization results in all of the points having a Z-coordinate of one. Further, an iterator is returned which can be used to obtainAffinePoints for each element in the slice.
Type Aliases§
- Base
- Represents an element of the base field $\mathbb{F}_q$ of the Jubjub elliptic curve construction.