From patchwork Mon Sep 10 14:41:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 146323 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp2574147ljw; Mon, 10 Sep 2018 07:43:37 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYIRKoe26ourcCiRQYD/McAEKSwy1660QZtXXjb4Jycd3LWBN+bpWIhDHlJE3ZeQdf4nRr0 X-Received: by 2002:a17:902:24e:: with SMTP id 72-v6mr22446146plc.74.1536590617008; Mon, 10 Sep 2018 07:43:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536590617; cv=none; d=google.com; s=arc-20160816; b=Y/xoR++LwE3pbltwypzHhI9NF8c3fOZbyUBL0gDCd5zG9Eg/HcwG0ZT37bQkgxRQGn eefngJcpHCaMvqeres7bs3XjnCwMKHbQwP8oYyicmkqjvj3yRVqYH97giiMtLhnUuzUv aZxgJArWEB/c9DcrwhkIHGHuaKEKg+A+RI3B5eZ87rO2GvpAcbIx9gabS4SOzjeLpzoD hIhHPJnSgCmJ8Dm8AkS2frK6+inT6Exea0sfGn//VYyGH07Jg5w4pN/Mh4WU46DW3hAz 2LGISYHi4KLkTDB43m2EZ6m6D7KWY2nDTvR04g40kNakO/65AvnjE6h65d7LLICa4nkA HpNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=DN8j8KEjIinzY3nH2wrtF4UyD74YG8R1EG33FH5HtmE=; b=RtTzHROM/fJdbL0uEl09NYkEcB0iAp3Ps1wE9R7N5saoyE1xaX/HPB4LB4UzgkGv/K 6AxNLKdUzz13KCoIx0Ni5rKVXYCuUBljufbWW62aPMZ14IjQ9n7If6IubE1Z3NS4Dqj/ qeMHC1L4IT8o2ouO4MJMIHSw+yejhu3zgl2woTO/WF4mREn2zr0eEq4hbexxOdViuefH iizNLU5Lq4DJ7n6fWSBEvNPvWT0Wjj1s/WcAWDnWM3FoviV9lsrasi4NouiZJo6b63sW 2Lfzj4gGIW3jwR5Png7WFDu0hoAreMnUMoDm/r/Zqd0DWwxfPr4q5pff4RyTiaabYT2M TokA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Y2sQdRty; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d2-v6si9571514plr.127.2018.09.10.07.43.36; Mon, 10 Sep 2018 07:43:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Y2sQdRty; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728341AbeIJTiA (ORCPT + 2 others); Mon, 10 Sep 2018 15:38:00 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:38549 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728127AbeIJTiA (ORCPT ); Mon, 10 Sep 2018 15:38:00 -0400 Received: by mail-ed1-f68.google.com with SMTP id h33-v6so16701024edb.5 for ; Mon, 10 Sep 2018 07:43:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=DN8j8KEjIinzY3nH2wrtF4UyD74YG8R1EG33FH5HtmE=; b=Y2sQdRtyRPlSeH/RbFAd915piLqhuBY+melHYhRfB6aWmgFRLtgjCb6AZZSZZ6Dsf9 3jGKDt4b3KEGlJusVK7wXUAVNWzY61cpNQUfEAhG38pvBrvRLiAZnE11LxDlifCly8Ih Q6WXAlFGIGEqVA3rLJzHy5jjHe4sgCkHcc9Bc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=DN8j8KEjIinzY3nH2wrtF4UyD74YG8R1EG33FH5HtmE=; b=Xvu2fAcHMPHQBA+OgQ1Ms/bijI0pkQlsZ59fVs+m+RjjfKOUy4Q2Yw3u+lsKFXlKFY yMsVoCptI+bE0jb3CqgXXLiKHWQpe64dg0HNt6YGORWvRZ0rRh9FGtqu11UBaYfZ7AyX 2RHr+OA8TvdDDf/cRNAUgYbhGWGu6zVG4Fha/pL9pM53bnVdee9rk+wvNWWveSliQW05 TSF6kgUgleGQA+3CHkMEQJf3Lz9R8whzg3vNSE/1PZmK04cwWnwuOE9gHltPn/CxJ/Ay BSssnuIF4UATPVkRYmo5zWW4x010SQOhq0SNA4JKyOUfayqsZwpmgqcwniVH4gqISBY/ /XBw== X-Gm-Message-State: APzg51BxGRtBZlXJzT3WwQmDDgOqQH50Cow2oKgJCXa/C+yc2T5yT1Gn r4NiqwDGSS2vSttjpIXLFlLZnLBN3qpa5cP2 X-Received: by 2002:aa7:d28c:: with SMTP id w12-v6mr22855940edq.113.1536590614188; Mon, 10 Sep 2018 07:43:34 -0700 (PDT) Received: from rev02.arnhem.chello.nl (dhcp-077-251-017-237.chello.nl. [77.251.17.237]) by smtp.gmail.com with ESMTPSA id d35-v6sm8279487eda.25.2018.09.10.07.43.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Sep 2018 07:43:33 -0700 (PDT) From: Ard Biesheuvel To: linux-crypto@vger.kernel.org Cc: herbert@gondor.apana.org.au, linux-arm-kernel@lists.infradead.org, Ard Biesheuvel , Eric Biggers , Theodore Ts'o , Steve Capper Subject: [PATCH 0/4] crypto: arm64/aes-blk - cleanups and optimizations for XTS/CTS-CBC Date: Mon, 10 Sep 2018 16:41:11 +0200 Message-Id: <20180910144115.25727-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.18.0 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Some cleanups and optimizations for the arm64 AES skcipher routines. Patch #1 fixes the peculiar use of u8 arrays to refer to AES round keys, which are natively arrays of u32. Patch #2 partially reverts the use of NEON yield calls, which is not needed for skciphers. Patch #3 adds support for cts(cbc(aes)) in the NEON chaining mode handling. Patch #4 tweaks the XTS handling to remove a literal load from the inner loop. Cc: Eric Biggers Cc: Theodore Ts'o Cc: Steve Capper Ard Biesheuvel (4): crypto: arm64/aes-blk - remove pointless (u8 *) casts crypto: arm64/aes-blk - revert NEON yield for skciphers crypto: arm64/aes-blk - add support for CTS-CBC mode crypto: aes/arm64-blk - improve XTS mask handling arch/arm64/crypto/aes-ce.S | 5 + arch/arm64/crypto/aes-glue.c | 212 +++++++++-- arch/arm64/crypto/aes-modes.S | 400 ++++++++++---------- arch/arm64/crypto/aes-neon.S | 6 + 4 files changed, 406 insertions(+), 217 deletions(-) -- 2.18.0