-
Notifications
You must be signed in to change notification settings - Fork 71
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
Memory cleanup of sensitive data #122
Comments
We should check crates.io for any potential helpful crates. |
Also, once this is done, some documentation should be added about this. Do we need to add anything in the threat-model about potentially leaking data (Heartbleed-style)? |
You should probably use https://github.com/iqlusioninc/crates/tree/develop/zeroize - @tarcieri has done a lot of work on secure zeroing and making sure it doesn't get optimised out which is a hard problem. |
Note that |
Thanks for the tips! We'll make sure to get this in before any prod use. The |
Based on the PSA spec which says
we should wipe out all memory allocated during operations |
My proposal here would be to use In this way we do not have to concern ourselves with the cleanup process after the variable creation. @hug-dev - thoughts on this? |
That seems like a good idea! We should try and prototype it on a few values. I have a few thoughts:
|
Tbh it seems a lot of the types we handle as temporary values are defined by us so we can just implement I think I'll start with the |
We did implement zeroing on most of our types but I forgot which repos are left out: probably |
Yeah, and |
Can we get a precise definition of exactly what (remaining) work is needed here? |
I think this one is known: it is about going through all structures of Parsec, checking if they contain any confidential information/secrets and if they do, wrap them in a |
From the PSA Crypto API version 1.0.0, section 6.3.3:
We should make sure that all of our data structures that contain confidential information are cleared once they are no longer used.
An implementation of
Drop
could handle that.The text was updated successfully, but these errors were encountered: