ToolT8
Mediator packet tracer
Alice sends Bob a message through none, one or two mediators. The message is DIDComm Messaging’s own test vector: encrypted by Alice for Bob’s three keys, with Alice’s key in the agreement so Bob knows it came from her DIDCOMM-2.0 §5.1.1. Each mediator receives a forward message encrypted to it alone DIDCOMM-2.0 §9.4.4. At every hop, the tool opens what that hop can open with that hop’s key, in your browser, and lists what it could log.
DIDComm Messaging 2.0, Routing Protocol 2.0 · a test vector, in your browser
- 1Alice’s agentone envelope, sealed twice
- 2Bob’s mediatorthe inner envelope, unopened
- 3Bob’s agent
Outer envelope, sealed for did:example:mediator1, one keyopened here
Inner envelope, sealed for did:example:bob, 3 keysnot readable here
MJezmxJ8DzUB01rMjiW6JViSaUhsZBhMvYtezkhmwts1qXWtDB63i4-FHZP6cJSyCI7eU-gqH8lBXO_UVuviWIqnIUrTRLaumanZ4q1dNKAnxNL-dHmb3coOqSvy3ZZn6W17…
ECDH-1PU+A256KW, A256CBC-HS512, for did:example:bob#key-x25519-1 and did:example:bob#key-x25519-2 and did:example:bob#key-x25519-3
What this hop can log
- Size
- 2778 characters
- For
- did:example:bob
- Sender
- did:example:alice#key-x25519-1
What it cannot
- The message type
- What it says
What you just saw. A mediator opens one layer and reads one instruction: where the next envelope goes DIDCOMM-2.0 §9.4.7.
Every mediator learned the sender’s key id: wrap the envelope for Bob in anonymous encryption to hide it DIDCOMM-2.0 §5.1.8.
Agrees with the specification Bob ends with the message DIDComm’s test vectors carry (Appendix C.3), from Alice’s key DIDCOMM-2.0 §C.3.
The vectors carry a message that differs from Appendix C.1 as printed in two places: a typ member, and a type URI on http rather than https. The tool shows what the envelope holds.
The vectors also hold two envelopes sealed with XC20P. Web Crypto, which this tool runs on in your browser, lacks XC20P, so it cannot open those two; this route carries the one it can.
A mediator holds messages for an agent that is not always reachable (8.4 Mediators and relays: why they exist). It opens the forward message addressed to it and learns where to send the next envelope, which it cannot open DIDCOMM-2.0 §9.4.7. What it can still read on that envelope is the outside: the recipients’ key ids and, for authenticated encryption, the sender’s key id. Wrapping the message once more in anonymous encryption for Bob hides the sender from every mediator DIDCOMM-2.0 §5.1.8.
- DIDCOMM-2.0 DIDComm Messaging v2.0