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

Add ZeroizeOnDrop support for Strobe. #4

Merged
merged 2 commits into from
Feb 13, 2022
Merged

Add ZeroizeOnDrop support for Strobe. #4

merged 2 commits into from
Feb 13, 2022

Conversation

codahale
Copy link
Contributor

@codahale codahale commented Jan 17, 2022

This adds a derived ZeroizeOnDrop implementation for Strobe, allowing for the state to be securely erased in memory once an instance is dropped.

@codahale codahale changed the title Add Zeroize support for Strobe objects. Add ZeroizeOnDrop support for Strobe. Jan 18, 2022
@rozbb
Copy link
Owner

rozbb commented Feb 13, 2022

Hi, I apologize for the delay. This is great! Do you think it'd be possible to also impl Zeroize on OpFlags as well, just for the sake of completion (that way it doesn't have to be #[zeroize(skip)]'d)? The protocol state of a STROBE session might be considered just as private as the sponge state.

@codahale
Copy link
Contributor Author

Good point. The derive macro doesn’t play nice with bitflags, so I added a concrete impl for Zeroize.

@rozbb rozbb merged commit 3a6cb4e into rozbb:master Feb 13, 2022
@rozbb
Copy link
Owner

rozbb commented Feb 13, 2022

Fantastic, thank you!

@codahale codahale deleted the zeroize-support branch February 13, 2022 21:17
@codahale
Copy link
Contributor Author

Thanks for writing and maintaining this library!

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.

None yet

2 participants