Eric Biggers
7137cbf2b5
crypto: aes - Add cmac, xcbc, and cbcmac algorithms using library
...
Update the "aes" module to implement "cmac(aes)", "xcbc(aes)", and
"cbcmac(aes)" algorithms using the corresponding library functions, and
register these with the crypto_shash API. Each algorithm is included
only if the corresponding existing kconfig option is enabled.
This allows the architecture-optimized implementations of these
algorithms to continue to be accessible via the crypto_shash API once
they are migrated into the library.
For "xcbc(aes)", I also fixed the bug where AES key lengths other than
128 bits were allowed, so that this bug didn't have to be implemented in
the library. The AES-XCBC-MAC specification (RFC 3566) is clear that
key lengths other than 128 bits MUST NOT be supported. AES-XCBC-MAC
derives a 128-bit subkey internally, so the nonstandard support for
longer AES keys didn't really work: AES-128 was still used internally.
In the unlikely event that someone is actually relying on the broken and
nonstandard support for longer AES-XCBC-MAC keys, we can fairly easily
reintroduce it. But it seems unnecessary: the only user of "xcbc(aes)"
seems to be IPsec, which uses 128-bit keys with it.
Reviewed-by: Ard Biesheuvel <ardb@kernel.org >
Link: https://lore.kernel.org/r/20260218213501.136844-3-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org >
2026-03-09 13:27:20 -07:00
..
2026-02-22 12:09:23 -08:00
2025-07-09 22:57:54 -07:00
2026-01-20 19:44:19 -08:00
2025-09-20 20:21:03 +08:00
2026-02-10 12:28:44 -08:00
2026-01-12 11:07:50 -08:00
2026-01-23 13:48:43 +08:00
2025-05-05 18:20:44 +08:00
2023-05-24 18:12:33 +08:00
2025-11-12 09:52:01 +01:00
2023-05-24 18:12:33 +08:00
2026-01-12 11:39:58 -08:00
2026-03-09 13:27:20 -07:00
2026-02-21 17:09:51 -08:00
2026-01-23 13:48:43 +08:00
2026-01-23 13:48:43 +08:00
2026-02-10 12:28:44 -08:00
2026-02-21 17:09:51 -08:00
2025-05-12 13:32:53 +08:00
2025-10-17 16:03:57 +08:00
2026-02-21 17:09:51 -08:00
2024-05-31 17:34:56 +08:00
2025-09-20 20:21:04 +08:00
2026-02-21 17:09:51 -08:00
2025-05-05 18:20:44 +08:00
2025-05-05 18:20:44 +08:00
2025-10-17 16:03:58 +08:00
2026-01-20 14:38:48 +08:00
2025-10-29 22:04:24 -07:00
2026-01-23 13:48:44 +08:00
2025-05-05 18:20:44 +08:00
2025-03-02 15:19:43 +08:00
2025-05-05 18:20:44 +08:00
2025-05-05 18:20:44 +08:00
2025-05-05 18:20:44 +08:00
2024-05-31 17:34:56 +08:00
2025-05-05 18:20:44 +08:00
2025-05-05 18:20:44 +08:00
2025-05-05 18:20:44 +08:00
2025-08-29 09:50:19 -07:00
2024-12-02 11:34:44 -08:00
2025-05-05 18:20:44 +08:00
2025-03-15 16:21:22 +08:00
2025-06-30 09:31:56 -07:00
2025-06-30 09:31:56 -07:00
2025-09-13 12:11:06 +08:00
2026-02-10 12:28:44 -08:00
2025-05-12 13:32:53 +08:00
2026-01-12 11:39:58 -08:00
2025-05-05 18:20:44 +08:00
2025-05-05 18:20:44 +08:00
2026-02-21 17:09:51 -08:00
2025-05-05 18:20:44 +08:00
2026-01-15 14:09:08 -08:00
2022-03-03 10:47:50 +12:00
2025-05-05 18:20:44 +08:00
2026-02-21 17:09:51 -08:00
2025-05-05 18:20:44 +08:00
2024-04-12 15:07:52 +08:00
2026-02-21 17:09:51 -08:00
2021-03-13 00:04:03 +11:00
2025-05-05 18:20:44 +08:00
2025-04-16 15:16:21 +08:00
2025-04-16 15:16:21 +08:00
2025-05-05 18:20:44 +08:00
2021-03-26 19:41:58 +11:00
2025-05-12 13:32:53 +08:00
2024-04-12 15:07:52 +08:00
2019-04-18 22:15:02 +08:00
2019-04-18 22:15:02 +08:00
2025-04-16 15:16:21 +08:00
2025-10-09 15:02:35 +08:00
2025-05-05 18:20:44 +08:00
2025-12-19 14:47:47 +08:00
2026-02-21 17:09:51 -08:00
2025-05-12 13:32:53 +08:00
2025-05-05 18:20:44 +08:00
2024-04-02 10:49:38 +08:00
2025-11-11 11:03:38 -08:00
2025-06-11 10:59:45 +08:00
2025-05-19 13:48:20 +08:00
2026-01-05 16:43:36 +01:00
2025-11-05 20:30:51 -08:00
2024-10-19 08:44:30 +08:00
2025-07-18 20:52:01 +10:00
2024-10-19 08:44:30 +08:00
2026-03-09 13:27:20 -07:00
2025-05-12 13:33:14 +08:00
2025-12-29 08:48:35 +08:00
2026-01-23 13:48:43 +08:00
2025-05-05 18:20:44 +08:00
2025-05-19 13:48:20 +08:00
2026-01-23 13:48:42 +08:00
2025-09-20 20:21:03 +08:00
2025-09-20 20:21:03 +08:00
2025-09-20 20:21:03 +08:00
2025-09-20 20:21:03 +08:00
2026-02-10 12:28:44 -08:00
2025-05-05 18:20:44 +08:00
2025-09-08 09:47:38 -07:00
2025-05-05 18:20:44 +08:00
2026-01-21 22:32:50 +00:00
2025-05-05 18:20:44 +08:00
2025-06-13 17:26:17 +08:00
2026-01-05 16:43:36 +01:00
2021-01-29 16:07:04 +11:00
2025-05-05 18:20:44 +08:00
2026-02-06 18:52:22 +08:00
2019-05-30 11:26:32 -07:00
2024-10-05 13:22:04 +08:00
2025-05-05 18:20:44 +08:00
2023-10-27 18:04:28 +08:00
2023-10-27 18:04:28 +08:00
2025-04-16 15:16:21 +08:00
2025-11-22 10:04:50 +08:00
2026-02-10 12:28:44 -08:00
2025-05-05 18:20:44 +08:00
2025-12-19 14:47:06 +08:00
2025-05-05 18:20:44 +08:00
2025-09-02 19:02:35 -07:00
2025-11-05 20:30:51 -08:00
2025-09-02 19:02:37 -07:00
2025-09-02 19:02:39 -07:00
2026-01-23 13:48:43 +08:00
2025-04-16 15:36:24 +08:00
2026-02-21 17:09:51 -08:00
2026-01-23 13:48:43 +08:00
2024-04-02 10:49:38 +08:00
2025-05-05 18:20:44 +08:00
2025-05-05 18:20:44 +08:00
2024-10-02 17:23:23 -04:00
2025-05-05 18:20:44 +08:00
2026-02-21 17:09:51 -08:00
2025-11-22 10:04:50 +08:00
2025-05-05 18:20:44 +08:00
2026-03-09 13:27:20 -07:00
2026-02-10 08:36:42 -08:00
2022-12-02 18:12:40 +08:00
2025-05-05 18:20:44 +08:00
2025-06-23 16:56:56 +08:00
2025-05-05 18:20:44 +08:00
2025-05-05 18:20:44 +08:00
2024-08-02 20:53:25 +08:00
2025-05-19 13:48:20 +08:00
2025-05-05 18:20:44 +08:00
2026-02-21 17:09:51 -08:00