This is my blog on Java and related technologies and tools that I have worked on. I started this blog just to keep my Java knowledge updated which can also be a place for quick reference. The source of most of the articles are a mixture of my views and the place where i read it. Comments are most welcome and please rectify me wherever i have gone wrong.
Monday, March 30, 2015
java.lang.SecurityException: Unsupported keysize or algorithm or java.security.InvalidKeyException: Illegal key size
I have faced this issue when working with the Bouncy Castle Provider and the reason for that is the JCE files are not updated in the JVM. To fix it, one needs to download the JCE unrestricted policy files from oracle site, e.g download and copy the local_policy.jar and the US_export_policy.jar to jre/lib/security. This fixes the issue
Got the solution from the Frequently asked questions for Bouncy Castle, here
Labels:
Bouncy Castle,
Cryptography,
Java 7,
JCE
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment