JSON Web Algorithms (JWA)
JSON Web Algorithms (JWA), RFC 7518, names the cryptographic algorithms JWS and JWE use, such as RS256, ES256, HS256 and AES-GCM.
JSON Web Algorithms (JWA) is the Internet Engineering Task Force (IETF) specification, published as RFC 7518, that names the cryptographic algorithms usable with JSON Web Signature (JWS) and JSON Web Encryption (JWE), and fixes exactly how each one must be applied. Where JWS and JWE define the container - which header field holds what, how the pieces are joined into a compact string - JWA supplies the ingredient list: a short identifier such as RS256 or A128GCM that a header's alg or enc value carries, pointing to a precise, interoperable recipe rather than a vague algorithm name.
The identifiers cover the algorithm families a reader will meet elsewhere in this glossary:
- HMAC: HS256, HS384, HS512 - a shared secret combined with a hash function, used mainly where the two parties already trust each other with a common key.
- RSA signatures: RS256 and the RSA-PSS variants PS256, PS384, PS512 - signing with an RSA private key.
- ECDSA signatures: ES256, ES384, ES512 - signing with elliptic curve cryptography, giving shorter keys for the same strength.
- AES-based encryption: A128GCM, A192GCM, A256GCM for content encryption, alongside key-management algorithms such as RSA-OAEP and ECDH-ES that protect or agree the content-encryption key inside a JWE.
Note: the specification also defines an algorithm identifier called none, for a token with no signature at all. A verifier that fails to reject none when it expects a signed token accepts a forged one just as readily - the alg value a header claims should never be trusted on its own, only checked against what the verifier was actually configured to expect.