Skip to content

BIP85: add Nostr application - #2126

Open
ethicnology wants to merge 3 commits into
bitcoin:masterfrom
ethicnology:bip85-nostr-application-86
Open

BIP85: add Nostr application#2126
ethicnology wants to merge 3 commits into
bitcoin:masterfrom
ethicnology:bip85-nostr-application-86

Conversation

@ethicnology

@ethicnology ethicnology commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

BIP-85: the Nostr path

Adds BIP-85 application number 128002' for deterministic Nostr private-key derivation.

Derivation path:

m/83696968'/128002'/{identity}'/{account_index}'

identity selects an independent, unlinkable Nostr key namespace; account_index selects a key within that identity. Indices 0' are reserved for future key-management semantics.

The first 32 bytes of BIP-85 entropy are used as the secp256k1 secret key and encoded as an nsec according to NIP-19.

@ethicnology ethicnology changed the title feat(BIP85): add Nostr application BIP85: add Nostr application Mar 20, 2026

@murchandamus murchandamus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn’t strike me as related to Bitcoin. Perhaps this would be better directed at the NIPs repository.

@ethicnology

Copy link
Copy Markdown
Contributor Author

Hello @murchandamus

I'm surprised by this reaction since most of the applications specified in this BIP are not directly Bitcoin related either (RSA, Dice, Passwords...)

@murchandamus

murchandamus commented Mar 20, 2026

Copy link
Copy Markdown
Member

Maybe I reacted too quickly. @akarve, please let us know whether you are interested in accepting this PR.

@murchandamus murchandamus reopened this Mar 20, 2026
@murchandamus murchandamus added Proposed BIP modification PR by non-owner to update BIP content Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified labels Mar 20, 2026
@akarve

akarve commented Mar 21, 2026

Copy link
Copy Markdown
Contributor

Maybe I reacted too quickly. @akarve, please let us know whether you are interested in accepting this PR.

Thanks for caring, @murchandamus.

@ethicnology nostr could be a reasonable BIP85 app. I'm probably missing something about nostr since I don't know it deeply, so I will ask a few basic questions to make sure we aren't reinventing any wheels. Looking at NIP-06 there are BIP32 and BIP39 derivations for nostr keys. BIP85 already has apps for 32' and 39'.

  • What is missing if one just assigns an integer key index for either app as their nostr index and then derives the nsec and npub?
  • How does your proposed derivation relate to the recommended BIP32 m/44'/1237'/<account>'/0/0 derivation?

For later (if we get there):

  • Higher app numbers are better (less collisions, higher = later, saves room for BIPs) so I'd recommend one number per letter of nostr
  • I am updating the linked reference implementation to have an app protocol soon and would request if we move forward that you extend the same https://github.com/akarve/bipsea

@ethicnology

Copy link
Copy Markdown
Contributor Author

Hi @akarve, thanks for taking the time

What is missing if one just assigns an integer key index for either app as
their nostr index and then derives the nsec and npub?

HEX can produce valid Nostr keys but carry no semantics. The integer index is just a counter there is no concept of identity / account, and we cannot perform any discovery.

The two-level {identity}'/{account}' structure allows: multiple unlinkable identities, key rotation within an identity, a dedicated proof key for linkage/revocation (account 0).

How does your proposed derivation relate to the recommended BIP32
m/44'/1237'/<account>'/0/0 derivation?

I want to distinguish my proposal from NIP-06 (or BIP85–> BIP39 + NIP06), because it derives directly from the wallet's master seed without BIP-85 isolation AND the last two path levels are unhardened, exposing sibling keys.

As a wallet (Bull) that offers BIP85 mnemonics to create sub/decoy-wallet, we would invent our own convention to integrate Nostr keys without conflicting with HEX and BIP39 derivations.

Higher app numbers are better

Ok, I'm open to your suggestion.

I would request that you extend bipsea

Ok, will do if we move forward.

PS: Full identity/account semantics allow Nostr enthusiasts to design mechanism for key rotation/migration like this one: nostr-protocol/nips#1691 (comment)

@jodobear

Copy link
Copy Markdown

It makes sense for Nostr to have a defined number in BIP 85

Comment thread bip-0085.mediawiki Outdated
@BullishNode

Copy link
Copy Markdown

I find this useful as an application layer BIP enhancement in the context that a few wallets have expressed the intention of leveraging Nostr identities as payment contacts (already the case for LNURL, with work ongoing for silent payments). Another application being considered is PSBT sharing and multisig coordination over Nostr. It is useful for these wallets to be able to regenerate the Nostr identities in a standardized way from the same mnemonic used to recover Bitcoins. So there is relevance to Bitcoin wallets in addition to the more typical Nostr "social media" apps.

@akarve

akarve commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

@ethicnology Your app proposal makes sense. The reference implementation has a new protocol that you can use when PR'ing that repo (and as an implicit test of the protocol and your app): https://github.com/akarve/bipsea/blob/main/src/bipsea/apps/README.md

@murchandamus

Copy link
Copy Markdown
Member

@akarve: Could you clarify, whether this is ready to be merged?

