Skip to main content

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:

DecisionOptionRationale
ZK Circuit TypeGroth16Proven, battle-tested, efficient proving
Proving BackendKeep separate initiallyCan use proving service later
Trusted SetupUse ceremony service initiallyMigrate 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:

  1. Steam - OAuth + Web API (most documented)
  2. Xbox - OAuth + Xbox Live API
  3. Epic Games - OAuth (400M user wedge!)
  4. 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​

TaskStatusDeliverable
ZK Proof Engine⏳ TODOProof generation circuits, Groth16 integration
Claim Storage API⏳ TODOCRUD operations, caching layer
Platform Attestation⏳ TODOSteam OAuth client, Xbox client
Core Types Package⏳ TODODefine all interfaces

Week 3-4: MVP Service

TaskStatusDeliverable
ZK Proof Service🔨 IN PROGRESSBasic proof generation, storage backend
Claim Storage API🚧 TODOREST endpoints with PostgreSQL
Steam Attestation🚧 TODOOAuth flow, profile import
API Server Framework🚧 TODOExpress setup, middleware

Week 5-6: Integration

TaskStatusDeliverable
Xbox Attestation🚧 TODOOAuth client
Epic Games Attestation🚧 TODOOAuth client
PlayStation Support🚧 TODOCommunity API integration

Week 7-8: Testing & Launch

TaskStatusDeliverable
Security Audit⏳ TODOThird-party review
Private Beta🚧 TODO100 users, infrastructure ready
Documentation⏳ TODOAPI docs, integration guides

6. Technical Requirements​

6.1 ZK Proof Requirements​

RequirementSpecification
PrivacyZero-knowledge proofs - reveal NOTHING about underlying data
SoundnessProof must be cryptographically secure and unforgeable
EfficiencyProof generation < 2 seconds per claim
RecursionSupporting proof verification and updates

6.2 API Performance​

MetricTarget
Latency< 100ms (p95)
Throughput1000+ verifications/second
Uptime99.9%
Error Rate< 0.1%

7. Security Considerations​

7.1 Threat Model​

ThreatMitigation
Proof ForgeryZK parameters prevent tampering
Claim StuffingRate limits per user/platform
Replay AttacksNonce + timestamps on proofs
Social EngineeringGradual confidence scoring, require supporting evidence

7.2 Compliance​

RequirementImplementation
GDPRUser consent, right to deletion, data export
KYCAge verification before platform attestation
SOC 2Annual 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:

  1. Implement ZK Proof Engine (use snarkjs or similar)
  2. Build Claim Storage API with PostgreSQL
  3. Create Steam attestation client
  4. Set up Express server with middleware

Estimated completion: Week 6-7


Prepared by: Claude (Anthropic) For: Idiomark Universal Identity Implementation Status: READY FOR DEVELOPMENT