20.01.2015 Views

an introduction to authenticated encryption - iSEC Partners

an introduction to authenticated encryption - iSEC Partners

an introduction to authenticated encryption - iSEC Partners

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

∆ ← Init(N)<br />

∆ 1 ← Inc 1 (∆) ∆ 2 ← Inc 2 (∆ 1 ) ∆ n ← Inc n (∆ n−1 ) ∆ $ ← Inc $ (∆)<br />

M 1 M 2 M n M 1 ⊕ ... ⊕ M n<br />

∆ 1 ∆ 2 ∆ n ∆ $<br />

E k E k<br />

. . . E k E k<br />

∆ 1 ∆ 2 ∆ n<br />

C 1 C 2 C n T<br />

Figure 6: OCB Mode<br />

The output of this function becomes Init(N), <strong>an</strong>d is the initial counter value. The incrementing function encrypts a<br />

block of zeros with K <strong>an</strong>d, for each block <strong>to</strong> be encrypted, left bit shifts this value by one <strong>an</strong>d XORs it with Init(N)<br />

(although the first increment is saved for the checksum). It should be noted that these c<strong>an</strong> be pre-computed for a<br />

given key. For each block <strong>to</strong> be encrypted, the message is XORed with the counter, encrypted, <strong>an</strong>d then XORed with<br />

the counter again <strong>to</strong> produce the ciphertext. A checksum is also created by breaking the message M in<strong>to</strong> n blocks<br />

<strong>an</strong>d then XORing each of these blocks <strong>to</strong>gether. The result is then XORed with the counter value, <strong>an</strong>d the result is<br />

encrypted with key K. The result of this operation is then output as the tag.<br />

Mainly due <strong>to</strong> the fact that OCB is a one-pass scheme, it is on the order of two times faster th<strong>an</strong> the fastest two-pass<br />

scheme GCM. In addition <strong>to</strong> this, it is on-line <strong>an</strong>d parallelizable. It has, however, not generally been adopted by<br />

st<strong>an</strong>dards bodies <strong>an</strong>d is not included in <strong>an</strong>y of the popular cryp<strong>to</strong>graphic libraries (although optimized reference<br />

code does exist). The primary reason for this has been OCB is patented. As of J<strong>an</strong>uary 2013, the patent restrictions<br />

have been loosened <strong>to</strong> allow inclusion in open source software <strong>an</strong>d non-military usage. 11<br />

3 COMPARISONS<br />

The following section compares properties that are relev<strong>an</strong>t <strong>to</strong> developers <strong>an</strong>d system architects when selecting a<br />

mode of operation. Some properties such as complexity <strong>an</strong>d security are subjective, but are still very import<strong>an</strong>t <strong>to</strong><br />

consider.<br />

Support for associated data: All modes discussed here except for the first version of OCB are full AEAD schemes<br />

me<strong>an</strong>ing that they support associated data.<br />

Support for on-line processing: Only CCM is not on-line, all others are fully on-line modes.<br />

Parallelization: GCM <strong>an</strong>d OCB <strong>an</strong>d fully parallelizable, where as CCM <strong>an</strong>d EAX only allow parallelization in the<br />

<strong>encryption</strong> operation.<br />

11 See http://www.cs.ucdavis.edu/~rogaway/ocb/license.htm for more information.<br />

HTTPS://WWW.ISECPARTNERS.COM 8/10

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

Saved successfully!

Ooh no, something went wrong!