PKI Tutorials - Herong's Tutorial Examples - Version 2.03, by Dr. Herong Yang
Generating a Private-Public Key Pair for Amy
This section provides a tutorial example on how to generate a private-public key pair for email@example.com using the JDK 'keytool' command.
Now let's use firstname.lastname@example.org as an example to see how I can issue a Class 1 personal certificate to her.
Step 1 - Amy needs to use a tool to generate a private-public key pair. I will ask her to use the JDK 'keytool' command do this.
Assuming Amy has JDK 1.6 installed, she can run the 'keytool' command shown below:
>keytool -genkey -alias email@example.com -keystore amy.jks -storepass AmyJKS What is your first and last name? [Unknown]: firstname.lastname@example.org What is the name of your organizational unit? [Unknown]: What is the name of your organization? [Unknown]: What is the name of your City or Locality? [Unknown]: What is the name of your State or Province? [Unknown]: What is the two-letter country code for this unit? [Unknown]: Is CNemail@example.com, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown correct? [no]: yes Enter key password for <firstname.lastname@example.org> (RETURN if same as keystore password): <Return>
Done. Amy has her private-public key pair generated and stored in a KeyStore file called amy.jks.
Last update: 2011.
Table of Contents