Keys & Identity
Understanding cryptographic keys and your Nostr identity.
Your Nostr Identity
Your identity on Nostr is defined by a cryptographic key pair:
Public Key (npub)
- Your identifier
- Like a username
- Safe to share
- Others use it to find you
Private Key (nsec)
- Your password
- Proves you're you
- NEVER share
- Guards your identity
Key Formats
Hexadecimal (hex)
- 64 character string
- Original format
- Example:
3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d
Bech32 (npub/nsec)
- Human-readable format
- Error detection
- Easier to handle
- Recommended
Public key: npub1...
Private key: nsec1...
How Keys Work
Signing
- You create content
- Private key signs it
- Signature proves it's from you
- Can't be forged
Verification
- Someone sees your post
- Checks signature with your public key
- Verifies it's really from you
- Cryptographically guaranteed
Key Security
Critical Rules
- ⚠️ NEVER share private key
- ⚠️ NEVER enter on untrusted sites
- ⚠️ NEVER send in messages
- ⚠️ NEVER post publicly
Safe Storage
✅ Password manager ✅ Written on paper ✅ Encrypted file ✅ Hardware wallet ✅ Multiple backups
Unsafe Storage
❌ Plain text file ❌ Screenshots ❌ Email ❌ Cloud notes ❌ Memory alone
Using Keys
Logging In
- Enter private key (nsec)
- Nostria decrypts it
- Uses it to sign actions
- Never leaves your device
Nostr Signing Extensions
Better security through:
- Browser extensions (nos2x, Alby)
- Key stays in extension
- Apps request signatures
- More secure than direct key entry
Multiple Identities
You can have multiple key pairs for:
- Personal vs. professional
- Different communities
- Privacy and anonymity
- Testing
Each pair = independent identity.
Key Recovery
⚠️ No recovery possible
Lost private key = lost account
This is the trade-off for:
- True decentralization
- No corporate control
- Complete ownership
Prevention is everything!
Advanced: Technical Details
- Elliptic curve cryptography (secp256k1)
- Same as Bitcoin
- Public key derived from private key
- Schnorr signatures (NIP-01)