Tag Archives: JCE

Java Cryptography Extension – Remove JCE Key Size Restriction

As we talked about yesterday, the default JDK has a limitation on key size which is bounded by the JCE Jurisdiction Policy.

But actually, Java provides a JCE Patch such that you can remove the restriction on key size.
The patch is called Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files which can be download at Java SE Downloads.
Continue reading Java Cryptography Extension – Remove JCE Key Size Restriction

Java Cryptography Extension – Check Maximum Allowed Key Size

In Java, there is a limitation on key size by the JCE Jurisdiction Policy. If you manipulate a private key with bit size which is larger than the limitation, it will throw a InvalidKeyException complaining about Illegal key size.

The following piece of Java code will check maximum key size of all the algorithms and print the result to the console. Continue reading Java Cryptography Extension – Check Maximum Allowed Key Size