cloudflare / circl

CIRCL: Cloudflare Interoperable Reusable Cryptographic Library
http://blog.cloudflare.com/introducing-circl
Other
1.26k stars 141 forks source link

bls12: addition chain for inversion in Fp #296

Closed armfazh closed 2 years ago

armfazh commented 2 years ago

Using special addition chain for inversion in Fp.

Chain was found using mmcloughlin/addchain v0.3.0 McLoughlin, Michael Ben. (2021). https://doi.org/10.5281/zenodo.4758226

benchmark               old ns/op     new ns/op     delta
BenchmarkFp12/Inv-8     112649        89706         -20.37%
BenchmarkFp2/Inv-8      95025         68185         -28.25%
BenchmarkFp6/Inv-8      100276        73924         -26.28%
BenchmarkFp/Inv-8       100091        70305         -29.76%

cc: @mmcloughlin

armfazh commented 2 years ago

Fixes #295