Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Glossary

DID Communication

DID Communication (DIDComm) is a protocol suite enabling secure, private, and authenticated messaging between entities identified by Decentralized Identifiers (DIDs).
Chainscore © 2026
definition
DECENTRALIZED IDENTITY

What is DID Communication?

DID Communication is a secure, privacy-preserving protocol for exchanging messages and data between entities using Decentralized Identifiers (DIDs).

DID Communication is a suite of protocols and standards that enables secure, private, and verifiable interactions between parties using Decentralized Identifiers (DIDs). It provides a standardized way for entities—such as individuals, organizations, or devices—to establish trusted connections, exchange encrypted messages, and prove control of their identity without relying on a central intermediary. This framework is foundational for building decentralized, self-sovereign identity systems where users own and control their personal data.

The core of DID Communication is built upon the DIDComm protocol, which defines how messages are formatted, encrypted, signed, and routed. Messages are typically encoded in JSON and secured using public key cryptography linked to the sender's and receiver's DIDs. A key feature is the use of peer-to-peer connections, often established through a DID Exchange or Out-of-Band protocol, which creates a secure channel independent of any specific messaging transport (like HTTP or Bluetooth). This ensures communication is private, integrity-protected, and resistant to eavesdropping.

Common use cases for DID Communication include verifiable credential issuance and presentation, secure access to services, and confidential data sharing. For example, a university (issuer) can send an encrypted digital diploma (a verifiable credential) directly to a graduate's digital wallet. The graduate can then present this credential to an employer (verifier) in a private, cryptographically verifiable manner, all using DIDComm messages. This eliminates the need for insecure email attachments or centralized credential verification services.

Implementing DID Communication requires several technical components: a DID Document to discover public keys and service endpoints, a DIDComm agent (software that sends/receives messages), and support for encryption envelopes like the JWE (JSON Web Encryption) standard. The protocol supports both synchronous and asynchronous messaging patterns, making it adaptable for various applications, from real-time chat to offline credential storage and later presentation.

etymology
DID COMMUNICATION

Etymology and Origin

The term 'DID Communication' (DIDComm) originates from the convergence of decentralized identity and secure messaging protocols, establishing a framework for privacy-preserving interactions between digital entities.

The term DID Communication, often abbreviated as DIDComm, is a compound noun formed from Decentralized Identifier (DID) and Communication. It was formally defined by the Decentralized Identity Foundation (DIF) and the W3C Credentials Community Group to describe a secure, peer-to-peer messaging protocol built upon the foundational layer of DIDs and Verifiable Credentials. The 'DID' component anchors the communication to a cryptographically verifiable identity, while 'Communication' specifies the protocol's purpose: enabling private, encrypted interactions. This naming convention directly reflects its core technical architecture and purpose.

The conceptual origin of DIDComm lies in addressing the shortcomings of traditional, centralized communication systems—such as email or messaging apps—which rely on intermediary servers that can surveil, censor, or lose data. It draws inspiration from earlier cryptographic messaging protocols like Off-the-Record Messaging (OTR) and the Signal Protocol, but innovates by using DIDs and their associated DID Documents as the root of trust. This allows any two parties who possess each other's DIDs to establish a secure channel without pre-sharing secrets or relying on a central directory, embodying the principles of self-sovereign identity (SSI).

The evolution of DIDComm is documented through a series of specifications, most notably the DIDComm Messaging v1 and v2 protocols. DIDComm v1, often associated with Hyperledger Aries, uses JSON Web Encryption (JWE) and JSON Web Signatures (JWS). DIDComm v2, developed under the DIF, introduced performance improvements and a more modular design. The protocol's development is a direct response to the need for interoperable, firewall-friendly, and transport-agnostic communication that can support complex interactions like credential issuance, presentation, and secure data sharing in decentralized ecosystems.

key-features
DID COMMUNICATION

Key Features of DIDComm

DIDComm is a secure, private messaging protocol built on decentralized identifiers (DIDs) and verifiable credentials. It enables encrypted, peer-to-peer communication between any two entities that possess DIDs.

01

End-to-End Encryption

DIDComm provides confidentiality and integrity for all messages using strong, modern cryptography. Messages are encrypted at the sender's device and can only be decrypted by the intended recipient's device, ensuring no intermediary (including routing nodes) can read the content. This is achieved using the recipient's public key from their DID Document.

