We know that in stream cipher c = m xor G(k). And if the key was used more than once, the attacker can get
- c1 = m1 xor G(k)
- c2 = m2 xor G(k)
Then he knows c1 xor c2 = m1 xor G(k) xor m2 xor G(k) = m1 xor m2.
So with the knowledge of (m1 xor m2), how can the attacker get to know m1 m2?
As you say:
c1 xor c2 = m1 xor m2if k is the same.In this equation you must know m1 or m2 to recover the other.
In real life, note that m1 or m2 are not pseudo random string like
G(k). They may be predictable or easy to guess the content. For example, m1 and m2 are both an English sentence or m1 and m2 are both a header of some protocols.