Skip to content

argon2: wipe intermediate buffers - #933

Open
karalabe wants to merge 2 commits into
RustCrypto:masterfrom
karalabe:argon2-zeroize-2
Open

argon2: wipe intermediate buffers#933
karalabe wants to merge 2 commits into
RustCrypto:masterfrom
karalabe:argon2-zeroize-2

Conversation

@karalabe

@karalabe karalabe commented Sep 5, 2026

Copy link
Copy Markdown

Wipes various intermediate buffers. Also does a mut addition, otherwise we're passing and wiping a copy of initial_hash, but not the original.

@karalabe karalabe changed the title Argon2 zeroize 2 argon2: wipe intermediate buffers Sep 5, 2026
@newpavlov

Copy link
Copy Markdown
Member

Relevant comment.

@tarcieri
WDYT our policy should be in this regard? It may be worth to open a meta issue for this.

@karalabe

karalabe commented Sep 5, 2026

Copy link
Copy Markdown
Author

Hmm, yes, it's a can of worms

@tarcieri

tarcieri commented Sep 8, 2026

Copy link
Copy Markdown
Member

Yeah, perhaps we should open a meta-issue, but my inclination would continue to be to wipe the stack in a single pass at the end of the operation, instead of zeroing buffers as-you-go. It should be a lot more foolproof, because as your comment notes Rust makes it very easy to accidentally make copies of things.

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.

3 participants