Skip to content

lib/crypto: Provide a function for zeroizing hmac_sha1_ctx

Thomas Huth keyrings linux-crypto linux-integrity linux-security-module lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3crypto: Provide a wrapper for zeroizing hmac_sha1_ctxinclude/crypto/sha1.h+17 -00 replies
2/3security: keys: trusted: always clear the hmac_sha1_ctx before returningsecurity/keys/trusted-keys/trusted_tpm1.c+1 -10 replies
3/3lib/crypto: sha1: Use hmac_sha1_zeroize_ctx() instead of memzero_explicit()lib/crypto/sha1.c+1 -10 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJarkko Sakkinen
SeriesR-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] lib/crypto: Provide a function for zeroizing hmac_sha1_ctx

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(-)
Signature · 1 line
2.55.0