keystream
Keystream is a sequence of bits or bytes used in certain encryption schemes to transform plaintext into ciphertext by combining the keystream with the plaintext, typically by the XOR operation. It is produced by a keystream generator and depends on a secret key and usually a nonce or initialization vector (IV) to ensure uniqueness across messages. The security of keystream-based schemes rests on the unpredictability and non-repetition of the keystream for a given key/IV pair.
In synchronous stream ciphers, the keystream is generated independently of the plaintext and then XORed with
A fundamental risk is keystream reuse: using the same keystream with two different messages enables attackers