The RC4 encryption algorithm is started with a different key length, usually between 40 and 256 bits, using the "key-scheduling" algorithm (KSA). Once this has been completed, the stream of encrypted bits is created using the "pseudo-random generation algorithm" (PRGA).