Stream cipher
From CRYPTUTOR
A stream cipher is similar to a pseudorandomness generator, in that it takes a short random seed, and outputs a string which "appears random" to all efficient computations. But the output length is not fixed a priori. Instead, a stream cipher, once initialized with a seed, maintains an internal state and produces output bits on demand. It derives its name from its use in encrypting a stream of data (by XORing the data stream with the pseudorandom stream).
[edit]
Definition
A pair of functions (G,U) is a stream cipher with a state-space Σ (w.l.o.g Σ = {0,1}k), if it has the following properties (here k is the security parameter of the stream cipher):
- Efficiency:
and
are computable in (deterministic) polynomial time in the input length. (Further Σ is efficiently samplable.)
- Pseudorandomness: For every polynomial
, the distribution
is a pseudorandom distribution. That is, it is computationally indistinguishable from the uniform distribution on
-bit strings. (More precisely, for every polynomial
the distribution ensemble
is pseudorandom).
It is easy to see that stream ciphers exist if and only if pseudorandom generators exist.

