7CCSMCIS Cryptography and Information Security
What is a meet-in-the-middle attack?
In 2DES (2 keys, running run encryption twice), a meet-in-the-middle attack is where an attacker can run the ciphertext through the encrypt function for all
How many keys are used in triple-DES and why?
There are 2 keys used in 3DES. This is to maintain compatibility with standard DES.
Why is the middle portion of triple-DES a decryption rather than an encryption?
a
- Consider a block cipher that applies bit permutations (transpositions) to bit vectors length 4. i.e. the permutation cipher with alphabet
and block length 4. - Consider the key
that transforms a bit vector of length 4 by shifiting it by one bit to the left i.e. permutes the bit order 1,2,3,4 to 2,3,4,1. The for example . - Consider
.
Use the ECB mode of operation to encrypt the plaintext
.
P = 101100010100101
Becomes:
P = 1011 0001 0100 101
P = 1011 0001 0100 1010
E(K, 1011) = 0111
E(K, 0001) = 0010
E(K, 0100) = 1000
E(K, 1010) = 0101
C = 0111 0010 1000 0101
We pad the last block by appending a 0 (or 1 if we like).
Use the CBC mode of operation to encrypt the plaintext
with , and then decrypt it.
P = 101100010100101
Becomes:
P = 1011 0001 0100 101
P = 1011 0001 0100 1010
C = 0010 0110 0100 1101
Decryption:
C = 0010 0110 0100 1101
P = 1011 0001 0100 1010
- Consider a block cipher that applies bit permutations (transpositions) to bit vectors of length 3, i.e.,
. - Consider the key
that transforms a bit vector of length 4 by shifting it one bit to the left, i.e. permutes the bit order 1,2,3,4 to 2,3,4,1. - Consider
.
Use CFB mode of operation to encrypt the plaintext
.
S = 3, therefore split plaintext into 3s.
P = 101 100 010 100 101
IV = 1010
Gives:
C = 111 011 001 101 000
Use OFB mode of operation to encrypt the plaintext
(with block length 4).
P = 1011 0001 0100 101
IV = 1010
. . . .
Gives:
C = 1110 1011 0001 000