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

Pairwise DID

A Pairwise DID is a unique Decentralized Identifier generated for each specific relationship, preventing correlation across interactions to enhance privacy.
Chainscore © 2026
definition
DECENTRALIZED IDENTITY

What is Pairwise DID?

A privacy-preserving decentralized identifier architecture that creates unique, unlinkable identifiers for each relationship.

A Pairwise Decentralized Identifier (Pairwise DID) is a decentralized identifier that is uniquely created for each relationship between a holder (e.g., a user) and a specific relying party (e.g., a service provider). Unlike a public DID, which is reused across multiple interactions, a Pairwise DID ensures that a user's activities with different entities cannot be correlated, providing a fundamental layer of privacy by preventing linkability across contexts. This architecture is a core principle in Self-Sovereign Identity (SSI) systems and is defined within the W3C Decentralized Identifiers (DIDs) specification.

The mechanism works by having the identity holder generate a new DID and its associated DID Document for every new relationship. For example, when Alice connects with her bank and her healthcare provider, she would use did:example:bank123 for one and a completely separate did:example:health789 for the other. Even though both DIDs are controlled by the same cryptographic keys held by Alice, the two identifiers share no publicly visible connection, making it impossible for the bank and the healthcare provider to collude and track her activities without her explicit consent.

Implementing Pairwise DIDs requires careful key management. While it is possible to use the same master key pair to derive unique key pairs for each relationship (a process known as key derivation), a more common and secure practice is to generate entirely separate cryptographic key pairs for each Pairwise DID. The corresponding private keys are securely stored in the user's digital wallet, which manages the creation and presentation of these distinct identifiers and Verifiable Credentials during authentication and authorization flows.

The primary use cases for Pairwise DIDs are scenarios demanding high privacy, such as accessing sensitive financial services, healthcare portals, or anonymous online forums. They are essential for complying with strict data protection regulations like the GDPR, which mandate data minimization and purpose limitation. By design, Pairwise DIDs prevent the formation of a centralized cross-service profile of an individual, putting control over linkability firmly in the hands of the identity holder.

It is important to contrast Pairwise DIDs with Public DIDs (or Universal DIDs). A Public DID is intended for broad, public recognition—such as a corporation's official identifier on a ledger or a government's issuer DID for verifiable credentials. This single identifier is used across all interactions, which is necessary for establishing trust but inherently creates correlation. A well-designed SSI ecosystem will strategically employ both types: Public DIDs for institutional trust and Pairwise DIDs for private user interactions.

how-it-works
DECENTRALIZED IDENTITY

How Pairwise DIDs Work

A technical overview of the pairwise decentralized identifier (DID) pattern, a privacy-preserving mechanism for managing digital relationships.

A Pairwise Decentralized Identifier (DID) is a privacy-enhancing design pattern where a unique, separate DID is created for each relationship or interaction between two parties. This architecture prevents correlation across different contexts, as the same entity uses distinct identifiers with a bank, an employer, and a social network, making it impossible for these service providers to collude and build a composite profile. The core principle is relationship-specific pseudonymity, which is a foundational concept for user-centric identity systems like Self-Sovereign Identity (SSI).

