Elliptical Curve Cryptography (ECC). ECC is emerging as an attractive public-key crypto system for mobile/wireless and other environments. Compared to traditional crypto systems like RSA, ECC offers equivalent security with smaller key sizes, which results in faster computations, lower power consumption, as well as memory and bandwidth savings.. The following examples show how to create ECC keys with a JCEKS Keystore.
Size of keypair - Range from 112 to 571 (inclusive) - Default is 256
Key Algorithm (keyalg) - EC
Signature Algorithm (sigalg) - SHA256withECDSA / SHA384withECDSA / SHA512withECDSA
How long the Key is Valid - 1085 days (~3 years).
Common Name (CN): The Common Name is usually the “company.com” or Person Name or Department
Organizational Unit (OU): The Organizational Unit (OU) field is the name of the department or organization unit making the request
Organization (O): If your company or department has an &, @, or any other symbol using the shift key in its name, you must spell out the symbol or omit it to enroll. Example: XY & Z Corporation would be XYZ Corporation.
Locality or City (L): The Locality field is the city or town name, for example: Planet
State or Province (S): Spell out the state completely; Colorado
Country Name (C): Use the two-letter code without punctuation for country, for example: US
The password of the private key:PWKey123
The alias name of our key: serverkey
The name of the keystore: this.keystore (if the file does not exist, it will be created)
KeyStore file format: JCEKS
Password of the keystore: changeit
Copy keytool -genkeypair -keysize 256 -sigalg SHA256withECDSA -keyalg EC -dname "cn=Me, ou=Tech, o=MF, l=Here, s=There c=US" -alias PrivKey -keypass PWKey123 -keystore this.keystore -storetype jceks -storepass changeit -validity 1085
Copy keytool -list -v -keystore this.keystore -storetype jceks -storepass changeit