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
- KYC provider verifies the player's identity and issues a signed credential
- Player's device stores the credential with a device-bound private key
- 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b070c7049046a45a093ff40b794949f7f51f3cd7f95daa22e0a42b6212776467
|
|
| MD5 |
30904ed4acd432b5d49a3cef788442a9
|
|
| BLAKE2b-256 |
a4fe8cd11461f3efc189837178d213ddb696dcb692b814d82fcf21e0cd55c34e
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6011a5328ab5bd0ec32c92d16f1ecc5175be38d3c85e63df7adbd45b362f99c0
|
|
| MD5 |
84e02e6d3c9f0e355e4900c8bd3ac66c
|
|
| BLAKE2b-256 |
39dce41fe39bbae28116df19aff612d626c35aa4e915081663e40e178fd6a155
|