If we use a self-signed certificate, is ephemeral Diffie–Hellman key exchange protocol vulnerable to a man in the middle attack?

  • Is there anything else you'd like me to add to my answer?
    – forest
    Jan 24, 2021 at 5:01

1 Answer 1


Unless the users connecting to your site have imported your self-certificate from a trusted source, then yes, you will be vulnerable to MITM attacks. The reason for this is that an attacker could use his own self-signed certificate, and there would be no way for end users to tell that it is not the correct one.

Don't use a self-signed certificate. Teaching users to ignore the browser warnings and click through teaches them bad habits. If you don't want to spend money on a certificate, you can use a free service like Let's Encrypt. This is a CA which provides free domain validation-based certificates.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .