encryption modes of operation
You will manually apply 3 different encryption modes to a block cipher, to learn how modes of operation can reinforce it. The 3 modes you will use are ECB mode (electronic code book), CTR mode (counter), and CBC mode (cipher block chaining). The block cipher to which you will apply them is sdes (simplified DES).
An encryption mode operates in conjunction with a block cipher. It takes the output of a block cipher and does some additional work on it, and/or does some additional work on the cipher's input before feeding it to the cipher in the first place. As such, a given mode can operate with any of the block ciphers and a given cipher can be reinforced by any of the modes. So for example, there are other modes than these 3 and they too could be applied to sdes. And, there are other block ciphers than sdes, and these modes could be applied to them too.
The exercise to perform:
Print out this homework form, then fill in the blanks with the values needed as indicated. Here is another, practice form and the completed practice form. The practice form differs only in that it takes different input values. The block size is 8 bits, and the plaintext messages are 3 blocks long. Try the practice form, and refer to the completed one if you get stuck, in order to understand how to do it. Then do it on the homework form. When you are finished, answer the following questions, regarding the homework form. Where you are called upon to produce the s-des encryption of a certain quantity with a certain key, do not trouble yourself to do so manually. Rather, please utilize this encryption calculator in the form of an Excel spreadsheet programmed to perform s-des.
1. Some encryption modes process blocks in isolation from one another, every block standing
on its own independent of the rest. Other encryption modes involve
cross-block influence as a feature of the algorithm. How do the 3 modes in this
exercise, ECB, CTR, and CBC, fall into these 2 categories?
a. all treat blocks independently
b. CBC treats blocks independently; ECB and CTR involve
cross-influence
c. ECB and CBC treat blocks independently; CTR involves
cross-influence
d. ECB and CTR treat blocks independently; CBC involves
cross-influence
e. ECB treat blocks independently; CTR and CBC involve
cross-influence
2. the encrypted ciphertext obtained as the result of CBC here is:
a. 00001111
b. 01000110
c. 01000110 11010001 00001111
d. 01101101 11110010 11100111
e. 10100011 00110101 10011011
3. ECB differs from both of the others in that
a. it has more stages of operation
b. when used with a block cipher like sdes, it will always produce
different output for the same input.
c. when used with a block cipher like sdes, it will always
produce the same output for different input.
d. when used with a block cipher like sdes, it will always
produce the same output for the same input.
Submit your answers to the preceding questions following these preparation and submittal instructions (you will use sftp to deposit your answer file in your "assignments" subdirectory on the remote server). Please name your file "modes.txt". I will grade these using an automated script, so the format of the answer is critical to intelligibility.
For reference, ECB (electronic code book):
P0, P1, P2... are blocks of the plaintext; C0, C1, C2 are ciphertext blocks resulting from encrypting the plaintext blocks. IV is initialization vector, or initial value of a counter.
For reference, CBC (cipher block chaining):