21.03.2013 Views

Problem - Kevin Tafuro

Problem - Kevin Tafuro

Problem - Kevin Tafuro

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Clearly, Triple-DES isn’t fast in the slightest; we have included it in Table 5-1 only to<br />

give you a point of reference. In our opinion, you really shouldn’t need to consider<br />

anything other than AES unless you need interoperability, in which case performance<br />

is practically irrelevant anyway!<br />

See Also<br />

• Brian Gladman’s Cryptographic Technology page: http://fp.gladman.plus.com/<br />

AES/<br />

• OpenSSL home page: http://www.openssl.org/<br />

• SNOW home page: http://www.it.lth.se/cryptology/snow/<br />

• Serpent home page: http://www.cl.cam.ac.uk/~rja14/serpent.html<br />

• Recipes 5.4, 5.23<br />

5.3 Selecting an Appropriate Key Length<br />

<strong>Problem</strong><br />

You are using a cipher with a variable key length and need to decide which key<br />

length to use.<br />

Solution<br />

Strike a balance between long-term security needs and speed requirements. The<br />

weakest commonly used key length we would recommend in practice would be Triple-DES<br />

keys (112 effective bits). For almost all other algorithms worth considering,<br />

it is easy to use 128-bit keys, and you should do so. Some would even recommend<br />

using a key size that’s twice as big as the effective strength you’d like (but this is<br />

unnecessary if you properly use a nonce when you encrypt; see the “Discussion” section).<br />

Discussion<br />

Some ciphers offer configurable key lengths. For example, AES allows 128-bit, 192bit,<br />

or 256-bit keys, whereas RC4 allows for many different sizes, but 40 bits and 128<br />

bits are the common configurations. The ease with which an attacker can perform a<br />

brute-force attack (trying out every possible key) is based not only on key length, but<br />

also on the financial resources of the attacker. 56-bit keys are trivial for a well-funded<br />

government to break, and even a person with access to a reasonable array of modern<br />

desktop hardware can break 56-bit keys fairly quickly. Therefore, the lifetime of 56bit<br />

keys is unreasonable for any security needs. Unfortunately, there are still many<br />

160 | Chapter 5: Symmetric Encryption<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!