Generating a new Key Pair using JSON Web Key Generator
-
Go to https://mkjwk.org/ for the JSON Web Key generator tool.
-
Select the RSA tab.
-
Select the right Key Size in bits, required for RSA key types. Recommended size is 2048 and above.
-
Select the Key Use as signature.
-
Select the Key ID as specify and enter any string, for example sign-rsa.
-
In the ShowX.509, select No
-
Copy the ‘Public Key’ and “Public and Private Keypair Set” into a separate files with .json extension and save.
-
Amend the ‘Public Key’ file to include the keys array as shown below:
Sample Public key:{ "keys": [ { "kty": "RSA", "e": "AQAB", "use": "sig", "kid": "sign-rsa", "alg": "RS256", "n": "g88SjdDsfdHd64fdf..." } ] }
Sample Private key:{ "keys": [ { "p": "5BjdvhhdGjjjdsUI...", "kty": "RSA", "q": "k-7TihGsdfjnjLLf8...", "d": "e4t4J7dfk7jddPo78...", "e": "AQAB", "use": "sig", "kid": "sign-rsa", "qi": "UlYwJ6Jsdfsdfc...", "dp": "CDz5rYYsdffffI1...", "alg": "RS256", "dq": "fBAEeUP98HHdf...", "n": "g88SjLLjsdf881IP..." } ] }