Generating a new Key Pair using JSON Web Key Generator

  1. Go to https://mkjwk.org/ for the JSON Web Key generator tool.

  2. Select the RSA tab.

  3. Select the right Key Size in bits, required for RSA key types. Recommended size is 2048 and above.

  4. Select the Key Use as signature.

  5. Select the Key ID as specify and enter any string, for example sign-rsa.

  6. In the ShowX.509, select No

  7. Copy the ‘Public Key’ and “Public and Private Keypair Set” into a separate files with .json extension and save.

  8. 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..."
            }
        ]
    }