Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3924660pxb; Mon, 21 Feb 2022 08:25:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJzi//xTJfi8UczKvejURjdErIN0O+vvugJ0ZO9l0ubXsE/5blomZhiOvCDno12KJb/ka9n4 X-Received: by 2002:a05:6402:11ce:b0:412:f162:28e8 with SMTP id j14-20020a05640211ce00b00412f16228e8mr8023971edw.341.1645460709549; Mon, 21 Feb 2022 08:25:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645460709; cv=none; d=google.com; s=arc-20160816; b=Uz6HFpp10hQCmh+Gmi3mT++w0CgVEuqEFR2uWAEZyvglW2ldJIvSxBpvsd0cENsvPO BfU6UgzBhqUPtwRXV+tqRXCbrFJgX1t6Xb0tmE7dZv/3kQ2bRU5UVC4wjuepQ7Y31DB/ EgE9Cj7HQNtutH69U0uj3To7mNqrBp+VFhWIRYtPErgp50BowXhAXqnN6FA+RAO3Es83 AdXfn5GyKx/mOE4RN5AiBKMJ45rDtblYHClb+BEmV9f2Z64WECDsTs62TnyL4BJm+GRA d+H5NcwZC0vikhu+1SzXUxzlDxUISPxxZZwZmPWCGGNedicnXJ+7vcBuhtPqooO4qpyk Dw4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=xpvzMC8Ckl84xZPjUXNnHSVeQU6Bt4IElqUIe5yAtWA=; b=Ltzwt30d1XrIibGfSIo2LySmLyxYaANpI9psnS/yfhWox6KzXqD901cvkdMESoxu2i Ffj7HKnrMewzCWLCvzanTdRdcDcE9pt4CN9qJoCipPiCHhvdocQHcM/JG67J5WCOOlI+ zT1v14CfykZ5B5GfS0FV7PqClLUUYk67dJnzRaV6AnLrLqoGhaFGFvcKq3E31SHaPsl1 lFw3puPki76x4XFDW5/7Y9t/7HNvQg3LBZqqVEFhxW6DpinXI7E8C5nW9msZgqRDHm6h +lANJ/8pF3DMoCe3qcp57GPYP7B6MJc261QTgH09gT3qm1xd7ZGsaR3nLwinOc9z5k/J xaWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=VmZaOh95; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w13si1254579edd.304.2022.02.21.08.24.46; Mon, 21 Feb 2022 08:25:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-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=@suse.de header.s=susede2_rsa header.b=VmZaOh95; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377553AbiBUOUP (ORCPT + 99 others); Mon, 21 Feb 2022 09:20:15 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:57526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357379AbiBUOUO (ORCPT ); Mon, 21 Feb 2022 09:20:14 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A28BA12AF2; Mon, 21 Feb 2022 06:19:51 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 608B02111A; Mon, 21 Feb 2022 14:19:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1645453190; h=from:from:reply-to: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=xpvzMC8Ckl84xZPjUXNnHSVeQU6Bt4IElqUIe5yAtWA=; b=VmZaOh95QLUlV9MWk1nhRkoRJ7Z3cyoXt547oBP4p6Xvha723dErQFriFXjdy7eMkDDWZP 7C/YYhPKHRv7lqgPROkdPmUlZV5ZGdRxJyXak4eNmrxuWw7LIX/HQ40fEtbbViCe+niHp5 orNFlflBjdQ6te4aoxqODY1SvEgkj9w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1645453190; h=from:from:reply-to: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=xpvzMC8Ckl84xZPjUXNnHSVeQU6Bt4IElqUIe5yAtWA=; b=0wrntaKV9mIr7Mj6qfD458ZIAbj45zfLV4x0qYiA6RaUX0LGTpgCsAMuNqTeJrknHknG/g 02KICil27wl9g2Bg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 407EE13B2F; Mon, 21 Feb 2022 14:19:50 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id IisJDoafE2IjIwAAMHmgww (envelope-from ); Mon, 21 Feb 2022 14:19:50 +0000 Message-ID: <23740a5b-5c3b-d685-c1fa-99f97d5211ea@suse.de> Date: Mon, 21 Feb 2022 15:19:49 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH v4 13/15] crypto: dh - disallow plain "dh" usage in FIPS mode Content-Language: en-US To: Nicolai Stange , Herbert Xu , "David S. Miller" Cc: =?UTF-8?Q?Stephan_M=c3=bcller?= , Torsten Duwe , David Howells , Jarkko Sakkinen , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, keyrings@vger.kernel.org References: <20220221121101.1615-1-nstange@suse.de> <20220221121101.1615-14-nstange@suse.de> From: Hannes Reinecke In-Reply-To: <20220221121101.1615-14-nstange@suse.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On 2/21/22 13:10, Nicolai Stange wrote: > SP800-56Arev3, sec. 5.5.2 ("Assurance of Domain-Parameter Validity") > asserts that an implementation needs to verify domain paramtere validity, > which boils down to either > - the domain parameters corresponding to some known safe-prime group > explicitly listed to be approved in the document or > - for parameters conforming to a "FIPS 186-type parameter-size set", > that the implementation needs to perform an explicit domain parameter > verification, which would require access to the "seed" and "counter" > values used in their generation. > > The latter is not easily feasible and moreover, SP800-56Arev3 states that > safe-prime groups are preferred and that FIPS 186-type parameter sets > should only be supported for backward compatibility, if it all. > > Mark "dh" as not fips_allowed in testmgr. Note that the safe-prime > ffdheXYZ(dh) wrappers are not affected by this change: as these enforce > some approved safe-prime group each, their usage is still allowed in FIPS > mode. > > This change will effectively render the keyctl(KEYCTL_DH_COMPUTE) syscall > unusable in FIPS mode, but it has been brought up that this might even be > a good thing ([1]). > > [1] https://lore.kernel.org/r/20211217055227.GA20698@gondor.apana.org.au > > Signed-off-by: Nicolai Stange > --- > crypto/testmgr.c | 1 - > 1 file changed, 1 deletion(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.de +49 911 74053 688 SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), GF: Felix Imendörffer