• Home
  • About

Snippet IT

IT News, Programming, Internet and Blogging

  • Programming and Scripting
  • Tips and Tricks
  • Software and Hardware
  • New and Happening
You are here: Home / Programming and Scripting / Java: Unlimited Strength Jurisdiction Policy

Java: Unlimited Strength Jurisdiction Policy

September 28, 2015 by Sze Hau Leave a Comment

Java
You are writing a Java program to encrypt or de-crypt some data with strong encryption keys but you got an error saying InvalidKeyException: Illegal key size or default parameters. You double checked and triple checked your code and everything seems to be correct but you still get the same exception every time you run your program.

You are probably doing nothing wrong but hit an arbitrary restriction imposed by JDK with default settings. The restriction turns out that the cryptography classes in Java will not allow encryption with a key size of more than 128 bits. The main reason for the restriction is that some countries have restrictions on the permitted key strength of imported encryption software. So, it is the user’s responsibility to verify that this action is permissible under local regulations.

Download JCE Unlimited Strength Jurisdiction Policy Files

If you really need to override the restriction (for example you need to use AES with 256-bit keys), you need download the JCE Unlimited Strength Jurisdiction Policy Files from Java and install the files into your JDK/JRE folder.

  • JCE Unlimited Strength Jurisdiction Policy Files for Java 6
  • JCE Unlimited Strength Jurisdiction Policy Files for Java 7
  • JCE Unlimited Strength Jurisdiction Policy Files for Java 8

Steps to install the JCE Unlimited Strength Jurisdiction Policy Files

  1. Backup the files in ${java.home}/jre/lib/security/ in case the downloaded file does not work.
  2. Download the JCE Unlimited Strength Jurisdiction Policy according to you Java version.
  3. Decompress the zip file.
  4. Replace all the files in ${java.home}/jre/lib/security/ with the new decompressed files.

More from my site

  • Wordpress: How To Change Admin UsernameWordPress: How To Change Admin Username
  • Java: Static Initializer (Static Constructor)Java: Static Initializer (Static Constructor)
  • Java: How To Select Top N Objects From A ListJava: How To Select Top N Objects From A List
  • Java: How To Implement ungetc in JavaJava: How To Implement ungetc in Java
  • Java: How To Use SQL LIKE Clasue with PreparedStatement?Java: How To Use SQL LIKE Clasue with PreparedStatement?
  • Security: US Cert Warns Users To Disable Java In Web BrowsersSecurity: US Cert Warns Users To Disable Java In Web Browsers

Filed Under: Programming and Scripting Tagged With: Exception, Java, secure, security

About Sze Hau

Geek. Love programming. Coffee addicted. Married with two children. Working towards financial freedom.

Leave a Reply Cancel reply

Advertisement

  • Facebook
  • Google+
  • Instagram
  • Twitter

Email News Letter

Sign up to receive updates daily and to hear what's going on with us

Software and Hardware

MD5 and SHA1 Checksum Using Windows

July 5, 2017 By Sze Hau Leave a Comment

Blog Network

  • Personal Fincance Personal Finance – Personal Money Tips, Stock Investment, Small Business and Make Money Online
  • szehau's weblog Life, Internet, Software, Gadgets, Programming and Investments

Snippet IT

This is the place where I want to share anything about information technology.

Search

Recent

  • MD5 and SHA1 Checksum Using Windows
  • MD5 and SHA1 Checksum Using Linux
  • Java: Unlimited Strength Jurisdiction Policy
  • WordPress: How To Change Admin Username
  • Linux: How To Compress And Decompress Folders And Files

Tags

Adsense advertisement advertising apache blog blogging tips C# EGPC error estimation format format Integer Gmail Google Google Adsense Google Chrome Google Search Engine Google search result how to HTTP internet marketing Java JavaScript Linux money password performance PHP programming search engine optimization secure security short URL SQL static constructor String tiny URL Tips and Tricks twitter video Windows Vista Wordpress wordpress plugin wordpress theme Youtube

Copyright © 2025 · Magazine Pro Theme on Genesis Framework · WordPress · Log in