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

Cleanup Rust annotations for Generic ML-KEM #565

Closed
6 tasks done
karthikbhargavan opened this issue Sep 9, 2024 · 7 comments
Closed
6 tasks done

Cleanup Rust annotations for Generic ML-KEM #565

karthikbhargavan opened this issue Sep 9, 2024 · 7 comments
Assignees

Comments

@karthikbhargavan
Copy link
Contributor

karthikbhargavan commented Sep 9, 2024

The proofs for generic ML-KEM need to be made consistent with the latest Vector Trait annotations
and should be optimized so they do not run for memory and can be verified on CI.

@mamonet
Copy link
Member

mamonet commented Sep 9, 2024

I started a WIP branch for this issue https://github.com/cryspen/libcrux/tree/dev-generic-cleanup
Currently, it marks certain function in sampling.rs and serialize.rs as lax as they don't have proper pre-conditions yet (e.g. the functions in serialize need to adapt the new conditions on vector trait). The branch also aims to figure a solution for functions in
Ind_cca.rs and Ind_cpa.rs that get out of memory.

@mamonet
Copy link
Member

mamonet commented Sep 10, 2024

I pushed changes to dev-generic-cleanup branch that make sample_from_uniform_distribution_next and sample_from_binomial_distribution_2 functions panic-free in generic sampling.rs module, based on hax fold-step-boundary branch. I will create a PR once all functions in sampling.rs are panic-free (except for sample_from_xof that utilizes Rust_primitives.f_while_loop).

@mamonet
Copy link
Member

mamonet commented Sep 10, 2024

I fixed the bug in generic polynomail.rs that blocks verifying the extracted code of constant ZETAS_TIMES_MONTGOMERY_R and I removed Libcrux_ml_kem.Polynomial.fst from ADMIT_MODULES in Makefile

@franziskuskiefer
Copy link
Member

@karthikbhargavan @mamonet Looks like everything is ticked off here. Is there still something open or can this be closed?

@mamonet
Copy link
Member

mamonet commented Sep 19, 2024

I need to merge dev to these PRs and do some modifications to get them work.

@karthikbhargavan
Copy link
Contributor Author

lets tick this off once the prs are merged today and then continue afterwards

@mamonet
Copy link
Member

mamonet commented Sep 30, 2024

This issue is completed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

3 participants