Skip to main content

JSON Web Key Sets - JWKS

A JSON Web Key Set (JWKS) is a JSON object for transmitting and validating cryptographic keys, particularly public keys, in web-based applications. It contains an array of JSON Web Keys (JWK).


JSON Web Keys represent a cryptographic key which usually includes the following metadata:

KeyDescription
ktyKey Type - Specifies the cryptographic algorithm family used for the key (e.g., RSA, EC).
usePublic Key Use - Indicates the intended use of the key, such as sig for signature or enc for encryption.
kidKey ID - A unique identifier for the key, used to match a specific key to a JWT.
algAlgorithm - Identifies the algorithm intended for use with the key, such as RS256 for RSA signature with SHA-256.
nPublic Key Modulus - Only used for RSA keys, it represents the modulus value.
ePublic Key Exponent - Only used for RSA keys, it represents the exponent value.
xX Coordinate - Only used for EC keys, it represents the x-coordinate on the elliptic curve.
yY Coordinate - Only used for EC keys, it represents the y-coordinate on the elliptic curve.
crvCurve - Only used for EC keys, it specifies the elliptic curve type.
{
"keys": [
{
"kty": "RSA",
"use": "sig",
"kid": "12345",
"alg": "RS256",
"n": "base64-encoded-modulus",
"e": "base64-encoded-exponent"
}
]
}