Skip to main content
IBM  
Shop Support Downloads
IBM Home Products Consulting Industries News About IBM
IBM developerWorks : Java : Education - Tutorials
Using JSSE for secure socket communication
ZIPPDF (letter)PDF (A4)e-mail
Main menuSection menuFeedbackPreviousNext
4. Key management
  


Client and server key pairs page 4 of 7


The first step in the preparation of our algorithm is to generate a public/private key pair for the client and another pair for the server. The following command will generate the file client.private, which is the key pair for the client:


keytool -genkey -alias clientprivate -keystore client.private
-storetype JKS -keyalg rsa -dname "CN=Your Name, OU=Your
Organizational Unit, O=Your Organization, L=Your City, S=Your State,
C=Your Country" -storepass clientpw -keypass clientpw

And here is the command to generate the file server.private, which is the key pair for the server:


keytool -genkey -alias serverprivate -keystore server.private
-storetype JKS -keyalg rsa -dname "CN=Your Name, OU=Your
Organizational Unit, O=Your Organization, L=Your City, S=Your State,
C=Your Country" -storepass serverpw -keypass serverpw

As mentioned in the panel Key files, the private client and server key files need to be installed in specific places. The client.private file is installed on the client side; the server.private file is installed on the server side.


Main menuSection menuFeedbackPreviousNext
Privacy Legal Contact