Skip to content

Commit 6049828

Browse files
committed
bip85: address review on Nostr application, renumber to 128002'
Incorporate akarve's review of the Nostr application: - Renumber 9000' -> 128002' and drop the origin explanation, per the convention of leaving the app number's meaning implicit. - State explicitly that the Nostr private key is the first 32 bytes (most significant 256 bits) of the 64-byte BIP-85 entropy. - Move the private-key sentence below the path and consolidate it with the encoding description. - Justify the reserved identity 0' and account 0' indices. - Show the full 64-byte DERIVED ENTROPY in all test vectors for consistency with the other applications.
1 parent 1925e8a commit 6049828

1 file changed

Lines changed: 15 additions & 19 deletions

File tree

bip-0085.mediawiki

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -425,49 +425,45 @@ OUTPUT
425425
426426
===Nostr===
427427

428-
Application number: 9000'
428+
Application number: 128002'
429429

430-
9000 is the zip code of Funchal in Madeira, Portugal, where this specification was written during the Sovereign Engineering event.
430+
The derivation path format is: <code>m/83696968'/128002'/{identity}'/{account_index}'</code>
431431

432-
The derivation path format is: <code>m/83696968'/9000'/{identity}'/{account_index}'</code>
432+
Each <code>identity</code> is an independent, unlinkable Nostr key namespace, and each <code>account_index</code> is a distinct key within that identity.
433433

434-
Uses the entropy as a Nostr private key.
434+
Identity index <code>0'</code> is reserved for future protocol-level use. Within every identity, account index <code>0'</code> is reserved as a management key for that identity (for example proof-of-linkage between an identity's keys, key rotation, and revocation). Usable signing keys therefore start at <code>identity >= 1'</code> and <code>account_index >= 1'</code>. The exact semantics of these reserved indices are defined by an external NIP that references this application.
435435

436-
Identity index <code>0'</code> is reserved for future protocol use.
437-
Account index <code>0'</code> is reserved across all identities for key management operations.
438-
Usable keys start at <code>identity >= 1'</code> and <code>account_index >= 1'</code>.
439-
440-
The resulting 32-byte private key is Bech32 encoded as an <code>nsec</code> per NIP19.
436+
The standard application of BIP-85 produces 64 bytes of entropy. Take the first 32 bytes (the 256 most significant bits) as the Nostr private key and discard the trailing 32 bytes, as in the HEX application. This 32-byte private key is then Bech32 encoded as an <code>nsec</code> per NIP19.
441437

442438
'''identity=1, account=1'''
443439

444440
INPUT:
445441
* MASTER BIP32 ROOT KEY: xprv9s21ZrQH143K2LBWUUQRFXhucrQqBpKdRRxNVq2zBqsx8HVqFk2uYo8kmbaLLHRdqtQpUm98uKfu3vca1LqdGhUtyoFnCNkfmXRyPXLjbKb
446-
* PATH: m/83696968'/9000'/1'/1'
442+
* PATH: m/83696968'/128002'/1'/1'
447443
448444
OUTPUT
449-
* DERIVED ENTROPY=552ad1d578fe1bc927cec9612651652b07c52dde4017911bc23bc953568075ff
450-
* DERIVED NSEC=nsec1254dr4tclcdujf7we9sjv5t99vru2tw7gqtezx7z80y4x45qwhlsmxapst
445+
* DERIVED ENTROPY=ff6eb0fcdf1ef87a2a06b0d7884d495b486d0faa210e9f80f23fd649d6e114d27873d12f3b57c469f684e4dc9f4abf10beeacb59b385fde8e33f1947bc5c6c17
446+
* DERIVED NSEC=nsec1lahtplxlrmu852sxkrtcsn2ftdyx6ra2yy8flq8j8ltyn4hpznfq23uvqz
451447
452448
'''identity=1, account=2'''
453449

454450
INPUT:
455451
* MASTER BIP32 ROOT KEY: xprv9s21ZrQH143K2LBWUUQRFXhucrQqBpKdRRxNVq2zBqsx8HVqFk2uYo8kmbaLLHRdqtQpUm98uKfu3vca1LqdGhUtyoFnCNkfmXRyPXLjbKb
456-
* PATH: m/83696968'/9000'/1'/2'
452+
* PATH: m/83696968'/128002'/1'/2'
457453
458454
OUTPUT
459-
* DERIVED ENTROPY=4fd36c0061a65db375b4350f44bb62a6d7f716ee93bd0f59887ac50b35fa8b96
460-
* DERIVED NSEC=nsec1flfkcqrp5ewmxad5x585fwmz5mtlw9hwjw7s7kvg0tzskd063wtq34wlgr
455+
* DERIVED ENTROPY=917628689652288f6983c8a01db516d0697d5198dcf9de9010597f5e322fba6e435a731d85fbcc5768c06ff95ff34bf577f63f415cb170473659753acf14722d
456+
* DERIVED NSEC=nsec1j9mzs6yk2g5g76vrezspmdgk6p5h65vcmnuaayqst9l4uv30hfhqje0jyh
461457
462458
'''identity=2, account=1'''
463459

464460
INPUT:
465461
* MASTER BIP32 ROOT KEY: xprv9s21ZrQH143K2LBWUUQRFXhucrQqBpKdRRxNVq2zBqsx8HVqFk2uYo8kmbaLLHRdqtQpUm98uKfu3vca1LqdGhUtyoFnCNkfmXRyPXLjbKb
466-
* PATH: m/83696968'/9000'/2'/1'
462+
* PATH: m/83696968'/128002'/2'/1'
467463
468464
OUTPUT
469-
* DERIVED ENTROPY=b2d3b48992d46f98beac0196c4e258417087e467dbec1503342785368f4402c2
470-
* DERIVED NSEC=nsec1ktfmfzvj63he304vqxtvfcjcg9cg0er8m0kp2qe5y7zndr6yqtpq7q5y44
465+
* DERIVED ENTROPY=fa2e784291b1fd347ba3624672e3090cb2cee34b8567180336e3aa290d02715b8f4b18f02f07cb2aa3023afd34735282cc6594370f47e6e1fa48d8d0dda93096
466+
* DERIVED NSEC=nsec1lgh8ss53k87ng7arvfr89ccfpjevac6ts4n3sqekuw4zjrgzw9dsq3uelh
471467
472468
==Backwards Compatibility==
473469

@@ -489,7 +485,7 @@ BIP32, BIP39, [https://github.com/nostr-protocol/nips/blob/master/01.md NIP01],
489485

490486
====Added====
491487

492-
* Nostr application 9000'
488+
* Nostr application 128002'
493489
494490
===2.0.0 (2025-09-19)===
495491

0 commit comments

Comments
 (0)