PS384: RSASSA-PSS with SHA-384 in a JWT
PS384 is RSA-PSS with SHA-384 for both the digest and the mask generation function, and a salt the same length as that digest. It is rare in practice and usually appears because a wider policy specified SHA-384.
At a glance
- Algorithm
- PS384, RSASSA-PSS using SHA-384 and MGF1 with SHA-384
- Registered in
- RFC 7518 section 3.5
- Implementation requirement
- Optional
- Key
- RSA key pair, 2048 bits or larger
- Salt length
- 48 bytes, matching the SHA-384 output
- Verified in the decoder
- Yes, in your browser, with a PEM public key.
In detail
Everything in PS256 applies here with SHA-384 substituted throughout: the message digest, the mask generation function and the salt length all move together. That last one is the detail worth knowing, because PSS implementations often let the caller choose a salt length and JOSE does not: RFC 7518 pins it to the hash output size, so a library configured with a different salt length produces signatures that conforming verifiers reject.
Padding consumes room inside the RSA modulus, and a longer hash consumes more of it. With a 2048 bit key there is ample space for SHA-384 with a 48 byte salt, so this is not a limit anyone meets in JWT deployments, but it is why very small RSA keys cannot support the larger PSS variants at all. It is another reason the 2048 bit minimum is not merely conservative.
You will meet PS384 mostly in estates that standardized on SHA-384 for everything, often because certificates and code signing were specified that way first and tokens inherited the rule. Chosen on its own merits it is hard to justify over PS256, which has the broader implementation support and the same padding scheme.
The decoder verifies PS384 in the browser given a PEM public key. That is worth checking early when integrating with a partner, because unsupported algorithm failures and invalid signature failures often surface as the same generic error message at the API boundary, and a local verification separates them immediately.
Examples
{ "alg": "PS384", "typ": "JWT" }
// digest: SHA-384
// mask function: MGF1 with SHA-384
// salt length: 48 bytes, fixed by RFC 7518
// signature: as long as the RSA modulusThings that catch people out
- Leaving a library's default salt length in place. JOSE fixes it at the digest size, and a mismatch fails verification with no useful error.
- Expecting a bigger signature than PS256. Both are the size of the RSA key, so the token length does not change.
- Picking PS384 for interoperability. PS256 is the variant partners are most likely to have enabled.
Try it: JWT Decoder
Paste a token to decode the header and payload, read the claims and expiry, and verify the signature in your browser. Nothing is uploaded.
JWT Decoder
LOCAL · Browser-OnlyDecode and inspect JSON Web Tokens without sending them to a server
Related JWT claims and algorithms
All jwt claims and algorithms →PS256: RSASSA-PSS with SHA-256 in a JWT
PS256 signs a JWT using RSA-PSS with SHA-256 and MGF1. How it differs from RS256, why two signatures differ, and verifying with a public key.
PS512: RSASSA-PSS with SHA-512 in a JWT
PS512 signs a JWT using RSA-PSS with SHA-512 and a 64 byte salt. Why very small keys cannot carry it, and how verification works in the decoder.
RS384: RSASSA-PKCS1-v1_5 with SHA-384 in a JWT
RS384 signs a JWT with RSA and SHA-384. What changes against RS256, what does not, and why the token size stays the same for a given key.
ES256: ECDSA with P-256 and SHA-256 in a JWT
ES256 signs a JWT with ECDSA on curve P-256 using SHA-256. Signature format, why raw R and S beats DER here, and verifying with a public key.
ES384: ECDSA with P-384 and SHA-384 in a JWT
ES384 signs a JWT with ECDSA on curve P-384 using SHA-384. Signature length, where the curve is mandated, and verification in your browser.
ES512: ECDSA with P-521 and SHA-512 in a JWT
ES512 signs a JWT with ECDSA on curve P-521 using SHA-512. Why the curve is 521 bits, what that does to signature length, and how to verify it.
Tools for this
- JWT Decoder Free online JWT decoder - decode and inspect JSON Web Tokens without sending them to a server