RFC 7518

JSON Web Algorithms (JWA)
Standards Track
May 2015
Abstract: JWA registers cryptographic algorithms for use with JWS, JWE, and JWK. It defines the algorithm identifiers used in JWS 'alg' and JWE 'alg'/'enc' header parameters.
Canonical source: https://www.rfc-editor.org/rfc/rfc7518  |  IETF Datatracker

1. Introduction

▶

JWA defines the set of cryptographic algorithms available in the JOSE ecosystem. Each algorithm has a registered identifier used in JWS/JWE headers to indicate the cryptographic operations performed.

2. JWS Signature Algorithms

▶
Identifier Algorithm Key Type Requirement
HS256 HMAC-SHA-256 oct (symmetric) Required
RS256 RSASSA-PKCS1-v1_5 + SHA-256 RSA Recommended
RS384 RSASSA-PKCS1-v1_5 + SHA-384 RSA Optional
ES256 ECDSA P-256 + SHA-256 EC Recommended+
ES384 ECDSA P-384 + SHA-384 EC Optional
PS256 RSASSA-PSS + SHA-256 RSA Optional
EdDSA Edwards-curve DSA OKP Optional
none No signature — MUST NOT for security tokens

3. JWE Key Management Algorithms

▶
Identifier Algorithm Description
RSA-OAEP RSAES OAEP RSA with SHA-1 OAEP padding
RSA-OAEP-256 RSAES OAEP + SHA-256 RSA with SHA-256 OAEP (preferred)
A128KW AES-128 Key Wrap Symmetric key wrapping
A256KW AES-256 Key Wrap Symmetric key wrapping
ECDH-ES ECDH Ephemeral Static Direct key agreement
ECDH-ES+A128KW ECDH-ES + A128KW Key agreement + wrapping
ECDH-ES+A256KW ECDH-ES + A256KW Key agreement + wrapping

4. JWE Content Encryption Algorithms

▶
Identifier Algorithm Key Size
A128CBC-HS256 AES-128-CBC + HMAC-SHA-256 256 bits
A256CBC-HS512 AES-256-CBC + HMAC-SHA-512 512 bits
A128GCM AES-128-GCM 128 bits
A256GCM AES-256-GCM 256 bits

5. 3GPP Algorithm Selection

▶
  • JWT signing: ES256 (ECDSA P-256) preferred, RS256 (RSA-2048) as fallback
  • N32-f JWE: ECDH-ES+A256KW for key management, A256GCM for content encryption
  • Avoid: 'none' algorithm, RSAES-PKCS1-v1_5 (vulnerable), symmetric algorithms for tokens
  • Key sizes: RSA minimum 2048 bits, EC minimum P-256