Verifiable Credentials

What is a verifiable credential (VC)?

VCs are a W3C standard for digital, cryptographically verifiable credentials. This means they can be stored on digital devices, and you can use cryptography to verify their data and authorship.

Explore use cases for VCs

The following code snippets and UI examples show the main components of a VC and how you can encode them and visualize them. Pick different samples using the tabs to go over various use cases. Learn more

  • ID card
  • University degree
  • Vaccine proof
  • Employment credential
JSON-LD
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
{
  "@context": [
    "https://www.w3.org/2018/credentials/v1"
  ],
  "type": ["VerifiableCredential", "IDCard"],
  "id": "urn:credential:34502108-4540",
  "issuer": "did:web:asgard-state.auth0lab.com",
  "issuanceDate": "2020-07-20T13:58:53Z",
  "credentialSubject": {
    "id": "urn:id-card:personal:1",
    "personalIdentifier": "34502108",
    "name": "Hanna Herwitz",
    "dateOfBirth": "1984-09-17",
    "placeOfBirth": "Asgard City",
    "currentAddress": "24th Street 210, Asgard City, 1023",
    "gender": "Female"
  },
  "credentialStatus": {
    "id": "https://asgard-state.auth0lab.com/vcs/credential/status/14",
    "type": "CredentialStatusList2017"
  }
  "proof": {
    "type": "Ed25519Signature2020",
    "created": "2020-07-20T13:58:53Z",
    "proofPurpose": "assertionMethod",
    "verificationMethod": "https://asgard-state.auth0lab.com/keys/1",
    "proofValue": "z2ty8BNvrKCvAXGqJVXF8aZ1jK5o5uXFvhXJksUXhn61uSwJJmWdcntfqvZTLbWmQHpieyhdcrG43em37Jo8bswvR"
  }
}
EXPLANATION 01 / 04
Type
A credential can have one or more types. It is specified in an array of strings/URIs. The "VerifiableCredential" is mandatory.

The credential type can be used to determine if a specific credential is appropriate for a particular use case. For example, a credential of type "UniversityStudent" might be useful to enter a college campus, but not a company campus.
How VCs work
Understanding the use cases
Stages
1. Credential issuance & storage

A user (Subject) requests a credential from an Issuer. The Issuer includes data about the Subject in a digital credential, including the Subject's identifier—the issuer signs the VC with its private key.

The user receives the VC and stores it in a digital wallet. The digital wallet allows users to store and present VCs of any type.

2. Credential presentation

Later, the Subject is using an application that wants to verify the Subject has a particular VC. The Subject uses the digital wallet to present the credential to the Verifier, signing a Verifiable Presentation (VP) with the Subject's private key.

3. Credential verification

The Verifier cryptographically verifies the VP (it was signed by Subject and original VC signed by Issuer) and checks its validity (for example, it hasn't expired). It obtains the Subject and Issuer public keys from a Verifiable Data Registry.

We are making it easy for developers to leverage Verifiable Credentials
Try it outJoin the community