My Oracle Support Banner

Error "java.security.InvalidKeyException: Illegal key size or default parameters" When Using 256-bit Encryption (Doc ID 972350.1)

Last updated on AUGUST 29, 2023

Applies to:

Oracle Database - Enterprise Edition - Version 6.0.0.0 to 11.1.0.8 [Release 6.0 to 11.1]
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Information in this document applies to any platform.

Symptoms


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

To view full details, 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 a vibrant support community of peers and Oracle experts.