DkgPublicShares's signed hash skips the PolyCommitment ID proofs and has no length prefixes
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- rust
- Domain
- backend-api-design, cryptography
Research direction
Find the Signable implementation for DkgPublicShares and the dkg_public_shares_digest encoding introduced in #248. Compare the fields and list encoding, then update the signed hash to cover every PolyCommitment field with length prefixes. Done means the hash matches the digest's field coverage and the wire-breaking change is scheduled for 16.0.0; the issue also suggests auditing other Signable implementations.
Written by the indexing model from the issue text.
Description
Problem
impl Signable for DkgPublicShares hashes dkg_id, signer_id, the kex key and proof, and for each commitment the party_id and the polynomial points. It does not hash comm.id at all (the Schnorr ID scalar and its proof R, s), and none of the lists are length-prefixed. So the packet signature does not cover the proof of knowledge of the constant term, which is exactly the proof the coordinator and signers verify and the whitepaper's security argument relies on. A relay could alter the proof without invalidating the packet signature; the proof itself would then fail verification, so this is a hardening gap rather than an exploit, but it is the one part of a public share the signature leaves open.
This is why the digest introduced in #248 uses its own encoding (every field, length-prefixed) instead of reusing the Signable hash.
Fix
Hash every field of each PolyCommitment, including the ID scalar and proof, with length prefixes on every list, in the same shape as dkg_public_shares_digest. Changes a signed hash, so wire-breaking; 16.0.0. Consider auditing the other Signable impls for the same omission at the same time.
- Dominant language
- Rust
- Stars
- 34
- Forks
- 19
- Avg merge
- 9h 19m
- Merged PRs (30d)
- 12
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from xoloki/wsts
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
xoloki/wsts#256 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
Similar issues
-
My Caps shows "Shared" on private Caps that were never sharedPossibly taken @AksharP5 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
CapSoftware/Cap#4569 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Document Web UIOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
parquet: reject truncated BYTE_STREAM_SPLIT numeric pages instead of silently fabricating valuesOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day