A cipher is an algorithm that transforms readable data (plaintext) into unreadable ciphertext and back again, using a secret key to control the transformation.
How ciphers work
A cipher defines the encryption and decryption steps; the encryption key determines the specific result. Historical ciphers such as the Caesar shift or the Enigma machine relied on substitution and transposition and are trivially broken today. Modern ciphers fall into two main groups:
- Block ciphers process fixed-size blocks – AES uses 128-bit blocks with 128-, 192- or 256-bit keys. A mode of operation such as CBC, CTR or GCM defines how blocks are chained; GCM also authenticates the data.
- Stream ciphers generate a keystream that is combined with the data bit by bit; ChaCha20 is the leading modern example.
Both are symmetric: sender and receiver share the same key. Asymmetric algorithms such as RSA are also sometimes called ciphers.
Cipher suites
In TLS, a cipher suite names the combination of key exchange, authentication, bulk cipher and hash used in a connection, for example TLS_AES_128_GCM_SHA256 in TLS 1.3. Servers and clients negotiate a suite they both support, which is why weak legacy suites must be disabled.
Why ciphers matter for security
Ciphers age. DES, with its 56-bit key, was brute-forced by the EFF’s “Deep Crack” machine in 1998; RC4 biases led RFC 7465 (2015) to prohibit it in TLS; and the Sweet32 attack (2016) showed that 64-bit block ciphers such as 3DES are unsafe for long sessions. Proprietary ciphers fail even faster, because they never received public scrutiny.
Best practices
- Use AES-GCM or ChaCha20-Poly1305 through established libraries.
- Disable DES, 3DES, RC4 and export-grade suites.
- Never reuse a nonce with the same key in GCM or stream ciphers.





