Verifiable Credential Revocation
The example below demonstrates two methods that an issuer can use to revoke a verifiable credential using the IOTA Identity Framework:
- By using the
credentialStatusfield in a credential and linking to a revocation bitmap, using the
- By removing the verification method that signed the credential. This invalidates all credentials that were signed with that verification method.
One of the ways for an issuer to control the status of its credentials is by using a revocation list. At the most basic level, revocation information for all verifiable credentials issued by an issuer are expressed as simple binary values. The issuer keeps a list of all verifiable credentials it has issued in a bitmap. Each verifiable credential is associated with a unique index in the list. If the binary value of the index in the bitmap is 1 (one), the verifiable credential is revoked, if it is 0 (zero) it is not revoked.
For example, with this approach the issuer adds an index to a credential in the
credentialStatus field, such as
"5". This part of the credential might then look like this:
The verifier uses the
id field (
did:iota:EvaQhPXXsJsGgxSXGhZGMCvTt63KuAFtaGThx6a5nSpw#revocation) to look up the service in the issuer's DID document. This is an example of such a service:
During verification the verifier decodes the revocation bitmap embedded in the
data url. This bitmap written as a bitstring looks like this:
000001. Here, the 5th bit is set, which means the credential with that index is revoked, while all other credentials aren't revoked.
Removing the verification method
A less efficient alternative is to remove the verification method that signed the credential from the DID Document of the issuer. This means the VC can no longer be validated. However, this would invalidate every VC signed with that verification method, meaning the issuer would have to sign every VC with a different key to retain precise control over which credential is revoked.
The following code exemplifies how you can revoke a Verifiable Credential (VC).