21.03.2013 Views

Problem - Kevin Tafuro

Problem - Kevin Tafuro

Problem - Kevin Tafuro

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Triple-DES does. When it was the de facto standard, Triple-DES was considered adequate<br />

for almost all applications.<br />

In the real world, 128 bits of security may be enough for all time, even considering<br />

that the ciphers we use today are probably nowhere near as good as they could be.<br />

And if it ever becomes something to worry about, it will be news on geek web sites<br />

like Slashdot. Basically, when the U.S. government went through the AES standardization<br />

process, they were thinking ahead in asking for algorithms capable of supporting<br />

192-bit and 256-bit keys, just in case future advances like quantum<br />

computing somehow reduce the effective key strength of symmetric algorithms.<br />

Until there’s a need for bigger keys, we recommend sticking with 128-bit keys when<br />

using AES as there is no reason to take the efficiency hit when using AES. We say<br />

this particularly because we don’t see anything on the horizon that is even a remote<br />

threat.<br />

However, this advice assumes you’re really getting 128 bits of effective strength. If<br />

you refuse to use random data to prevent against collision and precomputation<br />

attacks, it definitely makes sense to move to larger key sizes to obtain your desired<br />

security margin.<br />

See Also<br />

Recipes 5.3, 7.3, 10.7, 11.1<br />

5.4 Selecting a Cipher Mode<br />

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

You need to use a low-level interface to encryption. You have chosen a block cipher<br />

and need to select the mode in which to use that cipher.<br />

Solution<br />

There are various tradeoffs. For general-purpose use, we recommend CWC mode in<br />

conjunction with AES, as we discuss in the following section. If you wish to do your<br />

own message authentication, we recommend CTR mode, as long as you’re careful<br />

with it.<br />

Discussion<br />

First, we should emphasize that you should use a low-level mode only if it is absolutely<br />

necessary, because of the ease with which accidental security vulnerabilities<br />

162 | 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!