Building authentication around Diffie–Hellman
Plain Diffie–Hellman agrees on a secret but does not prove who is on the other side. I bound both peers, every handshake field, and the negotiated group into an HMAC-authenticated transcript, then derived separate authentication and directional record keys through HKDF.