]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ksmbd: Use AES-CMAC library for SMB3 signature calculation
authorEric Biggers <ebiggers@kernel.org>
Sat, 18 Apr 2026 22:17:07 +0000 (15:17 -0700)
committerSteve French <stfrench@microsoft.com>
Wed, 22 Apr 2026 13:11:23 +0000 (08:11 -0500)
commitcc92b479b6ed1d7d1a6eb13aba472badb836a832
tree2c54611f884294783b2d1edfb913047b3704c3aa
parentdef036ef87f8641c1c525d5ae17438d7a1006491
ksmbd: Use AES-CMAC library for SMB3 signature calculation

Now that AES-CMAC has a library API, convert ksmbd_sign_smb3_pdu() to
use it instead of a "cmac(aes)" crypto_shash.

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

Acked-by: Namjae Jeon <linkinjeon@kernel.org>
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/server/Kconfig
fs/smb/server/auth.c
fs/smb/server/auth.h
fs/smb/server/crypto_ctx.c
fs/smb/server/crypto_ctx.h
fs/smb/server/server.c
fs/smb/server/smb2pdu.c