RE: [suse-security] which cipher for ssh2

Which cipher would be safest for ssh v2 ? I have to choose from AES 128-256 ,RC4,Twofish ,3DES,Blowfish?
Disclaimer note: This is all in some people's opinions. No liability is accepted whatsoever. And it's from the back of my head, so take it with a grain of salt. First, a bit on *symmetric* key lengths, though. A cryptographer colleague of mine says that nowadays, keys of 80 or 90 bits length (I forget which of the two, it's less than 112 bits and that's the point) are considered practically unbreakable by brute-force methods. This is a statistical fact, because *on average* you need to test half of the keyspace to find the correct key. Of course, you can be lucky in one attempt and find the key at the first (or the first 10^x, x < e.g. 10) attempts, or be unlucky and have to search the entire keyspace, which amounts to never being able to find the key. It makes good sense to change symmetric keys regularly (SSH does this). However, as long as the cipher algorithm is sound, currently 112 bits and higher can be considered safe. On a sidenote, it is also perfectly safe today to use 1024 bit RSA keypairs. 4096, 8192 or even more bits currently merely serve to induce a performance penalty. 2048 bits are OK, too. * AES (aka Rijndael): Is fast and should be pretty secure, has undergone quite a bit of public verification in a good process (NIST AES challenge). Some people have reservations about its security because it uses a relatively new technique and IIRC doesn't use as many 'cycles' as they'd like. * RC4: Don't know much about it. It's used extensively on the Web. * Twofish: Schneier's AES candidate made it into the final round and can therefore be considered secure and fast. IIRC, it's slower than Rijndael, though, inducing more of a performance hit. Whether that matters in your case is a different matter. The choice between Twofish and Rijndael is probably more of a matter of personal taste. * 3DES: The classic. Safe and well tested, but real slow. * Blowfish: Fast. Should be secure, but probably hasn't been cryptanalysed as much as 3DES, Twofish and Rijndael, so there might be undiscovered problems. I wouldn't sweat that personally, though, and use Blowfish or Rijndael on old hardware. Another note: All of the ciphers above are so hard to break that attackers typically won't bother with them. Instead, they'll attack the endpoints, i.e. SSH client and server. Remember the apache.org breakin. A legit user had a trojaned, password-sniffing SSH client, which transmitted the passwords to the attackers. The connection wasn't attacked, the endpoint was. Similar as in Web attacks. Hackers currently don't often attack the connection, be it SSL-encrypted or not. They attack the servers, it's still so much easier. Cheers Tobias

Just to put the numbers into useful terms: Assume you have one bad-ass computer. Assume it will do a trillion (1,000,000,000,000) keys/second (nice). Assume you have to search 50% of the keyspace on average 80 bit key = on average 38,308 YEARS to break. So you upgrade your computer, let's say it now does a trillion trillion keys/second (24 zeros). Assume you have to search 50% of the keyspace on average 80 bit key = on average 1.2 second. EXCELLENT 90 bit key = on average 20.6 minutes. not bad. so people upgade to 90 bit keys. 112 bit key = 164 years. 160 bit key = 46,343,912,903,694,283 years. 1024 = 5700447535712569468953910422339626882350256782541560669502475937269554661513 8560100427599353883668195433826065408229755726404670476413185721983584043465 9197037569423594829671728507799344387665269701556798848952843855120124119935 5703764368040995282761394929943067804992387977103 years As you can unless NP=P, or barring some breakthrough in quantum computing key lengths should stay well ahead of brute force key factoring for some time. Nurt Seifried, kurt@seifried.org A15B BEE5 B391 B9AD B0EF AEB0 AD63 0B4E AD56 E574 http://www.seifried.org/security/
participants (2)
-
Kurt Seifried
-
Reckhard, Tobias