Small zeroization fix#366
Conversation
|
Personally, I don't think we should explicitly zeroize temporary variables stored on stack since there is plenty of ways to spill sensitive data to stack and zeroize-on-drop does not help with moves (especially considering inefficient zeroization codegen for byte arrays, see: RustCrypto/utils#1504). Instead users should zeroize stack after sensitive computation is completed. |
|
That makes sense. I'd be happy to close this PR if that's your stated policy. I just noticed other crates in this workspace already explicitly zeroize transient stack buffers after use, for example Re |
|
I will leave this decision to @tarcieri.
Yes, this is why I wrote that stack zeroization should be done by users. |
Just noticed that
fn expand_keyinx-wingdoesn't fully zeroizeseedandsk_x_rawso I added explicit zeroization as a defense in depth measure.