CS 311 Assignment 4

  1. Alice and Bob share a random key K∈{0,1,2}. Alice wants to encrypt a single message M∈{0,1,2} using this key.
    1. Suppose she does this by representing K and M using two bits (00, 01 or 10), and then XORing the two representatives. Explain why this is not a good protocol. Note: XORing is done bitwise. For example 01 XOR 10 = 11 and 01 XOR 11 = 10.
    2. Present a better way of doing it.
  2. Alice and Bob are talking on the phone to decide on a restaurant for dinner. Alice wants Chinese food and Bob wants pizza. They decide to flip a coin but they don't trust each other. Give a protocol so that Alice and Bob can flip a coin over the telephone. You may assume they have a one-way (easy-to-compute hard-to-invert) function.
  3. Suppose Alice has a number x and Bob has a number y. Can you create a protocol where both Alice and Bob learn z=x+y without Alice learning y and Bob learning x?