02

Decentralized Routing

Communication does not rely on centralized servers. Messages are delivered via mediators or relays that only handle encrypted envelopes, unable to read the contents. This uses a DIDComm Transport layer, which can work over various protocols (HTTP, WebSockets, Bluetooth). Routing instructions are discovered from the participants' DID Documents.

03

Message Packing Formats

DIDComm supports different serialization and encryption formats to balance security and functionality:

  • JWM (JSON Web Messages): The standard format, using JWE/JWS for encryption/signing.
  • Authcrypt (JWM encrypted to the recipient): Provides both confidentiality and sender authentication.
  • Anoncrypt (JWM encrypted to the recipient): Provides confidentiality without revealing the sender's identity to eavesdroppers.
04

Protocol-Based Interaction

Communication follows defined protocols—agreed-upon sequences of message types to achieve a specific goal (e.g., issuing a credential, proving a claim). This creates predictable, interoperable workflows. Examples include the Aries RFCs for credential issuance (Issue Credential Protocol) and presentation (Present Proof Protocol).

05

Forward Secrecy & Repudiation

DIDComm can be configured for enhanced security properties:

  • Forward Secrecy: Compromising a long-term private key does not reveal past session keys or decrypt old messages.
  • Repudiation: The ability for a sender to plausibly deny sending a message, supported by certain encryption modes. These features are enabled through the use of ephemeral key pairs for individual sessions.
06

Interoperability via DID Core

The protocol is built directly on W3C Decentralized Identifiers (DIDs) and DID Documents. Any entity with a compliant DID (e.g., did:key, did:web, did:indy) can participate. The recipient's public keys and service endpoints for routing are resolved from their DID Document, enabling universal addressability without pre-shared infrastructure.

how-it-works
DECENTRALIZED IDENTITY PROTOCOL

How DID Communication Works

DID Communication is a secure, privacy-preserving protocol that enables decentralized identifiers (DIDs) to exchange messages and data without relying on centralized intermediaries.

DID Communication is the standardized method by which entities controlled by Decentralized Identifiers (DIDs) discover, authenticate, and exchange encrypted messages. It is defined by the W3C's DIDComm specification and operates on a transport-agnostic, asynchronous model. At its core, DIDComm uses the DID Document—a public description of a DID—to locate a service endpoint (like an agent or wallet) and obtain the public keys necessary for establishing a secure channel. This enables two parties who only know each other's DIDs to initiate private communication.

The protocol employs end-to-end encryption using public key cryptography derived directly from the participants' DID Documents. A typical flow involves one party wrapping a plaintext message into a JWM (JSON Web Message), encrypting it for the recipient's public key, and optionally signing it with their own private key. This creates a DIDComm message that can be transmitted over any carrier system (e.g., HTTP, Bluetooth, or a blockchain). The recipient's agent decrypts the message using their private key, verifying the sender's signature against the sender's DID Document to ensure authenticity and integrity.

Key architectural components include the DIDComm Agent (software that sends/receives messages on behalf of a DID controller) and the concept of protocols—predefined sequences of messages for specific interactions like issuing verifiable credentials or negotiating connections. DIDComm supports both plaintext messages for public data and encrypted messages for private communication. Its asynchronous nature is crucial for decentralized systems, as it doesn't require both parties to be online simultaneously, with messages often being routed through mediators or stored in message queues.

A primary use case is the peer-to-peer exchange of Verifiable Credentials. For example, a university (issuer) can send a signed diploma credential directly to a graduate's (holder) digital wallet via DIDComm. The graduate can later present this credential to an employer (verifier) over another DIDComm channel. This creates a trusted data flow without exposing personal data to central servers. Other applications include secure IoT device pairing, decentralized service discovery, and inter-wallet asset transfers, all leveraging the same foundational protocol of DID-based authentication and encryption.

DIDComm v2, the current iteration, introduces significant improvements over v1, including a simplified JWE (JSON Web Encryption)-based envelope structure, enhanced forward secrecy through key rotation, and better support for multiple recipients. It is designed to be transport-agnostic, meaning the same encrypted message envelope can be sent via HTTP POST, a blockchain transaction, or even a QR code. This flexibility, combined with its foundation in open W3C standards, positions DIDComm as a critical infrastructure layer for building interoperable, secure, and user-centric digital relationships across the web.

core-protocols
DID COMMUNICATION

