Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1156536pxf; Fri, 9 Apr 2021 01:09:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGcOjOYyVM37YaIxtjgACIOa6lRgJ/zE86phDu9mjd4UzU8CqDaW+XFrf1BiLDipiKyw7M X-Received: by 2002:a17:90a:7186:: with SMTP id i6mr13002710pjk.191.1617955760662; Fri, 09 Apr 2021 01:09:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617955760; cv=none; d=google.com; s=arc-20160816; b=w5QYK20g1u3i9j43RkjO7foPa2AO5zybbZxOO0aIHOK9xWFxxBODVAMxWAIwxFmtcI FhlvCKcwY1tHZ+2We1BdwbtT4uM+sMIchOsPXu2xZbp31BiuvCIJ0FSuzE3iDWNGTCIT ch+479PZt5xwyHVi6QwTkR8zCBJIQ+R5la5hUNtAjqUcSxIyJPimRF2t0yb5rqmv0FNL ez02SqoBTIaNF/TAehaqqUlEdBOUtD8OjqK+RHumLgLLGk7jRBPSoUJ4mdI1ga5kGv29 R/GZ27ypgbq76yJdOTyDS8Wno34i9/r38dPXtVS+fhLoDvbnzNPexL+yRAKnleW0EpoG HpBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=CMMJZPbp0MgRCMvfRE+uOWyBauUtpDGlrFmT7fkYW5k=; b=Ow0LIcV65nz5mWIChQPADj7C9HKAOou6ReHZZZ4lRe17IA0v5HAzsDzfrTAUO5iLiV p+n+cPVLVGJCyM1NnN77hEc8RFV4jODllHV71J9YQG3boloGIlhuQBGy7v4taD1PXJBw DLoAC9mmMOO/NmMFF/fLs/AM29nG+KrEe1OIUwaPQqcHKYhzE9xPtAruIbpARbqDsCwc ELyGMYm4qqy0Ek222jp/qr115dGQnNhcVRm03GUe4sZCYMx3P5OspRuFDdq8LNpSK8oU NHZKk3KM199uxlcl034MsEPRboP79LDOZYJWWjl+Y5DmDgkynAypesQnrvVrQKtPvIeG 1FwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nvHD9vcM; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b5si2385945pjo.119.2021.04.09.01.09.03; Fri, 09 Apr 2021 01:09:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nvHD9vcM; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232286AbhDIII3 (ORCPT + 99 others); Fri, 9 Apr 2021 04:08:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231950AbhDIII2 (ORCPT ); Fri, 9 Apr 2021 04:08:28 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23CD7C061762; Fri, 9 Apr 2021 01:08:16 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id b8-20020a17090a5508b029014d0fbe9b64so4574313pji.5; Fri, 09 Apr 2021 01:08:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=CMMJZPbp0MgRCMvfRE+uOWyBauUtpDGlrFmT7fkYW5k=; b=nvHD9vcMQbQp7dZO1Z+Ko7EQPvJWFmilvnpnanwZ9FIql68hLtZK8ScyvHR4390nHQ ZbEfPaCGYv7VQckx5EqMpTZRTcJuEdMaUcSkA3kQkjWyushgnoKCn3yiw0xFmhaPi0Vq m5qQyzPxK7PYrv9BLFU2cpU4xvdqrP7P3OUPaEgRFXFdFfECOddW/akbrycr4hLf2bpt S4Sx4af9qWnRfthw6RoW9msrmZ/ah64mqYj7tNFkWMSnTu+/DiLquhM3IYVvLnPyMeMk Zpsc682rWOLFH6ubqoZJmZIHGEP+hiI4SBT0iAH5YFVGoZMFuCznqR95tMCv2mmxZXNi pYJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=CMMJZPbp0MgRCMvfRE+uOWyBauUtpDGlrFmT7fkYW5k=; b=lo0PC6/wLQ6SNAvtCUOWUVcl3W8H8jrvUMmfab+6t6s+PivSytOI7fXF8UXhA9z+Mu S2hVaAcgzjU3O0MqAmHNoF7Myp06g9jtBIh31MqyZKpVAq/qAgseMGoj3EQdpM2i82/H AKYhta10YSX2R/Eo49GLqT9lyki55XOgWzGCig+atriSDOOitbhTERK+aWrOWarvJQbp QVWwd9W7LWYRzcuKZwq2XSMyWwwr3kbH1wZvdpGuJryX3podCBhEjIWyOE+4m8iOEXAc ljLqlyCAjC6xw9Q92igTGB6v+5GmRjK4iIhLCsVW5XCyY5AmLQje5tfckDOKPqSt9rS3 kGpA== X-Gm-Message-State: AOAM531O9NLVQ2r2LALzOBL7j/IbJ+ps06lhAEq8TylhSkNHm52ffHe/ 9+RDkUCE5kmkiHFzqiCmtJs= X-Received: by 2002:a17:902:f687:b029:e8:da63:6195 with SMTP id l7-20020a170902f687b02900e8da636195mr11850895plg.75.1617955695735; Fri, 09 Apr 2021 01:08:15 -0700 (PDT) Received: from Leo-laptop-t470s ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id s6sm1414618pfw.96.2021.04.09.01.08.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Apr 2021 01:08:15 -0700 (PDT) Date: Fri, 9 Apr 2021 16:08:04 +0800 From: Hangbin Liu To: Stephan Mueller Cc: Eric Biggers , netdev@vger.kernel.org, "Jason A . Donenfeld" , Toke =?iso-8859-1?Q?H=F8iland-J=F8rgensen?= , Jakub Kicinski , Herbert Xu , Ondrej Mosnacek , linux-crypto@vger.kernel.org Subject: Re: [PATCH net-next] [RESEND] wireguard: disable in FIPS mode Message-ID: <20210409080804.GO2900@Leo-laptop-t470s> References: <20210407113920.3735505-1-liuhangbin@gmail.com> <20210408010640.GH2900@Leo-laptop-t470s> <20210408115808.GJ2900@Leo-laptop-t470s> <20210409021121.GK2900@Leo-laptop-t470s> <7c2b6eff291b2d326e96c3a5f9cd70aa4ef92df3.camel@chronox.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7c2b6eff291b2d326e96c3a5f9cd70aa4ef92df3.camel@chronox.de> Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, Apr 09, 2021 at 09:08:20AM +0200, Stephan Mueller wrote: > > > > > > And how do you handle all the other places in the kernel that use > > > > > > ChaCha20 and > > > > > > SipHash?? For example, drivers/char/random.c? > > > > > > > > > > Good question, I will check it and reply to you later. > > > > > > > > I just read the code. The drivers/char/random.c do has some fips > > > > specific > > > > parts(seems not related to crypto). After commit e192be9d9a30 ("random: > > > > replace > > > > non-blocking pool with a Chacha20-based CRNG") we moved part of chacha > > > > code to > > > > lib/chacha20.c and make that code out of control. > > > > > > > So you are saying that you removed drivers/char/random.c and > > > lib/chacha20.c from > > > your FIPS module boundary?? Why not do the same for WireGuard? > > > > No, I mean this looks like a bug (using not allowed crypto in FIPS mode) and > > we should fix it. > > The entirety of random.c is not compliant to FIPS rules. ChaCha20 is the least > of the problems. SP800-90B is the challenge. This is one of the motivation of > the design and architecture of the LRNG allowing different types of crypto and > have a different approach to post-process the data. > > https://github.com/smuellerDD/lrng Thanks Stephan for this info. After offline discussion with Herbert, here is what he said: """ This is not a problem in RHEL8 because the Crypto API RNG replaces /dev/random in FIPS mode. """ I'm not familiar with this code, not sure how upstream handle this. Thanks Hangbin