hihn.org

OpenSSH ciphers performance benchmark

These are the results of an OpenSSH ciphers performance benchmark with openssh-7.6_p1 on a Raspberry Pi 3. Since arcfour is deprecated and therefore missing on most modern OpenSSH installations, the fastest cipher is chacha20-poly1305@openssh.com with 28,67 MB/s on average.

The script (taken from here):

#!/bin/bash

CIPHERS=$(ssh -Q cipher)
TMP_FILE=/tmp/dd.txt
for cipher in $CIPHERS; do
    for i in 1 2 3 ; do
        echo
        echo "Cipher: $cipher (try $i)"
        dd if=/dev/zero bs=4M count=1024 2>$TMP_FILE | \
            pv --size 4G | \
            time -p ssh -c "$cipher" localhost 'cat > /dev/null'
        grep -v records $TMP_FILE
    done
done

OpenSSH ciphers performance benchmark

As csv:

Cipher,Probe A,Probe B,Probe C,(MB/s),AVG
chacha20-poly1305@openssh.com,"26,6","29,4",30,,"28,67"
aes192-cbc,"17,8","18,2","18,2",,"18,07"
aes128-cbc,"17,8","18,2","18,2",,"18,07"
aes128-ctr,"16,2","16,6","16,5",,"16,43"
aes192-ctr,"15,1","15,1",15,,"15,07"
rijndael-cbc@lysator.liu.se,"15,1",15,15,,"15,03"
aes256-cbc,"15,1",15,15,,"15,03"
aes256-ctr,"13,9",14,14,,"13,97"
aes128-gcm@openssh.com,13,"12,9","12,9",,"12,93"
aes256-gcm@openssh.com,"11,2","11,2","11,4",,"11,27"
3des-cbc,"4,2","4,2","4,6",,"4,33"

Tags: ssh  


Created: Dec. 6, 2017 | Updated: Dec. 6, 2017