Skip to content

Conversation

@fjarri
Copy link
Collaborator

@fjarri fjarri commented Jul 23, 2025

Use static rounds from entropyxyz/manul#117 and helpers from entropyxyz/manul#113

Also fixes #216 (static round methods use impl CryptoRngCore)

@fjarri fjarri self-assigned this Jul 23, 2025
@fjarri fjarri force-pushed the static-rounds branch 2 times, most recently from 0e36343 to d455ffd Compare July 30, 2025 21:29
@fjarri fjarri force-pushed the static-rounds branch 3 times, most recently from 74a3c0a to ee9eb2b Compare August 31, 2025 20:58
@codecov
Copy link

codecov bot commented Aug 31, 2025

Codecov Report

❌ Patch coverage is 96.23777% with 50 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.18%. Comparing base (92fb92e) to head (5d85bdb).
⚠️ Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
src/protocols/key_resharing.rs 47.16% 28 Missing ⚠️
...protocols/misbehavior_tests/interactive_signing.rs 93.65% 16 Missing ⚠️
src/curve/ecdsa.rs 0.00% 2 Missing ⚠️
src/protocols/key_refresh.rs 99.21% 2 Missing ⚠️
src/protocols/aux_gen.rs 99.32% 1 Missing ⚠️
src/protocols/key_init.rs 99.05% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #226      +/-   ##
==========================================
- Coverage   90.60%   89.18%   -1.43%     
==========================================
  Files          50       47       -3     
  Lines       10759     8403    -2356     
==========================================
- Hits         9748     7494    -2254     
+ Misses       1011      909     -102     

☔ 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.

@fjarri fjarri force-pushed the static-rounds branch 3 times, most recently from 7db7079 to ea905c5 Compare September 1, 2025 05:49
@fjarri fjarri marked this pull request as ready for review September 4, 2025 18:13
@github-actions
Copy link

github-actions bot commented Sep 6, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

Copy link
Contributor

@dvdplm dvdplm left a comment

Choose a reason for hiding this comment

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

LGTM

}
}

/// Reconstruct `rid` from echoed messages
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// Reconstruct `rid` from echoed messages
// Reconstruct `rid` from echoed messages

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I intended it to be a doc comment, I think that's fine?

Comment on lines +250 to +251
let r2_ebs = messages.combined_echos::<Round2<P, Id>>(2)?;
let r2_eb = messages.previous_echo_broadcast::<Round2<P, Id>>(2)?;
Copy link
Contributor

Choose a reason for hiding this comment

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

We discussed this a fair bit during the manul review, but I nonetheless was surprised to see that we have to pass in the 2 here. It's a wart. :/

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The consequence of one round type being able to be used for several actual rounds.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah I understand it, but still had to pause. It's just a bit of an oddity. Maybe if rounds had "functional" names it'd be less jarring? Like, dunno, "KeyInitRound", "ReshareRound", etc

@@ -47,6 +39,35 @@ use crate::{
},
};

/// Analogous to `Iterator::sum()`, but requires a non-empty iterator
/// (so that it can be used for types with no `default()`, like `Ciphertext`)
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure I understand this comment about Default. Wouldn't an impl Sum for CipherText work?

impl<P: PaillierParams> Sum for Ciphertext<P> {
    fn sum<I: Iterator<Item = Self>>(mut iter: I) -> Self {
        let mut result = iter.next().unwrap();
        for item in iter {
            result = result + item;
        }
        result
    }
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It'll panic for an empty iterator, and the purpose of these functions is to have a Result instead. We can't return Result from sum().

@fjarri
Copy link
Collaborator Author

fjarri commented Sep 12, 2025

I have read the CLA Document and I hereby sign the CLA

@fjarri fjarri merged commit b238a73 into entropyxyz:master Sep 12, 2025
11 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 12, 2025
@fjarri fjarri deleted the static-rounds branch September 12, 2025 16:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove BoxedRng when all the dependencies take impl CryptoRngCore + ?Sized arfuments

2 participants