0

I need to perform RC4 encryption with 256-bits key. Surprisingly. openssl won't let me:

# printf 'cleartext' |openssl rc4 -K 3132333435363738393031323334353637383930313233343536373839303132 -iv 0 -a -p
salt=0100000000000000
key=31323334353637383930313233343536
Q9z20FaRqfFn

As you can see the key is forced to be 128 bits. Any ideas?

wick
  • 1,995
  • 2
  • 20
  • 31
  • Seems to be a limitation of the argument parsing implementation of openssl md5. The maximum size for reading the key is the MD5 size -> 128bit. – Robert Oct 30 '18 at 16:58
  • 2
    [The documentation](https://www.openssl.org/docs/man1.1.0/apps/openssl-enc.html) says it as well: rc4 means 128 bit RC4 and _The enc program only supports a fixed number of algorithms with certain parameters. So if, for example, you want to use RC2 with a 76 bit key or RC4 with an 84 bit key you can't use this program._ – Reinier Torenbeek Oct 30 '18 at 23:09
  • The question is what am I to use to fulfil the requirement set forth above. – wick Oct 30 '18 at 23:25

0 Answers0