-
Notifications
You must be signed in to change notification settings - Fork 466
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
implement Zeroize for Scalar and MontgomeryPoint #236
Conversation
Cool! Two comments: I think if we add support for Right now I don't think we export any trait implementations etc. related to @tarcieri what's the current state of the |
For This means that the blanket For |
@hdevalence with However, several people have adopted it with the current API, so I plan on keeping that available in perpetuity. I may move to putting it behind an off-by-default cargo feature though (e.g. There is no All that said, if you do switch to |
Your point to switch to use I believe we need the zeroing for |
@DebugSteven re: zeroing From looking at the Re: a Getting |
@hdevalence I'm thinking If that works, I don't see any reason to ever remove That said, I've migrated to the 2018 edition in |
After playing around with adding That said, It also adds custom derive support for https://docs.rs/zeroize/0.6.0/zeroize/#custom-derive-support |
This would be really nice to have instead of using I'm happy to implement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to switch to the proc_macro #[derive]
that @tarcieri was mentioning later on in the thread.
For some reason, @DebugSteven and I were unable to get the Another problem I ran into was the issue of zeroizing arbitrary things like |
My guess is that we'd want to implement special drop logic on type wrappers around those types where they are needed, probably similar to how I drafted the drop logic change in x25519-dalek. Unless we wanted to get rid of the |
@isislovecruft the proc macro is pretty bad right now. I need to rewrite it with
There is not equivalent functionality in Otherwise what I've been particularly interested in is building a higher-level secret-keeping library on top of |
Zeroize crate's derive is broken right now. iqlusioninc/crates#237 Also dalek needs to switch dalek-cryptography/curve25519-dalek#236
What was still needed from this PR was merged in #306. |
dalek-cryptography#236) curve25519-dalek: - Enables `digest` and `rand_core` features - Removes transitive `nightly`, `simd_backend`, and `std` features ed25519: - `AsRef` impl for `Signature` has been removed; uses `to_bytes` - Uses `try_from` for `InternalSignature` conversion
This PR implements the
Zeroize
trait forScalar
and
MontgomeryPoint
. This enablesx25519-dalek
to use thezeroize
crate to securely zero the memory of secretkeys. The switch to use
zeroize
would be nice because ithas nicer documentation and platform support. The
nightly
feature in
zeroize
also provides fast byte array zeroingvia
volatile_set_memory
.