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

zero-on-drop #2

Open
mcginty opened this issue Mar 20, 2017 · 5 comments
Open

zero-on-drop #2

mcginty opened this issue Mar 20, 2017 · 5 comments

Comments

@mcginty
Copy link
Owner

mcginty commented Mar 20, 2017

clear out sensitive key material from the stack when they're dropped

https://github.com/isislovecruft/curve25519-dalek/issues/11 for some options

@Ryman
Copy link

Ryman commented Feb 8, 2018

Updated link: dalek-cryptography/curve25519-dalek#11

@gedigi
Copy link

gedigi commented May 6, 2019

I was looking at implementing zeroize for the Keypair struct. However, it will affect callers as they'd not be able to move that struct (and members) anymore. What do you suggest? Would this be a major version change?

Also, for non-default resolver, the cleanest approach would be to zero memory as part of their library (similar to what Dalek does) and not at the snow layer.

Ref:

@fogti
Copy link
Contributor

fogti commented Mar 29, 2020

Can callers wrap that struct themselves in a Zeroizing (without restricting the usage in common cases)?

@tarcieri
Copy link
Contributor

If one of the existing impls Zeroize provides works on them yes. However, if the underlying types can be moved/copied, they will still leave copies in memory.

@mcginty
Copy link
Owner Author

mcginty commented Apr 5, 2020

@gedigi (one year later) I think that this seems like a pretty reasonable way to go, and people that want a less secure keypair struct can simply make their own and convert to snow's keypair type as needed.

Maybe a good way to start that's not even a breaking change is simply to use Zeroize to clear out sensitive material that's no longer used during the transition from HandshakeState to TransportState.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants