Thread (17 messages) flat view 17 messages, 4 authors, 13d ago

Re: [PATCH v3 11/13] lib/crypto: sha2: Provide functions for zeroizing SHA2 hmac_sha* structures

From: Namjae Jeon <linkinjeon@kernel.org>
Date: 2026-09-11 01:15:53
Also in: lkml

On Thu, Sep 10, 2026 at 9:52 PM Thomas Huth [off-list ref] wrote:
In certain cases crypto code functions need to zeroize their local SHA2
hmac_sha*_key or hmac_sha*_ctx structures after use to avoid leaking
sensitive material on the stack.
Provide hmac_sha*_zeroize_key() and hmac_sha*_zeroize_ctx() helper
functions that can be used with __cleanup() to automatically zeroize
the structure when it goes out of scope.

Signed-off-by: Thomas Huth <redacted>
Reviewed-by: Namjae Jeon <linkinjeon@kernel.org>
Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help