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

ml_kem: Enable zeroization #51

Merged
merged 3 commits into from
Aug 17, 2024
Merged

Conversation

bifurcation
Copy link
Contributor

I'm not totally sure I understand the zeroize crate and its sharp edges, but I think this implements zeroization correctly. Basically just starts at kem::DecapsulationKey and works down the stack from there.

@bifurcation bifurcation marked this pull request as ready for review August 16, 2024 21:51
@bifurcation bifurcation requested a review from tarcieri August 16, 2024 21:51
ml-kem/src/kem.rs Outdated Show resolved Hide resolved
@tarcieri tarcieri mentioned this pull request Aug 16, 2024
@bifurcation
Copy link
Contributor Author

Thanks for the explanation @tarcieri. I accepted your proposed change, and removed the ZeroizeOnDrop impls for the internal types. So that leaves us in the following state:

  • Internal types (in pke.rs and algebra.rs) implement Zeroize
  • The public DecapsulationKey type implements Drop (with Zeroize calls) and ZeroizeOnDrop

@tarcieri tarcieri merged commit a75d842 into RustCrypto:master Aug 17, 2024
23 checks passed
@tarcieri
Copy link
Member

I can cut a v0.2.1 with this feature

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