You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### A rust implementation of Stake-based Threshold Multisignatures (STMs)
6
-
`mithril-stm` implements Stake-based Threshold Multisignatures as described in the paper
7
-
[Mithril: Stake-based Threshold Multisignatures](https://eprint.iacr.org/2021/916.pdf), by
8
-
Pyrros Chaidos and Aggelos Kiayias.
9
3
10
-
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)
14
-
That are still being resolved. We
15
-
currently only support the trivial concatenation proof system (Section 4.3) and do not support
16
-
other proof systems such as Bulletproofs or Halo2.
4
+
**This is a work in progress**:hammer_and_wrench:s
17
5
18
-
This library provides implementations of:
6
+
*`mithril-stm` is a Rust implementation of the scheme described in the paper [Mithril: Stake-based Threshold Multisignatures](https://eprint.iacr.org/2021/916.pdf) by Pyrros Chaidos and Aggelos Kiayias.
7
+
* The BLS12-381 signature library [blst](https://github.com/supranational/blst) is used as the backend for the implementation of STM.
8
+
* This implementation supports the _trivial concatenation proof system_ (Section 4.3). Other proof systems such as _Bulletproofs_ or _Halo2_ are not supported in this version.
9
+
* We implemented the concatenation proof system as batch proofs:
10
+
* Individual signatures do not contain the Merkle path to prove membership of the avk. Instead, it is the role of the aggregator to generate such proofs. This allows for a more efficient implementation of batched membership proofs (or batched Merkle paths).
11
+
* Protocol documentation is given in [Mithril Protocol in depth](https://mithril.network/doc/mithril/mithril-protocol/protocol/).
19
12
20
-
* Stake-based Threshold Multisignatures
21
-
* Key registration procedure for STM signatures
22
13
23
-
The user-facing documentation for the above modules can be found [here]().
14
+
* This library provides:
15
+
* The implementation of the Stake-based Threshold Multisignatures
16
+
* Key registration procedure for STM signatures
17
+
* The tests for the library functions and STM scheme
18
+
* Benchmark tests
19
+
20
+
## Pre-requisites
21
+
22
+
**Install Rust**
23
+
24
+
* Install a [correctly configured](https://www.rust-lang.org/learn/get-started) Rust toolchain (latest stable version).
You can run tests of the library using `cargo test` (we recommend to use the `--release` flag, otherwise
101
-
the tests might take a while) and run benchmarks using `cargo bench`. This crate uses `criterion` to run
102
-
benchmarks.
142
+
## Benchmarks
103
143
104
-
We have run the benchmarks on an Apple M1 Pro machine with 16 GB of RAM, on macOS 12.6.
144
+
Here we give the benchmark results of STM for size and time. We run the benchmarks on macOS 12.6 on an Apple M1 Pro machine with 16 GB of RAM.
105
145
106
-
Note that single signatures in batch compat version does not depend on any variable and size of an individual signature is `176` bytes.
146
+
Note that the size of an individual signature with one valid index is **176 bytes**and increases linearly in the length of valid indices (where an index is 8 bytes).
107
147
108
148
```shell
109
149
+----------------------+
110
150
| Size of benchmarks |
111
151
+----------------------+
112
-
| Results obtained by using the parameters suggested in paper.
152
+
| Results obtained by using the parameters suggested by the paper.
113
153
+----------------------+
114
154
+----------------------+
115
155
| Aggregate signatures |
116
156
+----------------------+
117
157
+----------------------+
118
158
| Hash: Blake2b 512 |
119
159
+----------------------+
120
-
k = 445 | m = 2728 | nr parties = 3000; 118760 bytes (old version = 356632 bytes)
160
+
k = 445 | m = 2728 | nr parties = 3000; 118760 bytes
121
161
+----------------------+
122
162
| Hash: Blake2b 256 |
123
163
+----------------------+
124
-
k = 445 | m = 2728 | nr parties = 3000; 99384 bytes (old version = 222536 bytes)
164
+
k = 445 | m = 2728 | nr parties = 3000; 99384 bytes
125
165
+----------------------+
126
166
+----------------------+
127
167
| Aggregate signatures |
128
168
+----------------------+
129
169
| Hash: Blake2b 512 |
130
170
+----------------------+
131
-
k = 554 | m = 3597 | nr parties = 3000; 133936 bytes (old version = 419808 bytes)
171
+
k = 554 | m = 3597 | nr parties = 3000; 133936 bytes
132
172
+----------------------+
133
173
| Hash: Blake2b 256 |
134
174
+----------------------+
135
-
k = 554 | m = 3597 | nr parties = 3000; 113728 bytes (old version = 261488 bytes)
0 commit comments