Chapter7Notes - Chapter 7 Notes Block-Cipher Modes 1...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Chapter 7 Notes Block-Cipher Modes 1) Electronic Code Book(ECB): This is the typical manner in which block cipher are executed. Simply grab n bits of the plaintext at a time, where n is the block size, and then encrypt them using the algorithm, and output the corresponding ciphertext. Repeat for each subsequent block. 2) Cipher Block Chaining(CBC) mode: C 0 = IV (initialization vector) i = 1 while (!done) C i = e K (C i-1 M i ) M i and C i stand for the ith 64 bit block of plain and cipher text respectively. 3) Output Feedback Mode(OFB): This is a stream cipher, which means that we obtain the ciphertext by XORing the plaintext with a keystream. The keystream is generated with the key and the block cipher system being used. K 0 = IV i = 1 while (!done) { K i = e K (K i-1 ) C i = M i K i } 4) Cipher Feedback Mode(CFB): This is also a stream cipher, except that the keystream is generated by encrypting the ciphertext instead of the plaintext. C 0 = IV i = 1 while (!done) { K i = e K (C i-1 ) C i = M i K i }
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
5) Counter Mode (CTR) Here, the counter array stores known, prechosen values, so that each block could be encrypted in parallel. It could just store, 1, 2, 3, etc. Or, the initial counter value could be provided and then future counter values could be based on it, but if this were the case, then the counter values would have to be determined sequentially. i = 1 while (!done) { K i = e K (counter[i]) C i = M i K i } Data Encryption Standard(DES) Here is the basic algorithm used for DES: To encrypt a plaintext x of 64 bits and a secret key K of 56 bits do the following: 1) Compute x 0 = IP(x), a fixed permutation of the bits in x. IP is specified in the text. 2) Let x i = L i R i , for 0 i 16, where L i is the 32 leftmost bits of x i and R i is the 32 rightmost bits of x i . Make the following sequence of computations: for (i=1 to 16) { L i = R i-1 R i = L i-1 f(R i-1 , K i ) } Essentially, each loop iteration is known as a Feistel round. (Feistel is the creator of DES.) DEs comprises 16 of these rounds. Each round encrypts ½ of the bits from the pervious round. The function f and the key for the ith round K i will be discussed in detail later in these notes. 3) y = IP -1 (R 16 L 16 ), this means applying the inverse permutation applied in step 1 to the string R 16 L 16 . (Notice the “reverse” order of the two blocks L 16 and R 16 .) In essence, you would repeat this process for every block of 64 bits that needs to be encrypted. Now, we need to mention the details of step 2. First the function f: The first input to f, R i-1 is 32 bits, while the second input K i is 48 bits from the 56 bits of the key K.
Background image of page 2
1) Expand the 32 bits of R i-1 to 48 bits using the matrix E, which is also shown in the book. This matrix delineates an ordering of the bits of R i-1 where 16 of the bits are repeated. Let this computed value be E(R i-1 ). 2) Compute E(R
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 8

Chapter7Notes - Chapter 7 Notes Block-Cipher Modes 1...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online