libcrux
libcrux copied to clipboard
Secret Independence for ML-KEM and ML-DSA
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
We never got around to doing this.
- [ ] Check C and compiled versions
- [ ] Consolidate and write up our story
- [ ] Automate checks
- 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_secretandneon_secretmodules 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.
This issue has been marked as stale due to a lack of activity for 60 days. If you believe this issue is still relevant, please provide an update or comment to keep it open. Otherwise, it will be closed in 7 days.
https://github.com/cryspen/libcrux/tree/franziskus/secret-arrays is a branch with all the things in a crate and some propagation to sha3.
This issue has been marked as stale due to a lack of activity for 60 days. If you believe this issue is still relevant, please provide an update or comment to keep it open. Otherwise, it will be closed in 7 days.
This issue has been closed due to a lack of activity since being marked as stale. If you believe this issue is still relevant, please reopen it with an update or comment.