The technical workflow involves several key steps. First, the DID Controller (e.g., a user's wallet) generates a new DID and its associated cryptographic key pair specifically for a new relationship with a Relying Party (RP). This new pairwise DID and its public key are then recorded to a verifiable data registry, such as a blockchain or a distributed ledger. Crucially, the RP only ever sees and uses this unique identifier; it has no visibility into the user's master identity or other pairwise DIDs. All verifiable credentials and interactions for that specific relationship are cryptographically bound to this dedicated key pair.

This model contrasts sharply with a public DID or universal identifier, which is reused across multiple relationships and inherently enables tracking. The pairwise approach provides unlinkability, a critical property defined by the W3C DID Core specification. Even if two different verifiers (e.g., a hotel and an airline) both receive credentials from the same issuer, they cannot determine if those credentials were issued to the same holder, provided pairwise DIDs were used in the credential issuance and presentation flows.

Implementing pairwise DIDs introduces management complexity, as users must securely store and organize multiple key pairs and DIDs—one for each relationship. DIDComm protocols and encrypted data vaults are often used to handle this orchestration. Furthermore, while pairwise DIDs excel at privacy, they can complicate scenarios requiring persistent reputation or long-term audit trails across sessions with the same entity, sometimes necessitating hybrid models or selective disclosure of a more permanent identifier under user control.

key-features
PRIVACY ARCHITECTURE

Key Features of Pairwise DIDs

Pairwise Decentralized Identifiers (DIDs) are a privacy-preserving identity pattern where a unique identifier is created for each relationship, preventing correlation across different contexts.

01

Relationship-Specific Identifiers

A Pairwise DID is a unique identifier generated for each distinct relationship between a user (holder) and a relying party (verifier). This prevents a service provider from linking a user's activity across different platforms or services, as a different DID is used for each interaction context.

02

Correlation Resistance

The primary security benefit of pairwise DIDs is correlation resistance. By using a different DID for each relationship, it becomes computationally infeasible for unrelated parties to collude and build a profile of a user's activity across the decentralized web, protecting user privacy.

03

Selective Disclosure

Users can present Verifiable Credentials from different issuers to different verifiers using their unique pairwise DIDs for each interaction. This allows for granular control over what information is shared with whom, without revealing a master identity that connects all disclosures.

04

Contrast with Public DIDs

Unlike a Public DID (a single, globally resolvable identifier meant for public entities), a pairwise DID is private by design. It is not published to a universal resolver and is only known to the two parties in the specific relationship, enhancing privacy.

05

Decentralized Key Management

Each pairwise DID is associated with its own DID Document containing unique public keys. The corresponding private keys are securely managed by the user's wallet or agent, ensuring that authentication and signing for each relationship are cryptographically isolated.

06

Use Case: Private User Logins

A practical application is in Decentralized Identity systems for login. A user can authenticate to Bank A and Social Media B using two completely separate pairwise DIDs. Neither service can know the user also uses the other, preventing cross-service tracking and data aggregation.

examples
PAIRWISE DID

Examples & Use Cases

Pairwise Decentralized Identifiers (DIDs) enable private, context-specific relationships. Here are key applications where their unique properties are essential.

01

Private Customer Onboarding

A financial institution can issue a unique Pairwise DID for each customer, preventing correlation across different services (e.g., checking, loans, investments). This allows for compliant KYC/AML verification without creating a single, trackable identity graph across the bank's entire ecosystem.

02

Selective Disclosure in Healthcare

A patient can use a Pairwise DID with their primary doctor, a different one with a specialist, and another with a pharmacy. This enables verifiable credentials (e.g., a prescription) to be shared in a targeted manner, minimizing data exposure and preventing unauthorized correlation of medical visits.

03

Enterprise Supply Chain Authentication

A manufacturer can establish a unique Pairwise DID relationship with each supplier and distributor. This facilitates secure, machine-to-machine communication and automated credential verification for shipments and payments, without revealing the full network of business partners to any single entity.

04

Decentralized Social & Reputation

A user can maintain separate Pairwise DIDs for different social platforms or DAOs. This allows them to port reputation or achievements (via verifiable credentials) between contexts they choose to link, while keeping their gaming profile disconnected from their professional network.

05

Secure IoT Device Networks

In a smart home or industrial setting, each device (sensor, actuator) can have a Pairwise DID relationship with the hub controller. This creates a secure, private communication channel for that specific context, isolating the device from others and preventing network-wide compromise if one credential is leaked.

DECENTRALIZED IDENTIFIER ARCHITECTURE

Pairwise DID vs. Public DID

A comparison of two core DID design patterns for managing digital identity relationships.

FeaturePairwise DIDPublic DID

Identifier Uniqueness

Unique per relationship

Globally unique, reused

Primary Use Case

Private, selective disclosure

Public verification & discovery

Linkability Risk

Minimal (pseudonymous pairs)

High (single correlatable identifier)

Relationship Context

Embedded in the DID itself

External to the DID (e.g., Verifiable Credentials)

Storage Location

Holder's local wallet/agent

Public verifiable data registry (e.g., blockchain)

Privacy by Design

Suitable for SSI (Self-Sovereign Identity)

Example DID Method

did:peer:2

did:ethr:0xab...

security-considerations
PAIRWISE DID

Security & Privacy Considerations

Pairwise Decentralized Identifiers (DIDs) are a privacy-preserving identity pattern where a unique DID is created for each relationship, preventing correlation across different contexts. This section details its core security mechanisms and trade-offs.

01

Correlation Resistance

The primary security benefit of a pairwise DID is its resistance to correlation attacks. By generating a unique identifier for each relationship (e.g., with Bank A, Social App B), activity across these separate contexts cannot be linked by observing the DID on-chain or in verifiable credentials. This protects user privacy from third-party trackers and service providers colluding to build a profile.

02

Key Management Overhead

Each pairwise DID requires its own cryptographic key pair and associated metadata. This introduces significant key management complexity:

  • Users must securely store and manage multiple private keys.
  • Recovery mechanisms (e.g., social recovery or sharded key custody) must scale per DID, increasing attack surface and usability challenges compared to a single, reused identifier.
03

Selective Disclosure & Minimal Disclosure

Pairwise DIDs enable selective disclosure within a specific relationship. Users can present different verifiable credentials (e.g., only age proof to one verifier, employment history to another) from the same issuer to different pairwise DIDs, ensuring each counterparty receives only the minimal data necessary. This limits data leakage if one verifier's database is compromised.

04

Relationship-Specific Revocation

Compromise or termination of a single relationship is contained. If a private key for one pairwise DID is leaked, or a user wishes to sever ties with a specific service, they can revoke only that DID and its associated credentials. This is a security advantage over global identifiers, where a single breach affects all relationships.

05

Verifier-Linkability & Sybil Resistance Trade-off

While pairwise DIDs prevent cross-verifier correlation, the verifier (relying party) can still link all interactions and credentials presented to that specific DID. For services requiring Sybil resistance (e.g., one-person-one-vote), additional proofs like zero-knowledge proofs of unique humanity may be needed alongside the pairwise DID to prevent a user from creating infinite identities with the same verifier.

06

On-Chain Privacy Considerations

If pairwise DIDs are anchored to a public blockchain (e.g., as Ethereum ERC-725/735 or ION on Bitcoin), the creation and update transactions are public. While the DIDs themselves are unlinkable, pattern analysis of transaction timing, gas fees, or associated smart contract interactions could theoretically be used for network-level correlation, especially if few users are active.

technical-details
DECENTRALIZED IDENTIFIER

Pairwise DID

A technical deep dive into Pairwise Decentralized Identifiers, a privacy-preserving mechanism for managing digital relationships across different contexts.

A Pairwise Decentralized Identifier (Pairwise DID) is a unique, self-sovereign identifier that is created for each specific relationship between two entities, ensuring that activities in one context cannot be correlated with those in another. Unlike a public DID, which is reused across multiple interactions, a Pairwise DID is generated for a single pairwise relationship, such as between a user and a specific service provider. This architecture is fundamental to privacy-by-design in decentralized identity systems, as it prevents the unintended linkage of a user's activities across different digital services, a common vulnerability in traditional identifier models.

The technical implementation relies on cryptographic key pairs, where each Pairwise DID is bound to a unique set of private and public keys used exclusively for that relationship. When establishing a new connection, such as through a DIDComm protocol, the parties generate a new DID and its associated DID Document containing the new public keys and service endpoints. This document is then recorded on a verifiable data registry, like a blockchain or a distributed ledger, but crucially, the DID itself contains no personally identifiable information. The separation of keys and contexts means a compromise in one relationship does not affect the security of others.

A core use case for Pairwise DIDs is in user-centric identity ecosystems, such as those built on the W3C Verifiable Credentials data model. Here, a holder might use one Pairwise DID with their healthcare provider and a completely different one with their employer, even when presenting credentials from the same issuer. This prevents either verifier from colluding to build a composite profile of the individual. Protocols like OIDC (OpenID Connect) for decentralized identity and ACA-Py agents utilize this pattern to facilitate secure, private, and consent-based data exchanges without creating a central correlation point.

From an architectural perspective, managing Pairwise DIDs introduces challenges in key management and relationship discovery, as an entity must securely store and retrieve the correct key pair for each interaction. Solutions often involve wallet software or identity agents that handle the lifecycle of these identifiers—generation, storage, resolution, and rotation. The DID Resolution process fetches the DID Document associated with a given Pairwise DID to obtain the current public keys and service endpoints necessary for authentication and secure communication, all while maintaining the privacy boundary of the relationship.

PAIRWISE DECENTRALIZED IDENTIFIERS

Frequently Asked Questions (FAQ)

Essential questions and answers about Pairwise Decentralized Identifiers (DIDs), a privacy-preserving identity standard for verifiable credentials and selective disclosure.

A Pairwise Decentralized Identifier (DID) is a unique identifier created for each specific relationship between two parties to prevent correlation across different interactions. It works by generating a distinct DID and its associated DID Document for every new connection, such as between a user and a verifier. This mechanism ensures that activities in one context (e.g., proving age to a bar) cannot be linked to activities in another (e.g., logging into a social media platform), even if the same underlying verifiable credentials are used. The technical foundation is defined in the W3C DID Core specification, enabling this pattern of identifier management for enhanced privacy.

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