@akarve

akarve commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

@murchandamus not yet; will review in more detail and circle back

Comment thread bip-0085.mediawiki Outdated
Comment thread bip-0085.mediawiki Outdated

====Added====

* Nostr application 86'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about 7879838482 per earlier discussion?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it a too big number ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is the remaining point to resolve?

@ethicnology ethicnology May 6, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is.
86 is too small, but 7879838482 exceeds 2³¹. I want to make sure that won't cause issues.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it a too big number ?

Good catch. No reason to break integer bounds. Can we try the Hebrew “NSTR”?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid removing a char, we could try, the ASCII sum of "nostr" (110+111+115+116+114) –> 566

But then I don't know if it is still too small

If so I could try a date

Comment thread .typos.toml
@jonatack
jonatack requested a review from akarve May 6, 2026 17:43
@akarve

akarve commented May 10, 2026 via email

Copy link
Copy Markdown
Contributor

@ethicnology

Copy link
Copy Markdown
Contributor Author

@akarve let's use 9000 ?
It's the zip code of Funchal in Madeira, Portugal. The place where I wrote this pull request during the Sovereign Engineering event.

@akarve

akarve commented May 13, 2026 via email

Copy link
Copy Markdown
Contributor

@jonatack jonatack added the PR Author action required Needs updates, has unaddressed review comments, or is otherwise waiting for PR author label May 13, 2026
@ethicnology

ethicnology commented May 14, 2026

Copy link
Copy Markdown
Contributor Author

c0aa336

  • 86'9000'
  • Version bumped 2.0.02.1.0 to match the changelog entry.
  • Added rust-bip85 (1.2.0) and dart-bip85-entropy (1.1.0) to Reference Implementations

Comment thread bip-0085.mediawiki Outdated
Comment on lines +436 to +438
Identity index <code>0'</code> is reserved for future protocol use.
Account index <code>0'</code> is reserved across all identities for key management operations.
Usable keys start at <code>identity >= 1'</code> and <code>account_index >= 1'</code>.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see a great reason to do this as written. If it's really about illegal values, fine, but update the description? Otherwise show me for example how you would use the derivation path m/83696968'/9000'/0'/0' in the future? Or do you mean nostr reserves account 0 for its own use, in which case we should link to that spec here. Pretty much every index in this spec starts with 0, it seems weird to do things different just for nostr.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If what you really want is a type segment (for future uses) is that something worth adding now or will it be forward compatible to add a segment for new "types"/sub-apps?

@akarve akarve left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This mostly looks good to me and I anticipate approving after next round of answers/edits. @ethicnology

Comment thread bip-0085.mediawiki Outdated
Comment thread bip-0085.mediawiki Outdated
Comment thread bip-0085.mediawiki Outdated
Comment thread bip-0085.mediawiki
@akarve

akarve commented May 27, 2026 via email

Copy link
Copy Markdown
Contributor

@murchandamus murchandamus added the PR Author action required Needs updates, has unaddressed review comments, or is otherwise waiting for PR author label Jun 12, 2026
@ethicnology
ethicnology force-pushed the bip85-nostr-application-86 branch from d30606f to 6049828 Compare June 29, 2026 15:11
@murchandamus murchandamus removed the PR Author action required Needs updates, has unaddressed review comments, or is otherwise waiting for PR author label Jun 30, 2026
Comment thread bip-0085.mediawiki
Comment thread bip-0085.mediawiki Outdated
Comment thread bip-0085.mediawiki Outdated
@murchandamus murchandamus added the PR Author action required Needs updates, has unaddressed review comments, or is otherwise waiting for PR author label Jul 23, 2026
@jonatack jonatack removed Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified PR Author action required Needs updates, has unaddressed review comments, or is otherwise waiting for PR author labels Jul 27, 2026
@jonatack
jonatack requested a review from akarve July 27, 2026 03:26
Comment thread bip-0085.mediawiki Outdated
Comment thread bip-0085.mediawiki Outdated

@akarve akarve left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonatack @murchandamus Pre-emptive APPROVE to keep PR moving (I can't approve on GH, only comment).

@ethicnology thanks for the contributions, please address the minor comments before merge.

@akarve

akarve commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

@ethicnology also please tighten up PR description. I would remove anything that's already expressed in the PR or divergent from the PR decisions (i.e. 90% of PR description can be deleted). This makes history and audit easier.

@jonatack jonatack added Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified PR Author action required Needs updates, has unaddressed review comments, or is otherwise waiting for PR author labels Aug 3, 2026
@ethicnology
ethicnology force-pushed the bip85-nostr-application-86 branch from 1e0bf69 to 6209768 Compare August 3, 2026 13:05
@ethicnology

Copy link
Copy Markdown
Contributor Author

@akarve @jonatack

  • updated the changelog date
  • renamed account to account_index in the test vectors
  • squashed the branch into 3 commits and updated the PR description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified PR Author action required Needs updates, has unaddressed review comments, or is otherwise waiting for PR author Proposed BIP modification PR by non-owner to update BIP content

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants