Selective disclosure
Physical identity documents force an all-or-nothing disclosure. Showing your ID card to prove your age also reveals your name, address, and photo. Selective disclosure changes this by allowing credential holders to share only the specific attributes a Relying Party requests, while keeping everything else private.
The Truvity EUDIW Connector enforces selective disclosure through the SD-JWT VC credential format and DCQL query language.
How it works
Selective disclosure relies on cryptographic commitments built into the credential at issuance.
When an issuer creates a credential, they do not sign the attribute values directly. Instead, each sensitive attribute is wrapped with a random salt and hashed. The issuer signs a payload containing these hashes rather than the raw values.
During presentation:
- To disclose an attribute: The wallet sends both the hash (in the signed payload) and the original value with its salt. The connector hashes the value and confirms it matches the signed hash.
- To withhold an attribute: The wallet sends the signed payload but omits the value. The connector sees only the hash, which reveals nothing about the underlying data.
Because the issuer signed the hashes, the connector can verify that disclosed attributes are authentic without needing to see the withheld ones.
The salted-hash selective disclosure mechanism is not unique to SD-JWT. ISO/IEC 18013-5 (mDoc), the other mandatory attestation format in the EUDI ecosystem, also supports selective disclosure.
Requesting specific attributes
For selective disclosure to work, you must specify exactly which attributes you need. You do this through a DCQL query in your presentation request. The query lists the credential type and the specific attributes required.
For example, a bank verifying a customer's identity for account opening might request name and date of birth from a PID credential. The wallet displays this request to the user, who sees exactly what data the bank is asking for. After the user consents, the wallet generates a presentation containing only the requested attributes. All other attributes on the credential remain hidden.
The granularity of selective disclosure depends on how the attestation scheme defines attributes. For example, if an attestation scheme defines "address" as a single attribute, you cannot request only the city—the entire address is either shared or withheld. Attestation schemes that break addresses into separate attributes (street, city, postal code) allow finer-grained disclosure.
Privacy benefits
Data minimization
GDPR Article 5(1)(c) requires that personal data collection be "adequate, relevant and limited to what is necessary." Selective disclosure transforms this legal requirement into a technical enforcement. You request only the attributes you need, and the wallet ensures you never receive anything beyond that.
Unlinkability
Each attribute disclosure includes a unique random salt. This prevents correlation via the cryptographic digests in the signed payload—with unique salts, the same attribute value produces a different hash in every credential issuance, so Relying Parties cannot compare hashes to track a user across sessions. However, salts do not prevent correlation via the disclosed attribute values themselves. If you disclose the same attribute value (for example, a name) to two Relying Parties, those Relying Parties can still correlate the user by comparing the values they received.
The EUDI ecosystem addresses broader Relying Party linkability through additional mechanisms beyond salted hashes, including short-lived attestations (credentials with validity periods brief enough that they expire before meaningful tracking is possible) and batch issuance (issuing multiple instances of the same credential so the holder can use a different instance for each presentation). These mechanisms limit the window during which a given credential can be presented and reduce the ability to correlate presentations over time.
Further reading
- SD-JWT VC credential format—the credential format that enables selective disclosure
- Digital Credentials Query Language (DCQL)—how to specify which attributes to request
- The ephemeral data model—how the connector handles disclosed data without persistence