0

mcrypt's implementation of RC2 has a fixed effective length of 1024 bits, however, it is possible to simulate keys with effective lengths between 1-1024 by doing something like this:

http://php.net/manual/en/function.mcrypt-generic-init.php#111496

My question is... is there a similar technique that can be used with OpenSSL? OpenSSL's implementation of RC2 has a fixed effective key length of 128 bits but is it possible to simulate keys with effective lengths between 1-128 bits with OpenSSL?

The php.net technique doesn't work out of the box for OpenSSL because the PHP technique essentially creates a 1024 bit key out of a key between 1-2024 bits long. And you can't truncate the result, either, since, quoting RFC2268, "the purpose of th key-expansion algorithm [in RC2] is to modify the key buffer so that each bit of the expanded key depends in a complicated way on every bit of the supplied input key".

Any ideas?

Also, does anyone know of any sort of more authoritative reference for the technique described at php.net?

neubert
  • 2,969
  • 1
  • 29
  • 58

0 Answers0