Skip to content
BIP ATLAS

BIP 0085

How can one backup create separate seeds for other wallets?

BIP 85 turns one BIP 32 root key into separate entropy for each wallet, key or password. A hardened path names each use, and HMAC-SHA512 keeps an output from leading back to the root.

Someone with several wallets faces a problem that BIP 85 starts from. One mnemonic cannot serve every wallet, because wallets follow incompatible standards. Sharing one seed between wallets is undesirable for security, and keeping many separate backups safe is hard.1

With BIP 85 the user keeps a single backup, a BIP 32 root key, and the software holding it derives separate entropy for each application. The receiving wallet uses that entropy the way it would use freshly generated randomness: as a BIP 39 mnemonic, a private key, an extended key or a password.23

Source revision
bitcoin/bips @ 3a10b5b
Source checked
8 November 2026
Review state
Technical review applied, awaiting sign-off
Source details

This chapter is an independent explanation, not the proposal itself. Preamble fields are shown as the pinned files record them, without author e-mail addresses. Status is the proposal’s own field. It is not an endorsement or a sign of consensus.

BIP 85: Deterministic Entropy From BIP32 Keychains

BIP
85
Layer
Applications
Title
Deterministic Entropy From BIP32 Keychains
Authors
Ethan Kosakovsky
Aneesh Karve
Status
Deployed
Type
Informational
Assigned
2020-03-20
License
BSD-2-Clause OR OPUBL-1.0
Version
2.1.0

Pinned source · Reader view on bips.dev
SHA-256 dcbeb97709eba4751f4af7dc582c35dff37dc831abb5adc5e2e975d708d1cf7e
Git blob c6a7d2b8f3e6603c2c273c857bda95d68375ed34

Fig. A19.1 One root, a separate output for each application

Static view: BIP 39, 12 English words, with what a leaked output reveals. With JavaScript you can choose among 7 applications.

One root, a separate output for each applicationPublished root key xprv9s21ZrQH…. Path m/83696968'/39'/0'/12'/0', every level hardened: 83696968' BIP 85, 39' BIP 39, 0' English, 12' 12 words, 0' index 0. Hardened derivation gives the private key k = 836951a7929020f8b4456034267fdebc9091274a4e46677c7d4180ef0c0ecea7. HMAC-SHA512 keyed with bip-entropy-from-k turns k into 64 bytes, 6250b68daf746d12a24d58b4787a714bf1b58d69e4c2a466276fb16fe93dc52b6fac6b756894072241447cad56f6405ee326dbb473d2f5e943543590082927c0. The application reads bytes 1–16: entropy for 12 words. The BIP 39 mnemonic is girl mad pet galaxy egg matter matrix prison refuse sense ordinary nose. If this output leaks, k stays unknown because HMAC-SHA512 is one-way; the root stays unknown because finding it would need k, and even k would not give it, as every level is hardened; and other paths' outputs stay unrelated. The hatching covers what someone holding only the output cannot know: the root, k and the bytes the application does not read.PUBLIC TEST VECTOR · BIP 39, 12 ENGLISH WORDSROOT KEYxprv9s21ZrQ…PATH · ' = HARDENEDm83696968'BIP 8539'BIP 390'ENGLISH12'12 WORDS0'INDEX 0CKDPRIVK836951a792…32-BYTE CHILD KEYHMAC-SHA512KEY: “bip-entropy-from-k”64 BYTES OF ENTROPY · FILLED = READBYTES 1–16: ENTROPY FOR 12 WORDSOUTPUT · BIP 39 MNEMONIC01 girl 02 mad 03 pet 04 galaxy 05 egg 06 matter07 matrix 08 prison 09 refuse 10 sense 11 ordinary 12 noseIF THIS OUTPUT LEAKS:k STAYS UNKNOWN (HMAC IS ONE-WAY)THE ROOT STAYS UNKNOWN: IT WOULD NEED k,AND k WOULD NOT GIVE IT (HARDENED)OTHER PATHS' OUTPUTS STAY UNRELATED
One root, a separate output for each applicationPublished root key xprv9s21ZrQH…. Path m/83696968'/39'/0'/12'/0', every level hardened: 83696968' BIP 85, 39' BIP 39, 0' English, 12' 12 words, 0' index 0. Hardened derivation gives the private key k = 836951a7929020f8b4456034267fdebc9091274a4e46677c7d4180ef0c0ecea7. HMAC-SHA512 keyed with bip-entropy-from-k turns k into 64 bytes, 6250b68daf746d12a24d58b4787a714bf1b58d69e4c2a466276fb16fe93dc52b6fac6b756894072241447cad56f6405ee326dbb473d2f5e943543590082927c0. The application reads bytes 1–16: entropy for 12 words. The BIP 39 mnemonic is girl mad pet galaxy egg matter matrix prison refuse sense ordinary nose. If this output leaks, k stays unknown because HMAC-SHA512 is one-way; the root stays unknown because finding it would need k, and even k would not give it, as every level is hardened; and other paths' outputs stay unrelated. The hatching covers what someone holding only the output cannot know: the root, k and the bytes the application does not read.PUBLIC TEST VECTOR · BIP 39, 12 ENGLISH WORDSROOT KEY · THE ONE BACKUPxprv9s21ZrQH143K2LBW…PATH · ' = HARDENEDm83696968'BIP 8539'BIP 390'ENGLISH12'12 WORDS0'INDEX 0CKDPRIVK836951a792…32-BYTE CHILD KEYHMAC-SHA512KEY:“bip-entropy-from-k”64 BYTES OF ENTROPY · FILLED = READBYTES 1–16: ENTROPY FOR 12 WORDSOUTPUT · BIP 39 MNEMONIC01 girl 02 mad 03 pet 04 galaxy05 egg 06 matter 07 matrix 08 prison09 refuse 10 sense 11 ordinary 12 noseIF THIS OUTPUT LEAKS:k STAYS UNKNOWN (HMAC IS ONE-WAY)THE ROOT STAYS UNKNOWN: IT WOULD NEED k,AND k WOULD NOT GIVE IT (HARDENED)OTHER PATHS' OUTPUTS STAY UNRELATED

