11.07.2015 Views

Cryptography - Sage

Cryptography - Sage

Cryptography - Sage

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

3. Error propagation. An error in a ciphertext bit affects only that bit of the plaintext.4. Error recovery. The cipher is self-synchronizing, and bit errors in a ciphertext blockaffect only that bit of the recovered plaintext. It recovers immediately from bit errors, butbit losses affect alignment.5. Throughput. As with CFB, the rate of enciphering and deciphering is reduced by afactor of n/r, however the vectors I j can be precomputed from K and I 0 , independentlyof the ciphertext blocks.ExercisesWe summarise the modes of operation covered in this chapter.Electronic Codebook Mode. For a fixed key K, the output ciphertext is given byC j = E K (M j ) with output C 1 C 2 . . . .Ciphertext Block Chaining Mode. For input key K, and initialization vector IV = C 0 ,the output ciphertext is given by C j = E K (C j−1 ⊕ M j ), with output C 0 C 1 C 2 . . ..Ciphertext Feedback Mode. Given plaintext M 1 M 2 . . . in r-bit blocks, a key K, ann-bit cipher E K , and an n-bit initialization vector IV = I 1 , the ciphertext is computed as:C j = M j ⊕ L r (E K (I j ))I j+1 = R n−r (I j ) || C jwhere R n−r and L r are the operators which take the right-most n−r bits and the left-mostr bits, respectively, and || is concatenation.Output Feedback Mode. Given plaintext M 1 M 2 . . . in r-bit blocks, a key K, an n-bitcipher E K , and an n-bit initialization vector IV = I 0 , the ciphertext is computed as:I j = E K (I j−1 )C j = M j ⊕ L r (I j ),where L r is the operator which takes the left-most r bits.Exercise 5.1 What mode of operation has been used in the assignment and in class up tothis point, and why? What are the security disadvantages of this mode of operation?Exercise 5.2 Let E K be the 4-bit cipher defined by:⎛⎞1 0 0 1E K (M) = (K ⊕ M) ⎜ 0 1 1 0⎟⎝ 1 0 1 0 ⎠ = (X 1 + X 3 , X 2 + X 4 , X 2 + X 3 , X 1 + X 4 )0 1 0 146 Chapter 5. Block Ciphers

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

Saved successfully!

Ooh no, something went wrong!