Sign then encrypt data (nested JWE(JWS))

Performs sign-then-encrypt operation: signs data with signKid, then encrypts
the resulting JWS with encryptKid to produce a nested JWE(JWS) structure.

Both keys must be homogeneous (both symmetric or both asymmetric). Both keys
must be different for security.

Serialization selection (PRD §60). The optional serialization field selects the representation of the INNER signed JWS (before it is encrypted into the outer JWE) and is orthogonal to the backend-authoritative RFC 3161 time-stamping policy (§49). Two honest compliance tiers apply to the inner JWS: RFC 7515 JWS (COMPACT = §7.1 three-segment compact, or JSON = §7.2 JWS JSON Serialization) and JAdES B-T (JWS JSON Serialization only, carrying an RFC 3161 qualified timestamp sigTst in the Unprotected Header per ETSI TS 119 182-1 — a COMPACT inner token structurally cannot carry it). Truth table (serialization × effective stamping → inner form): omitted+OFF → compact; omitted+REQUIRED → JWS-JSON + sigTst (auto-upgrade, JAdES B-T); COMPACT+OFF → compact; COMPACT+REQUIRED → 400 serialization-incompatible-with-timestamp (rejected BEFORE any signing or encryption); JSON+OFF → JWS-JSON, no sigTst; JSON+REQUIRED → JWS-JSON + sigTst. It never adds or drops a timestamp and does not change the outer JWE. The jweToken field and the separated sign/encrypt metadata envelope are ALWAYS present regardless of serialization.

Uses JWE General JSON Serialization (RFC 7516 §7.2) and JWS General JSON Serialization (RFC 7515 §7.2) uniformly across SIMPLE and COMPOSITE keys.
COMPOSITE keys enable hybrid post-quantum cryptography with dual signatures (COMPOSITE_SIGNATURE)
and combined key encapsulation (COMPOSITE_KEM_COMBINE).

Key type combinations:

  • Symmetric + Symmetric (e.g., AES-GCM + HMAC-SHA256)
  • Asymmetric + Asymmetric (e.g., ML-KEM + ML-DSA, RSA + ECDSA)
  • COMPOSITE + COMPOSITE (e.g., COMPOSITE_KEM_COMBINE + COMPOSITE_SIGNATURE)
  • COMPOSITE + SIMPLE (any homogeneous combination)

The JWE outer header includes cty="JWS" to indicate nested content.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Data to sign and encrypt with two different keys

Request for sign-then-encrypt operation producing nested JWE(JWS).

string
required
length ≥ 1

Base64-encoded data to sign and encrypt

string
required
length between 0 and 255
^[A-Za-z0-9._:-]+$

Key identifier for signing operation

string
required
length between 0 and 255
^[A-Za-z0-9._:-]+$

Key identifier for encryption operation

int64 | null
1 to 3650

Optional validity period in days for the signature (JWS exp claim)

string | null
enum

Optional JWS serialization representation to produce for the INNER signed JWS (PRD §60) before it is encrypted into the outer JWE. COMPACT = RFC 7515 §7.1 compact; JSON = RFC 7515 §7.2 JWS JSON Serialization (able to carry a JAdES qualified timestamp). Omit to let the server choose the standards-correct representation: compact when no timestamp is mandated, JWS-JSON when the deployment/tenant policy requires an RFC 3161 signature timestamp (JAdES B-T). Governs only the inner JWS representation; it never adds or drops a timestamp and does not change the outer JWE. Requesting COMPACT while the backend-authoritative policy mandates a timestamp is the single incompatible combination and is rejected with HTTP 400 before any signing or encryption is performed.

Allowed:
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Bearer
JWT
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
application/problem+json