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.

Extract the download file and copy the following 2 files to your JDK which is $JAVA_HOME/jre/lib/security

  • local_policy.jar
  • US_export_policy.jar

Check the key size and now all algorithms will have unlimited key size restriction.

BLOWFISH              : 2147483647bit
ARCFOUR               : 2147483647bit
PBEWITHMD5ANDDES      : 2147483647bit
RC2                   : 2147483647bit
RSA                   : 2147483647bit
PBEWITHMD5ANDTRIPLEDES: 2147483647bit
PBEWITHSHA1ANDDESEDE  : 2147483647bit
DESEDE                : 2147483647bit
AESWRAP               : 2147483647bit
AES                   : 2147483647bit
DES                   : 2147483647bit
DESEDEWRAP            : 2147483647bit
RSA/ECB/PKCS1PADDING  : 2147483647bit
PBEWITHSHA1ANDRC2_40  : 2147483647bit

 

Done =)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.