What is a Stream Cipher?

A stream cipher is a symmetric encryption algorithm. Stream ciphers can be designed to be exceptionally fast, much faster in fact than any block cipher (see Question 54). While block ciphers operate on large blocks of data, stream ciphers typically operate on smaller units of plaintext, usually bits. The encryption of any particular plaintext with a block cipher will result in the same ciphertext when the same key is used. With a stream cipher, the transformation of these smaller plaintext units will vary, depending on when they are encountered during the encryption process.

A stream cipher generates what is called a keystream and encryption is provided by combining the keystream with the plaintext, usually with the bitwise exclusive-or operation. The generation of the keystream can be independent of the plaintext and ciphertext (yielding what is termed a synchronous stream cipher) or it can depend on the data and its encryption (in which case the stream cipher is said to be self-synchronizing). Most stream cipher designs are for synchronous stream ciphers.

Current interest in stream ciphers is most commonly attributed to the appealing theoretical properties of the one-time pad (see Question 93), but there have been, as yet, no attempts to standardize on any particular stream cipher proposal as has been the case with block ciphers (see Question 64). Interestingly, certain modes of operation of a block cipher (see Question 83) effectively transform it into a keystream generator and in this way, any block cipher can be used as a stream cipher. However, stream ciphers with a dedicated design are likely to be much faster.

| Question 87|