Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2922736pxa; Tue, 18 Aug 2020 01:24:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHOFMMvTLKR9vHhKKgH3XI/s5Tl7vC7xpLvye5X98lRd42j3MiqNQnDTdxk11bQVIx492Z X-Received: by 2002:a17:906:6cd:: with SMTP id v13mr18556366ejb.307.1597739086775; Tue, 18 Aug 2020 01:24:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597739086; cv=none; d=google.com; s=arc-20160816; b=NQl5TH76gszJjyCyXbkBhxuGorTyq4yacBe+UybuEWPllgLxTHlt4W/XxLyMTPU9Q6 VmC7l/0Q9vqYXKZ3QFc1vjxXPf/5kTEqwUxcWTEJ5r2GgdrbUreIIks+hsEDjs0mKFNJ gvq1ZcB40gGfgMG/hJJAqSb/VIY29AcMJhIZVttXxuMsD72Uwm1Nt0YehX5Cl/7CVayA a3H/FRfwS+egXfjrud6W/MtagbsQvOwZkjrLNuyLK2m8p2qH4V/Eg2VdbmTjW6lxfFbR m/MlAf6mEqqbwFgoU+RLzipGRi9m1DJSsH/f+sb0uWyiad6O6EafYlW1aLP+KkwkT4Vn hGcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=z5iZVbZ5AGY6zdBlo0S8ulXWsD0kt8xMRW1csab2BjE=; b=B+NlSP4zorypObwJVamIUHxpqpy+asmfsxjwc9eAS6GIh9oO1Y+nercAEFz1ypaQTj +M0y+UcftVYZOWwYQv3OzylEjmbK0i6uBl+BniClKSyopXaiJenvMXM/0IbHmMSgaO0c N4bt3/wLenkUdyjOTUsl6HfajuHKdCp1QeAQT68SLIDpH3Ch4pxj1TIqJ62SK62wXNzj I+OvLydWqQzLcHnCQ5xRGdXjIPR5QHBZxbC+jD6sRP1wiJdR+Raa6EVWhLZtLRVFSFdr FujpfRGBo0yodaab0UMrSDbGcT4Qau5x4ph1sto6nRqN2BAiVaqxFwpLTis4d/dUX/JH 7QMg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a21si12554867edv.504.2020.08.18.01.24.16; Tue, 18 Aug 2020 01:24:46 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726228AbgHRIYO (ORCPT + 99 others); Tue, 18 Aug 2020 04:24:14 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:42286 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726043AbgHRIYO (ORCPT ); Tue, 18 Aug 2020 04:24:14 -0400 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.0.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1k7wug-0000cQ-Bq; Tue, 18 Aug 2020 18:24:11 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Tue, 18 Aug 2020 18:24:10 +1000 Date: Tue, 18 Aug 2020 18:24:10 +1000 From: Herbert Xu To: Ard Biesheuvel Cc: linux-crypto@vger.kernel.org, ebiggers@kernel.org, Ben Greear Subject: [PATCH 0/5] crypto: Implement cmac based on cbc skcipher Message-ID: <20200818082410.GA24497@gondor.apana.org.au> References: <20200802090616.1328-1-ardb@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200802090616.1328-1-ardb@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Sun, Aug 02, 2020 at 12:06:16PM +0300, Ard Biesheuvel wrote: > Ben reports that CCM using AES-NI instructions performs pathologically > poorly, which is due to the overhead of preserving/restoring the SIMD > state, which is repeated after every 16 bytes of input when executing > the CBCMAC portion of the algorithm. > > So let's clone the arm64 implementation of cbcmac(aes), which takes > care to only preserve/restore the SIMD state after processing the > whole input. Since cmac(aes) and xcbc(aes) can reuse most of the code, > let's expose those as well. > > Cc: Ben Greear > Signed-off-by: Ard Biesheuvel > --- > arch/x86/crypto/Makefile | 2 +- > arch/x86/crypto/aesni-intel.h | 39 +++ > arch/x86/crypto/aesni-intel_glue.c | 42 +--- > arch/x86/crypto/aesni-intel_mac.c | 257 ++++++++++++++++++++ > 4 files changed, 306 insertions(+), 34 deletions(-) We should just use the accelerated cbc skcipher. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt