Commit Graph

37 Commits

Author SHA1 Message Date
42c02b17df expose pub curve parameters and generator 2023-05-16 16:07:18 +02:00
bf617de79d Add WASM compatibility throguh feature 2023-05-15 20:43:00 +02:00
8e2d007d5c port https://github.com/arnaucube/babyjubjub-rs to arkworks ff 2023-05-08 18:04:21 +02:00
arnaucube
cd36d496e5 Merge pull request #6 from bingcicle/patch-1
fix link to add-2008-bbjlp
2023-05-04 21:24:41 +02:00
bing
5365144e82 fix link to addition-add-2008-bbjlp 2023-05-04 15:43:00 +00:00
arnaucube
1a69ae6828 Merge pull request #5 from leonardoalt/make_sk_fields_pub
Make fields of PrivateKey pub
2023-02-08 22:59:17 +01:00
Leo Alt
870cee750e Make fields of PrivateKey pub 2023-02-06 11:46:32 +01:00
arnaucube
5e3ee25cc9 Merge pull request #4 from leonardoalt/pub_sig_fields
Make fields of struct Signature public
2023-01-16 20:34:27 +01:00
Leo Alt
6f9bb1c133 Make fields of struct Signature public 2023-01-16 14:55:02 +01:00
8ae99d7b3c Update aarch64 feature related code & minor update
- Update aarch64 feature related code
- Update benchmarks to last lib updates
- Apply Clippy fixes
2022-09-09 15:13:05 +02:00
arnaucube
4793de7d24 Merge pull request #3 from nicolas-geniteau/update-deps
Update rust to 2021 and deps
2022-09-08 20:23:11 +02:00
Nicolas Geniteau
020f243f0f Update rust to 2021 and deps 2022-09-08 17:46:58 +02:00
e4b7ced755 Update clippy minor fixes, add clippy to GHA 2021-03-17 22:15:04 +01:00
53286f535c Add blake lib support for feature aarch64 2021-03-09 18:39:34 +01:00
27f9ab6acc Update to last poseidon-rs version
Update to last Poseidon version (which includes the changes of the reference implementation from
26ddaa91db)

Compatible with update at circomlib
(cf853c1cc9)
2021-03-08 20:52:47 +01:00
f3d57a2446 rm unnecessary Result<> 2020-12-20 14:17:20 +01:00
005019d684 Update EdDSA to last circomlib version
- Update EdDSA to last circomlib version
	- Compatible with circomlib version 0.3.0 at
	  5935ac69df
	- Use blake hash precandidate (non-blake2b) for circomlib
	  compatibility
	- Add circomlib testvector
- Change PrivateKey from BigInt to [u8;32], which lead to faster
signature computation:
	(Benchmarks on a Intel(R) Core(TM) i7-8705G CPU @ 3.10GHz, with
	32 GB of RAM)
	- Old:
	    ```
	    sign                    time:   [559.84 us 568.41 us 576.26 us]
	    verify                  time:   [376.59 us 376.68 us 376.78 us]
	    ```
	- New:
	    ```
	    sign                    time:   [383.85 us 390.31 us 396.44 us]
	    verify                  time:   [371.33 us 376.06 us 381.19 us]
	    ```
- crate version v0.0.5
2020-12-05 21:35:01 +01:00
53f7fd1215 v0.0.4
- update poseidon-rs to v0.0.5
- remove TravisCI and add GithubAction for tests
- remove mimc-rs support
2020-11-04 19:05:36 +01:00
d893ecc5f6 Poseidon load static ref avoiding load each time
Benchmarks (On a Intel(R) Core(TM) i7-8705G CPU @ 3.10GHz, with 32 GB of RAM):
- Old:
```
sign                    time:   [953.50 us 953.73 us 953.98 us]
verify                  time:   [832.24 us 832.38 us 832.52 us]
```

- New:
```
sign                    time:   [559.84 us 568.41 us 576.26 us]
verify                  time:   [376.59 us 376.68 us 376.78 us]
```
2020-09-07 23:09:08 +02:00
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
80d682ea93 Update Schnorr to last changes, rm MiMC7 methods 2020-08-02 19:22:12 +02:00
04d20b9e05 Update sign&verify (poseidon) to last optimization
(On a Intel(R) Core(TM) i7-8705G CPU @ 3.10GHz, with 32 GB of RAM)

- before:
```
sign_poseidon           time:   [383.01 ms 384.46 ms 385.98 ms]
verify_poseidon         time:   [250.56 ms 251.46 ms 252.43 ms]
```

- current:
```
sign_poseidon           time:   [973.38 us 973.83 us 974.41 us]
verify_poseidon         time:   [835.34 us 839.94 us 845.29 us]
```

sign_poseidon: `394x` improvement
verify_poseidon: `300x` improvement
2020-08-02 16:23:40 +02:00
2d94206899 Optimize point add & mul_scalar methods
(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]
```

- current:
```
add                     time:   [317.34 ns 317.44 ns 317.54 ns]
mul_scalar              time:   [131.05 us 131.28 us 131.58 us]
```

Which is `168x` improvement for `add`, and `923x` improvement for `mul_scalar`.
2020-08-01 18:18:43 +02:00
30218dc1f3 Add benchmarks 2020-07-25 18:33:51 +02:00
df8a21200f add Schnorr signature & verification 2019-09-11 11:22:15 +02:00
d7c383695d reference param in mul_scalar 2019-09-10 11:28:57 +02:00
addcca64e5 add some error handling 2019-09-09 20:42:17 +02:00
2ab48ff3ad add sign & verify with Poseidon hash, update MiMC use to v0.0.2 2019-09-07 19:52:48 +02:00
ad33bbd537 fix point & signature compress & decompress 2019-09-07 19:28:09 +02:00
48085c5a83 constants with lazy_static, refactor 2019-08-28 00:25:27 +02:00
1ff5a567a7 compress & decompress signature (wip) 2019-08-27 23:44:44 +02:00
eb42f48c65 add point compress&decompress, add modsqrt with Tonelli-Shanks algorithm 2019-08-24 16:15:05 +02:00
a2122dadce add travis & crate config 2019-08-04 14:16:51 +02:00
9bc3000898 signature & verification done 2019-08-04 14:13:51 +02:00
fffcb66143 add new private key generation, signature started 2019-08-03 20:37:14 +02:00
6658d975da add point scalar multiplication 2019-07-28 23:15:23 +02:00
35f4686198 add point addition 2019-07-28 21:18:08 +02:00