Nostr Identification Protocol-06 (NIP-06)
Nostr (Notes and Other Stuff Transmitted by Relays) uses clients and relays, and where users run clients, and where anyone can be a relay. Users identify themselves with these public key, and every post to a relay is then signed. There is no communications between relays, and each relay only services its associated clients. A client then subscribes by posting their public key to the relay and then receives updates in a chronological manner.
With Nostr Identification Protocol-06 (NIP-06), we have the basis for a key derivation method using a mnemonic seed phrase using the BIP32 (Bitcoin Improvement Proposal 32) protocol. We can then use the BIP39 protocol that will convert mnemonic seed words into a binary seed and vice-versa. In this way, we create a random key that can identify an account. In this case, we will generate a random seed value, and then use this to create a private key (sk) and then from this, we will create a public key (pk). We can create seed words using:
words,_:=nip06.GenerateSeedWords()
and then generate a key seed from these words with:
seed:=nip06.SeedFromWords(words)
From this seed, we can now create a private key and a public key:
sk,_:=nip06.PrivateKeyFromSeed(seed)
pk, _ := nostr.GetPublicKey(sk)