Tongsuo-Project / RustyVault

A rusted vault that can do many awesome secrets management stuff...
Apache License 2.0
264 stars 21 forks source link

Make sure all sensitive data in Barrier is zeroized #38

Closed InfoHunter closed 9 months ago

InfoHunter commented 10 months ago

Modern compiler doesn't guarantee all code is executed as expected. For instance, zeroizing a piece of memory could be omitted due to optimization purpose by compilers. This will cause problems in security oriented applications like RustyVault. The sensitive data in RustyVault, for instance the encryption key for barrier usage, should be zeroized after they are dropped.

A crate called zeroize can do this job well: https://docs.rs/zeroize/1.4.0/zeroize/index.html