Public-key cryptography uses two different keys. The public key can be shared with others, while the private key stays secret. This makes it possible to encrypt messages, verify signatures and establish secure communication without secretly exchanging the same key in advance.
