Authorized design and assessment of JOSE JWE token encryption: compact five-part structure, key encryption (alg) vs content encryption (enc), CEK handling, nested JWT (JWS inside JWE), and decryption/key-management checks. Use when APIs or clients issue or consume encrypted tokens (eyJ... five segments), JWE protected payloads, or confidentiality is required beyond signed JWT alone.
Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Authorized design and assessment of JOSE JWE token encryption: compact five-part structure, key encryption (alg) vs content encryption (enc), CEK handling, nested JWT (JWS inside JWE), and decryption/key-management checks. Use when APIs or clients issue or consume encrypted tokens (eyJ... five segments), JWE protected payloads, or confidentiality is required beyond signed JWT alone.
JWT / JWE Encryption Basics
Basics of JSON Web Encryption (JWE) for confidential tokens: structure,
algorithms, key management, and authorized review. Complements JWS/JWT abuse
work; encryption is not authentication by itself.
When To Use
Situation
Direction
Token has five base64url segments (not three)
This skill (primary)
Header shows enc, alg key wrap, zip, or cty: JWT
This skill
Design: encrypt access/ID/session payloads at rest or in transit layers
This skill
Nested JWT: JWE wrapping a signed JWS
This skill for outer encrypt
Three-part signed JWT only (alg none, confusion, kid)
Decode only the protected header (no trust): record alg, enc, kid, zip,
cty, typ, ephemeral keys (epk for ECDH-ES). Payload is ciphertext until decrypt.
2. Map alg (key management) vs enc (content encryption)
Critical: ciphertext integrity fails open, or plaintext claims trusted after
decrypt without inner signature / binding when the threat model requires both.
5. Design and remediation themes
Apply code-quality-standards when implementing:
Confidentiality need → JWE (or TLS + server-side storage); integrity of claims →
sign then encrypt (JWS nested in JWE) or encrypt then sign only with a clear profile.
Pin allowed (alg, enc) pairs server-side; never trust header alone.
Separate enc keys from sig keys in JWKS; rotate with kid.
Short token TTL; bind audience/issuer on plaintext claims after successful decrypt.
Never log CEKs, private keys, or full JWE; redact to kid + length/hash.