05 D2D

This chapter defines Dina-to-Dina transport, message families, policy, offline delivery, and federated execution.

Purpose

D2D defines how two sovereign identities coordinate securely.

It is not just a transport channel. It is a policy-aware, trust-aware coordination layer between two human-centered systems.

Protocol Requirements

A Dina-compatible D2D layer MUST provide:

Wire Model

The reference implementation currently uses:

The current transport wrapper is effectively:

{
  "c": "<base64 ciphertext>",
  "s": "<hex ed25519 signature over plaintext>"
}

The plaintext message model is currently:

{
  "id": "msg-123",
  "type": "coordination.request",
  "from": "did:plc:sender",
  "to": ["did:plc:recipient"],
  "created_time": 1710000000,
  "body": { ... }
}

Message Families

The current Dina D2D v1 families are:

These are the transport-level v1 families the current implementation accepts as its strict D2D surface.

Message Policy

The current scenario policy model is:

Default scenario families in the reference implementation currently map roughly to:

safety.alert is treated as a special always-pass inbound case.

Contact and Sharing Policy

D2D interoperability requires more than cryptography.

It also requires:

The reference implementation already models:

This is critical for person-to-person interoperability because "can I reach this Dina" and "what may I disclose to this Dina" are different questions.

Outbox and Offline Delivery

A conforming implementation SHOULD support durable offline delivery.

The reference implementation already has:

Outbox states currently include:

Replay and Verification

A D2D implementation MUST reject replayed messages.

The reference implementation uses senderDID|messageID replay tracking and verifies inbound signatures against resolved verification methods.

Federated Execution

This is where interaction learnings materially expand the protocol.

A remote Dina is not just a mailbox. It may act as an orchestrator.

Therefore the protocol MUST allow the following D2D fulfillment patterns:

Example:

For this reason, D2D interop SHOULD standardize a generic request-state plane.

Recommended request modes are:

Recommended lifecycle states are:

Required fields in a generic D2D request-state object SHOULD include:

Optional fields SHOULD include:

Support for request modes, lifecycle states, and optional fields SHOULD be advertised through the capability discovery layer so that remote peers know the highest common lifecycle they can use.

The current v1 transport families do not yet fully freeze this generic request-state plane. That is an open standardization task before Protocol 1.0.

Draft machine-readable artifacts for D2D interop live in: