Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
Block ciphers encrypt fixed-size chunks of data, stream ciphers produce a keystream that is combined with the plaintext byte by byte. The split shapes how symmetric encryption is used in practice.

What Are Block and Stream Ciphers?
Symmetric encryption comes in two shapes. A block cipher takes a fixed-size chunk of plaintext, typically 128 bits, and a key, and produces a block of ciphertext of the same size. A stream cipher takes a key and a nonce and produces a long pseudorandom keystream, which is combined with the plaintext one byte or one bit at a time, almost always with XOR. Both are reversible with the same key, and both are fast; the difference lies in how they handle data that is not neatly block-shaped.
AES is the obvious example, with Camellia, Twofish, and the long-obsolete DES and 3DES making up the rest of the family. Because the cipher only knows how to transform one block, two extra decisions are forced on you:
Block ciphers suit data you can address in pieces. Disk encryption needs to decrypt sector 4,000,000 without touching the preceding four million, which is exactly what XTS mode over AES provides.
A stream cipher never pads, never chains, and produces ciphertext the same length as the plaintext. That makes it natural for anything arriving in unpredictable sizes: voice over a radio link, a terminal session, or a video feed. ChaCha20, designed by Daniel Bernstein, is the modern choice; paired with the Poly1305 authenticator in RFC 8439 it is one of the two cipher suites TLS 1.3 actually uses, and it outperforms AES on processors without hardware acceleration, which is why Google deployed it for Android.
Never use the same key and nonce twice. If two messages are encrypted with the same keystream, XOR the two ciphertexts together and the keystream cancels out, leaving the two plaintexts combined — a problem cryptanalysts have been solving by hand since the 1940s. Every serious stream cipher failure has this shape.
WEP is the textbook case. It wrapped RC4 with a 24-bit initialisation vector, which repeats after a few hours on a busy network, and the Fluhrer–Mantin–Shamir attack of 2001 turned that into full key recovery in minutes. RC4 itself proved biased in its early output, and the IETF formally prohibited it in TLS in RFC 7465 in February 2015. GSM’s A5/1 and Bluetooth’s E0 have both been broken in the field as well.
Counter mode turns any block cipher into a stream cipher: encrypt a counter with AES, and use the output as keystream. AES-CTR and AES-GCM are therefore stream constructions built on a block primitive, and they inherit the nonce rule in full. Reusing a GCM nonce does not merely expose plaintext; it also lets an attacker recover the authentication key and forge arbitrary messages.
| Block cipher | Stream cipher | |
|---|---|---|
| Unit of work | Fixed block, usually 128 bits | Byte or bit |
| Padding | Required unless the mode avoids it | None |
| Random access | Yes, with XTS or CTR | Only with a seekable counter |
| Typical use | Disks, databases, files, backups | Network streams, voice, constrained devices |
| Modern examples | AES, Camellia, ASCON | ChaCha20, Salsa20 |
| Avoid | DES, 3DES, Blowfish with 64-bit blocks | RC4, A5/1, E0 |
For almost every application the answer is an authenticated construction rather than a raw cipher: AES-GCM where hardware acceleration exists, ChaCha20-Poly1305 where it does not. Neither gives you anything useful without integrity protection, so do not assemble AES-CTR plus a hand-written MAC unless you have a specific reason and a cryptographer to review it.
Constrained hardware has its own answer. NIST selected ASCON as its lightweight cryptography standard in February 2023 for sensors, RFID tags, and other devices where AES hardware is too expensive; it covers both encryption and hashing in one small design. Legacy 64-bit block ciphers deserve a separate note: the Sweet32 research of 2016 showed that 3DES and Blowfish leak data after roughly 32 GB on a single connection, which is why long-lived VPN tunnels using them should be retired. If you are not sure which ciphers your estate negotiates, a configuration review is a cheap place to start — our network security services enumerate exactly that.
Not inherently. ChaCha20 is as trusted as AES and is used alongside it in TLS 1.3. The reputation comes from RC4, A5/1, and WEP, all of which failed through weak design or nonce reuse rather than because they were stream ciphers. A well-designed stream cipher used correctly is a perfectly sound choice.
ECB encrypts every identical block to the same ciphertext, so structure in the plaintext survives encryption. Encrypt a bitmap image in ECB and you can still see the picture. In business data it means repeated values, such as a status flag or a national insurance number appearing twice, are visible to anyone who looks at the ciphertext.
Treat it as a migration item. NIST disallowed 3DES for new applications after 2023, and its 64-bit block size makes the Sweet32 birthday attack practical on connections carrying tens of gigabytes. Where you cannot replace it immediately, limit session volume and key lifetime, and schedule the move to AES rather than leaving it indefinitely.
It detects tampering as well as hiding the content. A plain cipher happily decrypts modified ciphertext into garbage or, worse, into something the attacker chose. AES-GCM, ChaCha20-Poly1305, and ASCON produce an authentication tag that fails verification if a single bit changed, which removes padding oracles and bit-flipping attacks in one step.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.