thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Commonly confused · Security Fundamentals & Crypto

Diffie-Hellman vs RSA: What's the Difference?

Diffie-Hellman is a key agreement protocol that lets two parties derive a shared secret over an insecure channel without ever sending it, but it cannot encrypt data or sign anything by itself. RSA can encrypt small values and create digital signatures.

Diffie-Hellman

Full definition
vs
Diffie-HellmanRSA
PurposeKey agreement onlyEncryption, key transport, and signatures
Secret transmitted?No, each side computes it independentlyYes, an encrypted key is sent (key transport)
AuthenticationNone by itself, vulnerable to MITM unless authenticatedCan authenticate via signatures
Forward secrecyYes when ephemeral (DHE/ECDHE)No with static RSA key exchange
Math basisDiscrete logarithm problemInteger factorization
Modern TLS 1.3ECDHE is mandatory for key exchangeUsed only for certificate signatures
Remember it

DH agrees on a key; RSA can sign the deal.

Exam tip

Exams like to ask which protocol provides perfect forward secrecy: ephemeral Diffie-Hellman. They also test that unauthenticated DH is open to man-in-the-middle attacks.

Tested on

More Security Fundamentals & Crypto look-alikes