diff options
| author | Thomas Huth <thuth@redhat.com> | 2026-09-16 11:50:10 +0200 |
|---|---|---|
| committer | Eric Biggers <ebiggers@kernel.org> | 2026-09-30 09:33:54 -0700 |
| commit | e09cbc96ff8c94d477a07b2e35b4b4886dc9cf30 (patch) | |
| tree | c135b1c34bbb0ca3ad42a093a83992d58670fed9 /security | |
| parent | 97560fd98d4d36b2fd656a6270e15cb2218fcbe2 (diff) | |
lib/crypto: sha1: Provide functions for zeroizing hmac_sha1 structures
In certain cases crypto code needs to zeroize their local hmac_sha1_key
or hmac_sha1_ctx structures after use to avoid leaking sensitive material.
Provide hmac_sha1_zeroize_key() and hmac_sha1_zeroize_ctx() helper
functions that e.g. can be used with __cleanup() to automatically zeroize
the structures when they go out of scope.
While we're at it, replace the related memzero_explicit() call in
lib/crypto/sha1.c with a call to the new helper function.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Link: https://patch.msgid.link/20260916095022.604354-9-thuth@redhat.com
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions
