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.

case, the faster of the two algorithms can be used (though you will get incompatible<br />

results if you use decryption where someone else uses encryption).<br />

We believe that the advantages of CWC mode make it more appealing for generalpurpose<br />

use than all other modes. However, the problem of repeating nonces is a<br />

serious one that developers often get wrong. See Recipe 5.10, where we provide a<br />

high-level wrapper to CWC mode that is designed to circumvent such problems.<br />

Offset Codebook (OCB) mode<br />

OCB mode is a patented encryption mode that you must license to use. * CWC offers<br />

similar properties and is not restricted by patents.<br />

OCB is reasonably new. It was introduced by Phil Rogaway and is based on earlier<br />

work at IBM. Both parties have patents covering this work, and a patent held by the<br />

University of Maryland also may apply. OCB is not under consideration by any standards<br />

movements.<br />

The primary disadvantages of OCB mode are:<br />

• It is restricted by patents.<br />

• The required nonce must never be reused (this is easy to avoid).<br />

• It isn’t well suited for use with 64-bit block ciphers. It does work well with AES,<br />

of course.<br />

The primary advantages of OCB mode are:<br />

• OCB ensures message integrity in addition to performing encryption.<br />

• The additional functionality requires minimal message expansion (you would<br />

need to send the same amount of data to perform integrity checking with any of<br />

the previously mentioned cipher modes).<br />

• OCB is fully parallelizable (hardware implementations can achieve speeds above<br />

10 gigabits per second).<br />

• OCB has provable security properties while using only a single block cipher key.<br />

This means that under reasonable assumptions on the underlying block cipher,<br />

the mode provides excellent secrecy and message integrity if the nonce is always<br />

unique.<br />

• Messages can be of arbitrary length (there is no need for block alignment).<br />

• For ciphers where raw encryption and decryption operations require separate<br />

algorithms (particularly AES), only a single algorithm is necessary. In such a<br />

case, the faster of the two algorithms can be used (though you will get incompatible<br />

results if you use decryption where someone else uses encryption).<br />

* At least one other patent also needs to be licensed to use this mode legally.<br />

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

Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.<br />

Selecting a Cipher Mode | 169

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

Saved successfully!

Ooh no, something went wrong!