1 # $OpenBSD: cipher-speed.sh,v 1.4 2011/08/02 01:23:41 djm Exp $
2 # Placed in the Public Domain.
8 sed -n '/transferred/s/.*secs (\(.* bytes.sec\).*/\1/p'
15 ciphers="aes128-cbc 3des-cbc blowfish-cbc cast128-cbc
16 arcfour128 arcfour256 arcfour
17 aes192-cbc aes256-cbc rijndael-cbc@lysator.liu.se
18 aes128-ctr aes192-ctr aes256-ctr"
19 macs="hmac-sha1 hmac-md5 umac-64@openssh.com hmac-sha1-96 hmac-md5-96"
20 config_defined HAVE_EVP_SHA256 &&
21 macs="$macs hmac-sha2-256 hmac-sha2-256-96 hmac-sha2-512 hmac-sha2-512-96"
23 for c in $ciphers; do for m in $macs; do
24 trace "proto 2 cipher $c mac $m"
27 ( ${SSH} -o 'compression no' \
28 -F $OBJ/ssh_proxy -2 -m $m -c $c somehost \
29 exec sh -c \'"dd of=/dev/null obs=32k"\' \
30 < ${DATA} ) 2>&1 | getbytes
33 fail "ssh -2 failed with mac $m cipher $c"
38 ciphers="3des blowfish"
40 trace "proto 1 cipher $c"
43 ( ${SSH} -o 'compression no' \
44 -F $OBJ/ssh_proxy -1 -c $c somehost \
45 exec sh -c \'"dd of=/dev/null obs=32k"\' \
46 < ${DATA} ) 2>&1 | getbytes
48 fail "ssh -1 failed with cipher $c"