authorgravatar for 124872+jedisct1@users.noreply.github.comFrank Denis <124872+jedisct1@users.noreply.github.com> 2026-06-23 17:27:23+02:00
committergravatar for 124872+jedisct1@users.noreply.github.comFrank Denis <124872+jedisct1@users.noreply.github.com> 2026-07-05 12:25:21+02:00
log81f7b7effe02b6d545e6aa1e4b90feec279369c4
tree7f8e763bd10c91fe02d7b7e01266d76bbe8d88af
parent300116b028df4d80c3088c38ac63f7d6c2da4f3e

crypto.aes_ccm: fix the IEEE 802.15.4 test vector

Also make sure the test runs. Spotted by @TibboddiT - Thanks! By the way, the cbc_mac test didn't run either, so make sure it does. Fixes #35903

2 files changed, 4 insertions(+), 1 deletions(-)

lib/std/crypto.zig+3
......@@ -282,6 +282,8 @@ test {
282282 _ = aead.aes_ocb.Aes128Ocb;
283283 _ = aead.aes_ocb.Aes256Ocb;
284284
285 _ = aead.aes_ccm;
286
285287 _ = aead.chacha_poly.ChaCha20Poly1305;
286288 _ = aead.chacha_poly.ChaCha12Poly1305;
287289 _ = aead.chacha_poly.ChaCha8Poly1305;
......@@ -294,6 +296,7 @@ test {
294296
295297 _ = auth.hmac;
296298 _ = auth.cmac;
299 _ = auth.cbc_mac;
297300 _ = auth.siphash;
298301
299302 _ = core.aes;
lib/std/crypto/aes_ccm.zig+1-1
......@@ -823,7 +823,7 @@ test "Aes128Ccm0 - IEEE 802.15.4 Data Frame (Encryption-only)" {
823823 var plaintext: [4]u8 = undefined;
824824 _ = try hexToBytes(&plaintext, "61626364");
825825 var ad: [26]u8 = undefined;
826 _ = try hexToBytes(&ad, "69DC84214302000000004DEAC010000000048DEAC04050000");
826 _ = try hexToBytes(&ad, "69DC842143020000000048DEAC010000000048DEAC0405000000");
827827
828828 // Expected ciphertext from IEEE spec
829829 var expected_ciphertext: [4]u8 = undefined;