Error "java.security.InvalidKeyException: : Illegal key size or default parameters" when using 256-bit encryption (Doc ID 972350.1)

Last updated on MARCH 08, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 6.0.0.0 to 11.1.0.8 [Release 6.0 to 11.1]
Information in this document applies to any platform.

Symptoms


===================
-- Problem Statement:
On 11.1.0.6.0 in Production:
When attempting to use a security Provider (for example BouncyCastle) with a key larger then 128-bit within the JavaVM of the database the following error occurs:

ERROR
-----------------------
Exception in thread "Root Thread" java.security.InvalidKeyException: Illegal key size or default parameters
at javax.crypto.Cipher.a(DashoA12275)
at javax.crypto.Cipher.init(DashoA12275)
at javax.crypto.Cipher.init(DashoA12275)
at crypt.codedDoc.encrypt(codedDoc:942)
at crypt.codedDoc.encrypt(codedDoc:890)



It works fine when the used encryption key is 128-bit or less.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms