You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that all crypto is implemented in Rust, we may be able to use zeroise (but maybe not: RustCrypto/AEADs#65)
I guess we should use zeroize:
On bytes buffer that receive decrypted data (given decrypted data often contains key in cleartext)
On structures deserialize the bytes buffer: I guess Zeorizing is transparent from serde/serde_as point of view
On final Key object (both for sodiumoxide and RustCrypto), this is what we should check first as it is very possible they work as opaque objects where we cannot simply ensure no copy of sensitive data occurs or that zeroing on drop is possible1
Footnotes
My current guess is this is possible given we have wrapped the Sodiumoxide/RustCrypto key structure in our own key structure, so we could do something like struct MyPrivateKey { key: Zeroizing<SodiumOxidePrivateKey> } which should do the trick (well unless the key is actually stored on the head, or is copied during decryption :/) ↩
The text was updated successfully, but these errors were encountered:
Now that all crypto is implemented in Rust, we may be able to use zeroise (but maybe not: RustCrypto/AEADs#65)
I guess we should use zeroize:
Footnotes
My current guess is this is possible given we have wrapped the Sodiumoxide/RustCrypto key structure in our own key structure, so we could do something like
struct MyPrivateKey { key: Zeroizing<SodiumOxidePrivateKey> }
which should do the trick (well unless the key is actually stored on the head, or is copied during decryption :/) ↩The text was updated successfully, but these errors were encountered: