What’s a stream cipher?

Print anything with Printful



A stream cipher is a flexible encryption algorithm that processes data based on a sequence of keys, allowing for high-speed processing. The first stream cipher was created in 1917 by Gilbert Vernam, who later developed the one-time pad cipher. Stream ciphers use a pseudorandom key to encrypt data and can be done manually or with a computer. There are two types of stream ciphers: synchronous and self-synchronizing. Widely used stream ciphers include RC4, ORYX, and SEAL.

A stream cipher is a type of algorithm used in data encryption in which the source to be encrypted is processed based on a sequence of keys that appears random. This type of cipher is somewhat flexible in the sense that it can vary the cipher as it processes the text. They are also sometimes referred to as state ciphers because the encryption also depends on the current state of the operation. Unlike block ciphers, which operate on 64-bit blocks of data at a time, a stream cipher can operate on a single bit. Because of this, a stream can be processed at high speed with very little processing power.

The first stream cipher was devised by Gilbert Vernam in 1917. Vernam also later helped create a cipher known as a one-time pad, which is a form of stream cipher that uses a one-time key to encrypt data. In a one-time pad, the generated key is the same length as the data to be encrypted, is completely random, and is never used again anywhere else, hence the name.

When processed against the data to be encrypted, typically referred to as plaintext, the resulting ciphertext is impossible to decipher without the key. The one-time pad is difficult to deal with in most scenarios, and is therefore only used for very exclusive situations. However, a stream cipher is generally considered to be useful, so the keys have been shortened and made pseudorandom, meaning they are statistically random but in reality they are not.

The stream cipher has the ability to encrypt on the fly. This way, it’s even easy for people to do simple stream ciphers by people on pen and paper, whereas a block cipher typically requires the use of a computer for processing. The plaintext flows through the encryption process along with the keystream, the pseudorandom sequence that makes up the key, where it’s converted and exits the other side as ciphertext.

Usually, this encryption is done via an exclusive operation or (XOR) on the individual bits as they pass through the encryption. A simple XOR cipher uses a type of logical disjunction as its basis, which essentially states that the result can be true if one of the operands is true, but not both. For example, if a bit moving through the encryption process is a zero or one and the paired keystream bit does not match, the resulting output is one. If the bit and the bit of the paired keystream match, where both are one or both are zero, the result is zero. The encrypted stream of ones and zeros is then decrypted by the other end of the transmission using the same key stream to convert the bits back to their original plaintext.

There are two types of stream ciphers. Using a synchronous method, the key stream is created separated from the plaintext or ciphertext and then joined together to provide encryption or decryption. With this method, both the transmitting and receiving ends of the transmission must remain in sync where they operate on the same key and at the same location in the key. If a problem occurs, decryption has to start over or there may be flags placed intermittently throughout the ciphertext indicating new starting points. A self-synchronizing cipher, on the other hand, will update the keystream based on a certain number of previous digits in the ciphertext.
One of the most widely used stream ciphers, called RC4, was created by RSA Data Security®. It is licensed and used in many software products, as well as the Secure Socket Layer (SSL) protocol used in secure Internet communications and wired equivalent privacy (WEP) encryption used with wireless devices. Another often used cipher is known as ORYX, which has found use in cell phone data transmissions that need to be encrypted. IBM® also developed a stream encryption method known as SEAL, which has found use in hard drive encryption.




Protect your devices with Threat Protection by NordVPN


Skip to content