Skip to content

Conversation

@SimonRastikian
Copy link
Contributor

Closes #99

@codecov-commenter
Copy link

codecov-commenter commented Dec 10, 2025

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.91%. Comparing base (1982f1b) to head (4db8fb7).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/dkg.rs 33.33% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #254   +/-   ##
=======================================
  Coverage   87.91%   87.91%           
=======================================
  Files          51       51           
  Lines        9787     9787           
  Branches     9787     9787           
=======================================
  Hits         8604     8604           
  Misses        733      733           
  Partials      450      450           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SimonRastikian SimonRastikian self-assigned this Dec 12, 2025
Copy link
Collaborator

@netrome netrome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great to have this documented. I have some thoughts and questions. Only blocker is that we don't define the lambda (lagrange coefficient?) before using it making it unclear to me as a reader what it means. There could be more things. I don't understand what the hashes we send in step 12 and 13 help with either.

Comment on lines +22 to +26
## Types of Thresholds

There are two types of thresholds one has to be aware of: the **asynchronous distributed systems threshold** a.k.a. the **BFT threshold**, and the **cryptography threshold** a.k.a. the **reconstruction threshold**.

The BFT threshold states that the maximum number of faulty nodes a distributed system ($\mathsf{MaxFaulty}$) can tolerate while still reaching consensus is at most one-third of the total number of participants $N$. More specifically:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I like that we're getting into the threshold types here but I wonder if it's relevant for the DKG algorithm. MaxFaulty is unused so I think we could move this part of the discussion to an appendix or similar since it's still interesting. For the purpose of understanding the DKG we only need to know the MaxMalicious parameter which in this case is the reconstruction lower bound - 1 as per our conversation yesterday.

Also, I think we take the reconstruction bound as input in the code but we talk abut max malicious here. Is that correct? I wonder if we should consider migrating to use max malicious as input to the dkg protocol in the future (which is a bit of a tricky change to do safely).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the purpose of understanding the DKG we only need to know the MaxMalicious parameter which in this case is the reconstruction lower bound - 1 as per our conversation yesterday.

I see that the MaxFaulty is also essential to the understanding of the algorithm. I suggest I keep this section but I definitely expand things in #98 and #18

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I think we take the reconstruction bound as input in the code but we talk abut max malicious here. Is that correct? I wonder if we should consider migrating to use max malicious as input to the dkg protocol in the future (which is a bit of a tricky change to do safely).

Could you pinpoint the spot in the implementation where we talk about reconstruction bound?

Co-authored-by: Mårten Blankfors <[email protected]>
Copy link
Contributor

@gilcu3 gilcu3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as in the EdDSA docs, to properly review this I need to check that it coincides bit by bit with the implementation. To make that task doable for me (and for future crate users) we need to include the step numbers in the code. After that is done I can then go ahead and make a proper review.

Comment on lines -72 to 76
/// H(id, `context_string`, g^{secret} , R)
/// H(`domain_separator`, id, g^{secret} , R)
fn challenge<C: Ciphersuite>(
session_id: &HashOutput,
domain_separator: u32,
session_id: &HashOutput,
id: Scalar<C>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it strange that the domain separator is of type u32. Shouldn't it be [u8; 4]?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reasoning behind this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we use it only as bytes later for example. And one of the important characteristics of domain separators is exactly that they have fixed width, so why have them as u32?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add doc for dkg

5 participants