Skip to content

Commit f15f05b

Browse files
Ard Biesheuvelherbertx
authored andcommitted
crypto: ccm - switch to separate cbcmac driver
Update the generic CCM driver to defer CBC-MAC processing to a dedicated CBC-MAC ahash transform rather than open coding this transform (and much of the associated scatterwalk plumbing) in the CCM driver itself. This cleans up the code considerably, but more importantly, it allows the use of alternative CBC-MAC implementations that don't suffer from performance degradation due to significant setup time (e.g., the NEON based AES code needs to enable/disable the NEON, and load the S-box into 16 SIMD registers, which cannot be amortized over the entire input when using the cipher interface) Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 092acf0 commit f15f05b

File tree

2 files changed

+245
-137
lines changed

2 files changed

+245
-137
lines changed

crypto/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ comment "Authenticated Encryption with Associated Data"
263263
config CRYPTO_CCM
264264
tristate "CCM support"
265265
select CRYPTO_CTR
266+
select CRYPTO_HASH
266267
select CRYPTO_AEAD
267268
help
268269
Support for Counter with CBC MAC. Required for IPsec.

0 commit comments

Comments
 (0)