An arrangement is provided for performing RC4 ciphering. The arrangement
includes apparatuses and methods that pipeline generation of a key stream
based on a byte state array, called the S-box, which is initially
generated from a secret key shared by a receiver and a transmitter in a
network system. The S-box is stored in a storage device which may be a
register file with two read ports and one write port. A cache is used to
store a number of bytes read from the S-box storage device.