]> andersk Git - gssapi-openssh.git/blame - openssh/regress/cipher-speed.sh
Import of OpenSSH 4.9p1
[gssapi-openssh.git] / openssh / regress / cipher-speed.sh
CommitLineData
47686178 1# $OpenBSD: cipher-speed.sh,v 1.3 2007/06/07 19:41:46 pvalchev Exp $
9108f8d9 2# Placed in the Public Domain.
3
4tid="cipher speed"
5
6getbytes ()
7{
8 sed -n '/transferred/s/.*secs (\(.* bytes.sec\).*/\1/p'
9}
10
11tries="1 2"
12DATA=/bin/ls
13DATA=/bsd
14
47686178 15macs="hmac-sha1 hmac-md5 umac-64@openssh.com hmac-sha1-96 hmac-md5-96"
9108f8d9 16ciphers="aes128-cbc 3des-cbc blowfish-cbc cast128-cbc
17 arcfour128 arcfour256 arcfour aes192-cbc aes256-cbc aes128-ctr"
18
19for c in $ciphers; do for m in $macs; do
20 trace "proto 2 cipher $c mac $m"
21 for x in $tries; do
22 echo -n "$c/$m:\t"
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
27
28 if [ $? -ne 0 ]; then
29 fail "ssh -2 failed with mac $m cipher $c"
30 fi
31 done
32done; done
33
34ciphers="3des blowfish"
35for c in $ciphers; do
36 trace "proto 1 cipher $c"
37 for x in $tries; do
38 echo -n "$c:\t"
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
43 if [ $? -ne 0 ]; then
44 fail "ssh -1 failed with cipher $c"
45 fi
46 done
47done
This page took 0.064023 seconds and 5 git commands to generate.