BIP 39, 12 English words: m/83696968'/39'/0'/12'/0' gives k, HMAC-SHA512 gives 64 bytes, and the application reads bytes 1–16: entropy for 12 words. Output: girl mad pet …

Exact values
Path
m/83696968'/39'/0'/12'/0'
Published root key
xprv9s21ZrQH143K2LBWUUQRFXhucrQqBpKdRRxNVq2zBqsx8HVqFk2uYo8kmbaLLHRdqtQpUm98uKfu3vca1LqdGhUtyoFnCNkfmXRyPXLjbKb
k, the private key at the path
836951a7929020f8b4456034267fdebc9091274a4e46677c7d4180ef0c0ecea7
HMAC-SHA512 output (64 bytes)
6250b68daf746d12a24d58b4787a714bf1b58d69e4c2a466276fb16fe93dc52b6fac6b756894072241447cad56f6405ee326dbb473d2f5e943543590082927c0
Output (BIP 39 mnemonic)
girl mad pet galaxy egg matter matrix prison refuse sense ordinary nose

BIP 85 line 194. The output, and every byte BIP 85 prints, equal the published vector at build time; k and the bytes the vector does not print are computed by the same tested model. Public test material: never use it for funds or passwords.

Choose an application. Its path leads to a child key k; HMAC-SHA512 turns k into 64 bytes, and the application reads only the bytes it needs. Every output, and every byte BIP 85 prints, is a published vector the model recomputes. The same model computes k and the bytes the vectors do not print. The toggle hatches what someone holding only the output cannot know.45678

One path per application

Every BIP 85 path starts at the purpose 83696968'. The next level is the application number, then that application's own parameters and an index. Application numbers are meant to be meaningful, such as a BIP number or ASCII codes: 39' makes BIP 39 mnemonics, 32' extended keys. Read two digits at a time as ASCII codes, 83696968 itself spells SEED.91011

For a mnemonic, the parameters are a language and a word count. Twelve English words at the first index sit at m/83696968'/39'/0'/12'/0'; the next twelve sit at index 1'. Each level is hardened, as the apostrophes show.412

Fig. A19.2 Two paths, level by level

