Source: /cirosantilli/rsa-vs-diffie-hellman

= RSA vs Diffie-Hellman
{c}

<RSA (cryptosystem)> vs <Diffie-Hellman key exchange> are the dominant <public-key cryptography> systems as of 2020, so it is natural to ask how they compare:
* https://security.stackexchange.com/questions/35471/is-there-any-particular-reason-to-use-diffie-hellman-over-rsa-for-key-exchange
* https://crypto.stackexchange.com/questions/2867/whats-the-fundamental-difference-between-diffie-hellman-and-rsa
* https://crypto.stackexchange.com/questions/797/is-diffie-hellman-mathematically-the-same-as-rsa

As its name indicates, <Diffie-Hellman key exchange> is a <key exchange> algorithm. TODO verify: this means that in order to transmit a message, both parties must first send data to one another to reach a shared secret key. For RSA on the other hand, you can just take the public key of the other party and send encrypted data to them, the receiver does not need to send you any data at any point.