Answer the given questions:
Question: Alice and her brother, Bob, are can't agree on the main course for their family Christmas dinner.
Alice wants a ham and Bob wants a turkey. Alice lives in Dallas and Bob lives in Atlanta, so they decide to use cryptography to perform a "coin flip" over the phone.
Here is the protocol that they use.
- Alice picks a secret bit, b ? {0, 1}.
- Alice picks a secret key, k, and use a block cipher to compute c = Ek(m) where m is b padded with random bits to the correct block length (the first bit of m is b).
- Alice reads the bits of c to Bob over the telephone.
- Bob tries to guess the value of b. Call his guess b'. Bob tells Alice his b' over the phone.
- Alice reads k to Bob. Bob decrypts c to recover b (the first bit of m).
If b' = b, Bob wins and they have turkey, otherwise they have ham.
Question 1. Describe how Alice can cheat.
Question 2. Describe how an oneway hash function can prevent this attack.
You have to satisfy the requirements specified in the instruction.