Stream Ciphers¶
Stream ciphers generally process information byte by byte or bit by bit. In general:
- The key length of a stream cipher is the same as the length of the plaintext.
- The key of a stream cipher is derived from a shorter key, and the derivation algorithm is typically a pseudorandom number generation algorithm.
It is important to note that stream ciphers are currently all symmetric encryption.
The stronger the randomness of the sequence generated by the pseudorandom number generation algorithm, the better the statistical characteristics of the plaintext are concealed.
Stream cipher encryption and decryption are very simple; with known plaintext, the keystream can be obtained very easily.
The key to stream ciphers lies in designing a good pseudorandom number generator. Generally, the basic building block of a pseudorandom number generator is a feedback shift register. Of course, there are also some specially designed stream ciphers, such as RC4.