Two BIP 85 paths, level by levelm/83696968'/39'/0'/12'/0': 83696968' selects BIP 85, 39' selects BIP 39, 0' selects English, 12' selects 12 words, 0' selects index 0. m/83696968'/2'/0': 83696968' selects BIP 85, 2' selects WIF, 0' selects index 0. Every level is hardened. The purpose number 83696968 is the ASCII codes 83, 69, 69, 68, which spell SEED.BIP 39, 12 ENGLISH WORDS · m/83696968'/39'/0'/12'/0'm83696968'BIP 8539'BIP 390'ENGLISH12'12 WORDS0'INDEX 0PURPOSEAPPLICATIONITS PARAMETERSINDEXTHE PURPOSE NUMBER, TWO DIGITS AT A TIME, AS ASCII83696968SEED→HD-SEED WIF · m/83696968'/2'/0'm83696968'BIP 852'WIF0'INDEX 0PURPOSEAPPLICATIONINDEX
The paths of two published vectors: twelve English words, and a WIF key. Each level selects something, and every level is hardened. The ASCII reading of the purpose number is ours; BIP 85 does not state it.9111213

From a child key to entropy

Ordinary hardened BIP 32 derivation along the path gives a child private key, k. BIP 85 does not hand k to the application. It computes HMAC-SHA512 with the text bip-entropy-from-k as the key and k as the message, which gives 512 bits.45

The authors give three reasons for the extra step. It prevents leakage of the parent tree should k be compromised. Hardened derivation would prevent that, and the specification requires it. The authors cannot enforce it on implementations, so the HMAC makes the derived entropy hardened either way. The application wants entropy, not a key, so the child key has to be transformed. And it guards against side effects should k also be used for another purpose, such as a nonce. The application only ever sees the HMAC's output, never k.47

Each application SHOULD use only the bits it needs and drop the rest. Twelve words take the first 128 bits; twenty-four take the first 256.512

Fig. A19.3 From root key to twelve words

  1. From root key to twelve words, step 1 of 5The published BIP 32 root key, xprv9s21ZrQH143K2LBWUUQRFXhucrQqBpKdRRxNVq2zBqsx8HVqFk2uYo8kmbaLLHRdqtQpUm98uKfu3vca1LqdGhUtyoFnCNkfmXRyPXLjbKb.ROOT KEYxprv9s21ZrQH143K…

    Start from the root key: the one backup.

  2. From root key to twelve words, step 2 of 5Hardened derivation along m/83696968'/39'/0'/12'/0' gives the 32-byte private key k = 836951a7929020f8b4456034267fdebc9091274a4e46677c7d4180ef0c0ecea7.83696968'39'0'12'0'K836951a79290…

    Derive along m/83696968'/39'/0'/12'/0', hardened at every level, to the child key k.

  3. From root key to twelve words, step 3 of 5HMAC-SHA512 with the key bip-entropy-from-k and the message k gives 64 bytes: 6250b68daf746d12a24d58b4787a714bf1b58d69e4c2a466276fb16fe93dc52b6fac6b756894072241447cad56f6405ee326dbb473d2f5e943543590082927c0.HMAC-SHA512(KEY “bip-entropy-from-k”, k)

    HMAC-SHA512, keyed with the text bip-entropy-from-k, turns k into 64 bytes.

  4. From root key to twelve words, step 4 of 5The first 16 bytes are kept: 6250b68daf746d12a24d58b4787a714b. The remaining 48 bytes are not used.16 BYTES KEPT

    Keep the first 16 bytes, 128 bits, and drop the other 48.

  5. From root key to twelve words, step 5 of 5BIP 39 encodes the 128 kept bits as 12 words: girl mad pet galaxy egg matter matrix prison refuse sense ordinary nose.01 girl02 mad03 pet04 galaxy05 egg06 matter07 matrix08 prison09 refuse10 sense11 ordinary12 nose

    BIP 39 turns those 128 bits into 12 words: girl mad pet …

Exact values
k
836951a7929020f8b4456034267fdebc9091274a4e46677c7d4180ef0c0ecea7
All 64 bytes
6250b68daf746d12a24d58b4787a714bf1b58d69e4c2a466276fb16fe93dc52b6fac6b756894072241447cad56f6405ee326dbb473d2f5e943543590082927c0
The 16 bytes kept
6250b68daf746d12a24d58b4787a714b
BIP 85's 12-word vector, step by step. The vector does not publish k for this path, or the 48 bytes it drops. The model computes both, and the build checks the kept bytes and the words against the vector.4612

