[PATCH 00/15] AES-CMAC library
Ard Biesheuvel
ardb at kernel.org
Thu Feb 19 01:25:11 PST 2026
On Wed, 18 Feb 2026, at 22:34, Eric Biggers wrote:
> This series can also be retrieved from:
>
> git fetch
> https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git
> aes-cmac-v1
>
> This series adds support for AES CBC-based MACs to the crypto library,
> specifically AES-CMAC, AES-XCBC-MAC, and AES-CBC-MAC. The
> implementation is fully optimized with the existing
> architecture-optimized AES code, either single-block AES en/decryption
> or arm64's neon_aes_mac_update() and ce_aes_mac_update(). As usual,
> optimizations are now enabled by default as well.
>
> AES-CMAC support will be useful for at least the SMB client and server,
> and the bluetooth and mac80211 drivers. Patches 8-15 convert these
> users to use the crypto library API instead of crypto_shash, though
> these patches will likely go in via subsystem trees later. They result
> in some significant simplifications and performance improvements.
>
> As usual, a KUnit test suite, FIPS self-test, and traditional crypto API
> wrapper algorithms are included as well.
>
> Note that I'm also planning to add additional AES modes to the library.
> This is just an initial set of AES modes to get things started.
> Notably, with the SMB client and server already using the SHA* and MD5
> libraries, "cmac(aes)" was the only remaining use of crypto_shash there.
> So it makes sense to take care of that.
>
> Eric Biggers (15):
> lib/crypto: aes: Add support for CBC-based MACs
> crypto: aes - Add cmac, xcbc, and cbcmac algorithms using library
> crypto: arm64/aes - Fix 32-bit aes_mac_update() arg treated as 64-bit
> lib/crypto: arm64/aes: Move assembly code for AES modes into libaes
> lib/crypto: arm64/aes: Migrate optimized CBC-based MACs into library
> lib/crypto: tests: Add KUnit tests for CBC-based MACs
> lib/crypto: aes: Add FIPS self-test for CMAC
> smb: client: Use AES-CMAC library for SMB3 signature calculation
> smb: client: Remove obsolete cmac(aes) allocation
> smb: client: Make generate_key() return void
> smb: client: Drop 'allocate_crypto' arg from smb*_calc_signature()
> ksmbd: Use AES-CMAC library for SMB3 signature calculation
> Bluetooth: SMP: Use AES-CMAC library API
> wifi: mac80211: Use AES-CMAC library in ieee80211_aes_cmac()
> wifi: mac80211: Use AES-CMAC library in aes_s2v()
>
Reviewed-by: Ard Biesheuvel <ardb at kernel.org>
More information about the linux-arm-kernel
mailing list