Home

blockcipher

A block cipher is a symmetric-key cipher that encrypts and decrypts fixed-size blocks of plaintext, typically 64 or 128 bits, using a secret key. The core algorithm provides a reversible transformation that, given the same key, can convert plaintext blocks into ciphertext blocks and back again. Block ciphers by themselves are not designed to handle messages of arbitrary length; they require a mode of operation to process longer data and to provide security properties beyond the block level.

Modes of operation define how to apply a block cipher to multiple blocks. Common modes include electronic

Block ciphers also need padding schemes when the message length is not a multiple of the block

codebook
(ECB),
which
encrypts
each
block
independently
and
is
vulnerable
to
pattern
leakage;
cipher
block
chaining
(CBC),
which
links
blocks
with
chaining
and
requires
a
unique
initialization
vector;
and
counter
(CTR),
which
turns
the
block
cipher
into
a
stream
of
keystream
blocks
and
requires
a
unique
nonce
for
each
encryption
under
the
same
key.
Authenticated
encryption
with
associated
data
(AEAD)
modes
such
as
GCM
combine
confidentiality
with
integrity.
size,
with
PKCS#7
being
a
common
choice.
Security
depends
on
a
large
enough
block
size
to
minimize
block
collisions,
a
strong
key
schedule,
and
careful
implementation
to
avoid
side-channel
leaks.
Widely
used
modern
block
ciphers
include
AES
(Rijndael)
with
a
128-bit
block
size
and
128-,
192-,
or
256-bit
keys,
DES
and
its
successor
3DES,
Blowfish,
and
Camellia.
Block
ciphers
are
foundational
in
symmetric
cryptography
and
are
often
paired
with
specific
modes
to
meet
confidentiality,
integrity,
and
performance
requirements.