Last active
March 5, 2024 11:54
-
-
Save sdesalas/694c1a79f7110af387a1099c5bf39646 to your computer and use it in GitHub Desktop.
JWT ES256 and ECDS Key generation
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
# Generate JWT public/private key pair for use in JWT (ES256 algorithm) | |
openssl ecparam -name secp256r1 -genkey -out jwt.es256.priv | |
openssl ec -in jwt.es256.priv -pubout -outform PEM -out jwt.es256.pub | |
# Create PKCS8 format | |
openssl pkcs8 -topk8 -inform PEM -outform DER -in jwt.es256.priv -out jwt.es256.pkcs8 -nocrypt | |
base64 -i jwt.es256.pkcs8 > jwt.es256.pkcs8.base64 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment