
348 Cryptography with Open-Source Software
sage: n = 4
sage: M = Matrix(GF(2),[x[i:i+n] for i in range(n)])
sage: X = vector(GF(2),x[n:2*n])
sage: c = M.inverse()*X
sage: c
(1, 1, 0, 0)
which are the correct values of c
i
.
13.7 RC4
The stream cipher RC4 was developed by Ronald Rives t (the “ R” of
“RSA”) and trademarked as a protected algorithm in 1987 (“RC” stands for
“Ron’s code” o r “Rivest Cipher.”) In 199 4 its details were leaked onto the In-
ternet by an anonymous attacker, and since then the algorithm has been pub-
licly known. It has been the most intensively researched stream cipher since
1994, and it has be e n extensively used. It suffers from