In: Computer Science
Suppose Alice and Bob have RSA public keys in a file on a server. They communicate regularly, using authenticated, confidential message. Eve wants to read the messages but is unable to crack the RSA private keys of Alice and Bob. However, she is able to break into the server and alter the file containing Alice’s and Bob’s public keys.
(1) How should Eve alter the file to so that she can read confidential messages sent between Alice and Bob, and forge messages from either?
(2) How might Alice and/or Bob detect Eve’s subversion of the public keys?
Answer for question 1:-
Eve can replace their public keys by your own, therefore Bob and Alice will encrypt messages using your public key and eve will be able to decrypt their messages. After eve replaced the public keys Bob and Alice won't be able to decrypt correctly their messages, they may realize quickly that there is a problem with the keys.
Answer For Question 2:-
If Eve fails to intercept a message, the decryption will be found because the message destined for alice and bob will not be decrypted correctly as alice and bob will use their real private keys to decrypt instead of a fake private key. Alice and Bob should regularly check that the public key they have posted on the server is correct. They could also post public key fingerprints at a separate location to encourage individuals to communicate to validate what they receive from the certificate server.
If You have any question, feel free to ask.
Best of luck ?....