Different uses for 64 bytes

Apart from their paths, applications differ only in what they do with their 64 bytes. The HD-seed WIF uses the first 256 bits as a private key, encoded as a compressed WIF. BIP 85 intends it as the hdseed of Bitcoin Core wallets. An extended private key takes the first 32 bytes as its chain code and the second 32 as its key. Depth, parent fingerprint and child number are set to zero. BIP 85 warns that this reverses BIP 32's order.1314

Some applications serve uses beyond wallets. HEX outputs 16 to 64 bytes. The Base64 password application encodes all 64 bytes and keeps the first 20 to 86 characters. Dice rolls, for PINs and other numeric secrets, read from BIP85-DRNG: a SHAKE256 stream seeded with the 64 bytes, for uses that need more input than that.15161718

Fig. A19.4 What each application reads

Each application's own 64 bytes, and the part it readsBIP 39, 12 English words (m/83696968'/39'/0'/12'/0'): bytes 1–16: entropy for 12 words; its BIP 39 mnemonic begins girl mad pet…. BIP 39, 24 English words (m/83696968'/39'/0'/24'/0'): bytes 1–32: entropy for 24 words; its BIP 39 mnemonic begins puppy ocean …. HD-seed WIF (m/83696968'/2'/0'): bytes 1–32: private key; its WIF private key begins Kzyv4uF39d4J…. XPRV (m/83696968'/32'/0'): bytes 1–32: chain code; bytes 33–64: private key; its extended private key begins xprv9s21ZrQH…. HEX, 64 bytes (m/83696968'/128169'/64'/0'): all 64 bytes: the hex output; its hex string begins 492db4698cf3…. Password, 21 Base64 characters (m/83696968'/707764'/21'/0'): bytes 1–16: base64, cut to 21 characters; its password begins dKLoepugzdVJ…. Dice, 10 rolls of a 6-sided die (m/83696968'/89101'/6'/10'/0'): all 64 bytes: seed of the drng; its dice rolls, zero-indexed begins 1,0,0,2,0,1,….EACH ROW: ONE APPLICATION'S 64 BYTES · FILLED = READ12 WORDS · m/83696968'/39'/0'/12'/0'1–16: ENTROPY FOR 12 WORDS24 WORDS · m/83696968'/39'/0'/24'/0'1–32: ENTROPY FOR 24 WORDSWIF KEY · m/83696968'/2'/0'1–32: PRIVATE KEYXPRV · m/83696968'/32'/0'1–32: CHAIN CODE · 33–64: PRIVATE KEYHEX · m/83696968'/128169'/64'/0'ALL: THE HEX OUTPUTPASSWORD · m/83696968'/707764'/21'/0'1–16: BASE64, CUT TO 21 CHARACTERSDICE · m/83696968'/89101'/6'/10'/0'ALL: SEED OF THE DRNG
Each published application's own 64 bytes, filled where the application reads them. Every application has its own path, so each row is different entropy; the figure compares which bytes are read, not their values.61314151618
When a derived key is invalid, and how dice avoid bias

A private key made from the bytes can, with probability below 1 in 2^127, be zero or not below the curve order. Software should then fail, and the user moves on to the next index.19

A die with N sides needs ceil(log2 N) bits a roll. Each roll reads whole bytes from the DRNG, as many as those bits need, and keeps only their top ceil(log2 N) bits: for a six-sided die, one byte, of which the top three bits count. A trial that comes out N or more is skipped, and the next one read. BIP 85's six-sided vector rolls 1,0,0,2,0,1,5,5,2,4, zero-indexed.618

What the root still controls

Every output is computed from the root key and its path alone. Whoever holds the root can recompute every output, which is what makes one backup enough, provided the user also knows which application, index and length each wallet used. One output does not reveal k, the root, or the output of another path.78

The receiving wallet sees an ordinary mnemonic, key or password; nothing in it marks it as derived. BIP 85 does not care how the root itself was made, whether from a BIP 39 mnemonic or another scheme. It records that it is not backwards compatible with any other specification.32021

Caveat

Every output in these figures comes from BIP 85's published root key. It is public test material: never use it, or anything derived from it, for funds or passwords.6

