Crate ironfish_jubjub

Crate ironfish_jubjub 

Source
Expand description

Implementation of the Jubjub elliptic curve group and its associated fields.

This is a fork of the original jubjub crate from Zcash. The fork was created by the Iron Fish project to add performance improvements.

§Delta from upstream

These are the differences between this crate and the upstream jubjub crate:

  • Changed the elliptic curve backend from bls12_381 to blstrs
  • Added optional statistics counters for performance monitoring. This can be enabled through the stats feature.
  • Added a ExtendedPoint::multiply_many method to efficiently perform multiple elliptic curve multiplications in one call.
  • Added a SubgroupPoint::as_extended method to convert a SubgroupPoint to an ExtendedPoint.

Structs§

AffineNielsPoint
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 ExtendedPoint.
AffinePoint
This represents a Jubjub point in the affine (u, v) coordinates.
ExtendedNielsPoint
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).
ExtendedPoint
This represents an extended point (U, V, Z, T1, T2) with Z nonzero, corresponding to the affine point (U/Z, V/Z). We always have T1 * T2 = UV/Z.
Fq
Represents an element of the scalar field $\mathbb{F}_q$ of the BLS12-381 elliptic curve construction.
Fr
Represents an element of the scalar field $\mathbb{F}_r$ of the Jubjub elliptic curve construction.
SubgroupPoint
This represents a point in the prime-order subgroup of Jubjub, in extended coordinates.

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 obtain AffinePoints 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.
Scalar
Represents an element of the scalar field $\mathbb{F}_r$ of the Jubjub elliptic curve construction.