Idiomark Identity Verification Service
Implementation Specification - ZK Proof System for Privacy-Preserving Identity Verification
Status: READY FOR IMPLEMENTATION Priority: P0 (Critical Foundation) Estimated Effort: 3-4 weeks Dependencies: None (new package)
1. Overview
Purpose
Build a privacy-preserving identity verification service that:
- Generates zero-knowledge proofs (ZK-SNARKs) for identity claims
- Performs platform attestation (Steam, Xbox, Epic, etc.)
- Stores verification metadata with confidence scoring
- Provides claim validation API for other services
Why This Matters
- Trust Layer: Users must prove "This is my Steam account" without revealing sensitive data
- Anti-Impersonation: ZK proofs prevent fake accounts and bots
- Privacy First: Prove statements without revealing underlying information
- Platform Partnerships: Gaming platforms need verification to integrate Idiomark claims
2. System Architecture
Component Diagram
┌─────────────────────────────────────────────────────────────────────────────┐
│ IDENTITY VERIFICATION SERVICE │
│ │
│ ┌──────────────────────────────────────────────────────────────────────┐ │
│ │ VERIFICATION ENGINE │ │
│ │ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │ │
│ │ │ ZK PROOFS │ │ OPTIMISTIC │ │ PROVING │ │ │
│ │ │ (Privacy) │ │ (Research) │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │
│ │ └──────────────┘ └──────────────┘ └──────────────┘ └──────────────┘ │ │
│ │ │ │
│ ┌──────────────────────────────────────────────────────────────────────┐ │
│ │ PROOF STORAGE │ │
│ │ ┌──────────────────────────────────────────────────────────────┐ │
│ │ │ Encrypted at Rest │ │ In-Memory │ │ │
│ │ │ │ │ │ │ │ │ │ │
│ │ └──────────────────┘ └──────────────┘ └──────────────┘ └──────────────┘ │ │
│ │ │ │
│ ┌──────────────────────────────────────────────────────────────────────┐ │
│ │ CLAIM VALIDATION │ │
│ │ ┌──────────────────────────────────────────────────────────────┐ │
│ │ │ Input │ │ Storage │ │ │ │ │
│ │ └──────────────────┘ └──────────────┘ └──────────────┘ │ │
│ │ │ │
│ ┌──────────────────────────────────────────────────────────────────────┐ │
│ │ PLATFORM ATTESTATION │ │
│ │ ┌──────────────────────────────────────────────────────────────┐ │
│ │ │ Steam API │ │ Xbox API │ │ Epic API │ │ Future │ │ │
│ │ └──────────────────┘ └──────────────┘ └──────────────┘ └──────────────┘ └──────────────┘ │ │
│ │ │ │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
3. Core Components
3.1 ZK Proof Engine
Purpose: Generate zero-knowledge proofs without revealing underlying data
interface ZKProofEngine {
// Generate ZK-SNARK for identity claim
generateProof(claim: IdentityClaim): Promise<IdentityProof>
// Verify proof structure
verifyProof(proof: IdentityProof): Promise<boolean>
// Get proving circuit parameters
getProvingCircuit(claimType: string): CircuitConfig
}
interface CircuitConfig {
circuitType: 'groth16' | 'plonk' | 'babyjub'
proverAddress: string
}
Key Decisions:
| Decision | Option | Rationale |
|---|---|---|
| ZK Circuit Type | Groth16 | Proven, battle-tested, efficient proving |
| Proving Backend | Keep separate initially | Can use proving service later |
| Trusted Setup | Use ceremony service initially | Migrate to self-proving over time |
3.2 Claim Storage
Purpose: Store and retrieve identity claims with metadata
interface ClaimStorage {
// Store claim with generated ZK proof
storeClaim(claim: IdentityClaim): Promise<string>
// Retrieve claims for user/profile
getClaims(userId: string, filter?: ClaimFilter): Promise<IdentityClaim[]>
// Revoke claim (emergency)
revokeClaim(claimId: string): Promise<void>
// Search claims across users/platforms
searchClaims(query: string): Promise<IdentityClaim[]>
}
Storage Options:
- PostgreSQL (production) - Relation queries, ACID transactions
- Redis (caching layer) - Hot data, session state
- S3 (blob storage) - Large proof files
3.3 Platform Attestation
Purpose: Verify identity claims against official platform APIs
interface PlatformAttestation {
// Verify Steam ID
verifySteamClaim(steamId: string): Promise<VerificationMetadata>
// Verify Xbox gamertag
verifyXboxClaim(xboxId: string): Promise<VerificationMetadata>
// Verify PlayStation trophies (unofficial)
verifyPlayStationClaim(psnId: string): Promise<VerificationMetadata>
// Verify Epic Games account
verifyEpicClaim(epicId: string): Promise<VerificationMetadata>
}
Implementation Priority:
- Steam - OAuth + Web API (most documented)
- Xbox - OAuth + Xbox Live API
- Epic Games - OAuth (400M user wedge!)
- PlayStation - Community APIs + trophy tracking
4. API Specification
4.1 REST Endpoints
POST /verify
Body: {
"claim": {
"type": "gaming",
"platform": "steam",
"identifier": "765611980123456"
}
}
Response: {
"proof_id": "proof_abc123",
"verification_metadata": {
"verified": true,
"method": "oauth",
"verified_at": "2026-02-11T12:00:00Z",
"confidence": 0.95,
"verifier": "steam-api"
},
"proof": {
"type": "zk_snark",
"value": "base64encodedproof...",
"created_at": "2026-02-11T12:00:00Z"
}
}
POST /claims/{claimId}/revoke
Response: { success: true }
GET /claims?userId={userId}&platform={platform}&verified={boolean}
Response: {
"claims": [...],
"page": 1,
"total_pages": 10
}
4.2 Data Models
// Extended Idiomark File with identity layer
interface ExtendedIdiomarkFile {
// ...existing fields...
// Identity Layer
identity_claims: IdentityClaim[]
// Verification metadata
verification?: {
self_verified: boolean
platform_verified: Record<string, VerificationMetadata>
proof_cache: Map<string, IdentityProof>
}
}
// New claim structure
interface IdentityClaim {
id: string // Unique claim ID
type: ClaimType // gaming | social | professional | creative
platform: string // steam | xbox | playstation | etc.
identifier: string // Platform-specific ID
verified?: boolean // Has this been verified?
proof?: IdentityProof // Cryptographic proof
created_at: string // ISO timestamp
confidence: number // 0.0 - 1.0
metadata?: VerificationMetadata // Verification details
}
5. Implementation Roadmap
Week 1-2: Foundation
| Task | Status | Deliverable |
|---|---|---|
| ZK Proof Engine | ⏳ TODO | Proof generation circuits, Groth16 integration |
| Claim Storage API | ⏳ TODO | CRUD operations, caching layer |
| Platform Attestation | ⏳ TODO | Steam OAuth client, Xbox client |
| Core Types Package | ⏳ TODO | Define all interfaces |
Week 3-4: MVP Service
| Task | Status | Deliverable |
|---|---|---|
| ZK Proof Service | 🔨 IN PROGRESS | Basic proof generation, storage backend |
| Claim Storage API | 🚧 TODO | REST endpoints with PostgreSQL |
| Steam Attestation | 🚧 TODO | OAuth flow, profile import |
| API Server Framework | 🚧 TODO | Express setup, middleware |
Week 5-6: Integration
| Task | Status | Deliverable |
|---|---|---|
| Xbox Attestation | 🚧 TODO | OAuth client |
| Epic Games Attestation | 🚧 TODO | OAuth client |
| PlayStation Support | 🚧 TODO | Community API integration |
Week 7-8: Testing & Launch
| Task | Status | Deliverable |
|---|---|---|
| Security Audit | ⏳ TODO | Third-party review |
| Private Beta | 🚧 TODO | 100 users, infrastructure ready |
| Documentation | ⏳ TODO | API docs, integration guides |
6. Technical Requirements
6.1 ZK Proof Requirements
| Requirement | Specification |
|---|---|
| Privacy | Zero-knowledge proofs - reveal NOTHING about underlying data |
| Soundness | Proof must be cryptographically secure and unforgeable |
| Efficiency | Proof generation < 2 seconds per claim |
| Recursion | Supporting proof verification and updates |
6.2 API Performance
| Metric | Target |
|---|---|
| Latency | < 100ms (p95) |
| Throughput | 1000+ verifications/second |
| Uptime | 99.9% |
| Error Rate | < 0.1% |
7. Security Considerations
7.1 Threat Model
| Threat | Mitigation |
|---|---|
| Proof Forgery | ZK parameters prevent tampering |
| Claim Stuffing | Rate limits per user/platform |
| Replay Attacks | Nonce + timestamps on proofs |
| Social Engineering | Gradual confidence scoring, require supporting evidence |
7.2 Compliance
| Requirement | Implementation |
|---|---|
| GDPR | User consent, right to deletion, data export |
| KYC | Age verification before platform attestation |
| SOC 2 | Annual security audit, penetration testing |
8. Success Criteria
8.1 Functional
- Generate valid ZK-SNARK proof for test claim
- Store claim with verification metadata
- Verify Steam identity via API
- Verify Xbox identity via API
- Complete proof verification within 2 seconds
8.2 Quality
- All proofs pass cryptographic validation
- Verification confidence scores are accurate (±5%)
- Platform attestations match expected results
- Zero false-positive rate < 0.01%
Next Steps:
- Implement ZK Proof Engine (use snarkjs or similar)
- Build Claim Storage API with PostgreSQL
- Create Steam attestation client
- Set up Express server with middleware
Estimated completion: Week 6-7
Prepared by: Claude (Anthropic) For: Idiomark Universal Identity Implementation Status: READY FOR DEVELOPMENT