All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] lib/crypto: Provide a function for zeroizing hmac_sha1_ctx
@ 2026-08-12 16:33 Thomas Huth
  2026-08-12 16:33 ` [PATCH 1/3] crypto: Provide a wrapper " Thomas Huth
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Thomas Huth @ 2026-08-12 16:33 UTC (permalink / raw)
  To: Eric Biggers, Jason A. Donenfeld, Ard Biesheuvel
  Cc: Herbert Xu, David S. Miller, James Bottomley, Jarkko Sakkinen,
	Mimi Zohar, David Howells, Paul Moore, James Morris,
	Serge E. Hallyn, linux-crypto, linux-kernel, linux-integrity,
	keyrings, linux-security-module

It's maybe not worth the effort for hmac_sha1_ctx right now (since there
is only one spot that forgot to zeroize the structure in case of errors),
but offering a function for zeroizing the data via __cleanup might help to
get future code into the proper shape right from the start. Thus let's
introduce a hmac_sha1_zeroize_ctx() function now and use it in the
appropriate spots.

Thomas Huth (3):
  crypto: Provide a wrapper for zeroizing hmac_sha1_ctx
  security: keys: trusted: always clear the hmac_sha1_ctx before
    returning
  lib/crypto: sha1: Use hmac_sha1_zeroize_ctx() instead of
    memzero_explicit()

 include/crypto/sha1.h                     | 17 +++++++++++++++++
 lib/crypto/sha1.c                         |  2 +-
 security/keys/trusted-keys/trusted_tpm1.c |  2 +-
 3 files changed, 19 insertions(+), 2 deletions(-)

-- 
2.55.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-08-12 16:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-12 16:33 [PATCH 0/3] lib/crypto: Provide a function for zeroizing hmac_sha1_ctx Thomas Huth
2026-08-12 16:33 ` [PATCH 1/3] crypto: Provide a wrapper " Thomas Huth
2026-08-12 16:33 ` [PATCH 2/3] security: keys: trusted: always clear the hmac_sha1_ctx before returning Thomas Huth
2026-08-12 16:33 ` [PATCH 3/3] lib/crypto: sha1: Use hmac_sha1_zeroize_ctx() instead of memzero_explicit() Thomas Huth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.