Cipher names and modes explained

AES, RC5 and Blowfish are ciphers. CBC, ECB and GCM are modes. A name like aes-256-cbc tells you both, plus the key size. Pick any of the 174 names on this site and see what it means.

aes-256-cbc

AES with a 256-bit key in CBC mode.

  • cipher the algorithm
  • bits key length
  • mode how blocks are chained
The idea

Cipher and mode: two different jobs

A block cipher like AES, RC5 or Blowfish can do exactly one thing: turn one block of data (16 bytes for AES, 8 bytes for RC5 and Blowfish) into another block, using a key. Real messages are longer than one block. The mode of operation decides how the blocks of a longer message are processed: each on its own (ECB), chained together (CBC), or by encrypting a counter (CTR, GCM).

So "CBC or RC5?" is not a choice. You always pick both: a cipher and a mode. rc5-cbc is RC5 in CBC mode, aes-256-cbc is AES in CBC mode. Change only the mode and you get a different result from the same cipher and key; change only the cipher and the mode works the same way.

aesCipherAES, ARIA, Camellia, DES, Blowfish, RC5 …
256Key length128, 192 or 256 bit. Missing when the cipher has one default size.
cbcModeECB, CBC, CFB, OFB, CTR, GCM, XTS … Missing on stream ciphers and short names.
See it

Same cipher, same key, different mode

Each square below is one 16-byte block, and the color is made from the first three bytes. The left picture is the plain text. Both others are encrypted with AES-128 and the secret my secret, computed by the same code as the tools on this site. Only the mode differs.

Plain picture192 blocks of 16 bytes, two colors
aes-128-ecbSame block in, same block out: the heart is still there
aes-128-cbcEvery block depends on the one before: noise

That is the whole problem with ECB: anyone can see which blocks are equal without knowing the key.

Try it yourself

One text in five modes

The quick brown fox jumps over the lazy dog (43 bytes) encrypted with AES-128 and the secret my secret, shown as hex, one block per line. The tools on this site use an IV of zero bytes, like PHP's openssl_encrypt without IV. That makes some modes start the same way.

ModeBytesCiphertext (hex, 16 bytes per line)
aes-128-ecb488bbbdf1c04e6bc2af1632f6a8876b1ca
dbf695a706057a340c5fbfe2c06e9a05
bb5487dd2c622c2fd06a2cacb7564614
aes-128-cbc488bbbdf1c04e6bc2af1632f6a8876b1ca
ddf0bce461f3c194bb34b37fd6f0e7ef
823344ba4032b87c4d72ac7678141d7a
aes-128-cfb434ac312ce5feb15184f259131203cfeb1
495f14377fb0cf66230818a1efce70a0
6851de85f839fb928437d7
aes-128-ofb434ac312ce5feb15184f259131203cfeb1
0c06c84c687d67c3a1341a9d9b56e149
8fd37d0e86ace41ca24dcc
aes-128-ctr434ac312ce5feb15184f259131203cfeb1
fc3f7599fd46a40b5c45440fdc06162c
ede5f0564ae14155ff34b1
ECB and CBC share the first block

With an IV of zeros, CBC's first step is the same as ECB. From the second block on, CBC mixes in the previous block and everything differs.

CFB, OFB and CTR share the first block

All three encrypt the IV first and XOR it onto the text. After that each feeds back something else.

48 bytes vs. 43 bytes

