What is public-key encryption?
Public-key encryption (also Public-key cryptography) is a form of modern cryptography which allows users to communicate securely without previously agreeing on a shared secret key. For most of the history of cryptography, a key had to be kept absolutely secret and would be agreed upon beforehand using a secure, but non-cryptographic, method; for example, a face-to-face meeting or a trusted courier. There are a number of significant practical difficulties in this approach to distributing keys. Public-key cryptography was invented to address these drawbacks. With public-key cryptography, users can communicate securely over an insecure channel without having to agree upon a key beforehand. Public-key algorithms typically use a pair of two related keys: one key is private and must be kept secret, while the other is made public and can be widely distributed; it should not be possible to deduce one key of a pair given the other. The terminology of “public-key cryptography” derives from the i