Skip to main content

Overview

zkID is a privacy-preserving universal identity system that generates a did:zk decentralized identifier with on-chain verification on both Solana and Starknet.

DID Format

Example:

How It Works

  1. Create Identity: Generate a new zkID with a username and password. The system creates an Ed25519 keypair, unique DID, and password hash using bcrypt.
  2. Generate Proof: Client-side proof generation using Ed25519 signatures. The proof demonstrates ownership of the identity without revealing the private key.
  3. On-Chain Verification: The proof is verified on-chain via Solana Mainnet transaction or Starknet Cairo contract (ZkIDProofRegistry).

Terminal Commands

Register New zkID

Prompts for username and password, then generates your unique did:zk identity with an Ed25519 keypair.

Login

Login with automatic on-chain verification. Supports blockchain selection:

Generate Proof

Generate a cryptographic ownership proof. Requires password to sign with your private key.

Verify On-Chain

Publish proof hash to Solana Mainnet. Server pays gas fees (free for users).

Check Status

Shows your zkID and on-chain verification status on both Solana and Starknet.

View Proof History

Displays all generated and verified proofs.

Logout

Clears authentication data and ends current session.

Help

Shows detailed help for all zkID commands.

API Reference

Register zkID

Response:

Login

Response:

Check Session

Response:

Logout

Response:

On-Chain Architecture

Solana Verification

zkID proofs are stored on Solana Mainnet using a Program Derived Address (PDA) structure. Only the signature hash goes on-chain for privacy.

Starknet Verification

The ZkIDProofRegistry Cairo contract stores zkID proofs on Starknet:

Security Features

  1. Ed25519 Cryptography: Elliptic curve cryptography for secure key generation and signatures.
  2. bcrypt Password Hashing: 10 rounds of bcrypt for password protection.
  3. Client-Side Proof Generation: Private key never leaves your device.
  4. Dual-Chain Verification: Redundancy through verification on both Solana and Starknet.
  5. Replay Protection: Nonce and timestamp prevent proof reuse.
  6. Session-Based Auth: HTTP-only cookies for secure session management.

Example: Full Flow