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!

Java 1.4 and AES Algorithm PLEASE HELP!!

843810Jul 3 2002 — edited Nov 19 2002
I hope this question has not already been asked. I have spent a long time searching the archives and documentation.

I am attempting to migrate from jsdk1.3 to jsdk1.4 but have come up against the following problem.

I need to create keys and encrypt files and was doing it by using the following:

import java.security.*;
import cryptix.provider.key.RawKeyGenerator;
import xjava.security.KeyGenerator;
...

And in my code am using:
...

SecureRandom rnd = new SecureRandom();
rnd.nextInt();

RawKeyGenerator kg = (RawKeyGenerator)KeyGenerator.getInstance("AES","Cryptix");
kg.initialize(rnd, 32);
key = kg.generateKey();

...

But I now get the following exception.

Unexpected exception in IJCE_SecuritySupport.registerTargets()
Please report this as a bug to <david.hopwood@lmh.ox.ac.uk>, including
any other messages displayed on the console, and a description of what appeared to cause the error.
java.lang.InternalError: Unexpected exception in IJCE_SecuritySupport.registerTargets()
at xjava.security.IJCE.reportBug(IJCE.java:701)
at xjava.security.IJCE_SecuritySupport.<clinit>(IJCE_SecuritySupport.java:138)
at xjava.security.IJCE.findTarget(IJCE.java:498)
at xjava.security.IJCE.getProviderInternal(IJCE.java:666)
at xjava.security.IJCE.getClassCandidate(IJCE.java:446)
at xjava.security.IJCE.getImplementationClass(IJCE.java:410)
at xjava.security.IJCE.getImplementation(IJCE.java:367)
at xjava.security.KeyGenerator.getInstance(KeyGenerator.java:152)
at uk.co.sundayta.docsys.KeyManager.createNewKey(KeyManager.java:96)
at uk.co.sundayta.docsys.KeyManager.createEncodedKey(KeyManager.java:110)
at uk.co.sundayta.docsys.KeyManager.createKey(KeyManager.java:71)
at uk.co.sundayta.docsys.KeyManager.run(KeyManager.java:62)
at java.lang.Thread.run(Thread.java:536)

The KeyManager error at line 96 mentioned above is in my code and is related to the snipit of code mentioned above.

I need 1.4 as I need to use the new 1.4 plug-in on the clients to unencrypt the data.

I have not sent an email to the address mentioned above as I assume it is a migration problem.

I also had a message saying:

Netscape security model is no longer supported.
Please migrate to the Java 2 security model instead.

I cannot do this as I need the java 1.4 plug-in for something else on the client. If I compile with 1.3 and run with 1.4 there seems to be an incompatibility problem.

I would be grateful for any advice as I need to ship this soon.

Thanks Andrew Mercer.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 17 2002
Added on Jul 3 2002
3 comments
362 views