Encryption Standard and Ciphers · Cryptography and Network Security

Stream Ciphers

Watch lectures

Stream Ciphers

1. What Is a Stream Cipher? (beginner — bit-by-bit!)

Stream cipher = encrypts ONE bit/byte at a time with a pseudorandom keystream (c=mc = m XOR kk!). Opposite of block ciphers (64-bit chunks!). Fast in hardware, no buffering — perfect for calls/video! Ideal = one-time pad (random key = message length!); real = short key stretched to long keystream!

2. Synchronous vs Self-Synchronizing (exam table!)

Synchronous Self-synchronizing
Keystream from key + state only (NOT data!) key + past CIPHERTEXT!
Sync loss fatal (must resync markers!) auto-heals after tt digits!
Error spread none (1 bad bit = 1 bad bit!) tt bits garbled, then OK!
Example RC4, ChaCha20, OFB mode! CFB mode!

3. LFSR Engine (exam hardware!)

Linear-Feedback Shift Register: bits shift right, new bit = XOR of taps!
4-bit example taps (3,0): 1000 → 0100 → 0010 → ... period up to 2⁴-1 = 15!
Pure LFSR = LINEAR (Berlekamp-Massey cracks from 2L bits!) → harden:
combine LFSRs (Geffe!), nonlinear filter, irregular clocking (A5/1!), or ditch LFSR (ChaCha ARX!)

4. Golden Rules (traps!)

  • NEVER reuse key+nonce (two-time pad: c1c₁ XOR c2c₂ = m1m₁ XOR m2m₂ — reads both!).
  • Stream = privacy ONLY (no integrity! flip bit → flips plaintext bit! add MAC!).
  • Need sync markers/nonces per message!

5. Exam Points

  • Stream vs block + sync table — 5-7 marks, very frequent.
  • LFSR idea + why harden — 3-5 marks, frequent.
  • Never-reuse rule — 2-3 marks, evergreen.
AI LearningWeb Platform

Coursify — Personal AI Course Generator

Struggling with a difficult subject or concept? Turn any engineering topic into a structured course with interactive lessons, quizzes, and research-backed explanations.

← All Cryptography and Network Security modules