3 unstable releases

0.2.0 Aug 7, 2019
0.1.1 Jul 12, 2019
0.1.0 Jul 11, 2019

#59 in #pairing

Apache-2.0

440KB
9K SLoC

Purpose

Rust library for EC arithmetics and pairing calculations over various curves with parameters defined at runtime.

Features (WIP):

  • Fields implementation
  • Weierstrass curves implementation
    • a = 0
    • generic case (a != 0, b != 0)
    • b = 0 (most likely will not be implemented to avoid point (0,0) being on curve)
    • a = -3 (not a priority, can be covered by generic case w/o much performance hit and with simpler gas cost schedule)
  • Extension towers
    • Fp2
    • Fp3
    • Fp4 as 2 over 2
    • Fp6 as 2 over 3
    • Fp6 as 3 over 2
    • Fp12 as 2 over 3 over 2
  • Pairings
    • BLS12 curves family
    • BN family
    • MNT6 family
    • MNT4 family
    • Cocks-Pinch method generated curves in Weierstrass form (Ate pairing)
      • Test over a single k=6 curve from Zexe

ABI interface

See ABI.md.

Performance testing

  • Find a way to save on precomputations
    • Implement windowed exponentiation and don't create elements that are neven used
  • Find more test vectors to fit quadratic gas schedules
  • Benchmark Peppinger

Contributors

Resources to consult and use

So I do not forget it

Dependencies

~2.5MB
~60K SLoC