> For the complete documentation index, see [llms.txt](https://wiki.songer.pro/interviewing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.songer.pro/interviewing/security-domains-and-technical-aptitude/cryptographic-protections/cryptography/what-is-public-key-cryptography.md).

# What is public-key cryptography?

Public-key cryptography, also known as asymmetric cryptography, is a type of encryption that uses two different keys – a public key and a private key – to encrypt and decrypt data. The public key is used to encrypt the data, and the private key is used to decrypt it. This type of cryptography is useful for secure communication, because it allows two parties to communicate without having to share a secret key beforehand.
