Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3213283pxb; Fri, 4 Feb 2022 04:01:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJyzgzIN84DpW3Luqmh7IFzYJ8HqGz2OXrT3R5ZHG0hOuwkCZxTZlHnDYOrCWmpW16ViSRZg X-Received: by 2002:a17:907:d9f:: with SMTP id go31mr2288986ejc.282.1643976079375; Fri, 04 Feb 2022 04:01:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643976079; cv=none; d=google.com; s=arc-20160816; b=iHU78Pcrk+WkxesgYJwwoH2UhMOI6NpIgRWVL5b+92XyiUdFu5YeE4mcz6mZxaMw6D Ni9/z9ELij3WU1Q7IsZ6HTtAiUkDb0qRPbV++OYVVeGlcyyAa8yMLe0ygRNpwBgzuhv6 Zf8kd4lLD/ORlKQ8ooT4y3jjVv9tcUrZLs4H0w9NLrsq+plCS8DIyifedAJ2aPu7NJVM KV9NNiit8YQPxSom0Z+g9aIozXGTQcs6fNowOds/bRMMcqhYRmg2Jtf9j/GunQEeEdBb /fH/ypEMiJfGWkhpHqOJv1gITtm2SbM+REKz1nsQV8a+u+U9i7HgDAaE5rSK5FQMmiBL hQSw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=in3ANS4p1/EJ1Vk8fAo3enQEiM4qdqkOrQ7NVZWdrM0=; b=GRwuZgNt0/uj8zDiRW5ysZR1Q0LY+q/X4YgYWlQ6Npk17omooNPzbuTFYblNBZHkMH WoFNuvZa5xR6nopv1ExWAOggwOqF9ou8ihRupY1euRGMdafBpI7vQoeGcPUK/DDqj6Eh A/yYKO3gbvzKqKcAzPhHEDQ/MZx6BDBYSa5Bb+NpFRlXBR4N3CeHsb+Fc4UhzROrWJCI u8vmnWDhokOuBWveBeapsShEd2ArZG08CU8QrbD+nLs2jzxfmmDOESawTHZDS1hoWadg YXs0gVHF2iyIfUvJGTcsG2xEaNetfMYx7f8gsVesuRjgrrss4NJWUf5dENyUeCmPDpPl LsPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chronox.de header.s=strato-dkim-0002 header.b=g43WW+kl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n19si850921edx.320.2022.02.04.04.00.52; Fri, 04 Feb 2022 04:01:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chronox.de header.s=strato-dkim-0002 header.b=g43WW+kl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235210AbiBCRMC (ORCPT + 99 others); Thu, 3 Feb 2022 12:12:02 -0500 Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.53]:39199 "EHLO mo4-p01-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234879AbiBCRL7 (ORCPT ); Thu, 3 Feb 2022 12:11:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1643908315; s=strato-dkim-0002; d=chronox.de; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=in3ANS4p1/EJ1Vk8fAo3enQEiM4qdqkOrQ7NVZWdrM0=; b=g43WW+klKEcQR1r6HM6JPA2vjUlwLzEaEEnxW/6JKB4llxJzBhans5dXOIxpgSEtAn wZJFOOwTRwvty9UnrL9uTsIV54zWKO/4x21z9kk9OAictzIeZMNeT3kW9NLIUNzhCnnA naRiTC0XbuMUoeJuJxoHCSE62589gRJs2QF6ImUIBqLe/Cbndn4rGu4XYGO4t3JssvZ5 cZQQh8oGjrosgrv61nXxlKKDfs+uDjMkIpqdW/vdwx/yzJMps4sQAeVrrHcDAxTpTnMy 16Wo0pMxJ6R+4GouMHQSo87JowHowitTTVIEpQnzD7I+vbUH4pZm/43s18q6TBjhRuvr 5K9A== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":P2ERcEykfu11Y98lp/T7+hdri+uKZK8TKWEqNyiHySGSa9k9zW8BKRp5UFiyGZZ4jof7Xg==" X-RZG-CLASS-ID: mo00 Received: from tauon.chronox.de by smtp.strato.de (RZmta 47.39.0 AUTH) with ESMTPSA id z28df7y13HBsGQ7 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Thu, 3 Feb 2022 18:11:54 +0100 (CET) From: Stephan Mueller To: Herbert Xu , "David S. Miller" , Nicolai Stange Cc: Hannes Reinecke , Torsten Duwe , David Howells , Jarkko Sakkinen , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, keyrings@vger.kernel.org, Nicolai Stange Subject: Re: [PATCH v3 00/15] crypto: dh - infrastructure for NVM in-band auth and FIPS conformance Date: Thu, 03 Feb 2022 18:11:53 +0100 Message-ID: <8937519.l8FpVtv5Hg@tauon.chronox.de> In-Reply-To: <20220202104012.4193-1-nstange@suse.de> References: <20220202104012.4193-1-nstange@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Mittwoch, 2. Februar 2022, 11:39:57 CET schrieb Nicolai Stange: Hi Nicolai, > Hi all, > > first of all, to the people primarily interested in security/keys/, there's > a rather trivial change to security/keys/dh.c in patch 4/15. It would be > great to get ACKs for that... > > This is a complete rework of the v2 patchset to be found at [1]. Most > notably, the ffdheXYZ groups are now made accessible by means of templates > wrapping the generic dh: ffdhe2048(dh) ffdhe3072(dh), etc, rather than by > that fixed enum dh_group_id as before. For your reference, this change has > been suggested at [2]. > > Plain "dh" usage will be disallowed in FIPS mode now, which will break > keyctl(KEYCTL_DH_COMPUTE) functionality in FIPS mode. As per the > discussion from [2], this is acceptable or perhaps even desirable. > > The only motivation to include the RFC 3526 MODP groups in the previous v2 > had been to keep keyctl(KEYCTL_DH_COMPUTE) somewhat workable in FIPS mode. > These groups have been dropped accordingly now and this patchset only > introduces support for the RFC 7919 FFDHE groups, which is what is needed > by NVM in-band authentication. > > In order to be able to restrict plain "dh" usage in FIPS mode while > still allowing the usage of those new ffdheXYZ(dh) instantiations, I > incorporated a modified version of the patch posted by Herbert at > [3] ("crypto: api - Disallow sha1 in FIPS-mode while allowing hmac(sha1)") > into this series here as [12/15] ("crypto: api - allow algs only in > specific constructions in FIPS mode"). There had been two changes worth > mentioning: > - An attempt to make it more generic by having crypto_grab_spawn() > to include FIPS_INTERNAL in the lookup and also, to let > crypto_register_instance() to propagate this flag from the > child spawns into the instance to be registered. > - To skip the actual self-test executions for !->fips_allowed algorithms, > just as before. The rationale for this can be found in the discussion to > [3]. > With these changes, all breakage is to blame on me and thus, I assumed > authorship of this patch. I reflected the fact that this is heavily based > on Herbert's work by means of an Originally-by tag and sincerely hope this > is an appropriate way of recording the patch's history. > > This series has been tested on x86_64 and s390x (big endian) with FIPS mode > both enabled and disabled each. Using the NIST ACVP reference implementation, shared secret computation and key generation was successfully tested. Tested-by: Stephan Mueller Ciao Stephan