arnaucube
arnaucube/go-iden3-cryptoPublic Self-hosted repository

Commit history

71dbddb5f119865bf9d1bb774c993c09d8e7241e
a
Abstract & expose CompressedPointToSignAndY
arnaucube committed on Dec 21, 2020
71dbddb
a
Merge pull request #29 from iden3/feature/babyjubjub-optimization - Add `add-2008-bbjlp` for point addition - Add `goff` to BabyJubJub point addition ``` Benchmarks (On a Intel(R) Core(TM) i7-8705G CPU @ 3.10GHz, with 32 GB of RAM): - Old (commit: e04ca5764a153717d7966e523a9cc8d7305bfcf8): BenchmarkBabyjub/AddConst-8 1000000 1072 ns/op BenchmarkBabyjub/AddRnd-8 93417 12943 ns/op BenchmarkBabyjub/MulRnd-8 252 4797810 ns/op BenchmarkBabyjub/Compress-8 7291580 166 ns/op BenchmarkBabyjub/InCurve-8 611137 1999 ns/op BenchmarkBabyjub/InSubGroup-8 615792 2021 ns/op BenchmarkBabyjubEddsa/SignMimc7-8 126 9358542 ns/op BenchmarkBabyjubEddsa/VerifyMimc7-8 124 9484005 ns/op BenchmarkBabyjubEddsa/SignPoseidon-8 126 9486484 ns/op BenchmarkBabyjubEddsa/VerifyPoseidon-8 126 9622807 ns/op - With new point addition algorithm (commit: aab1a681dd4b00cab49f39f9e30d6f28034589c1): BenchmarkBabyjub/AddConst-8 1356836 881 ns/op BenchmarkBabyjub/AddRnd-8 274112 4220 ns/op BenchmarkBabyjub/MulRnd-8 492 2474412 ns/op BenchmarkBabyjub/Compress-8 6964855 197 ns/op BenchmarkBabyjub/InCurve-8 608169 2008 ns/op BenchmarkBabyjub/InSubGroup-8 618772 1954 ns/op BenchmarkBabyjubEddsa/SignMimc7-8 238 4962397 ns/op BenchmarkBabyjubEddsa/VerifyMimc7-8 235 5234883 ns/op BenchmarkBabyjubEddsa/SignPoseidon-8 240 5028720 ns/op BenchmarkBabyjubEddsa/VerifyPoseidon-8 243 5226654 ns/op Point Addition: ~3x Point scalar Mul: ~1.9x Signature (poseidon): ~1.88x Verification (poseidon): ~1.84x - With new point addition algorithm & goff (current commit): BenchmarkBabyjub/AddConst-8 3000531 400 ns/op BenchmarkBabyjub/AddRnd-8 2770335 428 ns/op BenchmarkBabyjub/MulRnd-8 6636 175522 ns/op BenchmarkBabyjub/Compress-8 7358768 180 ns/op BenchmarkBabyjub/InCurve-8 539193 1950 ns/op BenchmarkBabyjub/InSubGroup-8 601402 1958 ns/op BenchmarkBabyjubEddsa/SignMimc7-8 2940 409487 ns/op BenchmarkBabyjubEddsa/VerifyMimc7-8 2908 414407 ns/op BenchmarkBabyjubEddsa/SignPoseidon-8 2395 493165 ns/op BenchmarkBabyjubEddsa/VerifyPoseidon-8 2491 494849 ns/op Point Addition: ~9.86x Point scalar Mul: ~14x Signature (poseidon): ~10.2x Verification (poseidon): ~10.56x --- Total improvement (from old to current): Point Addition: ~30.24x Point scalar Mul: ~27.33x Signature (poseidon): ~19.24x Verification (poseidon): ~19.44x ```
arnau committed on Sep 13, 2020
59d8c7a
E
Add babujub eddsa benchmarks
Eduard S committed on Dec 16, 2019
53b9050
E
Add poseidon and babyjub benchmarks
Eduard S committed on Dec 16, 2019
a5b6afc
a
add babyjub-eddsa Poseidon sign & verify
arnaucube committed on Aug 29, 2019
0bac1c8
a
add mimc7 & fields
arnaucube committed on Jun 25, 2019
e92a15d
E
Add babyjub from go-iden3/crypto/babyjub
Eduard S committed on Jun 25, 2019
0f93c8c
a
Initial commit
arnau committed on Jun 25, 2019
eea7579
a
add Poseidon
arnaucube committed on Jun 30, 2019
09c29da
E
Test that babyjub pk is always < Q
Eduard S committed on Dec 9, 2019
5ade04e
a
poseidon consistent use of T
arnaucube committed on Dec 17, 2019
c754d01
a
fix #9
arnaucube committed on Dec 17, 2019
fcb5865
E
Optimize Poseidon
Eduard S committed on Dec 18, 2019
c0c4ff2
a
Update BabyJubJub signature with Poseidon
arnaucube committed on Mar 3, 2020
97c76ce
a
Adapt babyjub/eddsa to new Poseidon methods
arnaucube committed on Mar 3, 2020
2a3f0d9
a
Resolve #4
arnaucube committed on Mar 3, 2020
83f87bf
a
Remove field package which is no longer used
arnaucube committed on Mar 5, 2020
4750e9c
E
Fix compat with 32 bit arch
Eduard S committed on Mar 17, 2020
e10db81
E
Fix linters errors
Eduard S committed on Apr 14, 2020
0ac8b46
E
Add github actions and remove travis
Eduard S committed on Apr 14, 2020
14d0991
a
Add utils.ElementArrayToBigIntArray
arnaucube committed on Apr 20, 2020
b98a9fe
a
Rm .travis.yml
arnaucube committed on May 22, 2020
e134988
a
Add scanner/valuer interface to PublicKey
a_bennassar committed on Aug 13, 2020
a86308c
a
Add scanner/valuer interface to signature
a_bennassar committed on Aug 11, 2020
d91a426
a
Fix value sql interface
a_bennassar committed on Aug 14, 2020
674e8a6
a
Add goff to BabyJubJub point addition ``` Benchmarks (On a Intel(R) Core(TM) i7-8705G CPU @ 3.10GHz, with 32 GB of RAM): - Old (commit: e04ca5764a153717d7966e523a9cc8d7305bfcf8): BenchmarkBabyjub/AddConst-8 1000000 1072 ns/op BenchmarkBabyjub/AddRnd-8 93417 12943 ns/op BenchmarkBabyjub/MulRnd-8 252 4797810 ns/op BenchmarkBabyjub/Compress-8 7291580 166 ns/op BenchmarkBabyjub/InCurve-8 611137 1999 ns/op BenchmarkBabyjub/InSubGroup-8 615792 2021 ns/op BenchmarkBabyjubEddsa/SignMimc7-8 126 9358542 ns/op BenchmarkBabyjubEddsa/VerifyMimc7-8 124 9484005 ns/op BenchmarkBabyjubEddsa/SignPoseidon-8 126 9486484 ns/op BenchmarkBabyjubEddsa/VerifyPoseidon-8 126 9622807 ns/op - With new point addition algorithm (commit: aab1a681dd4b00cab49f39f9e30d6f28034589c1): BenchmarkBabyjub/AddConst-8 1356836 881 ns/op BenchmarkBabyjub/AddRnd-8 274112 4220 ns/op BenchmarkBabyjub/MulRnd-8 492 2474412 ns/op BenchmarkBabyjub/Compress-8 6964855 197 ns/op BenchmarkBabyjub/InCurve-8 608169 2008 ns/op BenchmarkBabyjub/InSubGroup-8 618772 1954 ns/op BenchmarkBabyjubEddsa/SignMimc7-8 238 4962397 ns/op BenchmarkBabyjubEddsa/VerifyMimc7-8 235 5234883 ns/op BenchmarkBabyjubEddsa/SignPoseidon-8 240 5028720 ns/op BenchmarkBabyjubEddsa/VerifyPoseidon-8 243 5226654 ns/op Point Addition: ~3x Point scalar Mul: ~1.9x Signature (poseidon): ~1.88x Verification (poseidon): ~1.84x - With new point addition algorithm & goff (current commit): BenchmarkBabyjub/AddConst-8 3000531 400 ns/op BenchmarkBabyjub/AddRnd-8 2770335 428 ns/op BenchmarkBabyjub/MulRnd-8 6636 175522 ns/op BenchmarkBabyjub/Compress-8 7358768 180 ns/op BenchmarkBabyjub/InCurve-8 539193 1950 ns/op BenchmarkBabyjub/InSubGroup-8 601402 1958 ns/op BenchmarkBabyjubEddsa/SignMimc7-8 2940 409487 ns/op BenchmarkBabyjubEddsa/VerifyMimc7-8 2908 414407 ns/op BenchmarkBabyjubEddsa/SignPoseidon-8 2395 493165 ns/op BenchmarkBabyjubEddsa/VerifyPoseidon-8 2491 494849 ns/op Point Addition: ~9.86x Point scalar Mul: ~14x Signature (poseidon): ~10.2x Verification (poseidon): ~10.56x --- Total improvement (from old to current): Point Addition: ~30.24x Point scalar Mul: ~27.33x Signature (poseidon): ~19.24x Verification (poseidon): ~19.44x ```
arnaucube committed on Sep 5, 2020
91767c7
a
Upgrade linters
arnaucube committed on Dec 16, 2020
6d75396