A key is data called that is input into a cryptographic algorithm for the purpose of producing encrypted data. There are two types of cryptography, the public key and the private key. The public key uses public keys to encrypt data and private key uses private key to decrypt data. They are produced by a group of algorithms.