HW2 (Due Feb 13 in class)

 

Errata of HW1: In the ciphertext of problem 6, the two occurrences of BZQ should be BHQ. (The error was due to a typo in the plaintext.)

Hint: partial information of the permutation key: a-> F, c-> B, f->A, h->G, k->L, x-> Y.

 

1.     Cipher text generated by simple letter permutation maintains the letter frequencies of the original text. To help flatten frequencies we may use the following method, which is a generalization of exclusive-or encryption. First, we map English letters to an integer between 0 and 25, that is, I(A) = 0, I(B) = 1, …, I(Z) = 25.  Let X and Y be two English letters, define X+Y = I-1 ([I(X)+I(Y)] mod 26), where I-1 is the inverse of I, i.e.,  I-1(0) = A, …, I-1(25) = Z. Let X = X1X2 …Xl and Y = Y1Y2…Yl be two sequences of the same length of English letters, define X+Y = (X1+Y1)(X2+Y2)…(Xl+Yl). Let K be any sequence of l English letters. Let plaintext M = M1M2 …Mk, where each Mi is a block of l English letters, except possibly Mk, whose length m might be shorter. Let Km denote the first m letters in K. Define encryption algorithm by E(K, M) = C1C2 … Ck, where Ci = K + Mi, i = 1, …, k-1, and Ck = Km + Mk.

a.      Derive the decryption algorithm D.

b.     Let K = BLACKHAT. Encrypt the following plaintext (remove punctuations and blanks):

Methods of making messages unintelligible to adversaries have been necessary. Substitution is the simplest method that replaces a character in the plaintext with a fixed different character in the cipher text. This method preserves the letter frequency in the plaintext and so one can search for the plaintext from a given cipher text by comparing the frequency of each letter against the known common frequency in the underlying language.

 

2.     Let K be a DES key. After the initial permutation, its value is 1101001 1101011 0000101 1000111 0110101 0101001 1110001 0011101, what is sub-key K1?

 

3.     Let M and K both be 64-bit binary strings, which are encodings of, respectively, the plaintext WHITEHAT and the secret key BLACKHAT. In the plaintext, each letter is represented by an 8-bit ASCII code. For example, letter W has 7-bit ASCII code 1010111, whose 8-bit ASCII code is 01010111. In the secret key, each letter is represented by its 7-bit ASCII code followed by an odd parity bit. For example, letter B has 7-bit ASCII code 1000010, and so B is represented by 10000101. Execute the first round of DES and calculate L1R1.