What is KeyStore and How to create KeyStore?

KeyStore:
  • KeyStore is a simple file or repository, there we can able to store private keys, certificates and symmetric keys. And we can also handle storage in different ways like cryptographic token, using the our own OS mechanisms.
  • KeyStore is a java class and it is a part of Java Standard API. 
  • KeyStore is available in different formates and most popular formates are JKS, .p12 etc..
  • KeyStore will load and handle depends on the KeyStore format.


Generate a KeyStore:
  • For generating KeyStore we need a Java installation and Path (Path & JAVA_HOME) settings.
  • Once java path settings are done we will get a "keytool" from Oracle (SUN Microsystem).
  • keytool stands for Key and Certificate Management tool.


Before generating KeyStore, you can look once what are the commands are available with "keytool", with the help of executing "keytool --help" command in CMD/Unix terminal.


Note: KeyStore creation steps are same for all the Operating Systems (OS).

If you run below command in CMD, It will ask few information like Password, Conform Password, First and Last name, Organization unit, Organization Name, Locality of City, State, Country Unit code and Conformation about above information.

keytool -keystore MyAppKeyStore -genkey -alias MyAppKeyStore

Enter a all the information like below. After conformation you will get a MyAppKeyStore in your current location of command prompt.



After successful creation you will get a file with name "MyAppKeyStore" and file type should be "File" like below



What is KeyStore and How to create KeyStore? What is KeyStore and How to create KeyStore? Reviewed by Gurugubelli Technologies on November 29, 2018 Rating: 5

No comments:

Powered by Blogger.