hi Everyone please correct me if im wrong for my understanding for the man in the middle attack used in a variant of diffie hellman key exchange .

am i right to say that a protocol is susceptible to the man in the middle attack, if each participants is having their own private key of yP and public key of g^yP mod p and

A -> B : g^rA mod P

B -> A : g^rB mod P

rA and rB are random values each session and my shared key is = g^rAxB + g^rBxA mod P. This can be attack because the protocol does not authenticate participants .

am i right for that understanding ? and an adversary can just participate in that key exchange ?


If there is no authentication of at least party then then no connection can be trusted, and MitM is possible. MitM does of course require an active attack; just eavesdropping is not enough, and unauthenticated DH does protect against eavesdropping attacks.

Note that the authentication may require a relatively low amount of data (e.g. there are protocols that simply use vicinity) but some kind of authentication does need to take place.

Not the answer you're looking for? Browse other questions tagged or ask your own question.