W3C’s Verifiable Credentials Data Model v1.1

AbstractCredentials are a part of our daily lives; driver's licenses are used to assert that we are capable of operating a motor vehicle, university degrees can be used to assert our level of education, and government-issued passports enable us to travel between countries. This specification provides a mechanism to express these sorts of credentials on the Web in a way that is cryptographically secure, privacy respecting, and machine-verifiable.
Year2019 - 2022 (updated)
Link to the paperhttps://www.w3.org/TR/vc-data-model/
Relevance scoreVery relevant
Quality score5
LabelsStandardization efforts

Introduction

In this note, we provide an overview of the World Wide Web Consortium (W3C)’s specification to express and use (Verifiable) Credentials on the Web.

This is of special relevance because many projects we have examined adhere to such specification.

Note: W3C’s specification is quite detailed, being over 150 pages. Here we only describe some of the most relevant parts we found in it.

Core Data Model

Claims

A claim is a statement made about a subject. Formally it is a triple of the form (subject, property, value). For example, the claim below states that Pat is the alumni of the well-known Example University:

Figure 2. A claim. Source: W3C’s VC specification https://www.w3.org/TR/vc-data-model/

Claims can be combined to form a graph of information:

Figure 3: Three claims combined together to form a graph of information. Source: W3C’s VC specification https://www.w3.org/TR/vc-data-model/

Credentials

A credential is a set of one or more claims made by one entity (the Issuer). It can also contain metadata such as:

A Verifiable Credential (VC) is a credential with (cryptographic) proofs that the Issuer indeed issued the credential and agrees with its claims.

Typically, a proof is a signature of the Issuer on the whole claim.

See Figures 4 and 5, and the captions, for graphical depictions of the different components of a VC.

Figure 4: A basic depiction of the components of a VC. Source: W3C’s VC specification https://www.w3.org/TR/vc-data-model/
Figure 5: Detailed depiction of the components and information flow within a VC. The upper graph contains the claims and the corresponding metadata which forms the credential itself. The lower graph contains the cryptographic keys and signature which form the digital proof of the VC, together with some metadata. Source: W3C’s VC specification https://www.w3.org/TR/vc-data-model/

In Figure 5, the upper graph depicts a W3C credential. In this example the credential’s metadata consists of:

Furthermore, the credential contains a claim, namely that the credential’s subject, Pat, is an alumni of the university that issued the credential.

The lower graph contains a proof that the credential Issuer indeed issued the credential. In this example the proof consists of:

Note: As hinted previously, W3C’s specification also contemplates a scenario in which credentials are not verifiable. In this note we omit discussing such functionality.

The following image depicts

Figure 6: A VC written following JSON-LD syntax. Source: W3C’s VC specification https://www.w3.org/TR/vc-data-model/

How would such a VC be verified? A toy example

The Holder (Pat in our case) can use the above example VC to prove to a verifier that he is an alumni of Example University, without revealing its name.

To do so, it reveals all the VC except the part of the VC where his name (Pat) appears.

Then it proves in zero-knowledge that it knows a value for the “name field” such that, if added to the VC, then the Signature 456 is valid (with respect to the public key of Example University ).

Note: W3C also contemplates the case in which there is no aim at preserving privacy. In that case, the verifier can just check that the Issuer’s signature is valid.

Presentations

Verifiable Presentations (VPs) allow a user to package several VCs together.

Additionally, the authorship of the VP is also verifiable. More precisely, a VP is signed by the entity that formed it, similarly to how the Issuer signs a VC.

The data inside a VP is often about the same subject. However, it may have been issued by multiple issuers.

For example, a VP may contain all education credentials of a subject, with each credential being issued by a different entity.

Figure 7. A basic depiction of the components of a VP. Source: W3C’s VC specification https://www.w3.org/TR/vc-data-model/

As depicted in Figure 5, a VP is composed of one or more VCs together with some metadata around the VP. This metadata can be, e.g., the type of the VP, the terms of use, etc.

Figure 8. Detailed depiction of an example Verifiable Presentation. Source: W3C’s VC specification https://www.w3.org/TR/vc-data-model/

In Figure 8 we have an extension of the example in Figure 5. In this example, Pat’s alumni credential has been packaged into a Verifiable Presentation. An entity called “Example Presenter” has signed the whole VP.

Basic Concepts

Here we provide an overview of the most basic field types that appear in VCs and VPs.

Advanced Concepts

Syntaxes

The specification provided on the website uses only JSON and JSON-LD (an upgraded version of JSON which supports Linked Data). However, systems can also use XML, YAML, or other types which can express data.

Privacy Considerations