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.1.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.1-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: privacy_creds-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 b070c7049046a45a093ff40b794949f7f51f3cd7f95daa22e0a42b6212776467
MD5 30904ed4acd432b5d49a3cef788442a9
BLAKE2b-256 a4fe8cd11461f3efc189837178d213ddb696dcb692b814d82fcf21e0cd55c34e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: privacy_creds-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6011a5328ab5bd0ec32c92d16f1ecc5175be38d3c85e63df7adbd45b362f99c0
MD5 84e02e6d3c9f0e355e4900c8bd3ac66c
BLAKE2b-256 39dce41fe39bbae28116df19aff612d626c35aa4e915081663e40e178fd6a155

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