Skip to content

Commit e0be42f

Browse files
authored
Revised size and time estimates for votes/certs in tech report (#120)
1 parent 91b1a3b commit e0be42f

File tree

2 files changed

+47
-27
lines changed

2 files changed

+47
-27
lines changed

Logbook.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Leios logbook
22

3-
## 2024-12-26
3+
## 2024-12-27
4+
5+
### Votes and certificates
6+
7+
- Updated size estimates for votes.
8+
- Added CPU time estimates for BLS votes and certificates.
9+
- Wrote technical report sections on BLS and MUSEN certificates.
410

511
### Sortition
612

docs/technical-report-1.md

+40-26
Original file line numberDiff line numberDiff line change
@@ -271,36 +271,40 @@ The next subsections contain preliminary analyses of concerns and potential deci
271271

272272
Conceptually, a Leios vote contains the following information:
273273

274-
- The hash of the EB being voted for
275-
- The identity of the voter
276-
- The number of votes cast
277-
- A proof that the votes cast are valid
278-
- A signature
274+
- The hash of the EB being voted for.
275+
- The identifier for the pipeline.
276+
- This could be omitted because it can be inferred from the EB.
277+
- The identity of the voter.
278+
- The number of votes cast.
279+
- A proof that the votes cast are valid.
280+
- A signature.
279281

280-
When collecting votes for the same EB, the hash of the EB would only have to be listed once for the whole set. This will save 32 bytes per vote serialized. Note the EB presumably includes information about which pipeline it belongs to, so that information does not also be included in the vote. So, a minimalist vote might only comprise 146 bytes of core information, not counting the hash of the EB.
282+
When collecting votes for the same EB, the hash of the EB and the identifier for the pipeline would only have to be listed once for the whole set. This will save 64 bytes per vote serialized. So, a minimalist vote might only comprise 209 bytes of core information, not counting the hash of the EB.
281283

282284
- *Voter identity:* 32 bytes
283-
- *Number of votes cast:* 2 bytes
284-
- *Proof of right to vote:* 80 bytes
285-
- *Signature:* 32 bytes
285+
- *Number of votes cast:* 1 bytes
286+
- *ECVRF signature on pipeline identifier and nonce:* 80 bytes
287+
- *Compressed BLS12-381 signature:* 96 bytes
286288

287-
The above assumes that the keys for verifying the signature have already been transmitted. If the signature were a full KES signature, then it would be at least 416 bytes instead of 32 bytes, though the signed time of 32 bytes would be common to all votes of a given pipeline.
289+
The above assumes that the keys for verifying the signature and the proof of possession have already been transmitted. These would need to be registered on the chain, presumably on the Praos chain.
290+
291+
Instead of ephemeral keys, if the signature were a full KES signature, then it would be at least 448 bytes instead of 96 bytes, though the signed time of 32 bytes would be common to all votes of a given pipeline.
288292

289293
- Signed time: 32 bytes
290294
- Verification key: 32 bytes
291-
- Signature
295+
- KES Signature
292296
- Merkle path (verification key hashes): 7 × 32 = 224 bytes
293297
- Additional verification key: 32 bytes
294298
- Ed25519
295299
- Public key: 32 bytes
296-
- Two points: 2 × 32 = 64 bytes
300+
- Two points: 2 x 64 = 128 bytes
297301

298-
So, we have two scenarios for the minimal size of a vote.
302+
Much of larger size of the KES signature size comes from the Merkle path needed to prove the currently active key. If voting occurs frequently in Leios, that proof would be repeated many times using the 36-hour KES period. Perhaps that proof would only have to be recorded in a certificate during the node's first vote during a KES period. Also, MUSEN is an alternative to KES, but it still suffers from large descriptions of the evolved keys. So, in essence, we have two scenarios for the minimal size of a vote.
299303

300-
| Method | Common to all votes for a given EB | Specific to individual vote | Total |
301-
| -------------- | ---------------------------------: | --------------------------: | ----- |
302-
| Ephemeral keys | 32 B | 146 B | 178 B |
303-
| KES complete | 64 B | 498 B | 562 B |
304+
| Method | Common to all votes for a given EB | Specific to individual vote | Total | Comments |
305+
| ------------- | ---------------------------------: | --------------------------: | ----- | -------------------------------------------------------------------------- |
306+
| Ephemeral key | 32 B | 209 B | 241 B | The ephemeral keys would have to have been registered on-chain. |
307+
| KES key | 64 B | 529 B | 593 B | The KES Merkle path for stays constant for one KES period (e.g, 36 hours). |
304308

305309
However, it has not been decided what types of keys and signatures will be used for Leios votes. Key considerations are . . .
306310

@@ -492,20 +496,27 @@ Using the previously mentioned ALBA parameters and setting $n_p / n = 0.9$, we s
492496

493497
#### BLS certificate
494498

499+
The BLS certificate describe in the Leios paper does not compress votes the way that ALBA does, so votes must be fully stored in the certificate. However, only a quorum of votes, not all of them, need to be stored, which affords a type of compression. Additionally, two aggregate signature must also be stored. A certificate for a quorum of votes attested by ephemeral keys would fit in a Praos block, but a certificate attested by KES keys is about 50% too large.
495500

496-
> [!IMPORTANT]
497-
>
498-
> - [ ] To be written
501+
| Method | Common to all votes | Specific to individual vote | Aggregation | Number of votes | Certificate of all votes | Quorum | Certificate of quorum |
502+
| ------------- | ------------------: | --------------------------: | ----------: | --------------: | -----------------------: | -----: | --------------------: |
503+
| Ephemeral key | 32 B | 209 B | 192 B | 500 | 105 kB | 60% | 63 kB |
504+
| KES key | 64 B | 529 B | 192 B | 500 | 265 kB | 60% | 159 kB |
499505

506+
Also recall that any ephemeral keys would have to be registered on-chain, consuming additional precious space and complicating bookkeeping: that would only provide benefit if the keys were reused for many votes. It might also be possible to only store the Merkle proof for the KES key only at the start of the KES period (e.g., every 36 hours).
500507

501-
#### MUSEN certificate
508+
The construction and verification times below are based on previous experience with Mithril certificates:
502509

503-
> [!IMPORTANT]
504-
>
505-
> - [ ] To be written
506-
> - [ ] Include benchmark results
510+
| Metric | Value |
511+
| ----------------------------------- | ----- |
512+
| Proving time (per vote) | 70 ms |
513+
| Aggregation time (per certificate) | 1.2 s |
514+
| Verification time (per certificate) | 17 ms |
515+
516+
517+
#### MUSEN certificate
507518

508-
[MUSEN](https://iohk.io/en/research/library/papers/musen-aggregatable-key-evolving-verifiable-random-functions-and-applications/) ("MUlti-Stage key-Evolving verifiable random fuNctions.") builds upon the concept of VRFs by introducing a key-evolving feature and allowing for aggregating VRF outputs. The aggregation capability promises to result in small certificates attesting to the Leios votes. However, verification times may be to long for Leios.
519+
[MUSEN](https://iohk.io/en/research/library/papers/musen-aggregatable-key-evolving-verifiable-random-functions-and-applications/) ("MUlti-Stage key-Evolving verifiable random fuNctions.") builds upon the concept of VRFs by introducing a key-evolving feature and allowing for aggregating VRF outputs. The aggregation capability promises to result in small certificates attesting to the Leios votes, MUSEN suffers from the need to record all of the verification keys (e.g., in a Merkle tree). MUSEN signature are approximately the same size as KES signatures. However, verification times may be too long for Leios. Overall, the benefit of MUSEN's key evolution is minor and its other resource costs may be greater than plain BLS.
509520

510521

511522
### Insights regarding voting and certificates
@@ -519,6 +530,9 @@ Using the previously mentioned ALBA parameters and setting $n_p / n = 0.9$, we s
519530
1. Each has at least one strength and one drawback related to certificate size, proof time, or verification time.
520531
2. ALBA is close to being viable if vote size can reduced or if quorum disruption by adversaries with 10% of stake is acceptable.
521532
3. An ALBA security setting of $\ell_\text{sec} = \ell_\text{rel} = 80$ (i.e., eighty-bit security) seems sufficient for Leios voting.
533+
4. BLS is viable if ephemeral keys are used, but those would require pre-registration.
534+
5. BLS with KES keys could work if oversized Praos blocks (~160 kB) are allowed.
535+
6. ZK variants would result in small certificates but long proving times.
522536
3. At least 500 votes and a 60% quorum will be needed.
523537
1. These parameters ensure voting security at least as strong as Praos security over a range of adversary strengths.
524538
3. ALBA would require a larger quorum.

0 commit comments

Comments
 (0)