Introduction

Stream ciphers avail themselves of pseudorandom generators (PRGs) in order to allow for messages with a length arbitrarily larger than the key’s. Under the hood, they are nothing more than the One-Time Pad paired with a pseudorandom generator.

Definition: Stream Cipher

A stream cipher is a cipher equipped with a pseudorandom generator which takes a key of length , a message of length and produces a ciphertext of length and is defined as follows:

The seed is derived from the key .

Seed Derivation

In order to generate the keystream, the pseudorandom generator needs a seed. In the most basic cases, the key is used as the seed. However, usually the seed is created by appending to the key another binary string called the initialisation vector (IV).

The IV must be a random string and the same IV should never be used with the same key. Moreover, the IV must be known for decryption in order to derive the same seed from the key. Therefore, decryption requires both the key and the IV to function.

The purpose of the initialisation vector is to allow for key reuse. So long as the same key is used with different IVs, it poses no threat to the security of the cipher under a ciphertext-only attack.

Security

A stream cipher is semantically-secure so long as it uses a secure PRG.

1 item under this folder.