When applications exchange cryptographic keys across teams or organizations, storing an HMAC key as a hex string becomes difficult to standardize. JSON Web Key (JWK) solves this representation problem by expressing secret, public, and private keys as JSON objects. This format can carry complex key components and use consistent metadata across platforms and languages. section 11.3
JWK belongs to the JOSE standards family. JSON Web Algorithms (JWA) supplies algorithm identifiers; JWK represents the keys; JSON Web Signature (JWS) uses keys for tamper protection; and JSON Web Encryption (JWE) uses them for tamper protection and confidentiality. section 11.1
An elliptic-curve key pair
A JWK can describe an elliptic-curve key pair with fields such as kty for key type, crv for curve, x and y for public components, d for the private component, use for intended use, and kid for a unique key identifier. The supplied example uses an EC key on the NIST P-256 curve and assigns it kid 1. section 11.3 section 11.7
JWK is useful when:
- Applications need one JSON-based representation for different kinds of cryptographic keys. section 11.3
- Distributed systems must exchange keys across platforms, programming languages, teams, or organizations. section 11.7
- Systems need to identify a particular key through the kid field. section 11.7
Figure 11.1 Relationships between the standards that are part of the JOSE suite. JOSE enables interoperability between applications that want to exchange encrypted or signed data using the JSON data format. JOSE standards are used extensively by popular security protocols such as OIDC for single sign-on.
Use the standards relationship diagram to see how JWK connects JWA, JWS, and JWE within JOSE and supports interoperable JSON security protocols. section 11.1
JWK standardizes the container and metadata for keys; it does not replace the algorithm definitions supplied by JWA. Pair it with configurations recommended for the deployment, and do not copy educational cryptography examples into production unchanged. section 11.1 section 11.8


