PKI performs direct encryption through the keys it generates. It works by using two different cryptographic keys: a public key and a private key. Keys are public or private, they encrypt and decrypt secure data. A public key infrastructure (PKI) is a set of roles, policies, hardware, software, and processes required to create, manage, distribute, use, store and revoke digital certificates and manage public-key encryption. The purpose of PKI is to facilitate the secure electronic transfer of information for many network activities such as e-commerce, Internet banking and confidential email.