Home

streamciphers

Stream ciphers are a class of symmetric key ciphers that encrypt plaintext by combining it with a pseudorandom keystream, typically using an XOR operation. They operate on data as a stream rather than in fixed-size blocks, allowing low-latency encryption of inputs of varying length. The security of a stream cipher rests on the keystream being unpredictable and non-repeating; if the same keystream is ever reused with different plaintext, information can be leaked through simple algebraic relations.

Most stream ciphers generate a keystream from a secret key and an initialization vector (IV) or nonce.

Common examples include RC4 (now deprecated due to known biases), the Grain and Trivium families, and modern

Security notes emphasize that reusing a keystream is catastrophic, and implementations must avoid key/IV reuse, side-channel

Architectures
typically
combine
small,
fast
state
elements
such
as
linear
feedback
shift
registers
with
nonlinear
filters
or
generators
to
produce
the
keystream.
There
are
two
main
families:
synchronous
stream
ciphers,
where
the
keystream
is
advanced
independently
of
the
ciphertext,
and
self-synchronizing
stream
ciphers,
where
parts
of
the
ciphertext
feed
back
into
the
keystream
state
to
resynchronize
after
errors
or
losses.
designs
such
as
Salsa20
and
ChaCha,
which
are
widely
used
in
practice.
Some
designs
also
exist
in
the
ChaCha20-Poly1305
construction
for
authenticated
encryption.
Compared
to
block
ciphers
used
in
CTR
mode,
stream
ciphers
generally
offer
very
low
latency
and
reduced
memory
footprint
but
require
careful
IV
management
to
avoid
keystream
reuse.
leaks,
or
poor
randomness.
Stream
ciphers
find
use
in
TLS,
SSH,
and
wireless
and
embedded
communications,
particularly
where
speed
and
simplicity
are
advantageous.