The standard Diffie-Hellman protocol has one weakness: it doesn't verify identity. If Alice thinks she is talking to Bob, but she is actually talking to a hacker (Eve) who is pretending to be Bob, she will establish a shared key with Eve instead.
So next time you send a “🔒” in a message, thank the humble shared key generator. It’s the quiet math party where the key is invited, but the lockpick isn’t. shared key generator