jedisct1/rust-ed25519-compact

Zeroizing SecretKey

lann opened this issue · 1 comments

lann commented

I believe it is currently impossible to safely zeroize SecretKey since you cannot get mutable access to the underlying array. I'd be happy to write a PR doing one of these, any of which would allow zeroization:

  • Impl zeroize::Zeroize on SecretKey (perhaps behind a feature flag)
  • Impl DerefMut on SecretKey
  • Add SecretKey::into_inner(self) -> [u8; SecretKey::BYTES]

We already have Deref, we can totally add DerefMut :)