-
-
Save GrygrFlzr/764c8330aed214d00dc973a7cad28961 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# generate 1KB test file | |
head -c 1024 </dev/urandom >randbytes | |
TIMEFORMAT=%R | |
# benchmark encryption | |
echo "Encryption Benchmark" | |
echo " | hm602 | lh210 |" | |
echo "---+-------+-------+" | |
for version in {1..6} | |
do | |
HMTIME=$( { time for i in {1..1000}; | |
do \ | |
./honokamiku -e -w$version -b randbytes - ww_v${version}_test \ | |
<randbytes >/dev/null 2>&1; \ | |
done; } 2>&1 ) | |
LHTIME=$( { time for i in {1..1000}; | |
do \ | |
./libhonoka -e -w$version -b randbytes - ww_v${version}_test \ | |
<randbytes >/dev/null 2>&1; \ | |
done; } 2>&1 ) | |
echo "v$version | $HMTIME | $LHTIME |" | |
done | |
echo | |
# benchmark decryption | |
echo "Decryption Benchmark" | |
echo " | hm602 | lh210 |" | |
echo "---+-------+-------+" | |
for version in {1..6} | |
do | |
HMTIME=$( { time for i in {1..1000}; | |
do \ | |
./honokamiku -w$version ww_v${version}_test /dev/null >/dev/null 2>&1; \ | |
done; } 2>&1 ) | |
LHTIME=$( { time for i in {1..1000}; | |
do \ | |
./libhonoka -w$version ww_v${version}_test /dev/null >/dev/null 2>&1; \ | |
done; } 2>&1 ) | |
echo "v$version | $HMTIME | $LHTIME |" | |
done | |
# cleanup | |
rm randbytes | |
rm ww_v*_test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment