netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ondrej Mosnacek <omosnace@redhat.com>
To: Hangbin Liu <liuhangbin@gmail.com>
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>,
	Netdev <netdev@vger.kernel.org>,
	"Toke Høiland-Jørgensen" <toke@redhat.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Linux Crypto Mailing List" <linux-crypto@vger.kernel.org>
Subject: Re: [PATCH net-next] [RESEND] wireguard: disable in FIPS mode
Date: Thu, 8 Apr 2021 09:36:44 +0200	[thread overview]
Message-ID: <CAFqZXNuk6wqTb+m4ttyU_4UN5TjqSdvUiOJ=peztUUiyY+ReJQ@mail.gmail.com> (raw)
In-Reply-To: <20210408065231.GI2900@Leo-laptop-t470s>

On Thu, Apr 8, 2021 at 8:52 AM Hangbin Liu <liuhangbin@gmail.com> wrote:
> On Wed, Apr 07, 2021 at 03:15:51PM -0600, Jason A. Donenfeld wrote:
> > Hi Hangbin,
> >
> > On Wed, Apr 7, 2021 at 5:39 AM Hangbin Liu <liuhangbin@gmail.com> wrote:
> > >
> > > As the cryptos(BLAKE2S, Curve25519, CHACHA20POLY1305) in WireGuard are not
> > > FIPS certified, the WireGuard module should be disabled in FIPS mode.
> >
> > I'm not sure this makes so much sense to do _in wireguard_. If you
> > feel like the FIPS-allergic part is actually blake, 25519, chacha, and
> > poly1305, then wouldn't it make most sense to disable _those_ modules
> > instead? And then the various things that rely on those (such as
> > wireguard, but maybe there are other things too, like
> > security/keys/big_key.c) would be naturally disabled transitively?
>
> Hi Jason,
>
> I'm not familiar with the crypto code. From wg_noise_init() it looks the init
> part is in header file. So I just disabled wireguard directly.
>
> For disabling the modules. Hi Ondrej, do you know if there is any FIPS policy
> in crypto part? There seems no handler when load not allowed crypto modules
> in FIPS mode.

If I understand your question correctly, yes, there is a mechanism
that disables not-FIPS-approved algorithms/drivers in FIPS mode (not
kernel modules themselves, AFAIK). So if any part of the kernel tries
to use e.g. chacha20 via the Crypto API (the bits in crypto/...), it
will fail. I'm not sure about the direct library interface (the bits
in lib/crypto/...) though... That's relatively new and I haven't been
following the upstream development in this area that closely for some
time now...

>
> BTW, I also has a question, apart from the different RFC standard, what's the
> relation/difference between crypto/chacha20poly1305.c and lib/crypto/chacha20poly1305.c?
>
> Thanks
> Hangbin
>

-- 
Ondrej Mosnacek
Software Engineer, Linux Security - SELinux kernel
Red Hat, Inc.


  reply	other threads:[~2021-04-08  7:37 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-07 11:39 [PATCH net-next] [RESEND] wireguard: disable in FIPS mode Hangbin Liu
2021-04-07 21:12 ` Eric Biggers
2021-04-08  1:06   ` Hangbin Liu
2021-04-08 11:58     ` Hangbin Liu
2021-04-08 15:11       ` Eric Biggers
2021-04-09  2:11         ` Hangbin Liu
2021-04-09  7:08           ` Stephan Mueller
2021-04-09  8:08             ` Hangbin Liu
2021-04-09 16:26               ` Simo Sorce
2021-04-09 18:29               ` Jason A. Donenfeld
2021-04-12  2:11                 ` Hangbin Liu
2021-04-07 21:15 ` Jason A. Donenfeld
2021-04-08  6:52   ` Hangbin Liu
2021-04-08  7:36     ` Ondrej Mosnacek [this message]
2021-04-08 13:55   ` Simo Sorce
2021-04-08 21:55     ` Jason A. Donenfeld
2021-04-08 22:16       ` Simo Sorce
2021-04-09  2:41       ` Hangbin Liu
2021-04-09  2:44         ` Jason A. Donenfeld
2021-04-09  2:49           ` Hangbin Liu
2021-04-09  3:03             ` Jason A. Donenfeld
2021-04-09  6:02               ` Ard Biesheuvel
2021-04-09 12:47                 ` Simo Sorce
2021-04-09 18:36                   ` Jason A. Donenfeld
2021-04-09 18:56                     ` Simo Sorce
2021-04-12 12:46                       ` Simo Sorce

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='CAFqZXNuk6wqTb+m4ttyU_4UN5TjqSdvUiOJ=peztUUiyY+ReJQ@mail.gmail.com' \
    --to=omosnace@redhat.com \
    --cc=Jason@zx2c4.com \
    --cc=kuba@kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=liuhangbin@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=toke@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;
as well as URLs for NNTP newsgroup(s).