NIP-06: Mnemonic Key Derivation
NIP-06 describes how to derive a Nostr key pair from a mnemonic seed phrase. The current official NIP-06 text is marked draft and optional, and it carries this warning:
Warning
unrecommended: prefer a single nsec
This page covers NIP-06 for historical compatibility. It does not recommend adopting seed derivation.
How it works
According to the current specification, BIP39 is used to generate the mnemonic words and to derive a binary seed from them. BIP32 then derives keys along the path m/44'/1237'/<account>'/0/0, where 1237 is the Nostr entry in SLIP44. A basic client can use account 0. Incrementing the account value yields other keys from the same seed. Two implementations reproduce the same identity only when they agree on the derivation steps and use the correct encodings for the result.
Test vectors
An October 12, 2023 commit added two test vectors, one built from a 12-word mnemonic and one from a 24-word mnemonic. Each lists the expected private key and public key in hex, along with the matching nsec and npub encodings. Developers can use the vectors to cross-check implementations. The vectors say nothing about key custody, do not certify security, and do not guarantee universal interoperability.
See also
Primary sources:
Mentioned in: