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:
Key | Description |
---|---|
kty | Key Type - Specifies the cryptographic algorithm family used for the key (e.g., RSA, EC). |
use | Public Key Use - Indicates the intended use of the key, such as sig for signature or enc for encryption. |
kid | Key ID - A unique identifier for the key, used to match a specific key to a JWT. |
alg | Algorithm - Identifies the algorithm intended for use with the key, such as RS256 for RSA signature with SHA-256. |
n | Public Key Modulus - Only used for RSA keys, it represents the modulus value. |
e | Public Key Exponent - Only used for RSA keys, it represents the exponent value. |
x | X Coordinate - Only used for EC keys, it represents the x-coordinate on the elliptic curve. |
y | Y Coordinate - Only used for EC keys, it represents the y-coordinate on the elliptic curve. |
crv | Curve - 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"
}
]
}