]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
smb: client: Use AES-CMAC library for SMB3 signature calculation
authorEric Biggers <ebiggers@kernel.org>
Sat, 18 Apr 2026 22:13:08 +0000 (15:13 -0700)
committerSteve French <stfrench@microsoft.com>
Wed, 22 Apr 2026 14:56:07 +0000 (09:56 -0500)
commit3a4580e71371dc5d323ac1fb4af80316838aca14
treec8272beaf5a5a9acb763ddf8d93fda41c32f2acc
parent44ccf4162adc8a33520112be598a6fba5b318e51
smb: client: Use AES-CMAC library for SMB3 signature calculation

Convert smb3_calc_signature() to use the AES-CMAC library instead of a
"cmac(aes)" crypto_shash.

The result is simpler and faster code.  With the library there's no need
to allocate memory, no need to handle errors except for key preparation,
and the AES-CMAC code is accessed directly without inefficient indirect
calls and other unnecessary API overhead.

For now a "cmac(aes)" crypto_shash is still being allocated in
'struct cifs_secmech'.  Later commits will remove that, simplifying the
code even further.

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/Kconfig
fs/smb/client/cifsencrypt.c
fs/smb/client/cifsglob.h
fs/smb/client/smb2transport.c