Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1628927rwb; Thu, 10 Nov 2022 20:25:41 -0800 (PST) X-Google-Smtp-Source: AMsMyM5bzJ10wdaroTbaelME/n7Lw7wEXQmI3Xcgu5oZELt6k67FU2mVnFBxBOisa9AgiKiEGlVT X-Received: by 2002:aa7:cf1a:0:b0:461:ad40:e80a with SMTP id a26-20020aa7cf1a000000b00461ad40e80amr4410244edy.369.1668140740955; Thu, 10 Nov 2022 20:25:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668140740; cv=none; d=google.com; s=arc-20160816; b=Kii6jMDJkqLaLwF5Uzm+4kk7h8seBrPDraLH+VKTUhpTQaZC9cu9I5Fn+TW7tvCAI4 c3E+gqxEt02Q/uSfvSofZN5pPo0XV+RU9GRZar5RQZcinkxWbQvlA7l86I39vwX4z75n mvyfdZNCfHV9YRPoqFVkyTPITTguGU3IFZOub/2jLTSO45iVDevof/pSD/pS4dG+7ntj Lw6NuxPat5OAZ5zVNSGTq39s9iJM3uw4gsotmiO/rcxZz7zboKu+UPkcpY6xdfY3dYCr hH7x+uGEb/JirrUD0vpn/9LEssKNjJYsSrpzBY+tlZS17aqOcG/kF1rECnp6j3TowyWp bUUQ== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Zsc9jT8Hph1QUL3U6e5HbXKHGDYb6MOqXyf7crcp6jY=; b=Bn4QDrLQn0z89ZrK7ElZslk5VLkw116Xvj7S2FigVN5rXC8F9iBFwtvPqoyPg/NmBW q0MOJXkyb3WrIOjh7mzzLYjmsO18KuoWd43zaN/daGJ0P6FAdZJ8y1bMKAGUCQaKv9kE WrprDwx0j1i8D3Fp2a9Ea0CCKQdDuhLwkNHedAHK4IAb6MkxxmF40uV6TAWUUjL+fde4 AjA2Gj76YUrtLWXvc0537TBZLUxcBdkRTJn6OagiecBP3nm4UTk+lMIes0zo9FLAH6bH Ni4MY8SYQAYbf5InkPGEtceeAuYtcFyrwZltwUNfhz16NvvifpTG9Jtad/bTZ/gPzyYZ ajBw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id he14-20020a1709073d8e00b007ad88f87ed6si1187215ejc.993.2022.11.10.20.25.16; Thu, 10 Nov 2022 20:25:40 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230055AbiKKEXT (ORCPT + 99 others); Thu, 10 Nov 2022 23:23:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229932AbiKKEXR (ORCPT ); Thu, 10 Nov 2022 23:23:17 -0500 Received: from formenos.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A883345A3E; Thu, 10 Nov 2022 20:23:16 -0800 (PST) Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1otLZH-00CqDB-D2; Fri, 11 Nov 2022 12:23:04 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Fri, 11 Nov 2022 12:23:03 +0800 Date: Fri, 11 Nov 2022 12:23:03 +0800 From: Herbert Xu To: Nicolai Stange Cc: "Elliott, Robert (Servers)" , "David S. Miller" , Vladis Dronov , Stephan Mueller , "linux-crypto@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 1/4] crypto: xts - restrict key lengths to approved values in FIPS mode Message-ID: References: <20221108142025.13461-1-nstange@suse.de> <20221108142025.13461-2-nstange@suse.de> <8735asfnmu.fsf@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8735asfnmu.fsf@suse.de> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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 Wed, Nov 09, 2022 at 11:06:17AM +0100, Nicolai Stange wrote: > > >From a quick glance, all of the above drivers merely convert some > crypto_skcipher to a crypto_tfm before passing it to xts_check_key(). > > So I think these should all be made to call xts_verify_key() directly > instead, the former xts_check_key() could then get dropped. But that's > more of a cleanup IMO and would probably deserve a separate patch series > on its own. We should make sure both do the same thing though. So either change all the drivers or just change xts_check_key in your patch in addition to xts_verify_key. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt