scripts: Include botan in dh_speed.sh and pubkey_speed.sh

Also, using sudo is not necessary in dh_speed.sh.
laforge/swu
Tobias Brunner 4 years ago
parent 8b4c2a1d8e
commit b959532f68
  1. 32
      scripts/dh_speed.sh
  2. 2
      scripts/pubkey_speed.sh

@ -1,21 +1,31 @@
#!/bin/bash
DIR=$(dirname `readlink -f $0`)
# we run an unprinted group, as it seems the first run is inaccurate (cache?)
function modptest {
$DIR/dh_speed "$1" 400 modp768 modp768 modp1024 modp1024s160 modp1536 modp2048 modp2048s224 modp2048s256 | tail -n 7
$DIR/dh_speed "$1" 100 modp1024 modp3072 modp4096 | tail -n 2
$DIR/dh_speed "$1" 5 modp2048 modp6144 modp8192 | tail -n 2
}
echo "testing gmp"
# gmp needs a RNG plugin, pick gcrypt
sudo ./dh_speed "gmp gcrypt" 400 modp768 modp768 modp1024 modp1024s160 modp1536 modp2048 modp2048s224 modp2048s256 | tail -n 7
sudo ./dh_speed "gmp gcrypt" 100 modp1024 modp3072 modp4096 | tail -n 2
sudo ./dh_speed "gmp gcrypt" 5 modp2048 modp6144 modp8192 | tail -n 2
# gmp needs an RNG plugin, pick gcrypt
modptest "gmp gcrypt"
echo "testing curve25519"
# curve25519 needs an RNG plugin, pick gcrypt
$DIR/dh_speed "curve25519 gcrypt" 300 curve25519 curve25519 | tail -n 1
echo "testing gcrypt"
sudo ./dh_speed "gcrypt" 400 modp768 modp768 modp1024 modp1024s160 modp1536 modp2048 modp2048s224 modp2048s256 | tail -n 7
sudo ./dh_speed "gcrypt" 100 modp1024 modp3072 modp4096 | tail -n 2
sudo ./dh_speed "gcrypt" 5 modp2048 modp6144 modp8192 | tail -n 2
modptest "gcrypt"
echo "testing openssl"
sudo ./dh_speed "openssl" 400 modp768 modp768 modp1024 modp1024s160 modp1536 modp2048 modp2048s224 modp2048s256 | tail -n 7
sudo ./dh_speed "openssl" 100 modp1024 modp3072 modp4096 | tail -n 2
sudo ./dh_speed "openssl" 5 modp2048 modp6144 modp8192 | tail -n 2
sudo ./dh_speed "openssl" 300 ecp192 ecp192 ecp224 ecp256 ecp384 ecp521 | tail -n 5
modptest "openssl"
$DIR/dh_speed "openssl" 300 ecp192 ecp192 ecp224 ecp256 ecp384 ecp521 | tail -n 5
echo "testing botan"
modptest "botan"
$DIR/dh_speed "botan" 300 ecp256 ecp256 ecp384 ecp521 | tail -n 3
$DIR/dh_speed "botan" 300 curve25519 curve25519 | tail -n 1

@ -35,4 +35,6 @@ function ecdsatestall {
rsatestall "gmp gcrypt pem pkcs1"
rsatestall "gcrypt pem pkcs1"
rsatestall "openssl pem"
rsatestall "botan pem"
ecdsatestall "openssl pem"
ecdsatestall "botan pem"

Loading…
Cancel
Save