Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve zeroization of key buffer (#1069)
Currently, the temporary buffer used for deriving shareable keys is [manually zeroized](https://github.com/bitwarden/sdk/blob/76417172489d5790babbe14bb8c6ad8b3aac2a33/crates/bitwarden-crypto/src/keys/shareable_key.rs#L32-L33). While documentation indicates that preceding `expect` calls cannot fail, this still seems brittle to future changes. This PR places the buffer into a `Zeroizing` wrapper. It is still the case that zeroization may not occur on a panic, but this was already the case with the existing implementation, which would never zeroize in such a case.
- Loading branch information