Repository navigation
fix(DiffieHellman): reject mismatched moduli - #1042
Merged
fmontesi merged 1 commit intoOct 6, 2026
Merged
Conversation
SamuelSchlesinger
requested review from
arademaker,
chenson2018,
crei,
fmontesi and
sorrachai
as code owners
October 3, 2026 03:35
fmontesi
pushed a commit
that referenced
this pull request
Oct 6, 2026
The correctness statement assumed that the initial network reached `0` in one transition, which is impossible. Use `MTr` so the statement covers complete executions. Adds a regression proof constructing a four-step execution from any initial store, with both final keys equal to `g ^ (a * b)`. Depends on #1042 (the modulus-check fix); this PR targets that branch. Implemented with Codex.
SamuelSchlesinger
added a commit
that referenced
this pull request
Oct 7, 2026
The evaluator expressed modulus equality as an implication, so a call with the wrong modulus accepted every result. Require modulus equality together with the expected computed value. Adds a regression check rejecting every result for both functions when the modulus differs, while retaining the valid role-evaluation checks. The field elements already have type `ZMod params.p`, so the corrected relation also avoids the old dependent casts. Depends on #1041 (the role-exponent fix); this PR targets that branch. Implemented with Codex.
SamuelSchlesinger
added a commit
that referenced
this pull request
Oct 7, 2026
The correctness statement assumed that the initial network reached `0` in one transition, which is impossible. Use `MTr` so the statement covers complete executions. Adds a regression proof constructing a four-step execution from any initial store, with both final keys equal to `g ^ (a * b)`. Depends on #1042 (the modulus-check fix); this PR targets that branch. Implemented with Codex.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The evaluator expressed modulus equality as an implication, so a call with the wrong modulus accepted every result. Require modulus equality together with the expected computed value.
Adds a regression check rejecting every result for both functions when the modulus differs, while retaining the valid role-evaluation checks. The field elements already have type
ZMod params.p, so the corrected relation also avoids the old dependent casts.Depends on #1041 (the role-exponent fix); this PR targets that branch.
Implemented with Codex.