Last active
April 4, 2021 04:45
-
-
Save hoangbits/77d757d4f0ebd867bd8f05a8aacf9eea to your computer and use it in GitHub Desktop.
generate ECDSA (ES384)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ref: | |
# https://wiki.openssl.org/index.php/Command_Line_Elliptic_Curve_Operations | |
# https://stackoverflow.com/questions/15686821/generate-ec-keypair-from-openssl-command-line | |
# openssl ec help | |
# 1.1 generate private key in EC format: | |
openssl ecparam -name secp384r1 -genkey -noout -out auth-private.ec.key | |
# 1.2 convert EC format to a non-encrypted PKCS8 format: | |
openssl pkcs8 -topk8 -nocrypt -in auth-private.ec.key -out auth-private.pem | |
# 2. get public key from private key | |
openssl ec -in auth-private.pem -pubout -out auth-pubic.pem | |
# bonus: | |
# convert a PKCS8 file to a traditional unencrypted EC format: | |
openssl ec -in auth-private.pem -out tradfile-auth-private.pem | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment