SSH ciphers speed comparison
Aller à la navigation
Aller à la recherche
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
- 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