Skip to navigation

Verification Flow

View as Markdown

Verification is the process by which a Verifier cryptographically validates a Verifiable Credential or Verifiable Presentation.

Verification Flow Overview

Proof Request

A verifier initiates verification by sending a proof request to the holder:

{
"type": "https://didcomm.org/present-proof/3.0/request-presentation",
"id": "proof-req-001",
"from": "did:adi:verifier001...",
"to": ["did:adi:holder001..."],
"body": {
"goal_code": "verify.degree",
"will_confirm": true,
"presentation_definition": {
"id": "degree-verification",
"input_descriptors": [
{
"id": "degree-credential",
"name": "University Degree",
"purpose": "Verify the applicant holds a bachelor's degree",
"constraints": {
"fields": [
{
"path": ["$.credentialSubject.degree.type"],
"filter": { "type": "string", "const": "BachelorDegree" }
},
{
"path": ["$.credentialSubject.degree.university"],
"filter": { "type": "string" }
}
]
}
}
]
}
}
}

This follows the DIF Presentation Exchange v2 format.

Verify a Credential

Request

POST /api/v1/credentials/verify
Content-Type: application/json
{
"credential": {
"@context": ["https://www.w3.org/2018/credentials/v1", "..."],
"type": ["VerifiableCredential", "UniversityDegreeCredential"],
"issuer": "did:adi:issuer001...",
"issuanceDate": "2026-03-28T10:00:00Z",
"credentialSubject": { "..." },
"credentialStatus": { "..." },
"proof": { "..." }
}
}

Response

{
"verified": true,
"checks": {
"proof": {
"status": "valid",
"type": "Ed25519Signature2020",
"verificationMethod": "did:adi:issuer001...#key-1"
},
"issuer": {
"status": "valid",
"did": "did:adi:issuer001...",
"active": true
},
"schema": {
"status": "valid",
"schemaId": "did:adi:schema:university-degree-v1"
},
"expiration": {
"status": "valid",
"expirationDate": "2030-12-31T23:59:59Z"
},
"revocation": {
"status": "valid",
"revoked": false,
"checkedAt": "2026-03-28T12:00:00Z"
}
},
"warnings": []
}

Verify a Presentation

Request

POST /api/v1/presentations/verify
Content-Type: application/json
{
"presentation": {
"@context": ["https://www.w3.org/2018/credentials/v1"],
"type": ["VerifiablePresentation"],
"holder": "did:adi:holder001...",
"verifiableCredential": [ { "..." } ],
"proof": {
"type": "Ed25519Signature2020",
"challenge": "abc123-verifier-nonce",
"domain": "https://verifier.example.com",
"proofValue": "z4Abc123..."
}
},
"challenge": "abc123-verifier-nonce",
"domain": "https://verifier.example.com"
}

Response

{
"verified": true,
"presentationChecks": {
"holderProof": "valid",
"challenge": "matched",
"domain": "matched"
},
"credentialResults": [
{
"index": 0,
"type": "UniversityDegreeCredential",
"verified": true,
"checks": {
"proof": "valid",
"issuer": "valid",
"schema": "valid",
"expiration": "valid",
"revocation": "valid"
}
}
]
}

Verification Checks Explained

1. Proof Integrity

The cryptographic signature is verified:

  • Resolve the verificationMethod from the issuer’s DID Document
  • Extract the public key
  • Verify the signature over the canonicalized credential data

2. Issuer DID Resolution

  • Resolve the issuer DID from the ADI blockchain
  • Confirm the DID is not deactivated
  • Confirm the verification method exists in the DID Document
  • Confirm the key is listed in the assertionMethod relationship

3. Schema Compliance

  • Fetch the schema from the Schema Registry
  • Validate credentialSubject attributes against the schema

4. Expiration

  • Compare expirationDate against current time
  • If expired, the credential is invalid

5. Revocation

  • Query the Revocation Registry using credentialStatus
  • Check the specific statusListIndex in the StatusList2021 bitstring
  • If the bit is set, the credential has been revoked

Selective Disclosure Verification

For BBS+ credentials, the verifier receives a derived proof:

POST /api/v1/presentations/verify
Content-Type: application/json
{
"presentation": {
"verifiableCredential": [
{
"credentialSubject": {
"id": "did:adi:holder001...",
"degree": {
"type": "BachelorDegree",
"university": "MIT"
}
},
"proof": {
"type": "BbsBlsSignatureProof2020",
"nonce": "verifier-nonce",
"proofValue": "DerivedProof123..."
}
}
]
}
}

The verifier only sees the disclosed attributes (type and university), but can verify they were part of a validly signed credential.

Verification Failures

FailureDescriptionMitigation
INVALID_SIGNATUREProof signature does not verifyCredential may be tampered
ISSUER_DEACTIVATEDIssuer DID is deactivatedContact issuer for re-issuance
CREDENTIAL_EXPIREDCurrent time > expirationDateRequest updated credential
CREDENTIAL_REVOKEDCredential is in revocation listCredential is no longer valid
SCHEMA_MISMATCHClaims do not match schemaPossible schema version mismatch
CHALLENGE_MISMATCHVP challenge does not matchPossible replay attack
KEY_NOT_FOUNDVerification method not in DID DocKey may have been rotated