A cipher is a mathematical function used to encrypt and decrypt data. ciphertext is the data that has been encrypted using a cipher.