Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp7997825rwi; Tue, 25 Oct 2022 00:43:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5djYLtyj/gSOwiVGWFcprkUNsnVUzmA0d3/blsEZWlQNi0Ny8dGr7oo8L9NxpOEOO0u/Zf X-Received: by 2002:a17:90a:1197:b0:212:cfa7:8388 with SMTP id e23-20020a17090a119700b00212cfa78388mr24436750pja.4.1666683791948; Tue, 25 Oct 2022 00:43:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666683791; cv=none; d=google.com; s=arc-20160816; b=MZUxcuIBfbLUN1kJbQbhBNGzEHSlBG+fqOL0rP2cucosfJwpwrSF4vPE45go7yaFZe IljZ6tv+8fF2AvjI+iGFeqemhx+qQNwQPrjlgmKbjs5tAHMNUsIz3LS3X/utnhu+869N Tg4FCbS0OOAqOAGM4gxBaD/nNMECufPdJdjr3hG8mjepIhSItx11cWWDw+05ZyBRTB30 idtdD1Xo6P58EiDRa/9lofRs/RqJPnMiEUfNFk1zSKAtfeX3JWpl/E6n2djkatB7fm8K wKqiF7AaHUf0+ASWsZ/KxNBXPzO2kVs4HKqWxpsMy5352Z4a0DcRXAF6Lbf2TDqxb2c5 uGxQ== 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; bh=UlaCPJAHfh0X8quwkedoW7OpXRelj5FMUCn9oIMzOwI=; b=gQQ8q/RzfRmffGd92uB4FktTPXb4TUvDz1Q3qEz1B9Bc40WOFUTJMYaMzRsnBsVCpo XfDmx7+YpvJ69A7GL3nJBIW31V1SpI6fZobOSqGPHN+IkKG5fWlAYa/7CTiI1iaKceDn +AW2z9swbC4K1Aau50n8Lk48x6Yt63ZlnTh4TcCZv1+BW/lgzjRZMR68KlhiK50nitqL iZ9Pcui1wt7JTXE3e3Mv4vYq3cg+QZy9t+8huNWE5WXwGD8J9dOUjXRnxGnkF/L3n0Hi e2/xFajPJFnBC4VVcCzofQrdv/f3WU3QTipJjhg3lHOwtfWMUTFXI1ibv46ZRIuCismU wr1g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u21-20020a634555000000b00439cc644c03si2187407pgk.228.2022.10.25.00.42.49; Tue, 25 Oct 2022 00:43:11 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231769AbiJYHlI (ORCPT + 99 others); Tue, 25 Oct 2022 03:41:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231913AbiJYHlD (ORCPT ); Tue, 25 Oct 2022 03:41:03 -0400 Received: from out199-9.us.a.mail.aliyun.com (out199-9.us.a.mail.aliyun.com [47.90.199.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 239221162C5; Tue, 25 Oct 2022 00:41:01 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R151e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046050;MF=tianjia.zhang@linux.alibaba.com;NM=1;PH=DS;RN=14;SR=0;TI=SMTPD_---0VT2-i3n_1666683654; Received: from 30.240.99.167(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0VT2-i3n_1666683654) by smtp.aliyun-inc.com; Tue, 25 Oct 2022 15:40:57 +0800 Message-ID: <93a9e613-c4ee-e2f8-63d0-45119c031670@linux.alibaba.com> Date: Tue, 25 Oct 2022 15:40:53 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.13.1 Subject: Re: [PATCH v2 12/15] crypto: arm64/sm4 - add CE implementation for ESSIV mode Content-Language: en-US To: Eric Biggers Cc: Herbert Xu , "David S. Miller" , Jussi Kivilinna , Ard Biesheuvel , Mark Brown , Catalin Marinas , Will Deacon , Maxime Coquelin , Alexandre Torgue , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com References: <20221018071006.5717-1-tianjia.zhang@linux.alibaba.com> <20221018071006.5717-13-tianjia.zhang@linux.alibaba.com> <6d2a98f4-c50d-d05b-4a24-08fdd3ee20fa@linux.alibaba.com> From: Tianjia Zhang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL 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 Hi Eric, On 10/25/22 1:20 PM, Eric Biggers wrote: > On Fri, Oct 21, 2022 at 10:47:14AM +0800, Tianjia Zhang wrote: >> Hi Eric, >> >> On 10/20/22 11:58 AM, Eric Biggers wrote: >>> On Tue, Oct 18, 2022 at 03:10:03PM +0800, Tianjia Zhang wrote: >>>> This patch is a CE-optimized assembly implementation for ESSIV mode. >>>> The assembly part is realized by reusing the CBC mode. >>>> >>>> Signed-off-by: Tianjia Zhang >>> >>> Is there still a use case for CBC-ESSIV mode these days, now that everyone is >>> using XTS instead? >>> >>> - Eric >> >> The mainstream is already using XTS, but CBC-ESSIV is still an optional >> backup algorithm, especially in block crypto and fscrypto, I'm currently >> working on supporting the SM4 algorithm for these subsystems. >> > > The only reason that AES-CBC-ESSIV support was added to fs/crypto/ was because > someone had a low-power embedded device with a hardware crypto accelerator that > only supported AES-CBC. > > Nothing like that is relevant here, as this is just a software implementation. > > Please just don't include ESSIV. There's no need to implement random useless > algorithms. It could always be added later if a use case actually arises. > > - Eric Thanks for this information, I will remove the ESSIV code in the next patch. Best regards, Tianjia