A cipher is any algorithm that can be used to encrypt and decrypt information.
Ciphers work by transforming plaintext (the original message that the sender intends to encrypt) into ciphertext — the coded text that can be safely sent to the receiver. The receiver then needs to use an additional piece of information — commonly called a “key” — to decrypt the ciphertext back into plaintext.
The key is agreed upon by the sender and the receiver prior to initiating the communication, and a good cipher must produce such a ciphertext that is extremely difficult or impossible to decrypt without knowing the key.
The earlier ciphers that relied on pen and paper, and have by now been displaced by much more effective computer-assisted encryption methods, are often called classical ciphers. The two main types of these are substitution and transposition ciphers.
Advances in cryptanalysis have made these pen and paper ciphers easily crackable and effectively obsolete. The emergence in the mid-20th century of electromechanical encryption devices such as the Enigma machine had prolonged their usefulness somewhat, until the appearance of the corresponding decryption devices, such as the British bombe.
Since then, new cryptographic ciphers have emerged that are so computationally intensive that encryption can only be done effectively through the use of computers, and decryption is prohibitively expensive even with the most powerful machines available.
Join the thousands already learning crypto!