RC4 has a secret internal state which is a permutation of all the possible values of the vector S and the two indices i and j.

a. How many bits are needed to describe the state of RC4?

b. RC4 is a deterministic number generator: given its internal state, the output byte is uniquely defined. This means that the output of RC4 eventually cycles. Find an upper bound on the number of bytes that are output before RC4 will cycle.