2 releases

0.2.5 Jan 15, 2023
0.2.3 Jan 15, 2023
0.1.11 Apr 28, 2023
0.1.10 Jan 17, 2023
0.1.0 Dec 14, 2021

#5 in #jubjub

Download history 4/week @ 2024-02-18 20/week @ 2024-02-25 6/week @ 2024-03-03 8/week @ 2024-03-10 6/week @ 2024-03-17 110/week @ 2024-03-31

126 downloads per month
Used in 4 crates

Apache-2.0

20KB
469 lines

Jubjub Curve crates.io badge

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

This crate uses https://github.com/zkcrypto/jubjub algorithm designed by @str4d and @ebfull. We replace field and curve implementation with zero-crypto to make this compatible with Substrate.

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}) $$

Dependencies

~4.5MB
~91K SLoC