Revocation Status Lists
cheqd support for Ledger-Agnostic AnonCreds Revocation Status List Objects
cheqd AnonCreds Object Method for Revocation Status List Objects
In the ledger-agnostic AnonCreds specification, Status List Objects contain the state of the cryptographic accumulator and revocation indices at a given point in time. This enables:
Holders of Verifiable Credentials to generate a proof of non-revocation (or not) about their specific credential; and
Verifiers to be able to verify that proof.
A Status List is generated and published immediately on creation of the Revocation Registry Definition Object so that it can be used immediately by holders. Over time, additional Status Lists may be generated and published as the revocation status of one or more credentials within the Revocation Registry change.
In each of these subsequent Revocation Status List Objects, there is an updated cryptographic accumulator value AND an updated list of revoked indices, pointing to the Revocation Registry Definition Object and a location within a Tails File, associated with an index value.
This documentation will guide an implementor of AnonCreds on cheqd on how the cheqd AnonCreds Object Method defines and structures Status List IDs, Request Formats and Response Formats.
AnonCreds Status List Objects
If you are not familiar with the latest Ledger-Agnostic AnonCreds Revocation Registry Definition structure, click the collapsible tile below to learn about the new format.
cheqd Revocation Status List Object ID
cheqd uses DID-Linked Resources to identify individual resources, associated with a DID, using fully resolvable DID URLs.
cheqd resources module uses the following format:
did:cheqd:mainnet:<issuerDid>/resources/<statusListId>
Rather than using a composite string for the Status List ID. The cheqd AnonCreds object method uses a UUID to identify the Revocation Status List Object.
For example, the following DID URL is cheqd's representation of a statusListId
:
did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1J/resources/9d26b902-555d-43bd-bac3-0bedeb462887
Another supported format for a statusListId
may be used in applications where it is important to derive the credDefId
, revocRegDefId
and statusListId
from the same root.
This format uses query-based syntax, for example:
did:cheqd:mainnet:<IssuerDid>?resourceName=<resourceName>&resourceType=<resourceType>
For example:
did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1J?resourceName=universityDegree&resourceType=anonCredsStatusList
Understanding Request vs Response formats
It is important to differentiate between the Request format for creating an AnonCreds object on cheqd, and the Response format, for how an AnonCreds objectshould be compiled by SDKs and the cheqd DID Resolver.
The request format may be specific to each AnonCreds Object Method. However, the response format should be standardised to enable any AnonCreds supported application to understand the object, without needing custom or method-specific logic.
cheqd Status List Request format
The cheqd AnonCreds Status List request format comprises of:
A Resource file for the Status List object content (e.g.
degreeStatusList.json
); andA Payload file (including the signing keys and additional inputs to create a DID-Linked Resource).
Both of these inputs are required to provide the ledger enough information to:
Populate a cheqd DID-Linked Resource; and
Compile a standardised AnonCreds Revocation Registry Definition object in the Response format.
Status List Resource file
Before creating any on-ledger resource transaction, it is important to assemble the required Status List Content and save it as a file locally.
In the example below, the content should be saved as a file, for example: degreeStatusList.json
with the following content:
This Status List Resource file inputs should be replicated where possible within the Payload file, to populate a DID-Linked resource stored on cheqd, with the following mapping:
Resource file field | Resource file input | Payload file field | Payload file input |
---|---|---|---|
"type" | "currentAccumulator" | "resourceType" | "anonCredsStatusList" |
What this means is that if the Resource file has an object of "type" = "currentAccumulator" then this should be written as "resourceType" = "anonCredsStatusList" when creating the Payload file.
Status List Payload File
The Payload file utilises the inputs from the Resource file where possible, mapping common fields across. The Payload file may also require additional inputs to be provided by the creator to create a DID-Linked Resource for inputs not provided in the Resource file.
Below is an example of a Payload file:
When passing the Payload file to the ledger, additional inputs may be required within the Payload file to populate the DID-Linked Resource. In this instance, the only additional information required is:
Additional parameter | Expected input | Rationale |
---|---|---|
"name" | "<insert same name as CredDef and RevocRegDef>" | The Payload file drawing inputs from the Resource file on its own does not provide the ledger the requisite amount of information to create a full DID-Linked Resource. resourceName must be provided as an additional input parameter |
Publishing resource using CLI
For example, the full request format using a CLI should be structured as follows:
cheqd resource Metadata
Once you have created your Status List Object as a resource on cheqd, the following metadata will be generated in the DID Document Metadata associated with did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1J
Next and Previous Status Lists will appear in the resource Metadata when a new Status List is made with the same resourceName
and resourceType
cheqd Status List Response format
Using the cheqd Status List Request format and associated resource metadata, the ledger has enough information to compile the following data structure as a response format.
This can either be compiled by the relevant SDK handling cheqd AnonCreds, or it can be assembled by the cheqd DID resolver.
Compiling Response format in cheqd DID Resolver
The cheqd DID resolver will use the following logic to compile the standardised response format:
If "resourceType=anonCredsStatusList" then append "created" into a field called "timestamp" to the end of the Response Format for the resource presented
Linking Status Lists
To Create a Status List as a new version of a previous Status List, you need to create a new resource.
You must:
Generate a new UUID for the
resourceId
Specify the same
collectionId
Specify the same
resourceName
Specify the same
resourceType
Attach to the transaction the new
resourceFile
with the latestaccum
value andindex
values.
Once the transaction has been created, the resourceMetadata
will look like the following:
Note: The previousVersionId will now link to the previous Revocation Status List ID
Tying CredDef, RevRegDef and StatusList Objects together
Across the cheqd CredDef Object Method, the Revocation Registry Definition Object Method and the StatusList Object Method - each resource is associated with the same issuer DID and Collection ID.
Importantly, this allows each new resource to be indexed and versioned by their:
resourceName
resourceType
New resources can be created to update the existing CredDef or RevRegDef, whilst maintaining the historical state of the previous versions. See the documentation on Publishing a New Version of a Resource to understand this further.
Fetching a cheqd Status List Object
Existing DID Resolvers will be able to query for the Status List Object Content using the same patterns and parameters as the Schema Object found here.
The cheqd AnonCreds method also enables applications to derive the CredDef, Revocation Registry Definition Object and Status Lists from the same root:
Same Resource Name, different Resource type
We propose that the resourceName
for CredDefs, Revocation Registry Definitions and Revocation Status Lists should remain the same when each of these resources is part of the same AnonCred. This will make it easier for resources to query by resourceName
and resourceType
to delineate between the three resources using a common root.
Using this logic, the following queries can be used to dereference to CredDefs, Revocation Registry Definitions and Status Lists, in a way which can derive all three resources from the same root:
Dereference to CredDef
did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1J?resourceName=universityDegree&resourceType=anonCredsCredDef
Dereference to Revocation Registry Definition
did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1J?resourceName=universityDegree&resourceType=anonCredsRevocRegDef
Dereference to Revocation Status List
did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1J?resourceName=universityDegree&resourceType=anonCredsStatusList
Note: across all three of these queries, the resolver would fetch the latest version of the resource by default
Traversing Status Lists Versions using a DID Resolver
Using existing DID Resolvers, it is possible to traverse the history of Status List versions in order to produce proofs of non-revocation required in the AnonCreds Specification.
Obtain all Status List Versions
A DID URL such as the following will display all of the accumulators associated with a particular Status List:
did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1J?resourceName=universityDegree&resourceType=anonCredsStatusList&allResourceVersions=true
Obtain Status List Content at a point in time
Furthermore, it will be possible to query Status Lists at certain times. This may be very useful if you want to prove whether a Verifiable Credential was valid in the past:
did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1J?universityDegree&resourceType=anonCredsStatusList&versionTime=2022-08-21T08:40:00Z
Obtain latest Status List Version
It will be very common for a proof of non-revocation to require the latest Status List and work its way back from there.
The following DID URL will be able to call the latest Status List:
did:cheqd:mainnet:zF7rhDBfUt9d1gJPjx7s1J?universityDegree&resourceType=anonCredsStatusList
Constructing an AnonCred with this logic
The AnonCreds construction below uses this logic to demonstrate how an application could derive the latest Status List using the "rev_reg_id
" since it shares the same root and would only require replacing "anonCredsRevocRegDef" with "anonCredsStatusList".
This is similar to how Hyperledger Indy uses composite strings to derive assoicated AnonCreds Objects from others. For example:
Legacy AnonCreds Revocation Registry Structure
``
Last updated