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
{{ message }}
Repository navigation
hmac: clearing key material for secret keys — is there an upstream way? #289
Hi! In OpenNCALayer we use hmac with streebog for GOST key agreement and key wrap, where the HMAC key is a secret. We currently carry a patch (commit) that adds a secret-input feature: an HMAC core variant that clears the normalized key block, the ipad/opad block and the inner digest on drop. The normal Hmac path is unchanged.
We would much rather not keep a fork of a crypto crate. I saw #287 (ZeroizeOnDrop for HMAC cores). Questions:
With zeroize enabled and a hash core that zeroizes on drop, is the key material (normalized key, ipad/opad) already cleared, so our variant is unnecessary?
If not, is this something you'd want upstream, and in what shape?
Any reasons why this approach is a bad idea are very welcome too.
Activity