Make poly_pointwise_montgomery destructive#1067
Merged
mkannwischer merged 1 commit intomainfrom Apr 29, 2026
Merged
Conversation
923c839 to
554f977
Compare
Contributor
CBMC Results (ML-DSA-44, REDUCE-RAM)
Full Results (197 proofs)
|
Contributor
CBMC Results (ML-DSA-65)Full Results (197 proofs)
|
Contributor
CBMC Results (ML-DSA-65, REDUCE-RAM)
Full Results (197 proofs)
|
Contributor
CBMC Results (ML-DSA-87)
Full Results (197 proofs)
|
Contributor
CBMC Results (ML-DSA-44)Full Results (197 proofs)
|
Contributor
CBMC Results (ML-DSA-87, REDUCE-RAM)
Full Results (197 proofs)
|
04147e7 to
39ec8f4
Compare
This was referenced Apr 29, 2026
a7eb2f7 to
6bbf9d1
Compare
Rework mld_poly_pointwise_montgomery from (c, a, b) to in-place
(a, b) where a := a * b * R^{-1} mod q. The change propagates through
the C wrapper, the native dispatcher, the Arm aarch64 and x86_64 AVX2
assembly, all call sites, the test harness, and the allocation
constants.
This allows eliminating one temporary polynomial in the the REDUCE_RAM
definition in polymat, and it will also enable further memory optimizations
in follow-up PRs.
CBMC harnesses are adjusted. HOL Light proofs are updated.
Signed-off-by: Matthias J. Kannwischer <matthias@zerorisc.com>
87b9244 to
b70053d
Compare
hanno-becker
approved these changes
Apr 29, 2026
Contributor
hanno-becker
left a comment
There was a problem hiding this comment.
In sign.c it seems that perhaps further memory optimizations can be unlocked -- I didn't check in detail -- but this may be what you're alluding to in the PR description?
Otherwise, this looks clean to me. Sweet that the proofs just continue working.
Contributor
Author
Yes, one of the optimizations will be done for verification in #1007. |
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.
Rework mld_poly_pointwise_montgomery from (c, a, b) to in-place (a, b) where a := a * b * R^{-1} mod q. The change propagates through the C wrapper, the native dispatcher, the Arm aarch64 and x86_64 AVX2 assembly, all call sites, the test harness, and the allocation constants.
This allows eliminating one temporary polynomial in the the REDUCE_RAM definition in polymat, and it will also enable further memory optimizations in follow-up PRs.
CBMC and HOL Light proofs are not yet updated.