# simulating rc4-256 with rc4-128

OpenSSL supports rc4 with 128-bit keys and rc4 with 40-bit keys. It does not support rc4 with 256-bit keys.

My question is... is it possible to modify the state of the pseudo-random generation algorithm (PRGA), given a 128-bit key, to match the initial state a PRGA with a 256-bit key?

• OpenSSL library supports any multiple of 8 bits key (i.e. integral bytes) for RC4 if you write a few lines of code to call it; it is the prewritten commandline utility openssl enc -$cipher alias openssl$cipher that supports only 40 and 128. And libssl also uses only 40 and 128 because those are the only published RC4 ciphersuites. – dave_thompson_085 Nov 26 '14 at 0:33