For ECC Key and Certificate Generation

1. Generate an EC keypair on Utimaco HSM.

›_ Console

# keytool -genkey -alias ibmec -keyalg EC -keystore NONE -storetype 
PKCS11IMPLKS -providername IBMPKCS11Impl-CryptoServer 

Provide information when prompted.

Here:

  • EC is the key algorithm

  • NONE is the keystore for HSM

  • PKCS11IMPLKS is the storetype

  • IBMPKCS11Impl-CryptoServer is the provider name

  • ibmec is the key name that will be generated on Utimaco HSM

Provide the keystore password when prompted.

tmpjgbuejpk.jpg

Key generation using keytool command

2. Verify the entry with same alias name is generated using keytool command.

›_ Console

# keytool -list -keystore NONE -storetype PKCS11IMPLKS -providername 
IBMPKCS11Impl-CryptoServer 

Here:

  • NONE is the keystore for HSM

  • PKCS11IMPLKS is the storetype

  • IBMPKCS11Impl-CryptoServer is the provider name

Provide the keystore password when prompted.

tmp1z0i5gi5.jpg

Keytool list command output

  1. List the objects using p11tool2.

›_ Console

# p11tool2 Slot=0 LoginUser=ask ListObjects 

Enter user PIN when prompted.


tmpumczakn_.jpg
tmpmrk0y7_y.jpg

ListObjects output using p11tool2

  1. Generate a CSR using Keytool command.

›_ Console

# keytool -certreq -alias ibmec -keystore NONE -storetype PKCS11IMPLKS providername IBMPKCS11Impl-CryptoServer -file ec.csr 
tmpuwps2st2.jpg

Generate CSR command output

Here:

  • NONE is the keystore for HSM

  • PKCS11IMPLKS is the storetype

  • Provide the keystore password when prompted

  • IBMPKCS11Impl-CryptoServer is the provider name

  • ibmec is the key name

  • ec.csr is the CSR file name that will be generated

Provide the keystore password when prompted

  1. Get this CSR signed by CA.

  2. Copy the signed certificate and root CA certificate on the IBM WebSphere application server.

  3. Import Root CA certificate into HSM keystore.

›_ Console

#  keytool -importcert -alias rootca -file /home/LAbCA-Root.crt -storetype 
PKCS11IMPLKS -keystore NONE -providername IBMPKCS11Impl-CryptoServer 
tmp45uyhsib.jpg
tmpr5b61gpr.jpg

Importing root CA certificate into keystore

  1. Import the signed certificate reply using the command below.

›_ Console

#  keytool -importcert -alias ibmec -file /home/ec_demo.p7b -storetype 
PKCS11IMPLKS -keystore NONE -providername IBMPKCS11Impl-CryptoServer 
tmp4wnqp3qo.jpg

Importing user certificate into keystore

  1. Verify that the keytool command shows the signed certificate as well as root CA certificate.

›_ Console

# keytool -list -keystore NONE -storetype PKCS11IMPLKS -providername 
IBMPKCS11Impl-CryptoServer 

Here:

  • NONE is the keystore for HSM

  • PKCS11IMPLKS is the storetype

  • IBMPKCS11Impl-CryptoServer is the provider’s name

Provide the keystore password when prompted.

tmph4do40yx.jpg

Keytool list output showing signed certificate as well as root CA certificate