Rsa Keygenerator Not Available

We talked briefly at JavaOne about a problem I had with the SunJCE version 1.2 KeyStore JCEKS (March 1999) and the problem was blamed on using JDK 1.2.0. I have tried JDK 1.2.1 and get a different problem: I can create the store, use: setKeyEntry(String alias, Key key, char[] password, Certificate[] chain) where password is set, Key is a Jsafe RSAPrivateKey passed in as PrivateKey, store() it, and load() it. Here is some of my debug output: KeyStore creation: Generating key. PublicKey getFormat()= X509 publicKey getAlgorithm()= RSA publicKey classname= COM.rsa.jsafe.provider.JSA_RSAPublicKey privateKey getFormat()= PKCS8 privateKey getAlgorithm()= RSA privateKey classname()= COM.rsa.jsafe.provider.JSA_RSAPrivateKey ks.getProvider()=SunJCE version 1.2 ks.getType()=JCEKS saveStore: CA.keystore KeyStore load (a separate run): ks.getProvider()=SunJCE version 1.2 ks.getType()=JCEKS size()=1 ks.isKeyEntry(the CA alias)=true // There is an entry but cannot use: getKey(String alias, char[] password) successfully. An exception occurs: java.security.NoSuchAlgorithmException: KeyFactory not available at java.security.Security.getEngineClassName(Security.java:341) at java.security.Security.getEngineClassName(Security.java:351) at java.security.Security.getImpl(Security.java:618) at java.security.KeyFactory.getInstance(KeyFactory.java:113) at com.sun.crypto.provider.KeyProtector.recover(KeyProtector.java:181) at com.sun.crypto.provider.JceKeyStore.engineGetKey(JceKeyStore.java:120) at java.security.KeyStore.getKey(KeyStore.java:253). In both runs, I dump the Providers: Current providers: SUN 1. Action Strings Keygen Macromedia there. 2: SUN (DSA key/parameter generation; DSA signing; SHA-1, MD5 digests; SecureRandom; X.509 certificates; JKS keystore) SunJCE 1.2: SunJCE Provider (implements DES, Triple DES, Blowfish, PBE, Diffie-Hellman, HMAC-MD5, HMAC-SHA1) JsafeJCE 2.0: RSA Data Security, Inc. JSAFE Security Provider RSA, DSA, Diffie-Hellman, DES, Triple DES EDE, RC2, RC4, RC5, PBE, MD2, MD5, SHA1, HMAC Is the SetKey/getKey password protection broken in JCEKS?

Or is there a design flaw that it cannot know the type of that was stored? (There seems to be no way to specify it.). EVALUATION jan.luehe@Eng 1999-08-25 I was able to reproduce your problem. When using the latest JDK, I got a more descriptive error message: keytool error: java.security. Download Keygen Corel X4. NoSuchAlgorithmException: 1.2.840.113549.1.1.1 KeyFactory not available indicating that there is no key factory for the RSA algorithm, where 'RSA' is 'spelt out' in its OID representation. In the case of keystore, we determine the algorithm associated with the key and try to instantiate a corresponding key factory.

In your example, we determine '1.2.840.113549.1.1.1' as the OID of the algorithm associated w/ the key (that's how it is encoded in a PKCS#8 EncryptedPrivateKeyInfo), and therefore try to instantiate a corresponding key factory, which we cannot find, since the Crypto-J provider only has an entry of this form: put ('KeyFactory.RSA', 'COM.rsa.jsafe.provider.JSA_RSAKeyFactory'); If that provider also had defined this entry (using RSA's OID as an alias): put('Alg.Alias.KeyFactory.1.2.840.113549.1.1.1', 'RSA'); you would not have run into the problem. So the problem is that in JCE, we don't try to convert '1.2.840.113549.1.1.1' into its corresponding standard algorithm name ('RSA') before instantiating the requested provider implementation class, but use the OID name instead. I will fix this.

Oct 27, 2010. The root cause seems to be this one: NoSuchAlgorithmException: SunTlsRsaPremasterSecret KeyGenerator not available I tried with openjdk-6-jdk (6b18-1.8.1-0ubuntu1) on Lucid. I also tried to install the openjdk-6 from. SSLKeyException: RSA premaster secret error at com.sun.mail.pop3.POP3Store. Aug 29, 2014. I wrote how to use SSL connection string using JDBC driver in my previous blog. I deployed the code on the Unix server from Windows 7 pc and I got RSA premaster secret error. Caused by: java.security.NoSuchAlgorithmException: SunTlsRsaPremasterSecret KeyGenerator not available I figured it out.

Rsa Keygenerator Not Available

As a workaround, providers should also supply the OID representation of an algorithm as an alias entry in their master file, i.e., in the above case, they should define: put('Alg.Alias.KeyFactory.1.2.840.113549.1.1.1', 'RSA'); as an alias entry of put ('KeyFactory.RSA', 'COM.rsa.jsafe.provider.JSA_RSAKeyFactory'); If you use a DSA key, you won't run into the problem, because the 'SUN' provider already has these entries: put('KeyFactory.DSA', 'sun.security.provider.DSAKeyFactory'); put('Alg.Alias.KeyFactory.1.3.14.3.2.12', 'DSA'); put('Alg.Alias.KeyFactory.1.2.840.10040.4.1', 'DSA').