Revocation Registry Definitions
cheqd support for Ledger-Agnostic AnonCreds Revocation Registry Definitions
In the ledger-agnostic AnonCreds specification, a Revocation Registry Definition Object acts as an on-ledger hub for revocation, providing a central point information about the:
typeof Revocation Registry (In Indy this is always "
cred_def_id: Each Revocation Registry must be linked to one specific Credential Definition.
tag: An issuer-specified name for the Revocation Registry, to ensure consistency when referencing the registry.
maxCredNum: The maximum amount of Credentials that can be revoked in the Revocation Registry before a new one needs to be started.
A Tails File is a large file containing a cryptographic accumulator value of prime numbers multiplied together. When a Credential is revoked, the value of the accumulator changes, removing the cryptographic value of the Credential as a factor of the accumulator value.
Each credential issued using the Revocation Registry Definition is given its own index (1 to the
While not required, the Indy community has created a component, the “Indy Tails Server,” which is basically a web server for storing Tails Files.
This documentation will guide an implementor of AnonCreds on cheqd on how the cheqd AnonCreds Object Method defines and structures Revocation Registry Definition IDs and associated content.
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.
Each specific AnonCreds identifier must be defined within an AnonCreds Object Method in the AnonCreds Object Method Registry.
This means that an AnonCreds Revocation Registry Object ID does not need to be formatted in any particular syntax, in the latest version of the AnonCreds Specification.
The required content and data model for the AnonCreds Revocation Registry Definition Object are as follows:
issuerId- the Issuer Identifier of the revocation registry. MUST adhere to Issuer Identifiers rules and MUST be the same
issuerIdas the Credential Definition on which the Revocation Registry is based.
revocDefType: the input parameter
type(This is currently always
tag- an arbitrary string defined by the [ref: issuer], enabling an [ref: issuer] to create multiple Revocation Registry Definitions for the same Credential Definition.
value- The value of the revocation registry definition
publicKeys- Public keys data for signing the accumulator; the public key of a private/public key pair
accumKey- Accumulator key for signing the accumulator
z- a public key used to sign the accumulator (described further below)
maxCredNum- The maximum amount of Credentials that can be revoked in the Revocation Registry before a new one needs to be started
tailsLocation- The URL pointing to the related tails file
tailsHash- The hash of the tails file TAILS_FILE (see also: next section) resulting from hashing the tails file version prepended to the tails file as SHA256 and then encoded to base58.
For example, the on-ledger Revocation Registry Definition Object Content is as fol
"z": "1 0BB...386"
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:
Rather than using a composite string for the Revocation Registry Definition Resource ID. The cheqd AnonCreds object method uses a UUID to identify the Revocation Registry Definition Object Content.
For example, the following DID URL is cheqd's representation of a
Another supported format for a
revocRegDefIdmay be used in applications where it is important to derive the
statusListIdfrom the same root.
This format uses query-based syntax, for example:
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.
The cheqd revocation registry definition request format comprises of:
- 1.A Resource file for the Revocation Registry Definition object content (e.g.
- 2.A 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:
Before creating any on-ledger resource transaction, it is important to assemble the required Revocation Registry Definition Object Content and save it as a file locally.
In the example below, the content should be saved as a file, for example:
degreeRevocRegDef.jsonwith the following content:
"z": "1 0BB...386"
Note: The associated Credential Definition specified must have enabled revocation support for the Revocation Registry Definition to be able to be used properly in an SDK.
This Revocation Registry Definition Resource file fields 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
What this means is that if the Resource file has an object of "type" = "CL_ACCUM" then this should be written as "resourceType" = "anonCredsRevocRegDef" when creating the 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:
"name": "universityDegree", // this is an additional input
"version": "2.0", // this is an optional additional input
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:
"<insert same name as CredDef>"
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
For example, the full request format using a CLI should be structured as follows:
cheqd-noded tx resource create [payload.json] [degreeRevocRegDef.json] \
--chain-id cheqd \
--keyring-backend test \
--output json \
--fees 10000000000ncheq \
--gas auto \
--gas-adjustment 1.8 \
--from base_account \
Once you have created your Revocation Registry as a resource on cheqd, the following metadata will be generated in the DID Document Metadata associated with
Using the cheqd Revocation Registry Definition 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 associated SDK handling cheqd AnonCreds, or it can be assembled by the cheqd DID resolver.
"z": "1 0BB...386"
The cheqd DID resolver will use the following logic to compile the standardised response format:
If "resourceType=anonCredsRevocRegDef" then append "issuerId" to the beginning of the Response Format for the resource presented
To create a Revocation Registry Definition on cheqd, you should follow the tutorials for creating a DID-Linked Resource here, and pass the relevant JSON file for the object in the transaction.
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:
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.
Existing DID Resolvers will be able to query for the Revocation Registry Definition 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:
We propose that the
resourceNamefor CredDefs, Revocation Registry Definitions and 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
resourceTypeto 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:
Note: across all three of these queries, the resolver would fetch the latest version of the resource by default
The AnonCreds construction below uses this logic to demonstrate how an application could derive the latest Revocation 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:
Like both the Legacy Schema Object ID and the Legacy CredDef Object ID, the Legacy Revocation Registry Definition Object ID was defined as a composite string of the following information:
Publisher DID: The DID of the creator of the revocation registry. Generally this will be the same publisher as the creator of the CredDef Object.
Object Type: An integer denoting the type of object.
4is used for Revocation Registry Objects.
Revocation Registry Type: The type of Revocation Registry used, this is by default always "
tag: A unique name or tag given to the Revocation Registry Object.
revocRegDefIdtherefore was formatted in the following way:
For example a Legacy AnonCreds
Through combining each of the components into one string, it provides client applications all of the information they need to know about the Revocation Registry Definition Object in a simple and easily consumable format.
This is important to mention, since many client applications may still expect RevRegDef IDs or RevRegDef Content to contain the information or specific syntax of this Legacy