A cipher is an algorithm for performing encryption or decryption. The operation of a cipher usually depends on a piece of auxiliary information, called a key. Select a key before using a cipher to encrypt a message.