Is MITM attack theoretically possible after public/private key pair exchange is done successfully? Say Alice and Bob have genuine public keys of each other. Is MITM possible further during the authentication phase between Alice and Bob?
Please find the protocol below:
Alice and Bob have key pairs. Assume Alice and Bob have the correct public key of the other party. (i.e. key exchange is already done successfully.)
Now,
Ia and Ib are the identities of Alice and Bob.
pu_a and pu_b are the public keys of Alice and Bob.
pr_a and pr_b are the private keys of Alice and Bob
No_a and No_a’ are the nonce generated by Alice; No_b is the nonce generated by Bob
Sig_a and Sig_b are the signatures generated by Alice and Bob respectively by encrypting the message content with their private key:
Sig_a = Encpr_a(No_a’, No_b, Ib); Sig_b = Encpr_b(No_b, No_a, Ia)
Alice verifies Bob by decrypting Sig_b with pu_b, and checking if No_a is there; while Bob verifies Alice in the same way.