Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3787272rdb; Thu, 14 Sep 2023 02:35:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEySiKsMlw7N0dFhSr3cjt+x+JCZJBwaBtHZZVWSAUS6xkBSh/sbqaUwTsN1p4NO5f4/q2N X-Received: by 2002:a05:6808:14c7:b0:3a7:4b9a:43ca with SMTP id f7-20020a05680814c700b003a74b9a43camr6451297oiw.53.1694684125810; Thu, 14 Sep 2023 02:35:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694684125; cv=none; d=google.com; s=arc-20160816; b=Z8h1ju02moUG1YVsi6nh/r49alQtGvKIFSgzfXNB8AhTT9zmRgn3d8H+dx9F2GUaWx foJMDCEY9rNlnq3NYeWkBplX/bxYRLnsZVFpBRGyzAHYl//yyqgvMvZ/41UtSefvbk+6 MsUR2WfYgVnWGvL2sakZ1z4s8upRDRzcNY4gll/kD+STrHgJcjmRNKGzsDhfgBLBnxAA Y9ISZZ3f6MOWfwQYAZZywkQxMWMPbKPuB/maDYJRuOnAyy7zoZudddtTOG50kUNrsWy7 HX6NuwCMrVFtyJYPabfzlJxo6Z8Liik1JwIdK/b30+BNkYoSzfoboz87+zJl1dWQpCzN 4olQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Y81nEm+08vN1p4uDyRXtXGjbvYexXjVWhATeMOgu3wk=; fh=OUpgHz8gu+EFyREjScBnwgXxe9p5hHef04jJGlkpTWE=; b=0lZeR+JEUCueLjpS39U4+J52+k4M6XyNBtq6kQ/rT857cQVDhnlPvWlkV7HVBz8WQH vKJ4/Zpbt3MxXMw9Re0I1MTCBPv5rwU4wELKxqEc4pY3GwpRxQ2RV90xo7xOvHSUkQev bsFKCHAX0zII9ew1ufsw1Ml3wnCMukn8yqePsNDrobEUmhhcoUMqTRMZsKdCOxLnWfRG 4rXCj796d4Z0VyWPuR2j30dNEWcs4bwzFxNhhGKpoB0Kl6AljuYGkbXUqp/EI/uNC0n8 4wOoSCOvp4Y7c6K2m3MABCCltAo1w5SH0+YGVpjuH/rZXQtCsKbSXkTEo8zcg+2CrziZ Xjrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FeDdInOK; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id ay5-20020a056a00300500b0068e3a3cdfecsi1213601pfb.224.2023.09.14.02.35.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 02:35:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FeDdInOK; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 611FB80203E3; Thu, 14 Sep 2023 02:31:28 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236696AbjINJbb (ORCPT + 99 others); Thu, 14 Sep 2023 05:31:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235604AbjINJbb (ORCPT ); Thu, 14 Sep 2023 05:31:31 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2915CBB for ; Thu, 14 Sep 2023 02:31:27 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5F86C433CA for ; Thu, 14 Sep 2023 09:31:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694683886; bh=Y81nEm+08vN1p4uDyRXtXGjbvYexXjVWhATeMOgu3wk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=FeDdInOKVq1F+p1t4W9Djp7IiHkoUP0lh3jBMfUzIguIuwu2RTbAou0aoGZNlmFa5 Rv9MM/PU1MxCaMY+MBzL2w5/F3iwut+CiZbQoB7shONxUR58RCnj+FEqfD1Kohf/t9 5k/8tE4iblqRPJL6/Je/wPmgBG/S6ddoboJkpSWn+sevuOnSY4tGLwpgk1/KHYa934 4mOPJMj0ImZ6slHXys7/H0ZKR5Av87G48uGR9RtRiC4WrTQ9b3WzSrKvwkPIvHMVkr HXl0C/aAANqBofZ4CfxfJKo2r9s9m38IFKE9KQcKskLUNxvHKG70cLbbiD6jbdPfTd tuTfdA6tP6Iig== Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-2bcb50e194dso11378641fa.3 for ; Thu, 14 Sep 2023 02:31:26 -0700 (PDT) X-Gm-Message-State: AOJu0YwgB0ju0Saz2YKWKjPaCBgYBfNClkUWGtVF+s6A9Z88NFrBiGX7 qGnuzf3kLELVq5BjByoHn7BN5GaYPcsnajVT1z4= X-Received: by 2002:a05:651c:1034:b0:2bd:d31:cf32 with SMTP id w20-20020a05651c103400b002bd0d31cf32mr4203792ljm.15.1694683885007; Thu, 14 Sep 2023 02:31:25 -0700 (PDT) MIME-Version: 1.0 References: <20230914082828.895403-1-herbert@gondor.apana.org.au> In-Reply-To: From: Ard Biesheuvel Date: Thu, 14 Sep 2023 11:31:14 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 0/8] crypto: Add lskcipher API type To: Herbert Xu Cc: Linux Crypto Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 14 Sep 2023 02:31:28 -0700 (PDT) X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email On Thu, 14 Sept 2023 at 11:30, Herbert Xu wrote: > > On Thu, Sep 14, 2023 at 11:18:00AM +0200, Ard Biesheuvel wrote: > > > > So this means that the base name will be aes, not ecb(aes), right? > > What about cbc and ctr? It makes sense for a single lskcipher to > > implement all three of those at least, so that algorithms like XTS and > > GCM can be implemented cheaply using generic templates, without the > > need to call into the lskcipher for each block of input. > > You can certainly implement all three with arch-specific code > but I didn't think there was a need to do this for the generic > version. > Fair enough. So what should such an arch version implement? aes cbc(aes) ctr(aes) or ecb(aes) cbc(aes) ctr(aes) ?