Revocations
Overview
A credential with a revocationāpurpose status entry indicates that its valid/invalid state is determined by a Bitstring Status List maintained onāchain. The verifier must:
Detect the presence of a revocationāpurpose
credentialStatus
entry.Resolve and fetch the onāchain revocation list.
Decode the bitstring and inspect the bit at the credentialās
statusListIndex
.Reject the VC if that bit is set (1), otherwise allow validation to continue.
Integration Point
Location in code:
VcValidators.validateVc()
This is where existing validation checks occur (proof, issuer DID, subject matching). After those checks, insert the revocation validation logic described below.
Revocation Validation Steps
Extract
credentialStatus
from the VCRead the VCās
credentialStatus
array.Look for an entry where:
type
equals"BitstringStatusListEntry"
, andstatusPurpose
equals"revocation"
.
If no such entry exists, skip revocation validation and treat the VC as valid.
Parse the
statusListCredential
URIThe
credentialStatus
entry contains astatusListCredential
field in this format:Extract:
{issuerDid}
ā the DID of the issuer, and{resourceId}
ā the identifier of the onāchain resource.
Fetch the Revocation List from the Blockchain
Call:
If the call returns a āresource not foundā error, assume no revocation list has been published for this credential. In that case, allow the VC to pass validation (revocation cannot be determined).
Decode the Retrieved Data
The returned data is a byte array containing a compressed (gzipped) bitstring in Base64 form.
First decode the byte array from Base64 to obtain the raw gzip bytes.
Then decompress (gunzip) to recover the full bitstring as a sequence of bytes.
Inspect the Bit at
statusListIndex
From the
credentialStatus
entry, read the numericstatusListIndex
.Within the decompressed bitstring, locate the bit at that index.
A bit value of
1
means the credential is revoked.A bit value of
0
means the credential is not revoked.
If the bit is
1
, immediately fail validation (the VC is revoked).If the bit is
0
, continue with any remaining validation steps (proof verification, expiration check, etc.).
Example credentialStatus
Entry
credentialStatus
EntrystatusListCredential
:ssi://did:example:12345/statusList3
ā split intoissuerDid = did:example:12345
andresourceId = statusList3
.statusListIndex
:94567
ā the index of the bit to check in the decompressed bitstring.
Failure Modes
Resource Not Found
If
getLinkedResource(...)
indicates the onāchain revocation list does not exist, treat the VC as not revoked (do not fail).
Network or Decode Errors
If fetching or decoding the bitstring fails unexpectedly, the verifier may optionally treat the status as indeterminate and reject the VC, or fall back to a local policy. The exact behavior should align with your security requirements.
Summary
When a VC includes a revocationāpurpose status entry:
Check for
type: BitstringStatusListEntry
andstatusPurpose: revocation
.Fetch the onāchain revocation list via
getLinkedResource(blockchainRpcUrl, issuerDid, resourceId)
.If not found, allow the VC. If found, decode from Base64 ā gzip ā raw bytes.
Read the bit at
statusListIndex
:1
ā credential revoked ā fail validation.0
ā credential not revoked ā continue validation.
Add this section under your Verifier documentation to ensure all VCs with a revocation entry are properly checked before being accepted.
Last updated