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

Secret Independence for ML-KEM and ML-DSA #453

Open
karthikbhargavan opened this issue Jul 30, 2024 · 3 comments
Open

Secret Independence for ML-KEM and ML-DSA #453

karthikbhargavan opened this issue Jul 30, 2024 · 3 comments
Assignees

Comments

@karthikbhargavan
Copy link
Contributor

karthikbhargavan commented Jul 30, 2024

We need to prove secret-independence for the code in libcrux-ml-kem and libcrux-ml-dsa
This will require merging some ongoing work in https://github.com/hacspec/hax/tree/karthik/secret-integers

@karthikbhargavan
Copy link
Contributor Author

We never got around to doing this.

@karthikbhargavan karthikbhargavan changed the title Secret Independence for libcrux-ml-kem Secret Independence for ML-KEM and ML-DSA Sep 16, 2024
@franziskuskiefer
Copy link
Member

  • Check C and compiled versions
  • Consolidate and write up our story
  • Automate checks

@karthikbhargavan
Copy link
Contributor Author

  • I have created a new branch: https://github.com/cryspen/libcrux/tree/libcrux-secret-independence/libcrux-ml-kem
  • The secret independence (aka secret integers) crate is now here: https://github.com/cryspen/libcrux/tree/libcrux-secret-independence/libcrux-secret-independence
  • I extended libcrux-intrinsics to support secret-independent SIMD instructions: use avx2_secret and neon_secret modules to get the secret independent versions
  • This branch uses secret integers throughout libcrux-sha3, which is proved to be secret independent (yay!)
  • Now all SHA-3 functions expect &[U8] and produce arrays of [U8]
  • I propagated the use of SHA-3 throughout libcrux, resulting in changes to ML-KEM and ML-DSA
  • For now the pattern for using SHA-3 is: first classify the input, call SHA-3, then declassify the output
  • As more code becomes secret independent, we can move this classification dance higher and higher till it only applies to user inputs and outputs
  • There is some bug in psq that seems unrelated and needs fixing.
  • I did not propagate the changes to the old Kyber code yet.

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

No branches or pull requests

3 participants