« SSH ciphers speed comparison » : différence entre les versions

De Linux Server Wiki
Aller à la navigation Aller à la recherche
Ligne 21 : Ligne 21 :
= Host =
= Host =
* AES-NI
* AES-NI
* proxmox VE 4.1 (debian jessie based)
* OpenSSH_6.7p1 Debian-5, OpenSSL 1.0.1k 8 Jan 2015
* OpenSSH_6.7p1 Debian-5, OpenSSL 1.0.1k 8 Jan 2015
* pve-manager/4.1-2/78c5f4a2 (running kernel: 4.2.6-1-pve)
* pve-manager/4.1-2/78c5f4a2 (running kernel: 4.2.6-1-pve)
Ligne 75 : Ligne 76 :
4294967296 bytes (4.3 GB) copied, 12.9748 s, 331 MB/s
4294967296 bytes (4.3 GB) copied, 12.9748 s, 331 MB/s
4294967296 bytes (4.3 GB) copied, 12.8379 s, 335 MB/s
4294967296 bytes (4.3 GB) copied, 12.8379 s, 335 MB/s
</pre>
= Proxmox Qemu/KVM VM without AES =
<pre>
Cipher: aes128-ctr (try 1)
4294967296 bytes (4.3 GB) copied, 51.5934 s, 83.2 MB/s
Cipher: aes128-ctr (try 2)
4294967296 bytes (4.3 GB) copied, 51.5752 s, 83.3 MB/s
Cipher: aes128-ctr (try 3)
4294967296 bytes (4.3 GB) copied, 54.383 s, 79.0 MB/s
Cipher: aes192-ctr (try 1)
4294967296 bytes (4.3 GB) copied, 60.0338 s, 71.5 MB/s
Cipher: aes192-ctr (try 2)
4294967296 bytes (4.3 GB) copied, 59.9654 s, 71.6 MB/s
Cipher: aes192-ctr (try 3)
4294967296 bytes (4.3 GB) copied, 60.6374 s, 70.8 MB/s
Cipher: aes256-ctr (try 1)
4294967296 bytes (4.3 GB) copied, 67.8728 s, 63.3 MB/s
Cipher: aes256-ctr (try 2)
4294967296 bytes (4.3 GB) copied, 69.9567 s, 61.4 MB/s
Cipher: aes256-ctr (try 3)
4294967296 bytes (4.3 GB) copied, 68.1461 s, 63.0 MB/s
Cipher: aes128-gcm@openssh.com (try 1)
4294967296 bytes (4.3 GB) copied, 60.5148 s, 71.0 MB/s
Cipher: aes128-gcm@openssh.com (try 2)
4294967296 bytes (4.3 GB) copied, 61.3155 s, 70.0 MB/s
Cipher: aes128-gcm@openssh.com (try 3)
4294967296 bytes (4.3 GB) copied, 60.7298 s, 70.7 MB/s
Cipher: aes256-gcm@openssh.com (try 1)
4294967296 bytes (4.3 GB) copied, 79.0498 s, 54.3 MB/s
Cipher: aes256-gcm@openssh.com (try 2)
4294967296 bytes (4.3 GB) copied, 76.2416 s, 56.3 MB/s
Cipher: aes256-gcm@openssh.com (try 3)
4294967296 bytes (4.3 GB) copied, 78.5161 s, 54.7 MB/s
Cipher: chacha20-poly1305@openssh.com (try 1)
4294967296 bytes (4.3 GB) copied, 27.8819 s, 154 MB/s
Cipher: chacha20-poly1305@openssh.com (try 2)
4294967296 bytes (4.3 GB) copied, 27.4079 s, 157 MB/s
Cipher: chacha20-poly1305@openssh.com (try 3)
4294967296 bytes (4.3 GB) copied, 28.3614 s, 151 MB/s
</pre>
</pre>

Version du 3 janvier 2016 à 16:31

script

# uses "/root/tmp/dd.txt" as a temporary file!
ciphers="aes128-ctr aes192-ctr aes256-ctr aes128-gcm@openssh.com aes256-gcm@openssh.com chacha20-poly1305@openssh.com"
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>/root/tmp/dd.txt | pv --size 4G | time -p ssh -c "$cipher" root@localhost 'cat > /dev/null'
        grep -v records /root/tmp/dd.txt
    done
done

init :

ssh-keygen
cat .ssh/id_rsa.pub > .ssh/authorized_keys

Host

  • AES-NI
  • proxmox VE 4.1 (debian jessie based)
  • OpenSSH_6.7p1 Debian-5, OpenSSL 1.0.1k 8 Jan 2015
  • pve-manager/4.1-2/78c5f4a2 (running kernel: 4.2.6-1-pve)
  • OpenSSL 1.0.1k 8 Jan 2015
Cipher: aes128-ctr (try 1)
4294967296 bytes (4.3 GB) copied, 8.56115 s, 502 MB/s
Cipher: aes128-ctr (try 2)
4294967296 bytes (4.3 GB) copied, 8.35096 s, 514 MB/s
Cipher: aes128-ctr (try 3)
4294967296 bytes (4.3 GB) copied, 8.50322 s, 505 MB/s

