-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_kat.sh
47 lines (29 loc) · 1.05 KB
/
test_kat.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
# Script for ease of execution of Known Answer Tests against Romulus implementation
make lib
# ---
mkdir -p tmp
pushd tmp
wget -O romulus.zip https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/finalist-round/updated-submissions/romulus.zip
unzip romulus.zip
cp romulus/Implementations/crypto_aead/romulush/LWC_HASH_KAT_256.txt ../romulush.txt
cp romulus/Implementations/crypto_aead/romulusn/LWC_AEAD_KAT_128_128.txt ../romulusn.txt
cp romulus/Implementations/crypto_aead/romulusm/LWC_AEAD_KAT_128_128.txt ../romulusm.txt
cp romulus/Implementations/crypto_aead/romulust/LWC_AEAD_KAT_128_128.txt ../romulust.txt
popd
# ---
rm -rf tmp
mv romulus{h,n,m,t}.txt wrapper/python/
# ---
pushd wrapper/python
mv romulush.txt LWC_HASH_KAT_256.txt
python3 -m pytest -k romulush -v
mv romulusn.txt LWC_AEAD_KAT_128_128.txt
python3 -m pytest -k romulusn -v
mv romulusm.txt LWC_AEAD_KAT_128_128.txt
python3 -m pytest -k romulusm -v
mv romulust.txt LWC_AEAD_KAT_128_128.txt
python3 -m pytest -k romulust -v
rm LWC_*_KAT_*.txt
popd
# ---