mirror of
https://github.com/arnaucube/babyjubjub-ark.git
synced 2026-01-13 17:21:29 +01:00
d893ecc5f677dca9b0c3f48f2fe04f32c5cead7f
Benchmarks (On a Intel(R) Core(TM) i7-8705G CPU @ 3.10GHz, with 32 GB of RAM): - Old: ``` sign time: [953.50 us 953.73 us 953.98 us] verify time: [832.24 us 832.38 us 832.52 us] ``` - New: ``` sign time: [559.84 us 568.41 us 576.26 us] verify time: [376.59 us 376.68 us 376.78 us] ```
babyjubjub-rs

BabyJubJub elliptic curve implementation in Rust. A twisted edwards curve embedded in the curve of BN128/BN256.
BabyJubJub curve explanation: https://medium.com/zokrates/efficient-ecc-in-zksnarks-using-zokrates-bd9ae37b8186
Uses:
- Poseidon hash function https://github.com/arnaucube/poseidon-rs
Compatible with the BabyJubJub implementations in:
- Go, from https://github.com/iden3/go-iden3-crypto
- circom & javascript, from https://github.com/iden3/circomlib
Warning
Doing this in my free time to get familiar with Rust, do not use in production.
- point addition
- point scalar multiplication
- eddsa keys generation
- eddsa signature
- eddsa signature verification
- {point, pk, signature} compress&decompress parsers
References
- BabyJubJub curve explanation: https://medium.com/zokrates/efficient-ecc-in-zksnarks-using-zokrates-bd9ae37b8186
- C++ & Explanation https://github.com/barryWhiteHat/baby_jubjub
- Javascript & Circom: https://github.com/iden3/circomlib
- Go https://github.com/iden3/go-iden3-crypto
- JubJub curve explanation: https://z.cash/technology/jubjub/
Languages
Rust
100%