From: Stephan Mueller <smueller@chronox.de>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-crypto@vger.kernel.org
Subject: Re: [RFC] revamp fips_allowed flag
Date: Fri, 16 Sep 2016 07:42:13 +0200 [thread overview]
Message-ID: <9465267.bxih8SxCui@tauon.atsec.com> (raw)
In-Reply-To: <20160915062629.GA14950@gondor.apana.org.au>
Am Donnerstag, 15. September 2016, 14:26:29 CEST schrieb Herbert Xu:
Hi Herbert,
> On Thu, Sep 15, 2016 at 08:23:05AM +0200, Stephan Mueller wrote:
> > Where shall we draw the line here? Shall that be only for authenc, or
> > seqiv? Or shall we also consider rfc4106 too, knowing that there are
> > implementations which provide a full rfc4106 GCM combo (x86 for example).
> > What about the current pkcspad1 template where we could expect that there
> > may be entire HW implementations with that?
>
> That's something that only you can tell us :)
Well, as a baseline we can say that:
- with the exception of a few block chaining modes (e.g. xcbc, pcbc, lrw) all
templates are allowed in FIPS mode
- almost all "non-approved" ciphers (i.e those that should not have a
fips_allowed flag) are due to the raw base cipher (i.e. only SHA1/2, AES and
TDES is allowed)
- all compression algos are allowed
>
> For such templates we could move that info into the generic
> template implementation code and have them declare themselves
> as such that for any X if X is FIPS allowed then so is T(X).
>
> This info can then be used in testmgr.
I can see that, but I do not believe it makes our life in the testmgr easier.
The reason is that in a lot of cases, the template parts (read: block chaining
modes) are moved into implementations. The most notable examples are the x86
Intel and the S390 CPACF implementations. For those, the template handling
code is not triggered and thus we still would need testmgr entries with the
block chaining modes.
Considering that we now have RSA in the kernel and that we could expect RSA
implementations in hardware (in fact, we already have them), there is another
complication: FIPS only allows RSA according to FIPS 186-4 and not according
to FIPS 186-2 (ok, the main difference is in key gen, which we do not have).
What I want to say here is that with the more complex style ciphers, it may
very well be possible that only the respective implementation knows whether it
is FIPS compliant.
Thus, I am still thinking that moving the fips_allowed flag into the structs
that are evaluated during register time is more helpful. I definitely see that
this would imply that all, say, AES implementations need that flag. But IMHO
it is a much cleaner solution, because if the register is rejected, the cipher
does not show up in /proc/crypto and everybody knows that a particular cipher
is not in use.
My particular example is that in one test with FIPS mode enabled,
seqiv(rfc4106(gcm-base(...))) was successfully loaded and marked as selftest
passed in /proc/crypto. Yet, an allocation of the test failed with ENOENT.
Rebooting the system without FIPS mode allowed me to allocate the cipher. As
there is no test for this particular cipher name in testmgr, I highly suspect
that the allocation code did not find it because somehow there was no test. In
any case, it is definitely not clear why that particular cipher name cannot be
allocated in FIPS mode given the entries in /proc/crypto.
Ciao
Stephan
next prev parent reply other threads:[~2016-09-16 5:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-15 5:35 [RFC] revamp fips_allowed flag Stephan Mueller
2016-09-15 5:58 ` Herbert Xu
2016-09-15 6:23 ` Stephan Mueller
2016-09-15 6:26 ` Herbert Xu
2016-09-16 5:42 ` Stephan Mueller [this message]
2016-09-16 5:56 ` Herbert Xu
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=9465267.bxih8SxCui@tauon.atsec.com \
--to=smueller@chronox.de \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@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 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.