Core DIDComm Protocols

DIDComm is a secure, peer-to-peer messaging protocol for decentralized identity. These core protocols define the standard message formats and flows for establishing connections, issuing credentials, and presenting proofs.

02

Out-of-Band (OOB) Invitation

A protocol for initiating a DIDComm connection without a prior relationship. It uses a special message format (often encoded as a QR code or deep link) containing:

  • The inviter's DID and public key material.
  • The endpoint URL for the DIDComm transport.
  • Optional service endpoint metadata. This is the standard method for onboarding new users into a verifiable credential ecosystem.
03

Issue Credential Protocol

A three-step interactive protocol where an issuer grants a verifiable credential to a holder. The flow consists of:

  1. Proposal/Offer: The issuer offers a credential with a specific schema.
  2. Request: The holder requests issuance, proving control of their DID.
  3. Issue: The issuer signs and transmits the final W3C Verifiable Credential. This protocol ensures the credential is bound to the holder's DID before issuance.
04

Present Proof Protocol

A protocol where a verifier requests and a prover presents proof derived from their verifiable credentials. It supports:

  • Selective disclosure using BBS+ signatures.
  • Predicate proofs (e.g., proving age > 21 without revealing birthdate).
  • Presentation requests specifying required credential types and constraints. The prover constructs a Verifiable Presentation, a cryptographically verifiable package of proofs.
05

Discover Features Protocol

A protocol for peers to dynamically discover each other's supported protocols and features. It enables protocol negotiation and interoperability by querying:

  • Supported DIDComm protocol identifiers and versions.
  • Available message types and their roles.
  • Feature disclosures to avoid sending unsupported messages. This is critical for agents from different vendors to communicate effectively.
06

Trust Ping Protocol

A simple liveness and connectivity test protocol. One agent sends a trust ping message, and the other responds with a trust pong. This is used to:

  • Verify an active DIDComm connection.
  • Measure round-trip latency.
  • Confirm the other agent can decrypt messages for a given DID. It's the foundational protocol for basic agent-to-agent communication health checks.
examples
DID COMMUNICATION

Examples and Use Cases

Decentralized Identifiers (DIDs) enable secure, peer-to-peer interactions without centralized intermediaries. These examples illustrate how DID communication protocols are applied in practice.

security-considerations
DID COMMUNICATION

Security and Privacy Considerations

Decentralized Identifier (DID) Communication enables secure, private interactions between entities. This section details the core security properties and privacy challenges inherent to this peer-to-peer messaging layer.

01

End-to-End Encryption

DIDComm messages are encrypted at the application layer using the recipient's public key, ensuring confidentiality even if relay servers are compromised. This is typically achieved via Authenticated Encryption (e.g., using the X25519 key agreement and AES-GCM). The protocol ensures that only the intended recipient, holding the corresponding private key, can decrypt and read the message content.

02

Message Authentication & Integrity

Every DIDComm message is cryptographically signed by the sender using their private key. This provides non-repudiation and data integrity, allowing the recipient to verify:

  • The message originated from the claimed sender's DID.
  • The message was not altered in transit.
  • The sender cannot later deny sending the message. Signatures are typically implemented using Ed25519 or ES256K algorithms.
03

Sender/Recipient Anonymity

While message content is private, metadata privacy is a significant challenge. DIDComm often relies on DID Document Service Endpoints (URLs) for message routing, which can leak relationship graphs and communication patterns. Techniques to mitigate this include:

  • Using blinded message envelopes.
  • Routing through anonymous message relays.
  • Leveraging pairwise DIDs (unique DIDs for each relationship) to prevent correlation.
04

Replay & Man-in-the-Middle Attacks

The protocol must defend against common network attacks. Key mitigations are:

  • Nonces and Timestamps: To prevent replay attacks where an old message is resent.
  • Key Rotation: Regularly updating DID key material to limit exposure from key compromise.
  • Forward Secrecy: While not inherent, it can be achieved by using ephemeral key pairs for each session, ensuring past communications remain secure if a long-term key is later compromised.
05

Trust Establishment & Verification

Security depends on the ability to authentically resolve a DID to its Document and verify the associated public keys. This introduces a dependency on the chosen Verifiable Data Registry (e.g., a blockchain). Attacks can target the resolution layer through:

  • DNS spoofing of HTTP-based DID resolvers.
  • Sybil attacks on permissionless ledgers.
  • Malicious DID Document updates. Verifiers must trust the resilience of the underlying registry.
