> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.adid.dev/llms.txt.
> For full documentation content, see https://docs.adid.dev/llms-full.txt.

# DIDComm v2 Envelope

**Used in:** §7.6 Encryption & Authentication
**Audience:** Agent Operator, Backend Developer
**IA ID:** D15

```mermaid
graph LR
  classDef plain fill:#dbeafe,stroke:#1d4ed8
  classDef sig   fill:#dcfce7,stroke:#15803d
  classDef enc   fill:#fef9c3,stroke:#b45309
  classDef wire  fill:#fecaca,stroke:#b91c1c

  P["Plaintext message { id, type, body, from, to, thid }"]:::plain
  S["Signed JWS (sender DID key)"]:::sig
  E["Encrypted JWE (anoncrypt or authcrypt)"]:::enc
  W["Forward envelope to mediator"]:::wire
  R["Mediator unwraps forward → relays JWE"]:::wire
  D["Recipient JWE decrypt → JWS verify → plaintext"]:::plain

  P --> S --> E --> W --> R --> D
```

**Reading guide:** Two crypto layers: signature (authenticity) → encryption (confidentiality). A forward envelope adds a routing layer for mediator delivery.

***