KeyGenerator issue



I have a function add a JCE provider for an AES algorithm, but the JCE
fails every time I attempt to launch it.

Provider jceProvider = new com.x.jce.provider.JCEProvider;
Security.addProvider (jceProvider);
Provider [] currentProviders = Security.getProviders();
// ... prints the array
SecureRandom rand = SecureRandom.getInstance("SHA1PRNG",
"JceProvider");
//psuedo random number generator
KeyGenerator aesKeyGen = KeyGenerator.getInstance("AES","JceProvider");



The SecureRandom getInstance function works fine, but the KeyGenerator
getInstance function fails with the following error:

[java] java.security.NoSuchProviderException: JCE cannot
authenticate the provider JceProvider
[java] at javax.crypto.SunJCE_b.a(DashoA6275)
[java] at javax.crypto.SunJCE_b.a(DashoA6275)
[java] at javax.crypto.KeyGenerator.getInstance(DashoA6275)
[java] at com.x.jce.AES.go(Unknown Source)
[java] at com.x.jce.AES.main(Unknown Source)
[java] Caused by: java.util.jar.JarException:
file:/jceProvider.jar is not signed by a trusted signer.
[java] at javax.crypto.SunJCE_d.b(DashoA6275)
[java] at javax.crypto.SunJCE_d.a(DashoA6275)
[java] at javax.crypto.SunJCE_d.a(DashoA6275)
[java] at javax.crypto.SunJCE_b.b(DashoA6275)
[java] ... 5 more

Any ideas why the KeyGenerator would fail but the SecureRandom (which
looks for the same exact provider) fails? I've attempted to sign the
jars and verifying the signatures always returns true. I am completely
stumped.

.



Relevant Pages

  • Re: Newbie (Post#1): Help with Array of Objects
    ... I code Java in a TDD environment, ... > sense if you picture yourself in a war against the compiler to make your ... Best possible scenario. ... The code always fails at runtime. ...
    (comp.lang.java.help)
  • Re: Vista - jre1.6.0_05 - applets wont run
    ... and this is immediately after I install the JRE. ... Still it fails. ... I'm wondering if I need to wait for Java 6 Update 10? ... certain changes to become effective it required a reboot. ...
    (comp.lang.java.programmer)
  • RE: Word 2007 Automation BUG? in Windows 2008 Service C++
    ... I DO consider it a bug that the method reports success, and then fails. ... I am using C# and Java though. ... The Document Open method does not fail but the document is always NULL. ...
    (microsoft.public.office.developer.automation)
  • Re: Problem mit der "Unlimited Strength Policy"
    ... Bis Java 1.3 hatten die ihre eigene Clean-Room JCE ... keine Ahnung ob man die einem Java 5 als vorrangigen ... Bouncy Castle benutze ich sowieso schon. ...
    (de.comp.lang.java)
  • Java 1.5 is not encoding integers properly
    ... There is an Authenticator in this AP request. ... I saw that Java 1.5 implementation is either sending ... A7060204FFFFF77F Fails ...
    (comp.protocols.kerberos)