Why one shared mnemonic is not enough

The authors point out that some wallets may be inherently less secure, such as hot wallets on phones or Lightning nodes. A wallet that shares the main mnemonic exposes everything the mnemonic controls; a wallet with a derived mnemonic exposes only its own.822

BIP 85 (Ethan Kosakovsky and Aneesh Karve) was assigned in 2020 and is recorded as Deployed and Informational. The pinned text is version 2.1.0.23

Evidence

Each numbered marker in the text points here, and the ↩ links lead back to the text. Quotes are verbatim from the BIP files at commit 3a10b5b, wiki markup included. Links open the exact lines. Labels say what kind of statement each entry is: a rule, the author’s rationale, history, a test vector, or our own inference.

  1. ↩ Author’s rationale The authors' starting point: one mnemonic backup cannot serve every wallet because standards are incompatible, sharing one seed across wallets is undesirable for security, and physically storing many seeds is difficult.

    Quoted source text (1)

    It is not possible to maintain one single (mnemonic) seed backup for all keychains used across various wallets because there are a variety of incompatible standards. Sharing of seeds across multiple wallets is not desirable for security reasons. Physical storage of multiple seeds is difficult depending on the security and redundancy required.

    BIP 85, line 21
  2. ↩ Rule BIP 85 derives entropy from a BIP 32 keychain, to be fed into whatever method a target wallet uses to make its own mnemonic or root key.

    Quoted source text (1)

    this proposal provides a way to derive entropy from the keychain which can be fed into whatever method a wallet uses to derive the initial mnemonic seed or root key.

    BIP 85, line 23
  3. ↩ a b Rule BIP 85 starts from a single BIP 32 master root key and does not care how that root was made, for example from a BIP 39 mnemonic or an Electrum-style mnemonic.

    Quoted source text (2)

    We assume a single BIP32 master root key. This specification is not concerned with how this was derived (e.g. directly or via a mnemonic scheme such as BIP39).

    BIP 85, line 54

    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 or Electrum wallet style mnemonics.

    BIP 85, line 480
  4. ↩ a b c d e Rule Each application gets a unique private key k, derived from the root along a fully hardened path; k then goes through HMAC-SHA512 with the key bip-entropy-from-k and k as the message.

    Quoted source text (1)

    For each application that requires its own wallet, a unique private key is derived from the BIP32 master root key using a fully hardened derivation path. The resulting private key (k) is then processed with HMAC-SHA512, where the key is "bip-entropy-from-k", and the message payload is the private key k:

    BIP 85, line 56
  5. ↩ a b c Rule The HMAC gives 512 bits; each application SHOULD use only the bits it needs and truncate the rest.

    Quoted source text (1)

    The result produces 512 bits of entropy. Each application SHOULD use up to the required number of bits necessary for their operation, and truncate the rest.

    BIP 85, line 60
  6. ↩ a b c d e Test vector The model reproduces BIP 85's published vectors from the published root key: test cases 1 and 2, the DRNG bytes, 12, 18 and 24 words, the WIF, XPRV, HEX, Base64 password and dice outputs; the build checks every vector it draws.

    Quoted source text (3)

    ===Test vectors===

    BIP 85, line 64

    DERIVED BIP39 MNEMONIC=girl mad pet galaxy egg matter matrix prison refuse sense ordinary nose

    BIP 85, line 198

    DERIVED ROLLS=1,0,0,2,0,1,5,5,2,4

    BIP 85, line 424
  7. ↩ a b c Author’s rationale The authors give three reasons for HMAC-SHA512: to prevent leakage of the parent tree should k be compromised, since hardened derivation is required but the authors cannot enforce it, so the HMAC makes the entropy hardened regardless; the purpose is entropy, not a private key, so the child key must be transformed; and, out of caution, to avoid unwanted interactions should k be used for a dual purpose, such as a nonce.

    Quoted source text (1)

    The reason for running the derived key through HMAC-SHA512 and truncating the result as necessary is to prevent leakage of the parent tree should the derived key (''k'') be compromised. While the specification requires the use of hardened key derivation which would prevent this, we cannot enforce hardened derivation, so this method ensures the derived entropy is hardened. Also, from a semantic point of view, since the purpose is to derive entropy and not a private key, we are required to transform the child key. This is done out of an abundance of caution, in order to ward off unwanted side effects should ''k'' be used for a dual purpose, including as a nonce ''hash(k)'', where undesirable and unforeseen interactions could occur.

    BIP 85, line 58
  8. ↩ a b c Editorial inference Every output is computed from the root key and its path alone, so whoever holds the root can recompute every output, while one output does not give k, the root or another path's output. This follows from the derivation and the authors' rationale; BIP 85 does not state it in these words.

    Quoted source text (2)

    a unique private key is derived from the BIP32 master root key using a fully hardened derivation path.

    BIP 85, line 56

    to prevent leakage of the parent tree should the derived key (''k'') be compromised.

    BIP 85, line 58
  9. ↩ a b Rule BIP 85 paths have the form m/83696968'/{app_no}'/{index}', with the application's number after the purpose and an index last.

    Quoted source text (1)

    Derivation paths follow the format <code>m/83696968'/{app_no}'/{index}'</code>, where ''{app_no}'' is the path for the application, and ''{index}'' is the index.

    BIP 85, line 108
  10. ↩ Rule Application numbers should be semantic, such as a BIP number or a sequence of ASCII character codes.

    Quoted source text (1)

    Application numbers should be semantic in some way, such as a BIP number or ASCII character code sequence.

    BIP 85, line 110
  11. ↩ a b Editorial inference Read two digits at a time as ASCII codes, the purpose number 83696968 spells SEED (83 S, 69 E, 69 E, 68 D). BIP 85 does not say so; this is our reading, checked by a test.

    Quoted source text (2)

    m/83696968'/{app_no}'/{index}'

    BIP 85, line 108

    such as a BIP number or ASCII character code sequence.

    BIP 85, line 110
  12. ↩ a b c d Rule Application 39' makes BIP 39 mnemonics on the path m/83696968'/39'/{language}'/{words}'/{index}', keeping 128 bits for 12 words and 256 bits for 24; the next twelve words for the same language sit at index 1'.

    Quoted source text (4)

    Application number: 39'

    BIP 85, line 113

    Truncate trailing (least significant) bytes of the entropy to the number of bits required to map to the relevant word length: 128 bits for 12 words, 256 bits for 24 words.

    BIP 85, line 115

    The derivation path format is: <code>m/83696968'/39'/{language}'/{words}'/{index}'</code>

    BIP 85, line 117

    a BIP39 mnemonic with 12 English words (first index) would have the path <code>m/83696968'/39'/0'/12'/0'</code>, the next key would be <code>m/83696968'/39'/0'/12'/1'</code> etc.

    BIP 85, line 119
  13. ↩ a b c Rule Application 2' uses the most significant 256 bits as a private key, encoded as a compressed WIF that BIP 85 says will be used as the hdseed for Bitcoin Core wallets.

    Quoted source text (3)

    Application number: 2'

    BIP 85, line 227

    Uses the most significant 256 bits

    BIP 85, line 229

    of entropy as the secret exponent to derive a private key and encode as a compressed WIF that will be used as the hdseed for Bitcoin Core wallets.

    BIP 85, lines 237–238
  14. ↩ a b Rule Application 32' makes an extended private key: the first 32 bytes are the chain code and the second 32 the private key, with child number, depth and parent fingerprint zero. BIP 85 warns that this reverses BIP 32's order.

    Quoted source text (3)

    Application number: 32'

    BIP 85, line 251

    the first 32 bytes are the chain code, and the second 32 bytes<ref name="curve-order" /> are the private key for the BIP32 XPRV value. Child number, depth, and parent fingerprint are forced to zero.

    BIP 85, line 253

    ''Warning'': The above order reverses the order of BIP32, which takes the first 32 bytes as the private key, and the second 32 bytes as the chain code.

    BIP 85, line 255
  15. ↩ a b Rule Application 128169' outputs 16 to 64 bytes as hex, the rest truncated.

    Quoted source text (2)

    Application number: 128169'

    BIP 85, line 270

    `16 <= num_bytes <= 64` Truncate trailing (least significant) bytes of the entropy after `num_bytes`.

    BIP 85, lines 274–276
  16. ↩ a b Rule Application 707764' Base64-encodes all 64 bytes and keeps the first 20 to 86 characters as a password.

    Quoted source text (2)

    Application number: 707764'

    BIP 85, line 286

    `20 <= pwd_len <= 86` [https://datatracker.ietf.org/doc/html/rfc4648 Base64] encode all 64 bytes of entropy. Remove any spaces or new lines inserted by Base64 encoding process. Slice Base64 result string on index 0 to `pwd_len`. This slice is the password.

    BIP 85, lines 290–294
  17. ↩ Rule BIP85-DRNG seeds a SHAKE256 stream with exactly the 64 bytes, for uses that need more than 64 bytes of input.

    Quoted source text (1)

    BIP85-DRNG-SHAKE256 is a deterministic random number generator for cryptographic functions that require deterministic outputs, but where the input to that function requires more than the 64 bytes provided by BIP85's HMAC output. BIP85-DRNG-SHAKE256 uses BIP85 to seed a SHAKE256 stream (from the SHA-3 standard). The input must be exactly 64 bytes long (from the BIP85 HMAC output).

    BIP 85, line 86
  18. ↩ a b c Rule Application 89101' rolls an N-sided die for PINs and other numeric secrets: rolls are zero-indexed; each trial reads ceil(ceil(log2 N) / 8) whole bytes from the DRNG and keeps their most significant ceil(log2 N) bits; a trial that is not below N is skipped.

    Quoted source text (6)

    Application number: 89101'

    BIP 85, line 393

    Use this application to generate PIN numbers, numeric secrets, and secrets over custom alphabets.

    BIP 85, line 400

    Roll values are zero-indexed, such that an N-sided die produces values in the range <code>[0, N-1]</code>, inclusive.

    BIP 85, lines 403–404

    Create a BIP85 DRNG whose seed is the derived entropy.

    BIP 85, line 406

    bits_per_roll = ceil(log_2(sides)) bytes_per_roll = ceil(bits_per_roll / 8) Read <code>bytes_per_roll</code> bytes from the DRNG. Trim any bits in excess of <code>bits_per_roll</code> (retain the most significant bits). The resulting integer represents a single roll or trial.

    BIP 85, lines 410–415

    If the trial is greater than or equal to the number of sides, skip it and move on to the next one.

    BIP 85, lines 416–417
  19. ↩ Rule A derived key can, with probability below 1 in 2^127, be zero or not below the curve order; software should then fail hard, and the user moves to the next index.

    Quoted source text (2)

    should hard fail (forcing users to iterate to the next index).

    BIP 85, line 232

    (Note: this has probability lower than 1 in 2127.)

    BIP 85, line 234
  20. ↩ Editorial inference A derived mnemonic, WIF key or extended key is an ordinary one: the receiving wallet uses it as it would any other, and nothing in it records that it was derived. This follows from BIP 85's outputs being standard encodings; BIP 85 does not say it in these words.

    Quoted source text (2)

    can be fed into whatever method a wallet uses to derive the initial mnemonic seed or root key.

    BIP 85, line 23

    encode as a compressed WIF that will be used as the hdseed for Bitcoin Core wallets.

    BIP 85, lines 237–238
  21. ↩ Rule BIP 85 records that it is not backwards compatible with any other existing specification.

    Quoted source text (1)

    This specification is not backwards compatible with any other existing specification.

    BIP 85, line 478
  22. ↩ Author’s rationale The authors note that some wallets may be inherently less secure, such as hot wallets on smartphones or Lightning Network nodes, so sharing one mnemonic with them is unsatisfactory.

    Quoted source text (1)

    Neither scenario is particularly satisfactory for security reasons. For example, some wallets may be inherently less secure, like hot wallets on smartphones, JoinMarket servers, or Lightning Network nodes.

    BIP 85, line 46
  23. ↩ History BIP 85 (Kosakovsky, Karve), Deterministic Entropy From BIP32 Keychains, was assigned in 2020 and is recorded as Deployed and Informational, at version 2.1.0.

    Quoted source text (2)

    Title: Deterministic Entropy From BIP32 Keychains Authors: Ethan Kosakovsky <ethankosakovsky@protonmail.com> Aneesh Karve <dowsing.seaport0d@icloud.com> Status: Deployed Type: Informational Assigned: 2020-03-20

    BIP 85, lines 4–9

    Version: 2.1.0

    BIP 85, line 11