University of Virginia, Department of Computer Science CS551: Security and Privacy on the Internet, Fall 2000

 Problem Set 2: Symmetric Encryption Out: 13 September 2000 Due: 27 September 2000, before class

Collaboration Policy

You may work with up to two other students on this problem set. You must write up your answers independently, and understand completely everything you turn in. Working together means discussing the questions and criticing possible solutions; it does not permit splitting up questions in a group.

You may consult any outside resources you wish including books, papers, web sites and people. If you use resources other than the class materials, indicate what you used along with your answer.

Problem set answers may be hand-written, but only if your hand writting is neat enough for us to read it.

For full credit, answers must be clear and concise.

### 1. Perfect Ciphers

Dogbert invents a cipher based on tossing a coin with probabilities: p(heads) = 1/3, p(tails) = 1/3, p(edge) = 1/3. He creates a one-time pad from the results of an infinite number of coin flips, and gives Ratbert a copy of the pad.

He encodes a binary message using the following scheme:

```      message pad     output             message pad     output
======================             ======================
0       tails   &                  1       tails   %
0       edge    %                  1       edge    \$
```
a. (10) Is Dogbert's cipher perfect? (Prove or disprove)

b. (10) Ratbert doesn't like writing \$ signs, so he modifies Dogbert's cipher to use:

```      message pad     output             message pad     output
======================             ======================
0       tails   1                  1       tails   0
0       edge    1                  1       edge    0
```
Is Ratbert's cipher perfect? (Prove or disprove)

### 2. Entropy and Unicity

The Jefferson Wheel (from Problem Set 1) uses 36 wheels each having 26 letters. A legitimate receiver knows the contents and order of the wheels, but must be able to identify the correct plaintext row after aligning the wheels to the ciphertext.

a. (10) In order for the sender to have high confidence the receive will identify the correct row, what is the minimum redundancy of the language of the message?

b. (10) Challenge #1 challenges you to decipher a Jefferson wheel ciphertext 5753 characters long, without knowing the wheels. If you assume the secret message has typical redundancy of English, D = .72, is it (theoretically) possible to obtain the plaintext with good confidence?

### 3. Fiestel Ciphers

Ben Bitdiddle has invented a Feistel cipher and hired you to check if it is secure. His cipher opreates on 64-bit block and consists of 4 rounds. For each round:
```    L_i = R_i-1
R_i = L_i-1 XOR F (R_i-1, K)
F (m, k) = k XOR m
```
The same 32-bit key, K is used for each round. The final ciphertext is: C = R_4 || L_4.

You are given the plaintext-ciphertext pair:

```plaintext:  0001100100001101011101001100011101101011010100010011101001100010
ciphertext: 0111001001011100010011101010010101101011010100010011101001100010
```
Ben is stubbornly convinced of his genius and the invincibility of his cipher, and is not disturbed by the odd similarily between the second half of the ciphertext and the second half of the plaintext.

(20) Convince Ben the cipher is insecure by determining the key.
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}