You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* DERIVED BIP39 MNEMONIC=puppy ocean match cereal symbol another shed magic wrap hammer bulb intact gadget divorce twin tonight reason outdoor destroy simple truth cigar social volcano
227
227
228
-
229
228
===BIP93 (codex32)===
230
229
Application Number: 93'
231
230
232
-
<<<<<<< HEAD
233
-
<<<<<<< HEAD
234
231
The derivation path format is: <code>m/83696968'/93'/{hrp}'/{threshold}'/{n}'/{byte_length}'/{id0}'/{id1}'/{id2}'/{id3}'/{index}'</code>
235
232
236
233
Use this application to generate fresh codex32 strings (as defined in BIP-0093) for Shamir's Secret Sharing backups of BIP-0032 HD master seeds. Each codex32 string encodes a share or secret with a human-readable prefix (hrp), and a data part consisting of a threshold, identifier, share index, payload, and checksum.
@@ -243,20 +240,6 @@ Repeat until all required data characters are validly chosen.
243
240
244
241
Example: a codex32 secret with <code>hrp = "ms"</code> (first index), <code>threshold = "0"</code>, <code>n = 1</code>, <code>byte_length = 16</code>, identifier <code>"c0??"</code> would have the path <code>m/83696968'/93'/0'/0'/1'/16'/24'/15'/32'/32'/0'</code>, the next secret would be <code>m/83696968'/93'/0'/0'/1'/16'/24'/15'/32'/32'/1'</code> (identifier <code>"c0zc"</code>) etc.
245
242
246
-
=======
247
-
The derivation path format is: <code>m/83696968'/93'/<hrp>'/<threshold>'/<n>'/<byte_length>'/<id0>'/<id1>'/<id2>'/<id3>'</code>
248
-
=======
249
-
The derivation path format is: <code>m/83696968'/93'/{hrp}'/{threshold}'/{n}'/{byte_length}'/{id0}'/{id1}'/{id2}'/{id3}'</code>
250
-
>>>>>>> 8a14663 (Finish polishing of bip-0085.mediawiki)
251
-
252
-
Use this application to generate fresh codex32 strings (as defined in BIP-0093) for Shamir's Secret Sharing backups of BIP-0032 HD master seeds. Each codex32 string encodes a share or secret with a human-readable prefix (`hrp`), and a data part consisting of a threshold, identifier, share index, payload, and checksum.
253
-
254
-
Create a BIP85 DRNG whose seed is the derived entropy. Read 1 byte from the DRNG and trim to the 5 most significant bits to obtain an integer (0–31), representing a bech32 character. Repeat until all required data characters are validly chosen.
255
-
256
-
Example: a codex32 secret with <code>hrp = "ms"</code> (first index), <code>threshold = "0"</code>, <code>n = 1</code>, <code>byte_length = 16</code>, identifier <code>"c00l"</code> would have the path <code>m/83696968'/93'/0'/0'/1'/16'/24'/15'/15'/31'</code>, the next secret would be <code>m/83696968'/93'/0'/0'/1'/16'/24'/15'/15'/32'</code> (identifier <code>"c00?"</code>) etc.
257
-
258
-
259
-
>>>>>>> 8b99481 (Update bip-0085.mediawiki)
260
243
Human-readable Prefix Table
261
244
262
245
{|
@@ -274,11 +257,7 @@ Human-readable Prefix Table
274
257
Threshold Table
275
258
276
259
{|
277
-
<<<<<<< HEAD
278
260
!Threshold
279
-
=======
280
-
!threshold
281
-
>>>>>>> 8b99481 (Update bip-0085.mediawiki)
282
261
!Code
283
262
|-
284
263
| "0"
@@ -313,8 +292,6 @@ Threshold Table
313
292
Share Count Table
314
293
315
294
{|
316
-
<<<<<<< HEAD
317
-
<<<<<<< HEAD
318
295
!Threshold code
319
296
!Number of Shares
320
297
!Code
@@ -326,27 +303,12 @@ Share Count Table
326
303
| not 0'
327
304
| n (from 1 to 31)
328
305
| n'
329
-
=======
330
-
! Number of Shares to Generate
331
-
=======
332
-
! Number of Shares
333
-
>>>>>>> 8a14663 (Finish polishing of bip-0085.mediawiki)
334
-
!Code
335
-
|-
336
-
| n (from 1 to 31)
337
-
| n'
338
-
|-
339
-
>>>>>>> 8b99481 (Update bip-0085.mediawiki)
340
306
|}
341
-
Notes: If <code>threshold == "0"</code>, <code>n</code> must be ''1''.
342
-
343
307
344
308
Bytes Length Table
345
309
346
310
{|
347
311
! Bytes
348
-
<<<<<<< HEAD
349
-
<<<<<<< HEAD
350
312
! Data Length (Characters)
351
313
!Code
352
314
|-
@@ -418,7 +380,6 @@ Otherwise, for each initial share needed:
418
380
* Recover secret at "s", if needed, for the default identifier.
419
381
3. Prepend the <code>threshold</code> and identifier.
420
382
421
-
<<<<<<< HEAD
422
383
4. Compute and append the codex32 checksum.
423
384
424
385
5. Translate the data part to characters using the table from BIP-0173 and prepend <code>hrp</code>1.
Note: The share indices are alphabetized. The default identifier is the fingerprint of payload bytes of "s" had the <code>threshold</code been <code>n</code> (2 in this example).
477
-
=======
478
-
* Fresh Seeds (n >= t)
479
-
* Generate ''t'' shares with random payloads using the BIP85 DRNG:
480
-
* For each share, take the next available letter from the bech32 alphabet, in alphabetical order, as <code>a</code>, <code>c</code>, <code>d</code>, ..., to be the share index.
481
-
* Generate the payload as ceil(''byte_length * 8 / 5'') random symbols (5-bit values mapped to Bech32 chars).
482
-
* Note: The exact number of symbols depends on the byte_length.
483
-
* If ''n'' >= ''t'', use the DRNG to deterministically select additional unique indices.
484
-
* For additional shares ''n'' - ''t'', compute their payloads by interpolating using BIP-93 SSS rules from the initial ''t'' shares.
485
-
* Encode each share as a codex32 string per BIP-93.
486
-
* The secret can be recovered by interpolating any ''t'' shares at index "s".
487
-
488
-
* Existing Master Seeds (n = t - 1)
489
-
* Generate ''n'' = ''t'' - 1 shares with random payloads using the DRNG, as above.
490
-
* Assign indices in fixed alphabetical order (<code>a</code>, <code>c</code>, <code>d</code>, ...).
491
-
* The existing master seed is treated as the ''t''-th share (encoded as codex32 secret with index "s").
492
-
* To generate additional shares, interpolate using the ''t'' points (''t''-1 generated shares + secret).
493
-
* Encode the generated shares as codex32 strings.
494
-
* To recover, combine any ''t'' shares to interpolate the secret at "s".
495
-
Note: For existing seeds, the software must know the master seed to compute additional shares or verify, but the derived entropy ensures deterministic randomness.
496
-
=======
497
-
! Data length
498
-
=======
499
-
! Data Length (Characters)
500
-
>>>>>>> 8a14663 (Finish polishing of bip-0085.mediawiki)
501
-
!Code
502
-
|-
503
-
| 16
504
-
| 45
505
-
| 16'
506
-
|-
507
-
| 32
508
-
| 71
509
-
| 32'
510
-
|-
511
-
| 64
512
-
| 124
513
-
| 64'
514
-
|}
515
-
Note: Other lengths between 16 and 64 are valid but not recommended, using corresponding hardened indices.
516
-
517
-
Identifer Table
518
-
519
-
{|
520
-
! Identifier
521
-
!Code
522
-
|-
523
-
| id0, id1, id2, id3
524
-
| id0'/id1'/id2'/id3'
525
-
|-
526
-
| Default (BIP-0032 fingerprint)
527
-
| 32'/32'/32'/32'
528
-
|}
529
-
The identifier is four bech32 characters converted to four integers using the bech32 character table from BIP-0173. The default is the 20 most significant bits of the BIP-0032 fingerprint of the master seed converted to bech32. Values >= ''32'' use the default. This affects the derived entropy and resulting fingerprint allowing ''96 ^ 4'' independent default identifier codex32 backups to be generated by incrementing the hardened identifier indices.
530
-
531
-
Rationale: This default assists users in locating the correct codex32 backup for their wallets, should be distinct for every master seed users may need to disambiguate and, since it is widely stored, improves overall error correction.
532
-
533
-
====Unshared Secret====
534
-
535
-
When <code>threshold == "0" and n == 1</code>, the output is a codex32 secret. The payload in a codex32 secret is a direct encoding of a BIP-0032 HD master seed.
536
-
537
-
Note: <code>threshold == "0" and n > 1</code> is invalid.
538
-
539
-
Examples:
540
-
541
-
Generate a "cl" prefixed Core Lightning HSM secret, 32-bytes with identifier "cln2".
If we already have a valid set of ''t'' initial codex32 strings, use BIP-0093 to derive ''n'' shares. The BIP85 dice application may be used to randomly select ''n'' share indices.
553
-
554
-
Otherwise, for each initial share needed to reach ''t'':
555
-
556
-
1. Take the next available letter from the bech32 alphabet, in alphabetical order, as <code>a</code>, <code>c</code>, <code>d</code>, ..., to be the share index.
557
-
* Valid share index characters are the bech32 charset excluding "s" sorted alphabetically as ''acdefghjklmnpqrtuvwxyz023456789'' (31 share index characters).
558
-
2. Generate ceil(''<code>byte_length</code> * 8 / 5'') random payload characters using the BIP85 DRNG.
559
-
* Recover secret, if needed, for the default identifier.
560
-
3. Prepend the <code>threshold</code> and identifier.
561
-
562
-
4. Compute and append the codex32 checksum.
563
-
564
-
5. Translate the data part to characters using the table from BIP-0173 and prepend <code>hrp</code>1.
565
-
566
-
{|
567
-
! Fresh master seeds
568
-
!Existing master seeds
569
-
|-
570
-
| ''n'' >= ''t''
571
-
| ''n'' < ''t''
572
-
|}
573
-
574
-
There are two ways to create an initial set of ''t'' valid codex32 strings, depending on whether the user already has an existing master seed.
575
-
576
-
=====For a fresh master seed=====
577
-
578
-
Generate ''t'' initial random shares as above, then:
579
-
* Derive the remaining 31 - ''t'' possible shares by interpolating from these initial ''t'' shares.
580
-
* Use the DRNG to deterministically select ''n'' unique indices (excluding "s").
581
-
* Output the shares with these indices.
582
-
* The secret can be recovered by interpolating any ''t'' shares at index "s".
583
-
>>>>>>> 8b99481 (Update bip-0085.mediawiki)
584
-
585
-
<<<<<<< HEAD
586
-
* Constraints
587
-
* Index "s" is reserved for the secret (''t'' = 0').
588
-
* If ''n'' < ''t'' and ''n'' != ''t'' - 1, invalid.
589
-
* Payloads are generated as random symbols; final encoding includes checksums per BIP-93.
590
-
* For identifier omitted, compute as 4 bech32 characters of the BIP32 fingerprint of the seed (payload bytes of "s") or for ''n'' = ''t'' - 1 the BIP32 fingerprint of the share payload(s) bytes.
591
-
592
-
* Rationale:
593
-
- Aligns with the BIP-85 convention of using the BIP number as the
594
-
application number where appropriate.
595
-
- Enables deterministic generation of Codex32-compatible master seeds
596
-
from a single root xprv, consistent with other BIP-85 applications.
597
-
598
-
<<<<<<< HEAD
599
-
<<<<<<< HEAD
600
-
=====Examples=====
601
-
Generates 5 "ms" prefixed codex32 shares of 32 bytes each, threshold 3, identifier "qsqp" (assuming charset mapping for 0,16,0,1).
602
-
>>>>>>> 304e622 (reduce Table of Contents entries)
603
-
=======
604
-
====Examples====
605
-
=======
606
-
=====For an existing master seed=====
607
-
608
-
Existing Master Seeds (n = t - 1)
609
-
* Generate ''n'' = ''t'' - 1 shares with random payloads using the DRNG, as above.
610
-
* The existing master seed is treated as the ''t''-th share (encoded as codex32 secret with index "s").
611
-
* To generate additional shares, interpolate using the ''t'' points (''t''-1 generated shares + secret).
612
-
* Encode the generated shares as codex32 strings.
613
-
* To recover, combine any ''t'' shares to interpolate the secret at "s".
614
-
Note: For existing seeds, the software must know the master seed to compute additional shares or verify, but the derived entropy ensures deterministic randomness.
615
-
616
-
Examples:
617
-
618
-
>>>>>>> 8b99481 (Update bip-0085.mediawiki)
619
-
Generates 5 "ms" prefixed codex32 shares for a 32 byte seed, threshold 3, identifier "qsqp" (assuming charset mapping for 0,16,0,1).
620
-
>>>>>>> f02a449 (Described examples and bumped them up a TOC level)
Note: The share indices are alphabetized. The default identifier is the fingerprint of payload bytes of "s" had the <code>threshold</code been <code>n</code> (2 in this example).
>>>>>>> f02a449 (Described examples and bumped them up a TOC level)
716
458
717
-
=======
718
-
>>>>>>> 8b99481 (Update bip-0085.mediawiki)
719
459
===HD-Seed WIF===
720
460
Application number: 2'
721
461
@@ -920,11 +660,7 @@ OUTPUT
920
660
921
661
This specification is not backwards compatible with any other existing specification.
922
662
923
-
<<<<<<< HEAD
924
663
This specification relies on BIP32 but is agnostic to how the BIP32 root key is derived. As such, this standard is able to derive wallets with initialization schemes like BIP39, codex32 or Electrum wallet style mnemonics.
925
-
=======
926
-
This specification relies on BIP32 but is agnostic to how the BIP32 root key is derived. As such, this standard is able to derive wallets with initialization schemes like Codex32 backups or BIP39 or Electrum wallet style mnemonics.
927
-
>>>>>>> 8a14663 (Finish polishing of bip-0085.mediawiki)
0 commit comments