Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Invalid RSA public key with JDK 1.5

843811Aug 17 2005 — edited Aug 17 2005
I am using a third party interface that uses cryptography and it all worked fine with JDK 1.4, but recently I switched to JDK 1.5 and now am getting the exception.
Authentication failed: java.security.spec.InvalidKeySpecException:
java.security.InvalidKeyException: Invalid RSA public key
The third party code originated with JDK 1.3 and they say

"If running under the Sun Java 2 Version 1.3 Java Virtual Machine, and the Sun Java Cryptography Extension Version 1.2.1 is installed, and a JCE provider that supports RSA keys and related algorithms is configured (e.g. the supplied SunJCE provider)"

then they will use it.

I was using JDK 1.4 "out of the box" as I am with JDK 1.5. No extra providers installed.

Since this is third party code and I don't have the source I don't know what calls they are making.

Can anyone provide insight as to what changed between JDK 1.4 and 1.5 that would cause this change and what I could do about it?

Could it actually be using a different provider than it was with 1.4? I see there have been some changes in the default java.security files installed by the JDK between 1.4 and 1.5.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 14 2005
Added on Aug 17 2005
4 comments
419 views