I am trying to generate a KeyPair using the Bouncy Castle library by create a nCipherKM instance and the RSA algorithm.
This operation is failing, it seems to be caused due to an incorrect or incomplete configuration of the HSM and nCipher Tools because I can't see the RSA algorithm to be available to be used for Keypairs generation.
Can anybody help me on what I need to do or setup to have the RSA algorithm as one of the available for the HSM operations?
I am trying to generate a KeyPair using the Bouncy Castle library:
KeyPairGenerator.getInstance("RSA", "nCipherKM");
but I am receiving an error:
java.security.NoSuchAlgorithmException: no such algorithm: RSA for provider nCipherKM
If I run:
java -jar com.ncipher.provider.InstallationTest
It is supossed to get something like this:
nCipher JCE services:
Alg.Alias.AlgorithmParameters.DESede
Alg.Alias.AlgorithmParameters.OID.1.2.840.113549.3.7
Alg.Alias.Cipher.1.2.840.113549.1.1.1
Alg.Alias.Cipher.1.2.840.113549.3.4
Alg.Alias.Cipher.1.2.840.113549.3.7
Alg.Alias.Cipher.AES
Alg.Alias.Cipher.CAST6
Alg.Alias.Cipher.DES3
...
KeyPairGenerator.RSA
KeyStore.JKS
KeyStore.nCipher.sworld
...
But I am getting:
nCipher JCE services:
Alg.Alias.SecureRandom.SHA1PRNG
AlgorithmParameters.IVParameters
KeyStore.JKS
KeyStore.nCipher.sworld
SecureRandom.RNG
And that's it. So I think this is the cause what I am not able to genereate keypairs with bouncy castle.
Any help will be great!!!