]>
Commit | Line | Data |
---|---|---|
6edad5af MW |
1 | #!/bin/bash |
2 | ||
f17322dc TB |
3 | DIR=$(dirname `readlink -f $0`) |
4 | ||
6edad5af | 5 | function rsatest { |
f17322dc TB |
6 | echo -n " e=3 "; openssl genrsa -3 $1 2>/dev/null| $DIR/pubkey_speed "$2" rsa $3 |
7 | echo -n " e=f4 "; openssl genrsa -f4 $1 2>/dev/null| $DIR/pubkey_speed "$2" rsa $3 | |
6edad5af MW |
8 | } |
9 | ||
10 | function rsatestall { | |
11 | echo "testing: $1" | |
12 | rsatest 512 "$1" 5000 | |
0461a2ff | 13 | rsatest 768 "$1" 5000 |
6edad5af MW |
14 | rsatest 1024 "$1" 1000 |
15 | rsatest 1536 "$1" 500 | |
16 | rsatest 2048 "$1" 100 | |
17 | rsatest 3072 "$1" 10 | |
18 | rsatest 4096 "$1" 5 | |
19 | rsatest 6144 "$1" 2 | |
20 | rsatest 8192 "$1" 1 | |
21 | } | |
22 | ||
23 | function ecdsatest { | |
f17322dc | 24 | openssl ecparam -genkey -name $1 -noout | $DIR/pubkey_speed "$2" ecdsa $3 |
6edad5af MW |
25 | |
26 | } | |
27 | ||
28 | function ecdsatestall { | |
29 | echo "testing: $1" | |
30 | ecdsatest prime256v1 "$1" 4000 | |
31 | ecdsatest secp384r1 "$1" 1000 | |
f17322dc | 32 | ecdsatest secp521r1 "$1" 500 |
6edad5af MW |
33 | } |
34 | ||
0b47bb53 TB |
35 | rsatestall "gmp gcrypt pem pkcs1" |
36 | rsatestall "gcrypt pem pkcs1" | |
37 | rsatestall "openssl pem" | |
38 | ecdsatestall "openssl pem" |