7.12 Summary
In this chapter, we introduced the mathematical foundations of public-key cryptosystems and looked in detail at the two most important examples, the Diffie-Hellman key exchange protocol and the RSA cryptosystem. We also investigated how exactly public-key cryptography is used within TLS.
By now, you should be aware of a very substantial difference between Diffie-Hellman and RSA: while RSA has to work with integers, the Diffie-Hellman protocol works in principle with any abelian group 𝔾. The difficulty of the discrete logarithm problem, which lies at the core of the Diffie-Hellman protocol, varies from group to group. If we can find a group where it is especially difficult, the corresponding key lengths could be shorter in that group. This fact is what makes elliptic curves so attractive in modern cryptography. They are the topic of our next chapter.