5.1 - HD Wallets and Seeds
5.1 - HD Wallets and Seeds
and Seeds
BIP-32
HIERARCHICAL DETERMINISTIC
WALLETS
2
Hierarchical Deterministic Wallets
• Hierarchical Deterministic Wallets are wallets
that can be easily backed up with seed word
lists.
• If you lose the device holding your wallet, you
can recreate the wallet using your seed words,
and regain access to your funds.
• You can use the seed words to create the same
wallet on several different devices.
• Most modern wallets are hierarchical
deterministic wallets.
3
Hierarchical Deterministic Wallets (HD)
• Hierarchical: because all keys and addresses in
the wallet are derived from one initial “master
seed” (i.e. a very large number).
• The master seed is used to generate the initial key
• Sub-keys are generated from the initial key (i.e.
child keys, grandchild keys, etc.)
4
Master Seed = Number = Seed Words List
• Master seeds are a random number
• The number is represented by a list of words.
• It is easier for humans to remember a list of words than
large numbers.
6
SEED WORD LISTS
7
Seed Word Lists
• Lists of words which function as wallet backups.
D10
Wallets and Seeds
• Seed word lists are used to back up most digital
wallets:
Cell phone wallets
Computer wallets
Hardware wallets
Browser plugin/extension wallets
• Seed word lists aren’t used to back up some
wallets:
Paper wallets
Custodial wallets
9
When you set up a wallet
• Your wallet software will supply you with a word
list if you are setting up a new wallet.
• Wallets do not come with seed word lists coded
into them.
• Wallets use a number of “environmental factors”
to generate a random number.
• The random number determines which words to
give you.
10
How seed word lists are generated
(short version)
11
How seed word lists are generated
(slightly longer explanation…)
1. During installation the wallet generates a
random 128-bit number (i.e. the Seed).
2. The random number is hashed (SHA-256)
3. The first 4 bits of the hash are added to the
end of the random number.
4. The resulting 132-bit number is split into twelve
11-bit numbers.
5. Each word in the BIP-39 word list maps to a
specific number.
6. The ordered sequence of words represents the
initial seed number.
12
12 Seed Words = 132 Bit Number
11001000100010001101110101000110001100010110
10000011010011111100110111010110000111001100
00011011010110011110011100011110100111110101
13
Antonopoulos, A. and G.
Wood (2018). Mastering
Ethereum. Implementing
Smart Contracts, O'Reilly.
14
Seeds Can Generate Keys for
Different Coin Types
15 https://github.com/satoshilabs/slips/blob/master/slip-0044.md
BIP-39
16
BIP-39 Standard
19
Some Wordlist Considerations (BIP-39)
20 https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki
Note:
Some wallets do not use BIP-39
21 https://electrum.readthedocs.io/en/latest/seedphrase.html
DERIVATION PATHS
22
Derivation Paths
• There are different paths which can be used to
derive keys from the master key.
• The default derivation path for Bitcoin is
m/44'/0'/0'/0.
• Each number in that path represents a certain
level and path in the tree.
m / purpose' / coin_type' / account' / chain / address_index
24
What Seed Word Lists and Derivation
Paths Mean for an Investigator
• If you know a person’s seed word list:
1. You can generate all their keys and addresses.
2. You can control spend their cryptocurrency
3. You can map out all their transactions
• You need to know their wallet type:
• When you re-create the suspect’s wallet, you
need to use a wallet which uses the same
derivation paths.
26
Bitcoin Improvement Proposals (BIP)
27