Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
k256
to 0.11,sha2
to 0.10,hkdf
to 0.12,chacha20poly1305
to 0.10, andzeroize
to 1.5 (and MSRV to 1.57), so that we could use the newZeroizeOnDrop
functionality. In particular,SecretBox
andSecretKey
now implementZeroizeOnDrop
. Fixes Rethink zeroization whenZeroizeOnDrop
is available #89CanBeZeroizedOnDrop
;GenericArray
supportsZeroize
sincegeneric-array
0.14.6pyo3
to 0.16Note that it is not clear from the documentation, but
#[derive(ZeroizeOnDrop)]
works as follows: if a field isZeroizeOnDrop
, it is skipped, if it'sZeroize
, it's zeroized, if it's neither, an error is raised. So e.g. in the case when it's derived forSecretKey
there won't be double zeroization (because thek256::SecretKey
implementsZeroizeOnDrop
itself), but rather a compile-time check that the whole object is correctly zeroized on drop.