[ML-DSA] Runtime Safety Annotations#187
Open
jschneider-bensch wants to merge 22 commits into
Open
Conversation
This switches most of the arithmetic to `wrapping_*`, which simplifies the proofs.
[mldsa/proofs] WIP: Lax check invntt montgomery only
jschneider-bensch
force-pushed
the
jonas/mldsa-runtime-safety
branch
from
June 29, 2026 14:17
cfc1a44 to
f3bdeff
Compare
Contributor
Author
|
The proofs pushes my current machine with 32gb RAM quite close to the limit of available memory, so I'm not sure this is something we can run on CI. I think the issue comes from |
jschneider-bensch
marked this pull request as ready for review
June 29, 2026 14:39
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.
This PR adds runtime safety annotations for parts of ML-DSA. It covers:
portableimplementation of theOperationstrait, i.e. arithmetic, encoding, sampling, (i)NTTOperations, everything in the top-level modulespolynomialandntt.encoding::signatureI would have liked to include
encoding::signaturein this as well, but in particular the pre-conditions for hint (de)serialization are quite complicated and would require significant re-organization of the module. Theproofsbranch of mainline libcrux offers a preview of what is needed at the minimum, if you allow raw F* annotations (which we want to avoid here) and even there, I believe panic freedom is currently established only for deserialization and there is not the additional stack-optimized implementation to take into account.