A printable PDF is available.

# Homework 7 – Due Tuesday, March 27

- The basic Diffie-Hellman key exchange protocol is vulnerable to a
"man-in-the-middle" attack, as explained in the textbook. Describe
this attack.
- Consider a cryptographic hash function
*f:{0,1}*that satisfies the preimage resistance property and second preimage resistance property, even though it only works on fixed-size input blocks. Joe needs a function like this, but it has to work on^{n}-> {0,1}^{h}*pairs*of*n*-bit inputs, so he defines*g:{0,1}*as^{n}×{0,1}^{n}-> {0,1}^{h}

Is this function preimage resistant? Does it satisfy the second preimage resistance property? Justify both answers!*g(x,y) = f(x XOR y) .* - Prove that a hash function that satisfies the collision resistance
property also satisfies the second preimage resistance
property. (
*Hint: Write the statement you're trying to prove as an implication, and then prove the logical contrapositive.*)