arnaucube
93bf45c299
fix bbjj api: return err when hash fails while sign/verify
1 year ago
Oleksandr Brezhniev
e5cf066b8b
Poseidon Sponge Hash with different frame sizes ( #52 )
* Poseidon Sponge Hash with different frame sizes
* Update deps. Bump go version
* Update & fix linter.
* Refactor a bit.
* Reduce gc pressure
1 year ago
arnaucube
a366175021
Add scanner/valuer interface to babyjub.PublicKeyComp
4 years ago
arnaucube
6d75396b4b
Upgrade linters
4 years ago
arnaucube
5dd19b46dd
Update BabyJubJub EdDSA to last circomlib version
- Update BabyJubJub EdDSA signature to last circomlib version (Poseidon
usage)
- Remove panic on hash error inside verification, to avoid panic due
field overflow of BabyJubJub signature verification
4 years ago
Arnau B
5ef832f175
Add scanner/valuer interface to babyjub.SignatureComp
4 years ago
arnaucube
aab1a681dd
Add add-2008-bbjlp for point addition
Add `add-2008-bbjlp` for point addition
Benchmarks (On a Intel(R) Core(TM) i7-8705G CPU @ 3.10GHz, with 32 GB of RAM):
```
- Old:
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:
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
4 years ago
arnaucube
e04ca5764a
Update Poseidon to new circomlib version & https://extgit.iaik.tugraz.at/krypto/hadeshash
4 years ago
a_bennassar
674e8a6739
Fix value sql interface
4 years ago
a_bennassar
a86308cb0b
Add scanner/valuer interface to PublicKey
4 years ago
a_bennassar
d91a4261f1
Add scanner/valuer interface to signature
4 years ago
arnaucube
f22be3cdee
Update Poseidon Hash function names, rm HashBytes
Since Poseidon Hash is used because of compatibility in zkSNARK circuits, due
circuit constraints number, the hash method of [T]*big.Int is the one directly
compatible with the circuits, is the method which have the `Hash` name on it.
The method that can take arbitrary length of []*big.Int putting them in chunks
of [T]*big.Int and iterating, is called `HashSlice`. The `HashBytes` has been
removed, as is a method that will not be used in zkSNARK circuits due high
constraints number.
For zkSNARK circuits, should be used `poseidon.Hash([poseidon.T]*big.Int)`.
4 years ago
arnaucube
d189a6bedc
Expose SkToBigInt for usage from other packages & repos
4 years ago
arnaucube
2a3f0d9ed5
Adapt babyjub/eddsa to new Poseidon methods
4 years ago
arnaucube
97c76ce614
Update BabyJubJub signature with Poseidon
4 years ago
arnaucube
2b1935299c
MiMC7 finite field over R comprovation moved inside hash, same approach as Poseidon impl
5 years ago
arnaucube
0bac1c84ba
add babyjub-eddsa Poseidon sign & verify
5 years ago
Eduard S
5b79ded540
Move constants and utils to package, apply small fixes
5 years ago
arnaucube
7b219e15ec
add travis, add go.mod go.sum, update babyjub hex encoders to avoid
importing go-iden3
5 years ago
Eduard S
0f93c8ce38
Add babyjub from go-iden3/crypto/babyjub
5 years ago