1 # $OpenBSD: cipher-speed.sh,v 1.13 2015/03/24 20:22:17 markus Exp $
2 # Placed in the Public Domain.
8 sed -n -e '/transferred/s/.*secs (\(.* bytes.sec\).*/\1/p' \
9 -e '/copied/s/.*s, \(.* MB.s\).*/\1/p'
14 for c in `${SSH} -Q cipher`; do n=0; for m in `${SSH} -Q mac`; do
15 trace "proto 2 cipher $c mac $m"
17 printf "%-60s" "$c/$m:"
18 ( ${SSH} -o 'compression no' \
19 -F $OBJ/ssh_proxy -2 -m $m -c $c somehost \
20 exec sh -c \'"dd of=/dev/null obs=32k"\' \
21 < ${DATA} ) 2>&1 | getbytes
24 fail "ssh -2 failed with mac $m cipher $c"
27 # No point trying all MACs for AEAD ciphers since they are ignored.
28 if ${SSH} -Q cipher-auth | grep "^${c}\$" >/dev/null 2>&1 ; then
34 if ssh_version 1; then
35 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"