Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1482639pxf; Fri, 9 Apr 2021 09:26:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzv0/2ZPJPxutHct1UO/dVf/e9A+ckMRORVwHavchhPDcAQqki2AjGH9r/E9ddFgUxpUaac X-Received: by 2002:a17:902:b94c:b029:e6:98b9:c15b with SMTP id h12-20020a170902b94cb02900e698b9c15bmr13891260pls.60.1617985615494; Fri, 09 Apr 2021 09:26:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617985615; cv=none; d=google.com; s=arc-20160816; b=RKpUGKPvMjEsh9cQK3BXL3qutv0IwSqpGUyrGT2j8q1GDUhDXUMhvnJ3KuiKwR1DFw eR3j64mErXPWXaMHuXW7qT9POWj8QvUCHYniBfi7xUEbzoZHLgn9t3PDp66Eoymy+yUg eWJfZ3Jn2okgstqLCza35NhDun/XDBcEFzBbGZSPXXo28h3dzooU7fqTGIb3OL6ZnUbd 7Q4bbCXKlfDdJwilEpDSbHrioeqTLx9vesT2IVSFl3NMUbmGDssQLLUQZ9atbA5eg/Gr F9b5Tpv/+y7YOHWdCCU4IQ1fsXHeyhVRLVW4AzQzYP/UYuwVeAf3V5/VqdzXqVk1KZlO R19A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=A+XNjjMj7uKb6cWyQ0FNy1WHSr2ChCgb+eT313GmatE=; b=KikaKiQETc4DkoTqdQ8xKtN/vZQzSTQortjxCSNBizyUNAJ5e8OqWSzSc1e3QCmb6m fScD62h5ykRPVdjHqqrIbpacC9Qh1B/fW9x2yqMHfxXotCW4z0hhHKrInahwOlvOkkN0 nXMiE47qTfmktRyclw+fer22p24n4D4bshwhr63XHt3VyuVri/u6a1Xiym1IJhT1PRlK Lw5G53EgKFZFAzaAc7AVjmyRmYLxbsvOiG1m9lKHbnfi3Lp1cRB1tQARxsDtCsPcC2jq Aob4IpZcmCCiGGA5Y8t9hKtO75HjJNhHsbFwasrlNqmuWThTEJzk7zsq3+cdYsx6xA8D cuRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HUfj6BSt; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j36si3605104pgm.144.2021.04.09.09.26.37; Fri, 09 Apr 2021 09:26:55 -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=@redhat.com header.s=mimecast20190719 header.b=HUfj6BSt; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233674AbhDIQ0p (ORCPT + 99 others); Fri, 9 Apr 2021 12:26:45 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:56595 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234032AbhDIQ0o (ORCPT ); Fri, 9 Apr 2021 12:26:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617985591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=A+XNjjMj7uKb6cWyQ0FNy1WHSr2ChCgb+eT313GmatE=; b=HUfj6BSta0agnITERRbj5/NIhh0cq+Lwi8UZ8PRhmk/GbuGSx2mp/uz4aikzdn3ps0+5oU aEVldn1HE++y2BJB4E1T1nt7h3r+Xe3Z+VMUogfQIOSHd8ovPVoBa+XsDbou7ARNMvdgAF Xxu97PuwduqVX5ZglEgMT7ypGM+7ulU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-245-70dw0YHIOQq_ivsp5kp6fg-1; Fri, 09 Apr 2021 12:26:27 -0400 X-MC-Unique: 70dw0YHIOQq_ivsp5kp6fg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3CE1B10054F6; Fri, 9 Apr 2021 16:26:26 +0000 (UTC) Received: from ovpn-112-53.phx2.redhat.com (ovpn-112-53.phx2.redhat.com [10.3.112.53]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B6A4B5C1D5; Fri, 9 Apr 2021 16:26:24 +0000 (UTC) Message-ID: <2ab19b062cf61cf6f54e7f0145c8d6fd77aee5ed.camel@redhat.com> Subject: Re: [PATCH net-next] [RESEND] wireguard: disable in FIPS mode From: Simo Sorce To: Hangbin Liu , 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 Date: Fri, 09 Apr 2021 12:26:23 -0400 In-Reply-To: <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> <20210409080804.GO2900@Leo-laptop-t470s> Organization: Red Hat, Inc. Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, 2021-04-09 at 16:08 +0800, Hangbin Liu wrote: > 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. It is an open problem upstream. Simo. -- Simo Sorce RHEL Crypto Team Red Hat, Inc