mbox series

[0/4] crypto: arm64/aes-blk - cleanups and optimizations for XTS/CTS-CBC

Message ID 20180910144115.25727-1-ard.biesheuvel@linaro.org
Headers show
Series crypto: arm64/aes-blk - cleanups and optimizations for XTS/CTS-CBC | expand

Message

Ard Biesheuvel Sept. 10, 2018, 2:41 p.m. UTC
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 <ebiggers@google.com>
Cc: Theodore Ts'o <tytso@mit.edu>
Cc: Steve Capper <steve.capper@arm.com>

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

Comments

Ard Biesheuvel Sept. 20, 2018, 2:13 p.m. UTC | #1
On 10 September 2018 at 07:41, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> 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 <ebiggers@google.com>

> Cc: Theodore Ts'o <tytso@mit.edu>

> Cc: Steve Capper <steve.capper@arm.com>

>

> 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(-)

>


Eric, any thoughts on this?
Herbert Xu Sept. 21, 2018, 5:44 a.m. UTC | #2
On Mon, Sep 10, 2018 at 04:41:11PM +0200, Ard Biesheuvel wrote:
> 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 <ebiggers@google.com>

> Cc: Theodore Ts'o <tytso@mit.edu>

> Cc: Steve Capper <steve.capper@arm.com>

> 

> 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(-)


All applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt