Proof Verification
How to verify ProofPacks and attestations from Zipwire Attest users, including technical verification steps and developer integration.
Overview
When someone shares a ProofPack with you, you can verify its authenticity and integrity without needing access to the original documents. This page explains how to verify ProofPacks and understand what information has been shared.
Note: This page covers technical verification of ProofPack data structures. For general wallet verification and trust assessment, see Verifying Attested Wallets.
Understanding Proof vs. Wallet Verification
There are two complementary levels of verification:
Wallet Verification (General)
Purpose: Determine if a wallet owner is trustworthy
Focus: Who owns the wallet, when it was attested, transaction patterns
When to use: Before accepting any data from a wallet owner
Tools: EAS Scan, block explorers, transaction history
Proof Verification (Technical - This Page)
Purpose: Verify the authenticity and integrity of shared data
Focus: Cryptographic verification of ProofPack structures and attestations
When to use: After establishing wallet trust, to verify specific shared data
Tools: Code libraries, cryptographic verification, blockchain APIs
Workflow: First verify the wallet is trustworthy, then verify the specific data they share.
What is a ProofPack?
A ProofPack is a layered, privacy-preserving data exchange format that contains:
Merkle Exchange Document - The actual data with selective disclosure
Attested Merkle Exchange Document - Blockchain attestation metadata
JWS Envelope - Cryptographic signatures for tamper-proofing
For complete technical details, see the ProofPack specification on GitHub.
AI and LLM Integration
ProofPack's structured JSON format is ideal for AI-driven automation and verification. Large Language Models (LLMs) can already:
Current LLM Capabilities
Decode ProofPack JSON - Parse and understand the structure automatically
Extract leaf data - Decode hex-encoded content from leaves
Write verification scripts - Generate code to verify Merkle proofs
Execute verification logic - Run scripts to check data integrity
Analyze proof content - Understand what data has been revealed
Example: LLM Verification
LLMs like Google Gemini (June 2025) have demonstrated the ability to:
Parse ProofPack JSON structure
Decode hex-encoded leaf data
Write Python scripts to verify leaf hashes against the root hash
Execute verification without human intervention
Blockchain Connectivity Limitation
The only current limitation for LLMs is blockchain connectivity:
EAS verification - Checking attestations on Base blockchain
Chain connectivity - Accessing on-chain attestation data
MCP requirement - Need Model Context Protocol (MCP) server for Base connection
Future Potential
With MCP servers providing blockchain connectivity, LLMs could:
Fully automated verification - Complete end-to-end proof verification
Real-time attestation checking - Verify on-chain attestation status
Trust chain validation - Follow complete verification chains
Intelligent proof analysis - Understand context and validity
This represents a significant step toward AI-driven, secure verification without human intervention.
Simple Future Workflow
In the future, users will be able to simply drop a ProofPack JSON into an AI and it will automatically:
Parse the structure and understand what type of proof it is
Decode the data and extract the relevant information
Write verification scripts to check the proof's integrity
Connect to blockchain (via MCP) to verify attestations
Provide results with confidence levels and explanations
No technical knowledge required - just paste and verify.
Verification Process
1. Verify JWS Envelope (Outermost Layer)
The JWS envelope provides cryptographic signatures to ensure the document hasn't been tampered with.
What to Check:
Signature Validity: Verify at least one valid signature (RS256, ES256K)
Tamper Detection: Ensure the signature covers both header and payload
No Blockchain Required: JWS verification can be done offline
Example Verification:
// NOTE: This is conceptual code - no JavaScript SDK is currently available
// Manual verification using the ProofPack specification is required
const isValidSignature = await verifyJWS(proofPack, publicKey);
if (!isValidSignature) {
throw new Error("ProofPack signature is invalid");
}
2. Verify Merkle Tree (Innermost Layer)
The Merkle tree ensures data integrity and enables selective disclosure.
What to Check:
Minimum Leaves: Confirm at least two leaves exist
Metadata Leaf: First leaf must contain valid metadata
Content Types: Validate MIME types of revealed data
Hash Verification: Recompute leaf hashes and verify against root
Example Verification:
// NOTE: This is conceptual code - no JavaScript SDK is currently available
// Manual verification using the ProofPack specification is required
// Verify Merkle tree structure
const leaves = proofPack.merkleTree.leaves;
if (leaves.length < 2) {
throw new Error("ProofPack must have at least 2 leaves");
}
// Verify first leaf is metadata
const metadataLeaf = leaves[0];
if (metadataLeaf.contentType !== "application/json") {
throw new Error("First leaf must contain metadata");
}
// Verify revealed data hashes
for (const leaf of leaves) {
if (leaf.data && leaf.salt) {
const computedHash = hash(leaf.data + leaf.salt);
if (computedHash !== leaf.hash) {
throw new Error("Leaf hash verification failed");
}
}
}
3. Verify Blockchain Attestation (Middle Layer)
The blockchain attestation links the data to verifiable on-chain trust records.
What to Check:
EAS Attestation: Verify attestation exists on Base blockchain
Attester Validation: Confirm attestation from Zipwire's address
Schema Validation: Ensure correct schema type (IsAHuman or Private Data)
Revocation Check: Verify attestation is not revoked
Timestamp Validation: Check attestation is current
Example Verification:
// NOTE: This is conceptual code - no JavaScript SDK is currently available
// Manual verification using the ProofPack specification is required
// Verify on-chain attestation
const attestation = await eas.getAttestation(proofPack.attestation.eas.attestationUid);
// Check attester
const isValidAttester = attestation.attester === "0x2651e..."; // Zipwire's address
if (!isValidAttester) {
throw new Error("Invalid attester");
}
// Check revocation
if (attestation.revoked) {
throw new Error("Attestation has been revoked");
}
// Check schema
const isValidSchema = attestation.schema === expectedSchemaUid;
if (!isValidSchema) {
throw new Error("Invalid schema");
}
Trust Chain Verification
ProofPack enables verifiable trust chains through blockchain attestations.
Example Trust Chain:
Date of Birth ← Passport ← Zipwire ← Yoti ← iBeta ← NIST
Verification Steps:
Verify NIST attestation to iBeta's testing capabilities
Verify iBeta attestation to Yoti's MyFace technology
Verify Yoti attestation to Zipwire's implementation
Verify Zipwire attestation to passport verification
Verify passport authority to the date of birth
Real-World Verification Examples
Note: The following examples show simplified data for clarity. In practice, leaf data is normally hex-encoded JSON key-value pairs, but can conceivably be any data including images or audio.
Age Verification
{
"merkleTree": {
"leaves": [
{
"contentType": "application/json",
"data": "{\"documentType\":\"passport\",\"verificationDate\":\"2024-01-01\"}"
},
{
"contentType": "text/plain",
"data": "1990-05-15",
"salt": "random_salt_bytes",
"hash": "computed_hash"
}
],
"root": "0x1316fc0f..."
},
"attestation": {
"eas": {
"network": "base",
"attestationUid": "...",
"schema": "PrivateData"
}
}
}
Actual Implementation: Leaf data would be hex-encoded JSON like:
{
"contentType": "application/json",
"data": "0x7b22646f63756d656e7454797065223a2270617373706f7274222c22766572696669636174696f6e44617465223a22323032342d30312d3031227d",
"salt": "0x1234567890abcdef...",
"hash": "0xabcdef1234567890..."
}
Nationality Verification
{
"merkleTree": {
"leaves": [
{
"contentType": "application/json",
"data": "{\"documentType\":\"passport\"}"
},
{
"contentType": "text/plain",
"data": "United Kingdom",
"salt": "random_salt_bytes",
"hash": "computed_hash"
}
],
"root": "0x1316fc0f..."
}
}
Actual Implementation: Leaf data would be hex-encoded like:
{
"contentType": "text/plain",
"data": "0x556e69746564204b696e67646f6d",
"salt": "0xfedcba0987654321...",
"hash": "0x9876543210fedcba..."
}
Developer Integration
Manual Verification (Current)
Important: No JavaScript SDK is currently available for ProofPack verification. All verification must be done manually using the ProofPack specification.
// NOTE: This is conceptual code - no JavaScript SDK is currently available
// Manual verification using the ProofPack specification is required
// Complete verification workflow
async function verifyProofPack(proofPack) {
// 1. Verify JWS envelope
await verifyJWS(proofPack);
// 2. Verify Merkle tree
await verifyMerkleTree(proofPack.merkleTree);
// 3. Verify blockchain attestation
await verifyAttestation(proofPack.attestation);
// 4. Extract revealed data
const revealedData = extractRevealedData(proofPack);
return {
isValid: true,
data: revealedData,
attestation: proofPack.attestation
};
}
Current Verification Options
Since no SDK is available, verification must be done using:
Manual implementation following the ProofPack specification
EAS libraries for blockchain attestation verification
Standard JWS libraries for signature verification
Custom Merkle tree verification functions
Future SDK Integration
When ProofPack SDK becomes available (no timeline currently available):
// Future SDK usage (conceptual)
const verification = await proofPackSDK.verify(proofPackData);
if (verification.isValid) {
console.log("Verified data:", verification.data);
}
Security Considerations
Privacy Protection
Selective Disclosure: Only requested data is revealed
Salt Protection: Prevents preimage attacks on hashes
No Original Data: Original documents are never shared
Integrity Assurance
Cryptographic Proofs: Merkle trees ensure data integrity
Blockchain Verification: On-chain attestations prevent tampering
Signature Validation: JWS envelopes provide tamper-proofing
Trust Verification
Attester Validation: Confirm trusted source (Zipwire)
Revocation Checking: Ensure attestation is still valid
Timestamp Validation: Verify attestation is current
Common Verification Scenarios
For Age-Restricted Services
User shares ProofPack revealing only date of birth
Service verifies ProofPack integrity
Service checks attestation is from Zipwire
Service calculates age from date of birth
Service grants access if age requirement met
For Compliance Requirements
User shares ProofPack revealing specific compliance fields
Platform verifies ProofPack and attestation
Platform checks attestation is not revoked
Platform uses verified data for compliance reporting
For Identity Verification
User shares ProofPack revealing nationality
Service verifies ProofPack authenticity
Service confirms attestation from trusted source
Service grants access based on nationality
Troubleshooting
Common Issues
Invalid Signature: Check JWS envelope and public keys
Merkle Tree Error: Verify leaf structure and hash computations
Attestation Not Found: Check EAS Scan for attestation existence
Revoked Attestation: Attestation may have been revoked by Zipwire
Expired Attestation: Check timestamp and validity period
Verification Tools
EAS Scan: https://base.easscan.org/
JWS Verification: Use standard JWS libraries
Merkle Tree Tools: Implement hash verification functions
ProofPack Specification: Manual verification using the official specification
Related Resources
Verifying Attested Wallets - General wallet trust assessment
Last updated