Skip to content

Commit b895e50

Browse files
authored
Migrate tests to the new blobby format (#264)
1 parent 3d1440b commit b895e50

38 files changed

+110
-92
lines changed

belt-mac/tests/mod.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
//! Test vectors.
1+
//! Test vectors from STB 34.101.31-2020:
2+
//! <https://apmi.bsu.by/assets/files/std/belt-spec371.pdf>
23
3-
//use belt_mac::BeltMac;
4+
use belt_mac::BeltMac;
5+
use digest::dev::reset_mac_test;
46

5-
// TODO(tarcieri): update tests to support RustCrypto/traits#1916
6-
// digest::new_resettable_mac_test!(belt_mac_stb, "belt-mac", BeltMac, "left");
7+
digest::new_mac_test!(belt_mac_stb, BeltMac, reset_mac_test, trunc_left);

cmac/tests/cavp_large.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
//! Tests from CAVP (excluding all 64 KiB vectors for AES-128 except the first one):
22
//! <https://csrc.nist.gov/Projects/Cryptographic-Algorithm-Validation-Program/CAVP-TESTING-BLOCK-CIPHER-MODES>
3+
//!
4+
//! Test vectors in this file use 64 KiB of data, so they are excluded from published packages.
35
4-
// use aes::Aes128;
5-
// use cmac::Cmac;
6+
use aes::Aes128;
7+
use cmac::Cmac;
8+
use digest::dev::reset_mac_test;
69

7-
//
8-
// Test vectors in this file use 64 KiB of data, so they are excluded from published packages.
9-
// TODO(tarcieri): update tests to support RustCrypto/traits#1916
10-
// digest::new_resettable_mac_test!(
11-
// cmac_aes128_cavp,
12-
// "cavp_aes128_large",
13-
// Cmac<Aes128>,
14-
// trunc_left
15-
// );
10+
digest::new_mac_test!(
11+
cmac_aes128_cavp_large,
12+
Cmac<Aes128>,
13+
reset_mac_test,
14+
trunc_left,
15+
);

cmac/tests/data/aes192.blb

-203 Bytes
Binary file not shown.

cmac/tests/data/aes256.blb

-211 Bytes
Binary file not shown.
1 MB
Binary file not shown.
910 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)