Encyclopedia > Stream cipher

  Article Content

Stream cipher

A stream cipher is a cipher in which the input data is encrypted one bit (sometimes one byte) at a time. They are sometimes called state ciphers since the encryption of a bit is dependent on the current state. Stream ciphers represent a line of cipher development which is different from block ciphers although there are simple mathematical transformations that convert stream ciphers to block ciphers and vice versa. They are generally faster to execute in hardware than block ciphers.

Most stream ciphers consist of a pseudorandom number generator(PRNG) and an XOR gate. The PRNG is initialized with a key, and outputs a sequence of bits known as a keystream. Encryption consists of XORing the plaintext bits with the corresponding bits of the keystream; decryption consists of XORing the ciphertext bits with the corresponding keystream bits. This means that a single bit of ciphertext error results in a single bit of plaintext error; this property is useful when the transmission error rate is high. However, a stream cipher is susceptible to bit-fiddling attacks - dropping a bit will result in complete garbage. Some ciphers, called self-synchronizing stream ciphers, use several previous ciphertext bits to compute the keystream (as opposed to synchronous stream ciphers, in which the keystream is generated independently of the plaintext and the ciphertext). A single-bit error then turns into a long burst of garbage, but the cipher will recover from a lost bit after the erroneous bit falls off the shift register.

Keystream generators are often constructed using linear feedback shift registers.

All Wikipedia text is available under the terms of the GNU Free Documentation License

  Search Encyclopedia

Search over one million articles, find something about almost anything!
  Featured Article
French resistance

... them hid in the forested regions, especially in the unoccupied zone. They joined together to form maquis bands and began to plan attacks against the occupation forces. Some ...

This page was created in 25.8 ms