[−][src]Crate dusk_jubjub
This crate provides an implementation of the Jubjub elliptic curve and
its associated field arithmetic.
See README.md
API
AffinePoint
/ExtendedPoint
which are implementations of Jubjub group arithmeticAffineNielsPoint
/ExtendedNielsPoint
which are preprocessed Jubjub pointsFq
, which is the base field of JubjubFr
, which is the scalar field of Jubjubbatch_normalize
for converting manyExtendedPoint
s intoAffinePoint
s efficiently.
Constant Time
All operations are constant time unless explicitly noted; these functions will contain "vartime" in their name and they will be documented as variable time.
This crate uses the subtle
crate to perform constanttime operations.
Structs
AffineNielsPoint  This is a preprocessed version of an affine point 
AffinePoint  This represents a Jubjub point in the affine 
ExtendedNielsPoint  This is a preprocessed version of an extended point 
ExtendedPoint  This represents an extended point 
Fq  Represents an element of the scalar field $\mathbb{F}_q$ of the BLS12381 elliptic curve construction. 
Fr  Represents an element of the scalar field $\mathbb{F}_r$ of the Jubjub elliptic curve construction. 
Constants
EDWARDS_D 

EDWARDS_D2 

GENERATOR  Use a fixed generator point. The point is then reduced according to the prime field. We need only to state the coordinates, so users can exploit its properties which are proven by tests, checking: 
GENERATOR_NUMS  GENERATOR NUMS which is obtained following the specs in: https://app.gitbook.com/@dusknetwork/s/specs/specifications/poseidon/pedersencommitmentscheme The counter = 18 and the hash function used to compute it was blake2b Using: x = 0x5e67b8f316f414f7bd9514c773fd4456931e316a39fe4541921710179df76377 
Functions
batch_normalize  This takes a mutable slice of 
dhke  Compute a shared secret 
Type Definitions
Scalar  A better name than Fr. 