Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp386976pxk; Fri, 11 Sep 2020 09:32:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6yLCoL1kszmTD372M5n0XzXJI11qr+RNjQj3rb+JbHGD6rVHVsS0wZgLPMQ5OJZUi71Az X-Received: by 2002:a17:906:e18:: with SMTP id l24mr2842329eji.334.1599841920998; Fri, 11 Sep 2020 09:32:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599841920; cv=none; d=google.com; s=arc-20160816; b=nLYbt8MeC4Iu6Zxv9pQApPb+NOZe588hqzqt3FPE0dQy4RKSucElJAC7I5PNB+ODii o7ZKxUeopX9llVlCMPnk0/4AQ9UStbytUMv7HWJn/wuztUyxJfeGD1BrNpKFGd/RWHhV BN7UDUdfO/CqjZAHpw+trEfRpzUGFtZKVam/ZFL8Zhk4V7LRPkiFi0vh3geW5zm1oE9G 4NYhj3tpfwBpTeZXwShLpr3Hq15+SquMncRDKlFp1DKIv0aabEz0i0Q7oiMeqEZVQS3C EnPru+/bDLD9P+x2Y1sJLZ2Gn2mshW2Dt7R6BMJGVYCjLsqX7U2G6SaTDD/9LjrJQiQh 6sSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=J23HKSJPJEEq3Nu1U1GKL7z3p29WpomSj6rUg15L0y4=; b=DsPVic6HAVg8kA5WPvQu/XsQ5CP4p8YlMnxkF61NewEry16SgD4NxEKuMskDZNFZlX igVfvMBDeDSKHREbostSPWW0mIjhsM5wRKy2OkyCDe0ENTZMYNPwVZnDokvQ5W2swLNl KwmWnO6WMLfvOEZiT14NvviFEsBVpqqVu78Nn09ACAe5OdfTW/Y18PzKA2s2BEHLl1Se wiVGgxA5nvRJEPFqMcaABHrzHWvThGnQrkmMu3nR2QIJc2ovrFyXopJ7OoDkKtPwLXAu Zzocu+0QX8syq7R8JwvctVLH2V8V9ftNm8gZVGg+H1Zvi3nw2lulAeeOAhLNijNQniAG lo/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=D5oEDDiL; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cx16si1670260edb.575.2020.09.11.09.31.36; Fri, 11 Sep 2020 09:32:00 -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=@kernel.org header.s=default header.b=D5oEDDiL; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726262AbgIKQbb (ORCPT + 99 others); Fri, 11 Sep 2020 12:31:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:33494 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726270AbgIKQac (ORCPT ); Fri, 11 Sep 2020 12:30:32 -0400 Received: from mail-ot1-f53.google.com (mail-ot1-f53.google.com [209.85.210.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 45FB0206DB for ; Fri, 11 Sep 2020 16:30:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599841832; bh=h89bdVr/bit3pPtuE9cNhHZorvHOPU7+EYEVbVfI9Jo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=D5oEDDiL0GJK+ElFzq8mQh5bMGWAoJOMFikKNz3Q4aHxgTkjfA2f10D4u6j1vwCBT QqjAPXoK4vBzo4ZrisI9pZFZRpRMxygdvIVuBNU+QY4sQs+SbMG3jR6DnbBkyy3g6k vC1RTBY8nSY0a4HNRlUDBSBddnRrOFsaz7zWKHPk= Received: by mail-ot1-f53.google.com with SMTP id e23so8830767otk.7 for ; Fri, 11 Sep 2020 09:30:32 -0700 (PDT) X-Gm-Message-State: AOAM531LQxh05HGrjUIFkfeF0htjxGWFW8vF557VZRFEjmdz6SfZ5iek 3N/lL2Wk2cNunvJBZsC6vOoUGpkGQaI4wS3i0fE= X-Received: by 2002:a9d:69c9:: with SMTP id v9mr1597523oto.90.1599841831517; Fri, 11 Sep 2020 09:30:31 -0700 (PDT) MIME-Version: 1.0 References: <20200911141103.14832-1-ardb@kernel.org> In-Reply-To: From: Ard Biesheuvel Date: Fri, 11 Sep 2020 19:30:20 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] crypto: mark unused ciphers as obsolete To: "Van Leeuwen, Pascal" , dm-devel@redhat.com, Milan Broz Cc: "linux-crypto@vger.kernel.org" , "herbert@gondor.apana.org.au" , "ebiggers@kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org (cc Milan and dm-devel) On Fri, 11 Sep 2020 at 19:24, Van Leeuwen, Pascal wrote: > > > -----Original Message----- > > From: linux-crypto-owner@vger.kernel.org On Behalf Of Ard Biesheuvel > > Sent: Friday, September 11, 2020 4:11 PM > > To: linux-crypto@vger.kernel.org > > Cc: herbert@gondor.apana.org.au; ebiggers@kernel.org; Ard Biesheuvel > > Subject: [PATCH] crypto: mark unused ciphers as obsolete > > > > <<< External Email >>> > > We have a few interesting pieces in our cipher museum, which are never > > used internally, and were only ever provided as generic C implementatio= ns. > > > > Unfortunately, we cannot simply remove this code, as we cannot be sure > > that it is not being used via the AF_ALG socket API, however unlikely. > > So let's mark the Anubis, Khazad, SEED and TEA algorithms as obsolete, > > > Wouldn't the IKE deamon be able to utilize these algorithms through the X= FRM API? > I'm by no means an expert on the subject, but it looks like the cipher te= mplate is > provided there directly via XFRM, so it does not need to live in the kern= el source. > And I know for a fact that SEED is being used for IPsec (and TLS) in Kore= a. > I have been staring at net/xfrm/xfrm_algo.c, and as far as I can tell, algorithms have to be mentioned there in order to be usable. None of the ciphers that this patch touches are listed there or anywhere else in the kernel. > The point being, there are more users to consider beyond "internal" (mean= ing hard > coded in the kernel source in this context?) and AF_ALG. > That is a good point, actually, since dm-crypt could be affected here as well, hence the CCs. Milan (or others): are you aware of any of these ciphers being used for dm-crypt? > I'm not aware of any real use cases for Anubis, Khazad and TEA though. > OK, thanks for confirming. Removing those would be a good start. > > which means they can only be enabled in the build if the socket API is > > enabled in the first place. > > > > Signed-off-by: Ard Biesheuvel > > --- > > Hopefully, I will be able to convince the distro kernel maintainers to > > disable CRYPTO_USER_API_ENABLE_OBSOLETE in their v5.10+ builds once the > > iwd changes for arc4 make it downstream (Debian already has an updated > > version in its unstable distro). With the joint coverage of their QA, > > we should be able to confirm that these algos are never used, and > > actually remove them altogether. > > > > crypto/Kconfig | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/crypto/Kconfig b/crypto/Kconfig > > index e85d8a059489..fac10143d23f 100644 > > --- a/crypto/Kconfig > > +++ b/crypto/Kconfig > > @@ -1185,6 +1185,7 @@ config CRYPTO_AES_PPC_SPE > > > > config CRYPTO_ANUBIS > > tristate "Anubis cipher algorithm" > > +depends on CRYPTO_USER_API_ENABLE_OBSOLETE > > select CRYPTO_ALGAPI > > help > > Anubis cipher algorithm. > > @@ -1424,6 +1425,7 @@ config CRYPTO_FCRYPT > > > > config CRYPTO_KHAZAD > > tristate "Khazad cipher algorithm" > > +depends on CRYPTO_USER_API_ENABLE_OBSOLETE > > select CRYPTO_ALGAPI > > help > > Khazad cipher algorithm. > > @@ -1487,6 +1489,7 @@ config CRYPTO_CHACHA_MIPS > > > > config CRYPTO_SEED > > tristate "SEED cipher algorithm" > > +depends on CRYPTO_USER_API_ENABLE_OBSOLETE > > select CRYPTO_ALGAPI > > help > > SEED cipher algorithm (RFC4269). > > @@ -1613,6 +1616,7 @@ config CRYPTO_SM4 > > > > config CRYPTO_TEA > > tristate "TEA, XTEA and XETA cipher algorithms" > > +depends on CRYPTO_USER_API_ENABLE_OBSOLETE > > select CRYPTO_ALGAPI > > help > > TEA cipher algorithm. > > -- > > 2.17.1 > > Regards, > Pascal van Leeuwen > Silicon IP Architect Multi-Protocol Engines, Rambus Security > Rambus ROTW Holding BV > +31-73 6581953 > > Note: The Inside Secure/Verimatrix Silicon IP team was recently acquired = by Rambus. > Please be so kind to update your e-mail address book with my new e-mail a= ddress. > > > ** This message and any attachments are for the sole use of the intended = recipient(s). It may contain information that is confidential and privilege= d. If you are not the intended recipient of this message, you are prohibite= d from printing, copying, forwarding or saving it. Please delete the messag= e and attachments and notify the sender immediately. ** > > Rambus Inc.