Skip to main content

Privacy-preserving identity verification SDK for games and applications

Project description

privacy-creds

Privacy-preserving identity verification for games and applications.

Players prove who they are (age, region) without exposing personal data. No names, no IDs, no documents stored — just cryptographic proofs.

The problem

Games need age verification and regional compliance. Current solutions require uploading government ID to a database — creating breach risk and GDPR headaches.

The solution

Player verifies ID once → credential stored on their device →
game receives a yes/no answer → never sees the raw identity data

How it works

  1. KYC provider verifies the player's identity and issues a signed credential
  2. Player's device stores the credential with a device-bound private key
  3. Game sends a random challenge → player signs it → game verifies the signature and checks the claim

The game learns one thing: "Is this player over 18?" Nothing else.

Security layers

Layer Protection
Issuer signatures Prevents forged credentials
Challenge-response Prevents replay attacks
Device binding Prevents credential sharing between devices

Installation

pip install privacy-creds

Quick start

Game backend (verifier)

from privacy_creds import GameVerifier

verifier = GameVerifier(issuer_pubkey_pem=open("issuer_public.pem").read())

# Per player session:
challenge = verifier.create_challenge()
# ... send challenge to player, receive proof back ...
result = verifier.verify(proof, required_age=18)

if result:
    print("Access granted")
else:
    print(f"Denied: {result.reason}")

Player app (wallet)

from privacy_creds import PlayerWallet

wallet = PlayerWallet(user_id="player123")
wallet.setup(credential_from_kyc_provider)

# When game requests verification:
proof = wallet.prove(challenge_from_game)
# ... send proof to game ...

Issuer (KYC provider)

from privacy_creds import Issuer, FileStorage

issuer = Issuer(storage=FileStorage("/secure/path"))
issuer.generate_keys()

credential = issuer.issue(user_id="player123", age=22, country="GB")

Running the demo

git clone https://github.com/cairnintelligence/privacy-creds.git
cd privacy-creds
pip install -e ".[dev]"
python -m examples.demo

Running tests

pytest

Supported age thresholds

  • 13 (COPPA)
  • 16 (GDPR minimum)
  • 18 (most gaming regulations)
  • 21 (US gambling)
  • 25 (rental/financial services)

Roadmap

  • Zero-knowledge proof layer (Noir/zkSNARK)
  • REST API wrapper (FastAPI)
  • React Native player app
  • TPM/Secure Enclave hardware key storage
  • Credential expiry and renewal
  • Multi-issuer trust federation

License

MIT — see LICENSE.

Built by

Cairn Intelligence

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

privacy_creds-0.1.0.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

privacy_creds-0.1.0-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file privacy_creds-0.1.0.tar.gz.

File metadata

  • Download URL: privacy_creds-0.1.0.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for privacy_creds-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6c1b96b00bb073c2bea0a59b8f10d13cce290a3b0d5fa98b03720a61bc6a9eab
MD5 64417b292bf4d17a505ae77cfde4ac1e
BLAKE2b-256 62dbffeee03c53a27a3ce2168925655744e3c29c554622a8b49f89d0f5d53fca

See more details on using hashes here.

File details

Details for the file privacy_creds-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: privacy_creds-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for privacy_creds-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6da67fe6453b7734f15639a3c0f986a7d17a8b07274093539ad190510b01f2fe
MD5 a6360482ff63105effaa9d4213b0dd14
BLAKE2b-256 30459fbddfcc4bf2401defd4bf9201e58f1a6a330ebc54ca33d927776b146b89

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page