Skip to content

Digital Credential Query Language (DCQL)

Digital Credential Query Language (DCQL) is a JSON-based query language that standardizes how verifiers request verifiable credentials from holders in the OpenID4VP (Verifiable Presentations) ecosystem. It provides a simpler, more direct approach to credential requests compared to earlier methods, focusing on privacy preservation and ease of implementation.

In digital identity systems, verifiers need to request specific credentials from holders. Without standardization, each verifier would create custom request formats, leading to fragmented implementations. DCQL solves this by providing a standardized way to express credential requirements that any compliant wallet can understand and respond to.

DCQL enables verifiers to specify precisely what credentials they need, which claims within those credentials they require, and what combinations of credentials are acceptable. The wallet evaluates these requirements and returns only the information that matches, preserving user privacy through selective disclosure.

DCQL is designed with several core principles:

Privacy-preserving: Only required data is shared. Verifiers can express preferences for less sensitive claims (like “age_over_21” instead of “birth_date”), and wallets honor these preferences to minimize data disclosure.

Simplified querying: Unlike complex filter-based approaches, DCQL uses straightforward JSON structures to express requirements. Credential queries, credential sets, and claim queries combine to create clear, readable requests.

Format-agnostic: DCQL works with multiple credential formats including mso_mdoc (mobile documents), dc+sd-jwt (SD-JWT VCs), and others, ensuring broad compatibility across the ecosystem.

Standardized: As part of the OpenID4VP specification, DCQL ensures interoperability between different wallets, verifiers, and credential issuers across jurisdictions and use cases.

DCQL consists of four primary components that work together to create comprehensive credential requests:

Credential Queries are the fundamental building blocks, specifying individual credential requirements. Each query defines the credential format, required metadata, optional claims, and trusted issuer constraints.

Credential Sets enable logical combinations of credentials using AND/OR operators. They allow verifiers to express requirements like “Photo ID AND (Utility Bill OR Bank Statement)” in a structured format.

Claim Queries enable selective disclosure by specifying which fields within a credential are required. They support preference ordering, allowing verifiers to request less sensitive data when available.

Trusted Authorities allow verifiers to specify acceptable credential issuers upfront, enabling wallets to filter credentials before disclosure and improving privacy by preventing rejection of credentials from untrusted sources.

The DCQL request and response flow:

  1. Verifier creates DCQL query: The verifier constructs a JSON object containing credential queries, optionally organized into credential sets with specific claim requirements
  2. Query sent to wallet: The DCQL query is transmitted to the holder’s wallet via OpenID4VP
  3. Wallet evaluates requirements: The wallet processes the query against available credentials, checking formats, issuers, and claim availability
  4. Holder selects credentials: The wallet presents matching options to the holder, who chooses which credentials to share
  5. Presentation returned: The wallet creates a verifiable presentation containing selected credentials and returns it to the verifier
  6. Verifier validates response: The verifier checks that the presentation satisfies the DCQL requirements and performs cryptographic verification
sequenceDiagram
    participant Verifier
    participant Wallet
    participant Holder

    Verifier->>Wallet: DCQL Query (via OpenID4VP)
    Wallet->>Wallet: Evaluate credentials
    Wallet->>Holder: Show matching options
    Holder->>Wallet: Select credentials
    Wallet->>Verifier: Verifiable Presentation
    Verifier->>Verifier: Validate & verify

DCQL provides several advantages over previous credential request methods:

  • Clarity: JSON-based structure is human-readable and easy to debug
  • Flexibility: Supports complex credential combinations and alternatives
  • Privacy: Built-in support for selective disclosure and preference ordering
  • Simplicity: More straightforward than filter-based query languages
  • Interoperability: Standard format works across different wallet implementations
  • Trust integration: Native support for specifying trusted issuer frameworks

While both DCQL and Presentation Exchange solve the problem of requesting credentials, they take different approaches:

AspectPresentation ExchangeDCQL
OriginDIF (Decentralized Identity Foundation)OpenID Foundation (OpenID4VP)
ComplexityMore expressive with JSONPath filtersSimpler, more direct queries
StructureNested Input Descriptors in Presentation DefinitionFlat credential queries with sets
Field SelectionJSONPath expressionsPath arrays
CombinationsSubmission RequirementsCredential Sets
AdoptionBroader ecosystem supportFocused on OpenID4VP/EUDI Wallet

Both specifications are valid approaches, and Vidos supports both to ensure maximum interoperability.

DCQL is integrated into Vidos verification workflows:

Authorizer Service: Generates DCQL queries based on authorization policies. When a verification policy requires specific credentials, the Authorizer translates policy rules into DCQL format for transmission via OpenID4VP.

Validator Service: Processes responses to DCQL queries, validating that presentations satisfy the original requirements. It checks credential formats, verifies required claims are present, and ensures credential set logic is satisfied.

Verifier Service: Performs cryptographic verification of credentials included in DCQL responses, validating signatures, checking credential status, and verifying issuer authenticity.

This integration enables Vidos to support modern OpenID4VP-based verification workflows while maintaining privacy and security standards.

DCQL integrates with several key standards:

  • OpenID4VP: DCQL is the native query language for OpenID for Verifiable Presentations
  • W3C Verifiable Credentials: Works with W3C VC data model credentials
  • ISO mDL (mso_mdoc): Supports mobile document format credentials
  • SD-JWT VC: Compatible with Selective Disclosure JWT format
  • DIDs: Works with DID-based credential issuers and holders

DCQL is a core component of the European Digital Identity (EUDI) Wallet ecosystem, enabling standardized credential requests across EU member states. It supports cross-border interoperability while preserving privacy through selective disclosure and data minimization principles aligned with GDPR requirements.

Digital Credential Query Language provides a standardized, privacy-preserving way to request verifiable credentials in OpenID4VP systems. Its straightforward JSON structure, support for selective disclosure, and native trust framework integration make it well-suited for modern digital identity use cases.

In Vidos, DCQL enables simplified credential requests that respect user privacy while ensuring verifiers receive the information they need for authorization decisions.