Talk slide at Blockchain&DAPPs technologies meetup held on 11th April 2018 @ Microsoft - Singapore.
The slides cover the basic concept of bitcoin wallet functionalities.
How to Troubleshoot Apps for the Modern Connected Worker
Bitcoin Wallet & Keys
1. Bitcoin Wallet & Keys
Sun Sagong @ Microsoft - Singapore
Blockchain&DAPPs Technology meetup
(11Apr2018)
2. Key Roles of Bitcoin Wallet
• 1. Manage Public & Private Key pairs and
addresses that are necessary to make payments.
• 2. Manage UTXO amounts in the Bitcoin network
and check transaction histories.
3. Private Key => Public Key => Bitcoin Address
• Private Key is the the root of user control over
all funds associated with the corresponding
bitcoin address.
6. UTXO - Unspent Transaction Output
• UTXO will be spent as an input in a new transaction.
Transaction 1 (TXID)
OUTPUT
(UTXO)
● Sequence Number
● Amount of Bitcoins
● ScriptPubkey
(locking script)
INPUT
Transaction 2 (TXID)
OUTPUT
(UTXO)
INPUT
● TXID of UTXO
● Sequence Number
● ScriptSig (unlocking
script)
Structure of a transaction (non-coinbase)
7. Previously Used Wallet Structures
Type-0 nondeterministic (random) wallet
A collection of randomly generated keys
Type-1 deterministic (seeded) wallet
A deterministic sequence of keys derived from a seed
8. Hierarchical Deterministic Wallet - BIP32
Type-2 HD wallet
A tree of keys generated from a single seed
Password
Salt
PBKDF2(HMAC-SHA512, Password, Salt, 2048, 512)
HMAC-SHA512
512-bits
From mnemonic to seed
9. Creating Master Keys and Chain Code
Type-2 HD wallet
A tree of keys generated from a single seed
HMAC-SHA512
512-bits
256-bits
10. Private Child Key Derivation
Type-2 HD wallet
A tree of keys generated from a single seed
512-bits
256-bits
HMAC-SHA512
256-bits
11. Multipurpose HD Wallet Structure - BIP43 & 44
BIP-43 & 44 specifies the structure as consisting of five predefined tree levels:
• m / purpose' / coin_type' / account' / change / address_index
1. The first-level "purpose" is always set to 44'. - BIP 43
2. The second-level "coin_type" specifies the type of cryptocurrency coin,
allowing for multicurrency HD wallets where each currency has its own
subtree under the second level. - BIP 44
12. Wallet Best Practices
● Mnemonic code words, based on BIP-39
● HD wallets, based on BIP-32
● Multipurpose HD wallet structure, based on BIP-43
● Multicurrency and multiaccount wallets, based on BIP-44
Mastering Bitcoin 2nd Edition - Chapter 5: Wallets
https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch05.asciidoc