arnau 693c7be161 Merge pull request #1 from arnaucube/feature/opt
Add [ff](https://github.com/matter-labs/ff) for internal finite field operations, and add `add-2008-bbjlp` for point addition.

Benchmarks (On a Intel(R) Core(TM) i7-8705G CPU @ 3.10GHz, with 32 GB of RAM):
```
- before:
add               time:   [53.447 us 53.467 us 53.492 us]
mul_scalar        time:   [121.19 ms 121.22 ms 121.25 ms]
sign              time:   [383.01 ms 384.46 ms 385.98 ms]
verify            time:   [250.56 ms 251.46 ms 252.43 ms]

- current:
add               time:   [317.34 ns 317.44 ns 317.54 ns]
mul_scalar        time:   [131.05 us 131.28 us 131.58 us]
sign              time:   [973.38 us 973.83 us 974.41 us]
verify            time:   [835.34 us 839.94 us 845.29 us]
```

add: `168x` improvement
mul_scalar: `923x` improvement
sign: `394x` improvement
verify: `300x` improvement

Still needs a refactor.
2020-08-02 19:31:19 +02:00
2019-07-28 21:18:08 +02:00
2019-08-04 14:16:51 +02:00
2019-07-28 21:18:08 +02:00

babyjubjub-rs Crates.io Build Status

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:

Compatible with the BabyJubJub implementations in:

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

Description
No description provided
Readme GPL-3.0 99 KiB
Languages
Rust 100%