Skip to content

ml_kem: Enable zeroization#51

Merged
tarcieri merged 3 commits into
RustCrypto:masterfrom
bifurcation:zeroize
Aug 17, 2024
Merged

ml_kem: Enable zeroization#51
tarcieri merged 3 commits into
RustCrypto:masterfrom
bifurcation:zeroize

Conversation

@bifurcation

Copy link
Copy Markdown
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
Comment thread ml-kem/src/kem.rs
@tarcieri tarcieri mentioned this pull request Aug 16, 2024
bifurcation and others added 2 commits August 17, 2024 16:32
Co-authored-by: Tony Arcieri <bascule@gmail.com>
@bifurcation

Copy link
Copy Markdown
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
@tarcieri

Copy link
Copy Markdown
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