Cr. COMP5563 Chap. 02: Stream Cipher [undone]
童夢綺 Domuki自習スタジオ

Keywords: Distributed Algorithms, Protocols, Blockchains,

Stream Ciphers and Pseudo Random Generators

Stream Cipher

making OTP practical

Idea: replace "random" key by "pseudo random" key.

Definition: Pseudo random generator(PRG) is a function G:{0,1}s{0,1}nG:\{0,1\}^s \rightarrow \{0,1\}^n, where n>>sn >> s.

  • 0,1s{0,1}^s is the space of seed
  • GG should be efficient computable by a deterministic algorithm
  • Output should seem random

the only random thing is the seed

c=E(k,m):=mG(k)D(k,c):=cG(k)c = E(k,m) := m \oplus G(k) \newline D(k,c) := c \oplus G(k)
  • Stream Cipher cannot hace perfect secrecy
  • Need a different definition of security (Because the length of stream cipher key is usually shorter than plaintext)
  • Security will depend on specific PRG

PRGs Must be Unpredictable

It will be a problem if PRGs are predictable: i:G(k)[1,...,i]alg.G(k)[i+1,...,n]\exists i: G(k)[1, ..., i] \stackrel{ alg. }{\to} G(k)[i+1, ..., n]. The formula demostrates that there's a specific algorithm alg.\stackrel{ alg. }{\to} which can predict the G(k)G(k) value after ii such as (i+1)(i + 1), from the existing set of G(k)[1,...,i]G(k)[1, ..., i].