chacha20+poly1305 authenticated encryption
Christian Weisgerber
naddy at mips.inka.de
Sun Nov 17 10:56:44 EST 2013
Christian Weisgerber <naddy at mips.inka.de> wrote:
> I updated and ran the regression tests,
PS: Here's the diff for the test suite.
Index: cipher-speed.sh
===================================================================
RCS file: /cvs/src/regress/usr.bin/ssh/cipher-speed.sh,v
retrieving revision 1.10
diff -u -p -r1.10 cipher-speed.sh
--- cipher-speed.sh 7 Nov 2013 02:48:38 -0000 1.10
+++ cipher-speed.sh 15 Nov 2013 13:52:29 -0000
@@ -25,7 +25,8 @@ for c in `${SSH} -Q cipher`; do n=0; for
done
# No point trying all MACs for GCM since they are ignored.
case $c in
- aes*-gcm at openssh.com) test $n -gt 0 && break;;
+ aes*-gcm at openssh.com|chacha20-poly1305 at openssh.com)
+ test $n -gt 0 && break;;
esac
n=$(($n + 1))
done; done
Index: integrity.sh
===================================================================
RCS file: /cvs/src/regress/usr.bin/ssh/integrity.sh,v
retrieving revision 1.11
diff -u -p -r1.11 integrity.sh
--- integrity.sh 7 Nov 2013 02:48:38 -0000 1.11
+++ integrity.sh 16 Nov 2013 00:27:24 -0000
@@ -11,7 +11,7 @@ startoffset=2900
macs=`${SSH} -Q mac`
# The following are not MACs, but ciphers with integrated integrity. They are
# handled specially below.
-macs="$macs `${SSH} -Q cipher | grep gcm at openssh.com`"
+macs="$macs `${SSH} -Q cipher | egrep '(gcm|poly1305)@openssh.com'`"
# sshd-command for proxy (see test-exec.sh)
cmd="sh ${SRC}/sshd-log-wrapper.sh ${SSHD} ${TEST_SSHD_LOGFILE} -i -f $OBJ/sshd_proxy"
@@ -31,14 +31,14 @@ for m in $macs; do
# modify output from sshd at offset $off
pxy="proxycommand=$cmd | $OBJ/modpipe -wm xor:$off:1"
case $m in
- aes*gcm*) macopt="-c $m";;
- *) macopt="-m $m";;
+ aes*gcm*|chacha*poly*) macopt="-c $m";;
+ *) macopt="-m $m";;
esac
verbose "test $tid: $m @$off"
${SSH} $macopt -2F $OBJ/ssh_proxy -o "$pxy" \
999.999.999.999 'printf "%4096s" " "' >/dev/null
if [ $? -eq 0 ]; then
- fail "ssh -m $m succeeds with bit-flip at $off"
+ fail "ssh $macopt succeeds with bit-flip at $off"
fi
ecnt=$((ecnt+1))
output=$(tail -2 $TEST_SSH_LOGFILE | egrep -v "^debug" | \
Index: rekey.sh
===================================================================
RCS file: /cvs/src/regress/usr.bin/ssh/rekey.sh,v
retrieving revision 1.13
diff -u -p -r1.13 rekey.sh
--- rekey.sh 9 Nov 2013 05:41:34 -0000 1.13
+++ rekey.sh 16 Nov 2013 23:53:18 -0000
@@ -45,8 +45,8 @@ for opt in $opts; do
done
# GCM is magical so test with all KexAlgorithms
-if ${SSH} -Q cipher | grep gcm at openssh.com >/dev/null ; then
- for c in `${SSH} -Q cipher | grep gcm at openssh.com`; do
+if ${SSH} -Q cipher | egrep '(gcm|poly1305)@openssh.com' >/dev/null ; then
+ for c in `${SSH} -Q cipher | egrep '(gcm|poly1305)@openssh.com'`; do
for kex in `${SSH} -Q kex`; do
verbose "client rekey $c $kex"
ssh_data_rekeying -oRekeyLimit=256k -oCiphers=$c -oKexAlgorithms=$kex
Index: try-ciphers.sh
===================================================================
RCS file: /cvs/src/regress/usr.bin/ssh/try-ciphers.sh,v
retrieving revision 1.21
diff -u -p -r1.21 try-ciphers.sh
--- try-ciphers.sh 7 Nov 2013 02:48:38 -0000 1.21
+++ try-ciphers.sh 15 Nov 2013 13:52:48 -0000
@@ -14,7 +14,8 @@ for c in `${SSH} -Q cipher`; do
fi
# No point trying all MACs for GCM since they are ignored.
case $c in
- aes*-gcm at openssh.com) test $n -gt 0 && break;;
+ aes*-gcm at openssh.com|chacha20-poly1305 at openssh.com)
+ test $n -gt 0 && break;;
esac
n=`expr $n + 1`
done
--
Christian "naddy" Weisgerber naddy at mips.inka.de
More information about the openssh-unix-dev
mailing list