Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the RNG argument from Round::receive_message() #83

Merged
merged 1 commit into from
Jan 5, 2025

Conversation

fjarri
Copy link
Member

@fjarri fjarri commented Jan 5, 2025

Originally it was added to support a single ZK proof in synedrion where the verification required an RNG. The reason it did was to only pass it to crypto_primes::is_prime_with_rng(). After some consideration, I think it was not a correct way to handle that.

Since we want to be able to generate verifiable evidence for every receive_message() error, the outcome of receive_message() cannot be random (or we would have to store the RNG state which we don't have access to). If some of its internals need an RNG, it should construct one using shared_randomness, AssociatedData, or whatever else would be available during evidence verification, as a seed.

Specifically for primality checking, it seems that there is no need for an RNG at all (see entropyxyz/crypto-primes#21), although this method is too new and is not included in FIPS recommendations.

@fjarri fjarri force-pushed the no-rng-for-receive branch from c2a3c8b to c28d772 Compare January 5, 2025 08:20
@coveralls
Copy link

coveralls commented Jan 5, 2025

Pull Request Test Coverage Report for Build 12617911790

Details

  • 9 of 10 (90.0%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.1%) to 69.72%

Changes Missing Coverage Covered Lines Changed/Added Lines %
manul/src/combinators/chain.rs 3 4 75.0%
Totals Coverage Status
Change from base Build 12574035187: -0.1%
Covered Lines: 1819
Relevant Lines: 2609

💛 - Coveralls

@fjarri fjarri merged commit 80b6b5b into entropyxyz:master Jan 5, 2025
8 checks passed
@fjarri fjarri deleted the no-rng-for-receive branch January 5, 2025 17:53
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.

2 participants