Comment on page
Revocation Registry Definitions
cheqd support for Ledger-Agnostic AnonCreds Revocation Registry Definitions
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
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.
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:
revocDefType: the input parameter
type(This is currently always
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
For example, the on-ledger Revocation Registry Definition Object Content is as fol
"z": "1 0BB...386"
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.
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:
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
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
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.
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.
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:
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
Last modified 7mo ago