RS256
recommendedRSARSASSA-PKCS1-v1_5 using SHA-256
RFC 7518 §3.3
RS256 is the most widely deployed JWT signing algorithm. It uses RSA private key signing with SHA-256 hashing. The private key signs tokens (held by the issuer); any party with the public key can verify them. Public keys are distributed via JWKS (/.well-known/jwks.json). Google, Auth0, Okta, and most identity providers default to RS256.
Details
RS256 (RSASSA-PKCS1-v1_5 with SHA-256) is asymmetric: the issuer signs with a private key, verifiers use the corresponding public key. This separation means token verification can happen at the edge or in any service without sharing secrets.
Key rotation: the kid (key ID) header claim identifies which public key to use. Issuers can rotate keys by publishing new keys to JWKS while retaining old keys until outstanding tokens expire.
Why not RS512?: RS512 uses SHA-512 instead of SHA-256. The security difference at 2048-bit RSA keys is negligible – the RSA key size dominates security, not the hash size. RS256 is preferred for compatibility and performance.
RFC 7518 §3.3 defines this algorithm. RFC 8725 §3.1 recommends using asymmetric algorithms like RS256 over symmetric HS256 for multi-tenant or multi-service scenarios.
Key Information
| Key type | RSA key pair (private for signing, public for verification) |
| Key size | 2048 bits minimum (3072 or 4096 bits preferred) |
| Family | RSA |
| Spec | RFC 7518 §3.3 |
Advantages
- +Private key stays with the issuer – no secret sharing with verifiers
- +Public keys shareable via JWKS – any service can verify independently
- +Key rotation supported via kid header claim
- +Industry default – widest library and IDP support
Limitations
- !Slower than HMAC algorithms – RSA signing is computationally expensive
- !Larger tokens – RSA signature is 256 bytes vs 32 bytes for HS256
- !Key management overhead – requires PKI infrastructure
When to use
OIDC ID Tokens
OAuth 2.0 access tokens
Any multi-service or federated auth scenario
Public APIs where token issuance and verification are separate services