Private Key Guide
How to use private keys in the Living Constitution
🔐 Generating Your Key
When you visit the registration page, you can generate a new cryptographically secure private key using the browser's crypto API. This key is your unique identity on the platform.
- Keys are 32 bytes (256 bits) of randomness
- Converted to base64 for human-readable display
- Your public identity is derived via SHA-256 hash
💾 Saving Your Key
Once generated, you MUST save your private key immediately. There is no recovery mechanism.
- Write it down on paper
- Store in a password manager
- Save to an encrypted file
- Never share it except when registering
Warning: Losing your key means losing your account permanently.
🔑 How It Works
The system uses ed25519-style key derivation for simplicity:
- Generate 32 random bytes
- Encode as base64url (no padding)
- Your public key = SHA-256(private_key_bytes)[:20] base64url-encoded
- Authentication: derive public key from submitted private key and compare
🌐 No Emails, No Passwords
Traditional authentication (email + password) is replaced with:
- One-time key generation
- Public key derivation (server never sees private key)
- Session cookies signed with HMAC-SHA256
- All state stored in your browser session
🔄 Logging In
To log in, simply paste your private key. The system derives your public key and matches it against your registered account. No password, no 2FA needed - just your key.