mimblewimble / rust-secp256k1-zkp

ZKP fork for rust-secp256k1, adds wrappers for range proofs, pedersen commitments, etc
Creative Commons Zero v1.0 Universal
56 stars 51 forks source link

Fill SecretKey with zeros on Drop for security #51

Closed eupn closed 5 years ago

eupn commented 5 years ago

In response to https://github.com/mimblewimble/grin/issues/2218. Corresponding PR in Grin: https://github.com/mimblewimble/grin/pull/2851

This PR:

Some 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!

garyyu commented 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(); });
   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^
eupn commented 5 years ago

@garyyu this is strange. CI is building and passing though. Could you please do cargo update before building?

garyyu commented 5 years ago

👍 cargo update works.

garyyu commented 5 years ago

@eupn could you please fix the conflict? thanks.