In this algorithm, two different keys are used for encryption and decryption. Public key encryption is an example of asymmetric key encryption, which involves sharing a public key with anyone who wants to communicate with you while keeping the private key protected.