06

Credential Presentation Privacy

When using Verifiable Credentials over DIDComm, selective disclosure is crucial. Best practices to prevent data leakage include:

  • Using Zero-Knowledge Proofs (ZKPs) to prove claims without revealing the underlying credential data.
  • Bounding Presentation Requests to prevent verifiers from asking for unnecessary personal data.
  • Minimizing Correlation by using different DIDs or pseudonyms for different verifiers to avoid creating a unified identity graph.
PROTOCOL COMPARISON

DIDComm vs. Traditional Secure Messaging

A technical comparison of decentralized identity-based messaging (DIDComm) against centralized secure messaging protocols like TLS.

Feature / AttributeDIDComm (Decentralized)TLS/HTTPS (Traditional)

Architectural Model

Peer-to-Peer, Agent-Based

Client-Server, Hub-and-Spoke

Identity Foundation

Decentralized Identifiers (DIDs)

X.509 Certificates (PKI)

Trust Establishment

Verifiable Credentials & DID Documents

Certificate Authorities (CAs)

Message Layer Security

Authenticated Encryption (libsodium)

Transport Layer Security (TLS 1.3)

End-to-End Encryption

Message Routing

DID Service Endpoints & Mediators

Static IP/DNS Addresses

Sender/Recipient Privacy

Pseudonymous DIDs

IP Addresses & Domain Names

Protocol Portability

Application Layer (Any Transport)

Transport Layer (TCP)

ecosystem-usage
DID COMMUNICATION

Ecosystem and Implementations

DID Communication (DIDComm) is a suite of protocols enabling secure, private, and interoperable messaging between Decentralized Identifiers (DIDs). It is the core transport layer for verifiable credentials and decentralized identity ecosystems.

02

Mediators & Relays

To enable communication with DIDs that are not always online or are behind firewalls, DIDComm employs mediators (for mobile agents) and relays. These are trusted routing services that hold encrypted messages for later delivery. This architecture is essential for peer-to-peer interactions in mobile and IoT contexts, decoupling message delivery from endpoint availability.

04

Agent-to-Agent Protocols

DIDComm defines specific protocol flows for common interactions. Core protocols include:

  • Connection Protocol: Establishes a pairwise DID relationship.
  • Issue Credential Protocol: For issuing verifiable credentials.
  • Present Proof Protocol: For creating and verifying verifiable presentations.
  • Discover Features Protocol: For agents to discover each other's capabilities. These protocols enable trusted, automated interactions without centralized servers.
06

Use Cases & Deployments

DIDComm enables practical decentralized identity solutions:

  • Digital Wallets: Mobile apps for holding credentials (e.g., driver's licenses, diplomas).
  • Enterprise SSO: Passwordless, phishing-resistant authentication for employees.
  • Supply Chain: Verifiable credentials for product provenance and compliance.
  • Healthcare: Secure exchange of patient health records and provider credentials.
DID COMMUNICATION

Frequently Asked Questions (FAQ)

Decentralized Identifiers (DIDs) require a secure, private, and interoperable method for exchanging messages and data. This FAQ covers the core protocols and concepts that enable DID-to-DID interactions.

DIDComm is a secure, peer-to-peer messaging protocol that allows entities using Decentralized Identifiers (DIDs) to communicate privately. It works by encrypting messages end-to-end using the public keys listed in the recipient's DID Document, ensuring that only the intended recipient can decrypt the content. Messages are packaged into a standard JWM (JSON Web Messages) envelope, which can be transported over various transport protocols like HTTP or WebSockets. DIDComm supports features like forward secrecy and message repudiation, making it a foundational layer for building trusted interactions in decentralized ecosystems like verifiable credential exchanges and agent-based communication.

further-reading
DID COMMUNICATION

Further Reading

Explore the core protocols, standards, and real-world applications that define how Decentralized Identifiers (DIDs) interact and share verifiable data.

ENQUIRY

Get In Touch
today.

Our experts will offer a free quote and a 30min call to discuss your project.

NDA Protected
24h Response
Directly to Engineering Team
10+
Protocols Shipped
$20M+
TVL Overall
NDA Protected Directly to Engineering Team
DID Communication: Secure Messaging for Decentralized Identity | ChainScore Glossary