Speed up scp file transfer 20/05/2008 Syed Atif Ali Whats the fastest encryption to transfer files with

SCP ?
Description : Many times it is required to transfer files across machines on the same network , all machines being on the same network and behind proxy its useless to transfer them with an encryption which is more CPU intensive than other and also slower than others. There can be other methods to transfer files of course , ftp , sftp , rsync, but this document is just about scp command. Objective : To find out what is the faster cypher to define in scp command to transfer files on an internal local network. Environment : Two Linux machines, with same openssh versions. Connected on a 100 Mbps LAN . Both being idle nothing is running on them at the moment . Before each test files will be cached on the file system buffer , so the tests are not affected with cache. Tests : Copy 1000 small, medium , large files across the network using different cyphers in scp command and measure their real time. These are the file sizes : Small : 10K Medium: 100K Large: 1000K Results: Times are in seconds and they reflect time taken to transfer 1000 fies. size 10K 100K 1000K aes128cbc 8.758 47.540 1311.878 3des-cbc 9.041 44.172 340.359 blowfishcbc 8.725 46.174 118.553 cast128cbc 8.740 48.279 120.532 arcfour 8.051 46.103 116.352 aes192cbc 8.760 46.458 127.579 aes256cbc 8.934 47.116 124.799

Overall arcfour performed better than any other cypher used. It is safe to say that arcfour can be used to transfer files using scp on an internal network. You can define which cypher to use by -c option of scp .

scp -c arcfour filename.txt host:/path/filename

Graphs :
small : arcfour appears to be the fastest cypher to use if the size of the file is really small

Medium: Here 3des-cbc performed better than arcfour which stands second in terms of speed .

Large: Again arcfour the most efficient in terms of speed than all other cyphers , aes128-cbc and 3des-cbc are comparatively slower .