mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Thomas Huth <thuth@redhat.com>
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>,
	Ard Biesheuvel <ardb@kernel.org>,
	linux-crypto@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lib/crypto: Add a sentence about zeroizing raw key structures
Date: Wed, 4 Nov 2026 17:02:02 -0800	[thread overview]
Message-ID: <20261105010202.GB2084@sol> (raw)
In-Reply-To: <20261104105352.135540-1-thuth@redhat.com>

On Wed, Nov 04, 2026 at 11:53:52AM +0100, Thomas Huth wrote:
> Let's make it clear that raw key material has to be zeroized, too.
> 
> Suggested-by: Eric Biggers <ebiggers@kernel.org>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  Suggested here:
>  https://lore.kernel.org/linux-crypto/20260930201434.GA61218@google.com/
> 
>  Documentation/crypto/libcrypto-zeroization.rst | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/crypto/libcrypto-zeroization.rst b/Documentation/crypto/libcrypto-zeroization.rst
> index 76b6506711634..fe9f94413d1f2 100644
> --- a/Documentation/crypto/libcrypto-zeroization.rst
> +++ b/Documentation/crypto/libcrypto-zeroization.rst
> @@ -47,7 +47,9 @@ The following types of structures hold sensitive material and should be
>  zeroized after use:
>  
>  - **Key structures** (e.g. ``struct aes_key``, ``struct hmac_sha256_key``):
> -  contain expanded round keys or prepared key material.
> +  contain expanded round keys or prepared key material. Note: Arrays and
> +  structures that contain raw key material (e.g. raw AES keys) of course
> +  need to be zeroized as well as soon as the data is not required anymore.

It's better than nothing, but it reads kind of like an afterthought.
Might be worth its own paragraph before the one beginning with "The
following types of structures".

- Eric

      reply	other threads:[~2026-11-05  1:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04 10:53 Thomas Huth
2026-11-05  1:02 ` Eric Biggers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261105010202.GB2084@sol \
    --to=ebiggers@kernel.org \
    --cc=Jason@zx2c4.com \
    --cc=ardb@kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®