linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] crypto: time invariant AES for CCM (and GCM/CTR)
@ 2017-01-28 23:33 Ard Biesheuvel
  2017-01-28 23:33 ` [PATCH v2 1/4] crypto: testmgr - add test cases for cbcmac(aes) Ard Biesheuvel
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Ard Biesheuvel @ 2017-01-28 23:33 UTC (permalink / raw)
  To: linux-crypto; +Cc: linux-arm-kernel, herbert, Ard Biesheuvel

This series is primarily directed at improving the performance and security
of CCM on the Rasperry Pi 3. This involves splitting the MAC handling of
CCM into a separate driver so that we can efficiently replace it by something
else using the ordinary algo resolution machinery.

Patch #1 adds some testcases for cbcmac(aes), which will be introduced later.

Patch #2 replaces the open coded CBC MAC hashing routines in the CCM driver
with calls to a cbcmac() hash, and implements a template for producing such
transforms. This eliminates all the fuzzy scatterwalk code as well.

Patch #3 implements cbcmac(aes) using NEON on arm64

Patch #4 is an RFC patch that implements ctr(aes) and cbcmac(aes) in a way
that is intended to eliminate observeable data dependent latencies in AES
processing, by replacing the usual 16 KB of lookup tables with a single
Sbox that is prefetched before processing each block. It is 50% slower than
generic AES, but this may be acceptable in many cases.

Changes since v1:
- remove ilen, and add missing flags assignment (#2)
- deal with zero cryptlen (#2)
- use correctly sized dg[] array in desc ctx (#3, #4)
- fix bug in update routine (#3)
- various other tweaks

Ard Biesheuvel (4):
  crypto: testmgr - add test cases for cbcmac(aes)
  crypto: ccm - switch to separate cbcmac driver
  crypto: arm64/aes - add NEON and Crypto Extension CBC-MAC driver
  crypto: aes - add generic time invariant AES for CTR/CCM/GCM

 arch/arm64/crypto/aes-glue.c  | 107 ++++++
 arch/arm64/crypto/aes-modes.S |  22 ++
 crypto/Kconfig                |  18 +
 crypto/Makefile               |   1 +
 crypto/aes_ti.c               | 320 +++++++++++++++++
 crypto/ccm.c                  | 376 +++++++++++++-------
 crypto/testmgr.c              |   7 +
 crypto/testmgr.h              |  58 +++
 8 files changed, 772 insertions(+), 137 deletions(-)
 create mode 100644 crypto/aes_ti.c

-- 
2.7.4

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-02-02 18:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-28 23:33 [PATCH v2 0/4] crypto: time invariant AES for CCM (and GCM/CTR) Ard Biesheuvel
2017-01-28 23:33 ` [PATCH v2 1/4] crypto: testmgr - add test cases for cbcmac(aes) Ard Biesheuvel
2017-01-28 23:33 ` [PATCH v2 2/4] crypto: ccm - switch to separate cbcmac driver Ard Biesheuvel
2017-02-02 18:56   ` Ard Biesheuvel
2017-01-28 23:33 ` [PATCH v2 3/4] crypto: arm64/aes - add NEON and Crypto Extension CBC-MAC driver Ard Biesheuvel
2017-01-28 23:33 ` [RFC PATCH v2 4/4] crypto: aes - add generic time invariant AES for CTR/CCM/GCM Ard Biesheuvel
2017-02-02  7:38   ` Eric Biggers
2017-02-02  7:48     ` Ard Biesheuvel
2017-02-02  7:55       ` Ard Biesheuvel
2017-01-31 18:30 ` [PATCH v2 0/4] crypto: time invariant AES for CCM (and GCM/CTR) Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).