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

Improve secret key memory management #328

Merged
merged 4 commits into from
Oct 25, 2021
Merged

Improve secret key memory management #328

merged 4 commits into from
Oct 25, 2021

Conversation

clehner
Copy link
Contributor

@clehner clehner commented Oct 20, 2021

Continuing from #327: use zeroize during Ed25519 key generation (ring crate). I don't see Zeroize needed for ed25519-dalek, p256 and k256 key generation, but made some minor changes in there too.

Copies of key material are made when converting to crate-native types for signing. Those external types (e.g. RsaKeyPair) don't necessarily implement zeroize. So to clear them I added use of the clear_on_drop crate, to clear one stack page after performing signing.

@clehner clehner requested a review from sbihel October 21, 2021 12:54
@clehner clehner merged commit aeea9f4 into main Oct 25, 2021
@clehner clehner deleted the feat/key-secrecy branch October 25, 2021 18:20
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