Skip to main content


Showing posts from June, 2009

Illegal Key Size Error Thrown by CFML Encrypt() Function

This is one of those errors I'll probably forget about if I don't blog it for myself, and since I didn't find much concrete on it I figured it might help others as well.
A colleague ran into the following error when calling encrypt on Adobe ColdFusion using a 256-bit AES key:
"The key specified is not a valid key for this encryption:
Illegal key size or default parameters."
The odd thing is the code runs fine on OS X but fails on both Linux (Ubuntu) and Solaris.
Turns out that in order to use encryption higher than 128 bits, you have to install the Java Unlimited Strength Jurisdiction Policy Files, which are available here (very last download on the page as of the time of this blog post).
Download, install, and use as many bits as you like to encrypt.

Just reading
"Java Unlimited Strength Jurisdiction Policy Files"
...makes me want to take a shower.
Posted by Lester Beard @ 6/3/09 3:31 AM