5. Joe and Sam are using Public Key encryption. Joe’s public and private keys are named Joe- Pub and Joe-Priv. Sam’s public and private keys are named Sam-Pub and Sam-Priv. a) (5 points) Assume Sam is sending encrypted data to Joe. What key (out of the 4 keys listed above) does Sam use to encrypt the data? What key does Joe use to decrypt the data? b) (5 points) Now assume Sam is putting digital signatures on his messages to Joe to prove his identity. He does this by encrypting the HMAC hash code at the end of the message. What key does Sam use to encrypt this HMAC code? What key does Joe use to decrypt the encrypted HMAC code that he receives? Solution Suppose A(sender) wants to send some data to B(receiver) using public-private key encryption. Then A(sender) has to encrypt the data using public key of B(receiver). When B(receiver) will get the data, he will decrypt it using his own private key. So answer to first question (a) is that: Sam will be using Joe-Pub to encrypt the data to be sent to Joe. And Joe will use Joe-Priv to decrypt the data. For question(b), the case is similar to question(a). Sam will be using Joe-Pub key to encrypt the HMAC and Joe will be using Joe-Priv to decryp the HMAC of Sam..