What Is a Cipher? From Letter Puzzles to Modern Encryption
Move every letter three places along the alphabet, and CAT becomes FDW. You've used a cipher—although anyone with a pencil and a little patience could undo this one.
A cipher is a set of rules for transforming readable information into an encrypted form and back again. The original information is called plaintext; the encrypted result is ciphertext.
Encryption performs the transformation, while decryption reverses it. In modern systems, a key—a value supplied to the cipher—controls the result.
From Simple Ciphers to the Enigma Machine
The rule and the key are different things
In our letter-shifting example, the rule is “move each letter along the alphabet, wrapping around at the end.” The key is the number of places to move: three.
Change the key to one, and CAT becomes DBU. Someone who knows the shift can move the letters backward to recover the message.
This kind of letter shift is commonly called a Caesar cipher. It makes the basic idea visible, but its tiny number of possible shifts makes it unsuitable for protecting real secrets.
Modern ciphers operate on digital data, including documents, pictures, and sound. Their security shouldn't depend on keeping the rules hidden: the Advanced Encryption Standard specification, for example, is publicly available.
The protected part is the secret key.
From alphabet puzzles to modern encryption
Two common kinds of symmetric cipher are block ciphers and stream ciphers. Symmetric means the same secret key is used to encrypt and decrypt.
| Kind | How it works | Example |
|---|---|---|
| Block cipher | Transforms fixed-size chunks of data | AES, the Advanced Encryption Standard |
| Stream cipher | Generates a stream of values that is combined with the data | ChaCha20 |
AES transforms 16-byte blocks; each byte holds eight bits, the zero-or-one units of digital data. Its variants use keys of different lengths, which is why names such as AES-128 and AES-256 refer to key size, not different block sizes.
- Carry sensitive files on a drive that stays locked without your PIN.
- Unlock it on any computer, with no software to install.
- Lose it without losing sleep: the contents are encrypted in hardware.
To encrypt a whole document, a block cipher needs a mode of operation: rules for applying the cipher across the message. That choice matters because a sound cipher can be used in an unsafe way.
ChaCha20's specification describes a stream cipher and a commonly paired checking method called Poly1305. Together, they can protect the content and help detect unauthorized changes to it.
You don't need to choose these parts by hand to use an encrypted messaging app. The software should use a well-designed combination and manage the details correctly.
The Enigma Machine, Explained
Keeping a message secret isn't the whole job
A basic encryption operation aims to keep outsiders from reading data. It doesn't automatically prove who sent a message or guarantee that nobody altered it.
Authenticated encryption adds a check that lets the recipient detect invalid or tampered-with encrypted data. That check establishes possession of the required key; tying the key to a particular person or service requires the surrounding system.
OWASP's storage guidance recommends authenticated modes where available and warns against inventing custom encryption algorithms. Established cryptographic software also has to handle keys, fresh per-message values, and errors properly.
A strong cipher won't rescue a key left in a public file. Nor will it stop someone from reading a message on a device they've already taken over after the app decrypts it.
- Follow the contest between codemakers and codebreakers from ancient Egypt to quantum cryptography.
- Understand how Enigma was broken, told as a story and not a math lecture.
- Come away able to explain public-key encryption to anyone.
Similar-looking operations with different purposes
Encoding changes how data is represented so software can carry or display it. Base64, which represents data using printable characters, needs no secret key to reverse and doesn't provide secrecy, as its specification makes clear.
Hashing calculates a short result from data for tasks such as checking for changes. Unlike encryption, it isn't designed to be reversed to recover the original message.
Public-key encryption uses a pair of related keys: a public one for encryption and a private one for decryption. Systems can use that approach alongside symmetric ciphers, with each handling a different part of secure communication.
That leaves a useful distinction when a product says it uses a “secret cipher.” Hiding the method is much less reassuring than naming a studied method, protecting the keys, and using it correctly.
Plaintext Can Be a Photograph

Ciphertext: What Encrypted Data Hides—and What It Doesn't

Cryptanalysis: How Codebreakers Find the Weak Spots

QUOTE:
"Amateurs hack systems, professionals hack people."

