-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtest_kat.sh
44 lines (28 loc) · 925 Bytes
/
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
#!/bin/bash
# Script for ease of execution of Known Answer Tests against
# Elephant ( i.e. Dumbo, Jumbo & Delirium ) implementation
make lib
# ---
mkdir -p tmp
pushd tmp
wget -O elephant.zip https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/finalist-round/updated-submissions/elephant.zip
unzip elephant.zip
cp elephant/Implementations/crypto_aead/elephant160v2/ref/LWC_AEAD_KAT_128_96.txt ../dumbo.txt
cp elephant/Implementations/crypto_aead/elephant176v2/ref/LWC_AEAD_KAT_128_96.txt ../jumbo.txt
cp elephant/Implementations/crypto_aead/elephant200v2/ref/LWC_AEAD_KAT_128_96.txt ../delirium.txt
popd
# ---
rm -rf tmp
mv dumbo.txt wrapper/python/
mv jumbo.txt wrapper/python/
mv delirium.txt wrapper/python/
# ---
pushd wrapper/python
python3 -m pytest -v -k dumbo
rm dumbo.txt
python3 -m pytest -v -k jumbo
rm jumbo.txt
python3 -m pytest -v -k delirium
rm delirium.txt
popd
# ---