liveBook · Manning

RS256

As explained in Secure APIs

RS256 is the RSA-based signature algorithm designation that combines RSASSA-PKCS1-v1_5 with SHA-256.

RS256 is an asymmetric JWT signature algorithm: RSASSA-PKCS1-v1_5 uses SHA-256 to hash the message, a private RSA key signs it, and the matching public key verifies it. section 7.2.2

Using separate signing and verification keys reduces the leakage risk of HS256, whose shared secret must exist wherever tokens are validated. section 7.2.2 section 8.2

A JOSE header selecting RS256

A JWT header can identify the token type, select RS256 through alg, and identify a key with kid: { "typ": "JWT", "alg": "RS256", "kid": "080E8CtRFAnnLlgK3dk8Y" }.

Assess RS256 deployments against these cautions:

  • Check for RSA signing keys with exponents below 3, which are associated with Bleichenbacher’s signature-forgery attack. section 8.2
  • Treat verification implementation flaws as a serious concern even when the algorithm itself is otherwise safe. section 8.2
  • Consider PS256 or EdDSA where FAPI guidance applies, because FAPI bans RS256 and recommends those alternatives. section 8.2

How Secure APIs covers it

How deep it goes
Defines the scheme, contrasts its key model with HS256, and identifies attack conditions without detailing verification internals.
Examples
Uses a JOSE header containing typ, alg, and kid to illustrate RS256 selection and key identification.
What it assumes
Assumes JWT familiarity but establishes symmetric versus asymmetric signing through the HS256 comparison.
What you can do after
Evaluate RS256 deployments by checking key roles, low-exponent risks, verification flaws, and applicable algorithm guidance.
How it connects
Contrasts RS256 with HS256 and connects it to JWT, RSA, SHA-256, PS256, EdDSA, and FAPI.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Secure APIs. The section links point to the parts of the book it draws on.