-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.sh
47 lines (30 loc) · 940 Bytes
/
test.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 Xoodyak implementation
# generate shared library object
make lib
# ---
mkdir -p tmp
pushd tmp
# download compressed NIST LWC submission of Xoodyak
wget -O xoodyak.zip https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/finalist-round/updated-submissions/xoodyak.zip
# uncomress
unzip xoodyak.zip
# copy Known Answer Tests outside of uncompressed NIST LWC submission directory
cp xoodyak/Implementations/crypto_hash/xoodyakround3/LWC_HASH_KAT_256.txt ../
cp xoodyak/Implementations/crypto_aead/xoodyakround3/LWC_AEAD_KAT_128_128.txt ../
popd
# ---
# remove NIST LWC submission zip
rm -rf tmp
# move Known Answer Tests to execution directory
mv LWC_HASH_KAT_256.txt wrapper/python/
mv LWC_AEAD_KAT_128_128.txt wrapper/python/
# ---
pushd wrapper/python
# run tests
pytest -v
# clean up
rm LWC_*_KAT_*.txt
popd
make clean
# ---