Skip to content

Zeroize stack copies in key deserialization and decap - #112

Merged
rozbb merged 1 commit into
rozbb:mainfrom
emil-wire:zeroize-deserialization-locals
Jul 20, 2026
Merged

Zeroize stack copies in key deserialization and decap#112
rozbb merged 1 commit into
rozbb:mainfrom
emil-wire:zeroize-deserialization-locals

Conversation

@emil-wire

Copy link
Copy Markdown
Contributor

In the X-Wing and X25519 PrivateKey::from_bytes, the fixed-size array is Copy, so constructing the key leaves an unzeroized copy of the secret behind. In the ML-KEM/NIST-P hybrids, ss_pq is an Array<u8, U32>, which is not zeroize-on-drop.

Just a small defense in depth measure.

@rozbb
rozbb merged commit 57b14d8 into rozbb:main Jul 20, 2026
13 checks passed
@rozbb

rozbb commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Thank you!

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