Crate jub_jub

Source
Expand description

§Jubjub Curve

CI crates.io badge Documentation crates.io badge GitHub license codecov dependency status

This crate provides jubjub curve arithmetic and also supports fully no_std and parity-scale-codec.

§Specification

The Jubjub curve is one of twisted edwards curve.

  • Twisted Edwards Curve

$$ ax^2 + y^2 = 1 + dx^2y^2 $$

  • Addition Law

$$ (x_3 = \frac{x_1y_1 + y_1x_1}{1 + dx_1x_1y_1y_1}, y_3 = \frac{y_1y_1 + ax_1x_1}{1 - dx_1x_1y_1y_1}) $$

§Test

$ cargo test

Structs§

Fp
Twisted Edwards curve Jubjub base field
Fr
Bls12 381 curve scalar field
JubjubAffine
Twisted Edwards curve Jubjub affine coordinate
JubjubExtended
Twisted Edwards curve Jubjub extended coordinate

Constants§

EDWARDS_D
Twisted Edwards curve Jubjub D params

Functions§

compute_windowed_naf
wNAF expression computation over field