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 ?