Stream Cipher Concepts & PRNG
Learn how stream ciphers generate a keystream from a seed.
Welcome
Stream ciphers generate a pseudorandom keystream from a key and encrypt byte by byte. In this lesson we understand how keystreams work and what makes a stream cipher secure.
Stream Cipher Model
KeyGen(K, Nonce) → keystream K1, K2, K3, ...
Ci = Pi XOR Ki
Pi = Ci XOR Ki
Encryption and decryption are identical: XOR with the keystream. The keystream must be pseudorandom and never reused.
All lessons in this course
- Stream Cipher Concepts & PRNG
- RC4: Design, Weaknesses & WEP Attacks
- Salsa20 & ChaCha20 Design
- ChaCha20-Poly1305 AEAD in TLS 1.3