JWE compact decrypt
Decrypt compact JWE tokens with local symmetric, password or RSA private keys.
Encrypted token (JWE)
Loading editor…
Shared secret
Loading editor…
Five parts, not three
A signed JWT has three dot-separated parts. A compact JWE has five: the protected header, the wrapped CEK, the initialization vector, the ciphertext, and the authentication tag. The CEK is the random value that encrypts the payload. The second part is empty when the header uses alg dir, because the shared secret is used directly as the CEK.
alg wraps, enc encrypts
Read the two header fields as separate jobs. alg answers how the sender protected the CEK, and enc names the cipher that encrypted the payload. Either one can be wrong for your setup, so check both.
| alg | how the CEK is protected, such as dir, A128KW, or RSA-OAEP |
| enc | the cipher for the payload, such as A128GCM or A256GCM |
Matching the input to the mode
- A password works only with the PBES2 family of alg values.
- An RSA private half must be PKCS#8 PEM, so a PKCS#1 block will not import.
- A shared secret must have the length the enc cipher expects.
More web & auth tools
All web & auth toolsWas this tool useful?