Key Creation Using Keytool

You can use the following command to create an RSA key using keytool:

keytool -storetype PKCS11 -keystore NONE -storepass clientcard -genkey 
-keyalg RSA -alias myKey

where:

clientcard

Is a password for the softcard.

myKey

Is a private key alias that we are creating.

After you execute this command, you are prompted to provide your information to create the private key.

You can use the following command to view your keystore:

keytool -v -list -keystore NONE -storepass clientcard -storetype PKCS11

The following shows the sample output:

Keystore type: PKCS11
Keystore provider: SunPKCS11-nShield
Your keystore contains 1 entry
Alias name: maria
Entry type: keyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=Maria, OU=iway, O=ibi, L=ny, ST=ny, C=US
Issuer: CN=Maria, OU=iway, O=ibi, L=ny, ST=ny, C=US
Serial number: 45face41
Valid from: Fri Mar 16 13:05:05 EDT 2007 until: Thu Jun 14 13:05:05 EDT
2007
Certificate fingerprints:
MD5: B3:1B:56:79:4A:45:AD:44:B2:F3:47:AF:ED:48:03:E4
SHA1: F8:BE:CD:85:A1:83:A9:10:FD:51:30:39:00:E0:83:9D:9B:4A:29:1C

iWay Software