Definition
npub and nsec are the two halves of a Nostr identity, encoded in a human-friendly format defined by NIP-19. The npub is your public key — the identifier you share freely so others can follow you and verify your signatures. The nsec is your secret (private) key — the credential that proves you are you. Whoever holds the nsec controls the identity, exactly as whoever holds a Bitcoin private key controls the coins.
Public versus secret
The npub1... prefix marks a public key safe to post anywhere. The nsec1... prefix marks a secret key that must never be shared, pasted into untrusted sites, or stored in plain text. There is no "reset password" on Nostr: if your nsec leaks, an attacker can impersonate you, and if you lose it, the identity is gone. This is the same self-custody responsibility Bitcoiners already understand from seed phrases.
Why it matters for sovereignty
Because your account is a key pair you generate yourself, no company issues it, no company can revoke it, and no company can lock you out. Your social identity becomes portable across every Nostr client and relay. Treat your nsec with the same care as a Bitcoin private key: back it up offline, and consider a signing tool or hardware approach for high-value identities.
D-Central covers key-custody practices across our digital sovereignty hub.
In Simple Terms
npub and nsec are the two halves of a Nostr identity, encoded in a human-friendly format defined by NIP-19. The npub is your public key…
