aarvay 2f3234c76a
std.crypto: add AES-CCM and CBC-MAC (#25526)
* std.crypto: add AES-CCM and CBC-MAC

Add AES-CCM (Counter with CBC-MAC) authenticated encryption and
CBC-MAC message authentication code implementations to the standard
library.

AES-CCM combines CTR mode encryption with CBC-MAC authentication as
specified in NIST SP 800-38C and RFC 3610. It provides authenticated
encryption with support for additional authenticated data (AAD).

CBC-MAC is a simple MAC construction used internally by CCM, specified
in FIPS 113 and ISO/IEC 9797-1.

Includes comprehensive test vectors from RFC 3610 and NIST SP 800-38C.

* std.crypto: add CCM* (encryption-only) support to AES-CCM

Implements CCM* mode per IEEE 802.15.4 specification, extending
AES-CCM to support encryption-only mode when tag_len=0. This is
required by protocols like ZigBee, Thread, and WirelessHART.

Changes:
- Allow tag_len=0 for encryption-only mode (no authentication)
- Skip CBC-MAC computation when tag_len=0 in encrypt/decrypt
- Correctly encode M'=0 in B0 block for CCM* mode
- Add Aes128Ccm0 and Aes256Ccm0 convenience instances
- Add IEEE 802.15.4 test vectors and CCM* tests

* std.crypto: add doc comments for AES-CCM variants
2025-10-14 12:00:44 +02:00
..
2025-07-07 22:43:51 -07:00
2025-09-18 22:39:33 -07:00
2025-09-30 13:44:54 +01:00
2025-10-06 06:54:52 +02:00
2025-09-03 21:46:01 -07:00
2025-09-18 22:39:33 -07:00
2025-08-29 17:14:26 -07:00
2025-09-30 13:44:54 +01:00
2025-09-18 22:39:33 -07:00
2025-08-31 12:49:18 -07:00
2025-08-28 18:30:57 -07:00
2025-10-10 22:47:47 -07:00
2025-09-20 14:34:18 -07:00
2024-08-22 08:44:08 +02:00
2025-09-30 13:44:53 +01:00
2025-09-11 00:18:37 -07:00
2025-07-31 22:10:11 -07:00
2025-08-29 17:14:26 -07:00
2025-08-29 17:14:26 -07:00
2025-08-29 17:14:26 -07:00
2025-09-18 22:39:33 -07:00
2025-09-30 13:44:51 +01:00
2025-10-08 17:00:15 -07:00
2025-08-29 17:14:26 -07:00
2025-09-30 13:44:55 +01:00
2025-07-22 09:41:44 -07:00
2025-10-06 01:28:56 +02:00
2025-08-28 18:30:57 -07:00
2025-08-31 12:49:18 -07:00
2025-08-31 12:49:18 -07:00
2025-07-16 10:27:39 -07:00
2025-09-24 20:01:18 -07:00
2025-08-29 17:14:26 -07:00