Java
Need help with json-web-key-generator?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.
mitreid-connect

Description

A Java-based generator for JWK and JPSKs

156 Stars 81 Forks Other 74 Commits 3 Opened issues

Services available

Need anything else?

json-web-key-generator

A commandline Java-based generator for JSON Web Keys (JWK) and JSON Private/Shared Keys (JPSKs).

=====================

To compile, run

mvn package
. This will generate a
json-web-key-generator-0.9-SNAPSHOT-jar-with-dependencies.jar
in the
/target
directory.

To generate a key, run

java -jar target/json-web-key-generator-0.9-SNAPSHOT-jar-with-dependencies.jar -t 
. Several other arguments are defined which may be required depending on your key type:
usage: java -jar json-web-key-generator.jar -t  [options]
 -t,--type            Key Type, one of: RSA, oct, EC, OKP
 -s,--size            Key Size in bits, required for RSA and oct key
                           types. Must be an integer divisible by 8
 -c,--curve           Key Curve, required for EC or OKP key type.
                           Must be one of P-256, secp256k1, P-384, P-521
                           for EC keys or one of Ed25519, Ed448, X25519,
                           X448 for OKP keys.
 -u,--usage           Usage, one of: enc, sig (optional)
 -a,--algorithm       Algorithm (optional)
 -i,--id              Key ID (optional), one will be generated if not
                           defined
 -g,--idGenerator     Key ID generation method (optional). Can be one
                           of: date, timestamp, sha256, sha1, none. If
                           omitted, generator method defaults to
                           'timestamp'.
 -I,--noGenerateId          Don't generate a Key ID.
                           (Deprecated, use '-g none' instead.)
 -p,--showPubKey           Display public key separately (if applicable)
 -S,--keySet               Wrap the generated key in a KeySet
 -o,--output          Write output to file. Will append to existing
                           KeySet if -S is used. Key material will not be
                           displayed to console.
 -P,--pubKeyOutput    Write public key to separate file. Will append
                           to existing KeySet if -S is used. Key material
                           will not be displayed to console. '-o/--output'
                           must be declared as well.
 -x,--x509                 Display keys in X509 PEM format

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.