From: Jeff Barnes <jeffbarnes@linux.microsoft.com>
To: Joachim Vandersmissen <git@jvdsn.com>,
Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
Jeff Barnes <jeffbarnes@microsoft.com>
Subject: Re: [PATCH] crypto: aead: add service indicator flag for RFC4106 AES-GCM
Date: Mon, 2 Mar 2026 16:51:38 -0500 [thread overview]
Message-ID: <145cfedf-7510-44b7-b1b7-6569144e7b21@linux.microsoft.com> (raw)
In-Reply-To: <a73a2556-3fa3-45fc-bf06-a62e8367e953@jvdsn.com>
On 3/1/26 15:41, Joachim Vandersmissen wrote:
> Hi Herbert,
>
> On 2/28/26 2:56 AM, Herbert Xu wrote:
>> On Tue, Feb 17, 2026 at 03:59:41PM -0500, Jeff Barnes wrote:
>>> I don't know how to accomplish that.
>>>
>>> SP800-38D provides two frameworks for constructing a gcm IV.
>>> (https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf)
>>>
>>> The first construction, described in Sec. 8.2.1, relies on
>>> deterministic
>>> elements to achieve the uniqueness requirement in Sec. 8; the second
>>> construction, described in Sec. 8.2.2, relies on a sufficiently long
>>> output
>>> string from an approved RBG with a sufficient security strength. My
>>> patch
>>> checks for an implementation of 8.2.1 via rfc4106(gcm(aes)). I don't
>>> know
>>> how a patch could check for 8.2.1 or 8.2.2 from an externally
>>> generated iv.
>>>
>>> Suggestions welcome.
>> Rather than setting the FIPS_COMPLIANCE flag, why not simply ban the
>> non-compliant cases from being used in FIPS mode?
>>
>> Sure that would mean banning gcm(aes) in FIPS mode, and only
>> allowing seqiv(gcm(aes)) but that's OK because we have the
>> FIPS_INTERNAL flag to deal with this by only allowing gcm(aes)
>> to be used to construct something like seqiv(gcm(aes)).
>
> Like you said, this could work for seqiv(gcm(aes)), if there are truly
> no usecases for gcm(aes) when the kernel is in FIPS mode.
For instance, ceph, samba, tls, to name a few. They all instantiate the
gcm(aes) template. They all construct their own IV. They are all
compliant to SP 800-38d. I am pretty sure that at least one constructs
it per 8.2.2 while the rest construct per 8.2.1.
There is a good case for asserting "the kernel crypto api is FIPS
compliant, for out-of-tree modules, you're on your own". But that's
where the need for the service indicator arises. I'm sure that
maintaining the out-of-tree patch with a service indicator is a royal
pain downstream.
>> Of course this would need to be tested since FIPS_INTERNAL was
>> introduced for something else but I see no reason why it can't
>> be used for gcm too.
>>
>> Cheers,
next prev parent reply other threads:[~2026-03-02 21:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-29 21:04 jeffbarnes
2026-01-30 5:10 ` Herbert Xu
2026-02-17 20:59 ` Jeff Barnes
2026-02-28 8:56 ` Herbert Xu
2026-03-01 20:41 ` Joachim Vandersmissen
2026-03-02 12:26 ` Herbert Xu
2026-03-02 21:34 ` Jeff Barnes
2026-03-02 21:51 ` Jeff Barnes [this message]
2026-03-03 3:37 ` Herbert Xu
2026-03-12 14:00 ` Jeff Barnes
2026-03-14 19:37 ` Eric Biggers
2026-03-03 15:14 ` Christoph Hellwig
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=145cfedf-7510-44b7-b1b7-6569144e7b21@linux.microsoft.com \
--to=jeffbarnes@linux.microsoft.com \
--cc=davem@davemloft.net \
--cc=git@jvdsn.com \
--cc=herbert@gondor.apana.org.au \
--cc=jeffbarnes@microsoft.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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®