ECB and CBC pad the text to full blocks (PKCS#7). CFB, OFB and CTR work like stream ciphers: the output is exactly as long as the input.

Why a random IV matters

With a fixed IV the same text always gives the same ciphertext. Real apps use a new random IV for every message and send it along.

Modes

The modes at a glance

ModePaddingIV / nonceDetects changesToday
ECByesnonoAvoid
CBCyesyesnoLegacy
CFB, CFB8, CFB1noyesnoLegacy
OFBnoyesnoLegacy
CTRnoyes (nonce)noRecommended
GCM, CCM, OCBnoyes (nonce)yesRecommended
XTSnoyes (sector number)noRecommended
Key Wrapno (-pad: yes)fixedyesRecommended
Stream ciphernoRC4: no, ChaCha20: yesno

ECB Electronic Codebook

Avoid

Every block is encrypted on its own. The same 16 bytes of plain text always give the same 16 bytes of ciphertext, so patterns stay visible (see the picture above). Only for single blocks, such as wrapping one key.

Try aes-256-ecb →NIST SP 800-38A

CBC Cipher Block Chaining

Legacy

Each plain text block is XORed with the previous ciphertext block before it is encrypted; the first one with the IV. The most common mode in older code. Needs a random IV per message, and without a MAC it is open to padding oracle attacks.

Try aes-256-cbc →NIST SP 800-38A

CFB, CFB8, CFB1 Cipher Feedback

Legacy

Turns the block cipher into a stream cipher: it encrypts the previous ciphertext and XORs the result onto the plain text. CFB uses a whole block per step, CFB8 one byte, CFB1 one bit (8 or 128 times slower).

Try aes-256-cfb →NIST SP 800-38A

OFB Output Feedback

Legacy

Encrypts the IV again and again and XORs that keystream onto the text. No padding. Reusing an IV with the same key reveals both texts.

Try aes-256-ofb →NIST SP 800-38A

CTR Counter

Recommended

Encrypts a counter (nonce + 0, 1, 2 …) and XORs it onto the text. Fast and parallel, no padding. The basis of GCM. A nonce must never repeat under the same key.

Try aes-256-ctr →NIST SP 800-38A

GCM, CCM, OCB Authenticated encryption (AEAD)

Recommended

CTR-style encryption plus an authentication tag that detects any change to the ciphertext. GCM is what TLS, SSH and most libraries use today. This tool shows an empty result for them, because PHP needs the tag, which the old site never passed.

Try aes-256-gcm →NIST SP 800-38D / 38C, RFC 7253

XTS XEX-based tweaked codebook with ciphertext stealing

Recommended

Made for disk encryption (BitLocker, FileVault, LUKS). Two keys, so aes-256-xts needs 64 bytes. Each disk sector gets its own tweak. Needs at least 16 bytes of input.

Try aes-256-xts →NIST SP 800-38E

Key Wrap AES Key Wrap

Recommended

Encrypts keys, not text: the input must be a multiple of 8 bytes (the -pad variants accept any length). Has a built-in integrity check.

Try id-aes256-wrap →RFC 3394 / RFC 5649

Stream cipher no mode

RC4 and ChaCha20 are stream ciphers. They produce a keystream directly, so there is no mode in the name. ChaCha20-Poly1305 adds a tag like GCM.

Try chacha20 →RFC 8439

Ciphers

The cipher families

The first part of the name. These are the 14 ciphers behind the 174 names on this site, from today's standard to museum pieces.

AES

Recommended

2001 · Daemen & Rijmen, NIST standard (FIPS 197)

Block
128 bit
Key
128, 192, 256 bit

The standard cipher today. Built into almost every processor, used in TLS, Wi-Fi, disk and file encryption. Also called Rijndael.

aes-128-cbcaes-128-ccmaes-128-cfbaes-128-cfb1aes-128-cfb8aes-128-ctraes-128-ecbaes-128-gcmaes-128-ocbaes-128-ofbaes-128-xtsaes-192-cbcaes-192-ccmaes-192-cfbaes-192-cfb1aes-192-cfb8aes-192-ctraes-192-ecbaes-192-gcmaes-192-ocbaes-192-ofbaes-256-cbcaes-256-ccmaes-256-cfbaes-256-cfb1aes-256-cfb8aes-256-ctraes-256-ecbaes-256-gcmaes-256-ocbaes-256-ofbaes-256-xtsid-aes128-ccmid-aes128-gcmid-aes128-wrapid-aes128-wrap-padid-aes192-ccmid-aes192-gcmid-aes192-wrapid-aes192-wrap-padid-aes256-ccmid-aes256-gcmid-aes256-wrapid-aes256-wrap-pad

ChaCha20

Recommended

2008 · D. J. Bernstein (RFC 8439)

Block
stream cipher
Key
256 bit

A modern stream cipher. Fast in software, so phones and WireGuard like it. With Poly1305 it is one of the standard cipher suites of TLS 1.3.

chacha20chacha20-poly1305

Camellia

Recommended

2000 · Mitsubishi & NTT, Japan (RFC 3713)

Block
128 bit
Key
128, 192, 256 bit

Same block and key sizes as AES and considered just as secure. Approved in Japan and the EU, but rarely used elsewhere.

camellia-128-cbccamellia-128-cfbcamellia-128-cfb1camellia-128-cfb8camellia-128-ctrcamellia-128-ecbcamellia-128-ofbcamellia-192-cbccamellia-192-cfbcamellia-192-cfb1camellia-192-cfb8camellia-192-ctrcamellia-192-ecbcamellia-192-ofbcamellia-256-cbccamellia-256-cfbcamellia-256-cfb1camellia-256-cfb8camellia-256-ctrcamellia-256-ecbcamellia-256-ofb

ARIA

Recommended

2004 · South Korea (RFC 5794)

Block
128 bit
Key
128, 192, 256 bit

The Korean national standard, built like AES. Secure, but you will hardly meet it outside Korean systems.

aria-128-cbcaria-128-ccmaria-128-cfbaria-128-cfb1aria-128-cfb8aria-128-ctraria-128-ecbaria-128-gcmaria-128-ofbaria-192-cbcaria-192-ccmaria-192-cfbaria-192-cfb1aria-192-cfb8aria-192-ctraria-192-ecbaria-192-gcmaria-192-ofbaria-256-cbcaria-256-ccmaria-256-cfbaria-256-cfb1aria-256-cfb8aria-256-ctraria-256-ecbaria-256-gcmaria-256-ofb

SEED

Legacy

1998 · KISA, South Korea (RFC 4269)

Block
128 bit
Key
128 bit

Was required for online banking in Korea for years. Not broken, but replaced by ARIA and AES.

seed-cbcseed-cfbseed-ecbseed-ofb

Blowfish

Legacy

1993 · Bruce Schneier

Block
64 bit
Key
32 to 448 bit

Never broken, but its 64-bit block is too small for large amounts of data. Lives on in bcrypt. Its successor is Twofish.

bf-cbcbf-cfbbf-ecbbf-ofb

CAST5 (CAST-128)

Legacy

1996 · Adams & Tavares (RFC 2144)

Block
64 bit
Key
40 to 128 bit

The default cipher of older PGP and GnuPG versions. Not broken, but 64-bit blocks.

cast5-cbccast5-cfbcast5-ecbcast5-ofb

IDEA

Legacy

1991 · Lai & Massey

Block
64 bit
Key
128 bit

Famous as the cipher of the first PGP. Patents expired in 2012. Replaced by AES.

idea-cbcidea-cfbidea-ecbidea-ofb

RC5

Legacy

1994 · Ron Rivest (RFC 2040)

Block
64 bit here
Key
variable, here 128 bit

Very simple and flexible: block size, rounds and key length are adjustable. OpenSSL uses 12 rounds, which have known theoretical attacks. Rarely used.

rc5-cbcrc5-cfbrc5-ecbrc5-ofb

RC4

Avoid

1987 · Ron Rivest

Block
stream cipher
Key
40 to 2048 bit

Once in WEP and TLS. Its output is biased and leaks plain text, so TLS banned it in 2015 (RFC 7465). Do not use.

rc4rc4-40

DESX

Avoid

1984 · Ron Rivest

Block
64 bit
Key
56 + 2 × 64 bit

DES with extra key material XORed before and after. Stronger than DES, weaker than 3DES. Historic.

desx-cbc

Short names

34 names that are only a different name

OpenSSL accepts short names. They give exactly the same result as the long form. Two traps: des-ede3 is ECB, while des3 is CBC, and the -hmac- names only encrypt when you call them like this.

Key size

128, 192 or 256?

The number is the key length in bits: 128 bit = 16 bytes, 256 bit = 32 bytes. AES-128 is already far beyond brute force; AES-256 adds a margin, for example against future quantum computers, and costs about 40 % more time. Numbers like 40 or 64 (rc2-40-cbc, rc4-40) are old export versions that were weakened on purpose.

On this site, your secret becomes the key directly: shorter secrets are padded with zero bytes, longer ones are cut. So a 9-character secret in AES-256 is a 9-byte key with 23 zero bytes, not a strong 256-bit key. Real software derives the key from a password with a slow function like PBKDF2 or Argon2.

FAQ

Frequently asked questions

What is the difference between CBC and RC5?

They are different kinds of things. RC5 is a cipher: the algorithm that scrambles one block with a key. CBC is a mode: the rule for how a cipher handles a message that is longer than one block. That is why a name like rc5-cbc contains both.

What does AES-256-CBC mean?

AES is the cipher, 256 is the key length in bits (32 bytes), CBC is the mode, Cipher Block Chaining. Most cipher names follow this pattern: family, key size, mode.

Is aes256 the same as aes-256-cbc?

Yes. aes256 is OpenSSL's short name for aes-256-cbc. Both give exactly the same result. The same goes for bf (bf-cbc), des3 (des-ede3-cbc) and rc5 (rc5-cbc).

What is the difference between ECB and CBC?

ECB encrypts every block on its own, so identical blocks give identical ciphertext and patterns stay visible. CBC mixes each block with the previous ciphertext and starts with an IV, so the output looks random.

Should I use CBC or GCM?

GCM for anything new. It encrypts and adds a tag that detects tampering. CBC only hides the content and needs a separate MAC to be safe.

Why do some names have no mode?

RC4 and ChaCha20 are stream ciphers. They produce a keystream directly and need no mode. Names without a mode like aes256 or bf are short names that default to CBC.

Which cipher should I use?

AES-256-GCM or ChaCha20-Poly1305 with a random nonce per message. Everything else on this list is for compatibility with existing data.

Sources

Standards and references

Last updated 21 November 2026.

Searches the list of pages on this site. What you type stays in your browser.