Skip to content

Commit a308e49

Browse files
curiecryptiquerejeta
authored andcommitted
readme updated
1 parent c77e85e commit a308e49

File tree

3 files changed

+73
-38
lines changed

3 files changed

+73
-38
lines changed

clippy

Whitespace-only changes.

mithril-common/src/crypto_helper/cardano/key_certification.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ use mithril::key_reg::{ClosedKeyReg, KeyReg};
1313
use mithril::stm::{Stake, StmInitializer, StmParameters, StmSigner, StmVerificationKeyPoP};
1414
use mithril::RegisterError;
1515

16-
use blake2::{digest::{consts::U32, FixedOutput}, Blake2b, Digest};
16+
use blake2::{
17+
digest::{consts::U32, FixedOutput},
18+
Blake2b, Digest,
19+
};
1720
use kes_summed_ed25519::kes::{Sum6Kes, Sum6KesSig};
1821
use kes_summed_ed25519::traits::{KesSig, KesSk};
1922
use rand_core::{CryptoRng, RngCore};

mithril-core/README.md

Lines changed: 69 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ This crate is ongoing work, has not been audited, and it's API is by no means fi
55
### A rust implementation of Stake-based Threshold Multisignatures (STMs)
66
`mithril-core` implements Stake-based Threshold Multisignatures as described in the paper
77
[Mithril: Stake-based Threshold Multisignatures](https://eprint.iacr.org/2021/916.pdf), by
8-
Pyrros Chaidos and Aggelos Kiayias.
8+
Pyrros Chaidos and Aggelos Kiayias.
99

1010
This library uses zkcrypto's implementation of curve [BLS12-381](https://github.com/zkcrypto/bls12_381)
11-
by default for implementing the multisignature scheme. One can optionally choose the
12-
[blst](https://github.com/supranational/blst) backend (by using the feature `blast`),
13-
but this is not recommended due to some [flaky tests](https://github.com/input-output-hk/mithril/issues/207)
11+
by default for implementing the multisignature scheme. One can optionally choose the
12+
[blst](https://github.com/supranational/blst) backend (by using the feature `blast`),
13+
but this is not recommended due to some [flaky tests](https://github.com/input-output-hk/mithril/issues/207)
1414
That are still being resolved. We
1515
currently only support the trivial concatenation proof system (Section 4.3) and do not support
1616
other proof systems such as Bulletproofs or Halo2.
@@ -90,7 +90,7 @@ fn main() {
9090

9191
// Aggregate with random parties
9292
let msig = clerk.aggregate(&sigs, &msg);
93-
93+
9494
assert!(msig.is_ok(), "aggregation failed");
9595
assert!(msig.unwrap().verify(&msg, &clerk.compute_avk(), &params).is_ok());
9696
}
@@ -101,53 +101,85 @@ You can run tests of the library using `cargo test` (we recommend to use the `--
101101
the tests might take a while) and run benchmarks using `cargo bench`. This crate uses `criterion` to run
102102
benchmarks.
103103

104-
We have run the benchmarks on a 2,7 GHz Quad-Core Intel Core i7 machine with 16 GB of RAM, on macOS 12.1.
104+
We have run the benchmarks on an Apple M1 Pro machine with 16 GB of RAM, on macOS 12.6.
105+
106+
Note that single signatures in batch compat version does not depend on any variable and size of an individual signature is `176` bytes.
105107

106108
```shell
107-
+-------------------+
108-
| Size of proofs |
109-
+-------------------+
110-
|-------------------|
111-
| Trivial proofs |
112-
+-------------------+
109+
+----------------------+
110+
| Size of benchmarks |
111+
+----------------------+
113112
| Results obtained by using the parameters suggested in paper.
114-
+-------------------+
115-
+-------------------+
116-
| Hash: Blake2b 512 |
117-
+-------------------+
118-
k = 445 | m = 2728 | nr parties = 3000; 118760 bytes
119-
+-------------------+
120-
| Hash: Blake2b 256 |
121-
+-------------------+
122-
k = 445 | m = 2728 | nr parties = 3000; 99384 bytes
123-
+-------------------+
124-
| Hash: Blake2b 512 |
125-
+-------------------+
126-
k = 554 | m = 3597 | nr parties = 3000; 133936 bytes
127-
+-------------------+
128-
| Hash: Blake2b 256 |
129-
+-------------------+
130-
k = 554 | m = 3597 | nr parties = 3000; 113728 bytes
113+
+----------------------+
114+
+----------------------+
115+
| Aggregate signatures |
116+
+----------------------+
117+
+----------------------+
118+
| Hash: Blake2b 512 |
119+
+----------------------+
120+
k = 445 | m = 2728 | nr parties = 3000; 118760 bytes (old version = 356632 bytes)
121+
+----------------------+
122+
| Hash: Blake2b 256 |
123+
+----------------------+
124+
k = 445 | m = 2728 | nr parties = 3000; 99384 bytes (old version = 222536 bytes)
125+
+----------------------+
126+
+----------------------+
127+
| Aggregate signatures |
128+
+----------------------+
129+
| Hash: Blake2b 512 |
130+
+----------------------+
131+
k = 554 | m = 3597 | nr parties = 3000; 133936 bytes (old version = 419808 bytes)
132+
+----------------------+
133+
| Hash: Blake2b 256 |
134+
+----------------------+
135+
k = 554 | m = 3597 | nr parties = 3000; 113728 bytes (old version = 261488 bytes)
136+
make build && ./mithrildemo --nparties 16 -k 5 -m 5 --phi-f 0.9
137+
131138
```
132139

133140
```shell
134141
STM/Blake2b/Key registration/k: 25, m: 150, nr_parties: 300
135-
time: [388.95 ms 389.43 ms 389.90 ms]
142+
time: [409.70 ms 426.81 ms 446.30 ms]
143+
change: [+2.3183% +7.5525% +13.315%] (p = 0.02 < 0.05)
144+
Performance has regressed.
145+
136146
STM/Blake2b/Play all lotteries/k: 25, m: 150, nr_parties: 300
137-
time: [699.76 µs 701.42 µs 703.63 µs]
147+
time: [696.58 µs 697.62 µs 698.75 µs]
148+
change: [-1.1128% -0.8545% -0.5490%] (p = 0.00 < 0.05)
149+
Change within noise threshold.
150+
138151
STM/Blake2b/Aggregation/k: 25, m: 150, nr_parties: 300
139-
time: [18.888 ms 18.903 ms 18.920 ms]
152+
time: [18.765 ms 18.775 ms 18.785 ms]
153+
change: [-1.5665% -1.4456% -1.3236%] (p = 0.00 < 0.05)
154+
Performance has improved.
155+
140156
STM/Blake2b/Verification/k: 25, m: 150, nr_parties: 300
141-
time: [2.1547 ms 2.1609 ms 2.1686 ms]
157+
time: [2.1577 ms 2.1715 ms 2.1915 ms]
158+
change: [-0.0379% +0.5723% +1.6451%] (p = 0.14 > 0.05)
159+
No change in performance detected.
160+
142161

143162
STM/Blake2b/Key registration/k: 250, m: 1523, nr_parties: 2000
144-
time: [2.5986 s 2.6042 s 2.6101 s]
163+
time: [2.5807 s 2.5880 s 2.5961 s]
164+
change: [-1.7298% -0.2763% +0.7870%] (p = 0.78 > 0.05)
165+
No change in performance detected.
166+
145167
STM/Blake2b/Play all lotteries/k: 250, m: 1523, nr_parties: 2000
146-
time: [5.9141 ms 5.9346 ms 5.9641 ms]
168+
time: [5.9318 ms 5.9447 ms 5.9582 ms]
169+
change: [+1.1467% +1.4105% +1.6686%] (p = 0.00 < 0.05)
170+
Performance has regressed.
171+
147172
STM/Blake2b/Aggregation/k: 250, m: 1523, nr_parties: 2000
148-
time: [189.63 ms 190.10 ms 190.69 ms]
173+
time: [190.81 ms 191.15 ms 191.54 ms]
174+
change: [-0.2176% +0.0444% +0.3235%] (p = 0.82 > 0.05)
175+
No change in performance detected.
176+
149177
STM/Blake2b/Verification/k: 250, m: 1523, nr_parties: 2000
150-
time: [14.040 ms 14.143 ms 14.271 ms]
178+
time: [13.944 ms 14.010 ms 14.077 ms]
179+
change: [-1.0844% -0.6175% -0.0397%] (p = 0.03 < 0.05)
180+
Change within noise threshold.
181+
182+
151183
```
152184

153185
# ToDo list once we go public

0 commit comments

Comments
 (0)