The following keytool command is used to generate a new public/private key pair:
keytool -genkey -keystore [filename]
When you run this command, you will be asked a series of questions. These questions concern you as an entity
(your name, organization, and the like). The information you
provide will be used to create a self-signed certificate that associates
the information with a public key and testifies to the authenticity
of the association. You will also be asked to enter passwords for
the keystore and, optionally, passwords for the key pair you are creating.