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

Add proofs for Ind_cpa functions #630

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

mamonet
Copy link
Member

@mamonet mamonet commented Oct 14, 2024

This PR adds spec for unpacked functions and writes full proofs for Ind_cpa functions.

Note there's a mismatch between the spec and implementation for generate_keypair function, I will confirm the right procedure and upload the changes for this function.

@mamonet
Copy link
Member Author

mamonet commented Oct 14, 2024

generate_keypair calls Scheme::cpa_keygen_seed which have the following post-condition https://github.com/cryspen/libcrux/blob/Ind-cpa-proofs-refined/libcrux-ml-kem/src/variant.rs#L97-L99
However, generate_keypair spec has different parameter for v_G https://github.com/cryspen/libcrux/blob/dev/libcrux-ml-kem/proofs/fstar/spec/Spec.MLKEM.fst#L226
I modified the spec here https://github.com/cryspen/libcrux/blob/Ind-cpa-proofs-refined/libcrux-ml-kem/proofs/fstar/spec/Spec.MLKEM.fst#L238
@karthikbhargavan is the new spec supposed to be right?

@karthikbhargavan
Copy link
Contributor

Good catch, FIPS 203 says: : (𝜌,𝜎) ← G(𝑑‖𝑘)
Which is what the new fix does.

@karthikbhargavan karthikbhargavan merged commit b583513 into experiment-refined-ints Oct 22, 2024
28 checks passed
@karthikbhargavan karthikbhargavan deleted the Ind-cpa-proofs-refined branch October 22, 2024 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants