1 # $OpenBSD: cipher-speed.sh,v 1.2 2005/05/24 04:09:54 djm Exp $
2 # Placed in the Public Domain.
8 sed -n '/transferred/s/.*secs (\(.* bytes.sec\).*/\1/p'
15 macs
="hmac-sha1 hmac-md5 hmac-sha1-96 hmac-md5-96"
16 ciphers
="aes128-cbc 3des-cbc blowfish-cbc cast128-cbc
17 arcfour128 arcfour256 arcfour aes192-cbc aes256-cbc aes128-ctr"
19 for c
in $ciphers; do for m
in $macs; do
20 trace
"proto 2 cipher $c mac $m"
23 ( ${SSH} -o 'compression no' \
24 -F $OBJ/ssh_proxy
-2 -m $m -c $c somehost \
25 exec sh
-c \'"dd of=/dev/null obs=32k"\' \
26 < ${DATA} ) 2>&1 | getbytes
29 fail
"ssh -2 failed with mac $m cipher $c"
34 ciphers
="3des blowfish"
36 trace
"proto 1 cipher $c"
39 ( ${SSH} -o 'compression no' \
40 -F $OBJ/ssh_proxy
-1 -c $c somehost \
41 exec sh
-c \'"dd of=/dev/null obs=32k"\' \
42 < ${DATA} ) 2>&1 | getbytes
44 fail
"ssh -1 failed with cipher $c"