Closed eupn closed 5 years ago
With Cargo & Rustc on 1.35.0 version, a lot of following build errors:
error: cannot find macro `quote_spanned!` in this scope
--> /Users/garyyu/.cargo/registry/src/github.com-1ecc6299db9ec823/zeroize_derive-0.8.0/src/lib.rs:22:33
|
22 | let zeroizers = s.each(|bi| quote! { #bi.zeroize(); });
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@garyyu this is strange. CI is building and passing though. Could you please do cargo update
before building?
👍 cargo update
works.
@eupn could you please fix the conflict? thanks.
In response to https://github.com/mimblewimble/grin/issues/2218. Corresponding PR in Grin: https://github.com/mimblewimble/grin/pull/2851
This PR:
Zeroize
derive forSecretKey
in a way that underlying byte array is filled with zeroesCopy
derive fromSecretKey
since it is impossible to implement bothDrop
andCopy
at the same time. Implicit copying was replaced with more explicit.clone()
SecretKey
zeroingSome references: https://github.com/dalek-cryptography/curve25519-dalek/issues/11 https://github.com/rust-lang/rfcs/issues/2533 https://www.youtube.com/watch?v=cQ9wTyYCdNU
Feedback is highly appreciated!