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 zeroize support #3

Open
jac-cbi opened this issue Oct 16, 2024 · 0 comments
Open

Add zeroize support #3

jac-cbi opened this issue Oct 16, 2024 · 0 comments

Comments

@jac-cbi
Copy link

jac-cbi commented Oct 16, 2024

I opened this discussion against liboqs-rust #269, but since it seems to be unmaintained, I'll open it here.

From my analysis of the code in safe-oqs, safe-oqs-sys, and liboqs, it seems that sensitive buffers like PrivateKey and SharedSecret aren't being properly zeroed out after use.

I'm basing this assessment on the fact that the buffers are initialized in Rust code (see newtype_buffer!() in macro.rs, but without an implementation of Drop.

If my assessment is correct, should we derive Zeroize and implement Drop for sensitive buffers? Or, implement Drop and call the liboqs OQS_MEM_secure_free()? My gut says that since the buffers are created in Rust, we should use the Rust zeroize crate.

Edit: please '@' me, as GitHub isn't in my daily workflow

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

No branches or pull requests

1 participant