# 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.
