-
Notifications
You must be signed in to change notification settings - Fork 41
Refactor mlk_polymat_permute_bitrev_to_custom #1336
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
base: main
Are you sure you want to change the base?
Conversation
18ed177 to
28046a2
Compare
|
This proves fine in a couple of seconds for MLKEM_K=3, but spins forever for MLKEM_K=2 and MLKEM_K=4: Makes no sense to me. |
|
Since we introduced struct wrappers around mlk_polyvec and mlk_polymat, the latter is now a struct that contains a K-element array of structs, each of which contains a single K-element array of mlk_poly. This new code is trying to treat that as a single-dimensional array of K*K mlk_poly's by the look of it. That's bound to cause serious complications for CBMC. Try a nested loop, so the code structure matches the data structure. |
cc0d751 to
782e470
Compare
|
@mkannwischer Can you comment on state/plans for this? |
See pq-code-package/mldsa-native#770 - we are waiting for diffblue/cbmc#8705 to be merged. @willieyz, could you rebase this PR and also include the experimental branch of CBMC so we can confirm that the proofs pass with that version. |
Yes, I can do it. |
9c47daa to
6ce031c
Compare
This commit refactors mlk_polymat_permute_bitrev_to_custom to not require the helper function mlk_polyvec_permute_bitrev_to_custom. The function was only needed due CBMC limitations. Also updates CBMC to trial new build (CBMC PR[#8705](https://github.com/pq-code-package/mlkem-native/issues/8705)) that solves performance problem for this proof. Simplify polymat_permite_bitrev_to_customer() (native version) The code structure now mimics the data structure to make proof tractable. Also updates Makefile for this proof in line with the similar function in mldsa-native. Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu> Signed-off-by: Rod Chapman <rodchap@amazon.com> Signed-off-by: willieyz <willie.zhao@chelpis.com>
Signed-off-by: willieyz <willie.zhao@chelpis.com>
6ce031c to
1745ecc
Compare
mlk_polymat_permute_bitrev_to_customand prove monolithically #1375This commit refactors mlk_polymat_permute_bitrev_to_custom to not require the helper function mlk_polyvec_permute_bitrev_to_custom. The function was only needed due CBMC limitations.