1 //! Message Authentication Code tests
2 
3 use super::*;
4 
5 define_test_set!("MAC with IV", "mac_with_iv_test_schema.json");
6 
7 define_test_set_names!(
8     Gmac => "gmac",
9     Vmac64 => "vmac_64",
10     Vmac128 => "vmac_128",
11 );
12 
13 define_algorithm_map!(
14     "AES-GMAC" => AesGmac,
15     "VMAC-AES" => VmacAes,
16 );
17 
18 define_typeid!(TestGroupTypeId => "MacWithIvTest");
19 
20 define_test_flags!(InvalidNonce);
21 
22 define_test_group!(
23     "keySize" => key_size: usize,
24     "tagSize" => tag_size: usize,
25     "ivSize" => nonce_size: usize,
26 );
27 
28 define_test!(
29     key: Vec<u8>,
30     "iv" => nonce: Vec<u8>,
31     msg: Vec<u8>,
32     tag: Vec<u8>,
33 );
34