Cipher: aes192-ctr (try 1)
4294967296 bytes (4.3 GB) copied, 8.51948 s, 504 MB/s
Cipher: aes192-ctr (try 2)
4294967296 bytes (4.3 GB) copied, 8.59202 s, 500 MB/s
Cipher: aes192-ctr (try 3)
4294967296 bytes (4.3 GB) copied, 8.72386 s, 492 MB/s

Cipher: aes256-ctr (try 1)
4294967296 bytes (4.3 GB) copied, 8.70587 s, 493 MB/s
Cipher: aes256-ctr (try 2)
4294967296 bytes (4.3 GB) copied, 8.86468 s, 485 MB/s
Cipher: aes256-ctr (try 3)
4294967296 bytes (4.3 GB) copied, 8.74792 s, 491 MB/s

Cipher: aes128-gcm@openssh.com (try 1)
4294967296 bytes (4.3 GB) copied, 8.5165 s, 504 MB/s
Cipher: aes128-gcm@openssh.com (try 2)
4294967296 bytes (4.3 GB) copied, 8.72384 s, 492 MB/s
Cipher: aes128-gcm@openssh.com (try 3)
4294967296 bytes (4.3 GB) copied, 8.50666 s, 505 MB/s

Cipher: aes256-gcm@openssh.com (try 1)
4294967296 bytes (4.3 GB) copied, 8.98815 s, 478 MB/s
Cipher: aes256-gcm@openssh.com (try 2)
4294967296 bytes (4.3 GB) copied, 8.90123 s, 483 MB/s
Cipher: aes256-gcm@openssh.com (try 3)
4294967296 bytes (4.3 GB) copied, 9.15974 s, 469 MB/s

Cipher: chacha20-poly1305@openssh.com (try 1)
4294967296 bytes (4.3 GB) copied, 24.8439 s, 173 MB/s
Cipher: chacha20-poly1305@openssh.com (try 2)
4294967296 bytes (4.3 GB) copied, 25.0407 s, 172 MB/s
Cipher: chacha20-poly1305@openssh.com (try 3)
4294967296 bytes (4.3 GB) copied, 24.8911 s, 173 MB/s

For the record, this is arcfour on the same host :

arcfour :
4294967296 bytes (4.3 GB) copied, 13.0633 s, 329 MB/s
4294967296 bytes (4.3 GB) copied, 12.9748 s, 331 MB/s
4294967296 bytes (4.3 GB) copied, 12.8379 s, 335 MB/s

Proxmox Qemu/KVM VM without AES

Cipher: aes128-ctr (try 1)
4294967296 bytes (4.3 GB) copied, 51.5934 s, 83.2 MB/s
Cipher: aes128-ctr (try 2)
4294967296 bytes (4.3 GB) copied, 51.5752 s, 83.3 MB/s
Cipher: aes128-ctr (try 3)
4294967296 bytes (4.3 GB) copied, 54.383 s, 79.0 MB/s

Cipher: aes192-ctr (try 1)
4294967296 bytes (4.3 GB) copied, 60.0338 s, 71.5 MB/s
Cipher: aes192-ctr (try 2)
4294967296 bytes (4.3 GB) copied, 59.9654 s, 71.6 MB/s
Cipher: aes192-ctr (try 3)
4294967296 bytes (4.3 GB) copied, 60.6374 s, 70.8 MB/s

Cipher: aes256-ctr (try 1)
4294967296 bytes (4.3 GB) copied, 67.8728 s, 63.3 MB/s
Cipher: aes256-ctr (try 2)
4294967296 bytes (4.3 GB) copied, 69.9567 s, 61.4 MB/s
Cipher: aes256-ctr (try 3)
4294967296 bytes (4.3 GB) copied, 68.1461 s, 63.0 MB/s

Cipher: aes128-gcm@openssh.com (try 1)
4294967296 bytes (4.3 GB) copied, 60.5148 s, 71.0 MB/s
Cipher: aes128-gcm@openssh.com (try 2)
4294967296 bytes (4.3 GB) copied, 61.3155 s, 70.0 MB/s
Cipher: aes128-gcm@openssh.com (try 3)
4294967296 bytes (4.3 GB) copied, 60.7298 s, 70.7 MB/s

Cipher: aes256-gcm@openssh.com (try 1)
4294967296 bytes (4.3 GB) copied, 79.0498 s, 54.3 MB/s
Cipher: aes256-gcm@openssh.com (try 2)
4294967296 bytes (4.3 GB) copied, 76.2416 s, 56.3 MB/s
Cipher: aes256-gcm@openssh.com (try 3)
4294967296 bytes (4.3 GB) copied, 78.5161 s, 54.7 MB/s

Cipher: chacha20-poly1305@openssh.com (try 1)
4294967296 bytes (4.3 GB) copied, 27.8819 s, 154 MB/s
Cipher: chacha20-poly1305@openssh.com (try 2)
4294967296 bytes (4.3 GB) copied, 27.4079 s, 157 MB/s
Cipher: chacha20-poly1305@openssh.com (try 3)
4294967296 bytes (4.3 GB) copied, 28.3614 s, 151 MB/s