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.

tively new breed of block cipher that is far less understood than the traditional<br />

underpinnings upon which Triple-DES is based. *<br />

Nonetheless, AES is widely believed to be able to resist any practical attack currently<br />

known that could be launched against any block cipher. Today, many cryptographers<br />

would feel just as safe using AES as they would using Triple-DES. In addition,<br />

AES always uses longer effective keys and is capable of key sizes up to 256 bits,<br />

which should offer vastly more security than Triple-DES, with its effective 112-bit<br />

keys. † (The actual key length can be either 128 or 192 bits, but not all of the bits<br />

have an impact on security.) DES itself is, for all intents and purposes, insecure<br />

because of its short key length. Finally, AES is faster than DES, and much faster than<br />

Triple-DES.<br />

Serpent is a block cipher that has received significant scrutiny and is believed to have<br />

a higher security margin than AES. Some cryptographers worry that AES may be easy<br />

to break in 5 to 10 years because of its nontraditional nature and its simple algebraic<br />

structure. Serpent is significantly more conservative in every way, but it is slower.<br />

Nonetheless, it’s at least three times faster than Triple-DES and is more than fast<br />

enough for all practical purposes.<br />

Of course, because AES is a standard, you won’t lose your job if AES turns out to be<br />

broken, whereas you’ll probably get in trouble if Serpent someday falls!<br />

RC4 is the only widely used stream cipher. It is quite fast but difficult to use properly,<br />

because of a major weakness in initialization (when using a key to initialize the<br />

cipher). In addition, while there is no known practical attack against RC4, there are<br />

some theoretical problems that show this algorithm to be far from optimal. In particular,<br />

RC4’s output is fairly easy to distinguish from a true random generator, which<br />

is a bad sign. (See Recipe 5.23 for information on how to use RC4 securely.)<br />

SNOW is a new stream cipher that makes significant improvements on old principles.<br />

Besides the fact that it’s likely to be more secure than RC4, it is also faster—an<br />

optimized C version runs nearly twice as fast for us than does a good, optimized<br />

assembly implementation of RC4. It has also received a fair amount of scrutiny,<br />

though not nearly as much as AES. Nothing significant has been found in it, and even<br />

the minor theoretical issues in the first version were fixed, resulting in SNOW 2.0.<br />

Table 5-1 shows some of the fastest noncommercial implementations for popular<br />

patent-free algorithms we could find and run on our own x86-based hardware.<br />

(There may, of course, be faster implementations out there.) Generally, the implementations<br />

were optimized assembly. Speeds are measured in cycles per byte for the<br />

* Most block ciphers are known as Feistel ciphers, a construction style dating back to the early 1970s. AES is<br />

a Square cipher, which is a new style of block cipher construction, dating only to 1997.<br />

† This assumes that a meet-in-the-middle attack is practical. Otherwise, the effective strength is 168 bits. In<br />

practice, even 112 bits is enough.<br />

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