42
votes
Accepted
ELI5: What's the difference between a child-key and a hardened child-key in BIP32
Essentially, a hardened child key is is computed with hash(parent private key + index), whereas a non-hardened child key is computed with hash(parent public key + index).
So what practical ...
33
votes
Key derivation in HD wallets using the extended private key vs hardened derivation
There's a lot of confusion here, mostly bits and pieces of the whole scheme that is Hierarchical Deterministic derivation, and finally two questions that seem to indicate missing some point about it.
...
21
votes
Accepted
How are different addresses generated from the same private key?
Private and public key correspond to a point on the secp256k1 curve. They have a one-to-one relationship.
The address is derived from the public key by performing a ripemd160 hash after a sha256 hash ...
21
votes
Accepted
Derivation of parent private key from non-hardened child
First we must understand how BIP 32 derives non-hardened private and public keys.
From BIP 32, deriving a child private key from an extended parent private key:
let I = HMAC-SHA512(Key = cpar, Data = ...
19
votes
Accepted
What is the wallet "word seed" that is commonly used in popular wallets clients and what does it do?
With HD wallets, a single key can be used to generate an entire tree of key pairs. This single key serves as the "root" of the tree. The word seed is simply a more human-readable way of expressing ...
11
votes
Accepted
What BIP32 derivation path does Electrum use?
It uses m/0/<n> for receiving addresses, and m/1/<n> for change addresses.
Here's some example bitcoinj code to generate receiving addresses from an extended public key.
String ...
11
votes
Accepted
difference between Master Public/private Key and Public/private Key?
With "Master public key" you probably refer to deterministic key derivation after bip32.
The correct term is "Master extended private key" (acronym xpriv) and "Master extended public key" (acronym ...
11
votes
How to get xpub or mpk(bip32) for my bitcoin core wallet?
Bitcoin Core (since 0.13) uses HD after BIP32 with only hardened private key derivation. Exporting the xpub would be useless, because other apps could not derive public keys (hardened derivation ...
10
votes
Accepted
How to use NBitcoin for BIP32 wallets
when you are doing
BitcoinAddress address1 = **pubKey**.Derive([some client data]).PubKey.GetAddress(Network.Main);
You are getting the bitcoin address, but not the master public key. (ExtPubKey)
A ...
10
votes
Accepted
Best Practices for hardened keys in HD wallets?
The simple (and I believe correct) answer is: use hardened keys everywhere except where a need for watching-only wallets is perceived, e.g. below the "account" level. A watching only-wallet in this ...
10
votes
How are different addresses generated from the same private key?
With Bitcoin, a single private key will have associated compressed and uncompressed private/public key pairs. Uncompressed public key addresses are larger in size than newer compressed public ...
10
votes
Accepted
Is the Electrum seed compatible with other wallets?
There are different "backup-standards".
Some use BIP39 (mnemonic) which lacks a flexible wordlist and versioning. It's used by KeepKey, Ledger, Trezor, Bitpay/Copay, etc.
Electrum uses a ...
9
votes
Best Practices for hardened keys in HD wallets?
It is possible for a custom implementation use hardened keys for all the leaf keys to enhance security in case of a single private key leak. This scheme will be incompatible with the standard ...
9
votes
How are different addresses generated from the same private key?
Whenever you are attempting to explain Bitcoin to anyone, it makes a lot of sense to simply state that the derivation private key > public key > address is deterministic. However, if you are ...
9
votes
Accepted
BIP32 recommends a 256 bit seed. Why do most Bitcoin wallets only use a 128 bit seed?
The reasons for the 3 numbers:
Bitcoin uses 256-bit ECDSA signatures. These require in the order of 2128 steps to find a private key from the public key is known. This is Bitcoin's security level: we ...
8
votes
HMAC "Bitcoin Seed" for BIP32
It is specified in BIP32 (https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki). The SHA512-HMAC function is reused because it is already part of the standard elsewhere, but it takes a key ...
8
votes
Accepted
Can I verify a sub public key came from it's parent public key in a HD wallet without involving any private keys?
Yes, you can, assuming that the child key isn't hardened, and you know the chain code of the parent public key and the index of the child. (Also known as the extended public key.)
Just compute
CKDpub(...
8
votes
Accepted
How does the client know the number of keys and coins when recovering from a seed?
There is a so-called gap limit. In Electrum, it's 20 by default but can be changed. But if you changed it up, remember that! Preferably write it next to your wallet's seed.
This means that the HD ...
8
votes
Accepted
How Do HD Wallets Keep Track of all accounts?
In general, HD Wallets use the following logic for how many addresses to query, and when to stop:
Start with account 0, generate gap limit number of addresses (usually 20)
Check for any transactions ...
8
votes
Accepted
How does BIP 39 mnemonic work?
Mnemonics are the private key separated in 12 words which joined together in the very same order produces the private key
That is incorrect. A mnemonic represents an entropy that is passed to a ...
7
votes
Accepted
How do I view the extended public key in Electrum?
How do I view my extended public key?
Go to Wallet > Master Public Keys, and copy the text that starts with xpub
What are the consequences of giving my extended public key to someone?
They can ...
7
votes
Accepted
How to import a HD wallet from an extended private key
Response to clarified first part
You're pretty close, I suspect you want something simpler like this (and then typing in the xprv you extracted from an Electrum 2.x (unencrypted) wallet file):
bx hd-...
7
votes
Accepted
How can I watch all addresses under HD wallet?
Full disclosure: I'm BlockCypher's Developer Advocate.
We have a series of HD Wallet Endpoints that we recently released that might suit your needs; you can read more about it here:
http://dev....
7
votes
Accepted
Can you detect that the addresses generated by an HD wallet came from a single wallet?
No.
All addresses generated by HD derivation are indistinguishable to someone who does not know the parent's master key (the private one for hardened derivation, the public one for normal derivation)....
7
votes
Where can I view my HD wallet seed in bitcoin core 13.2
To get the extended private masterkey itself (not a seed), you can use the dumpwallet command and provide it with a filename to dump your keys to. The extended master key will be at the top of the ...
7
votes
How many combinations are there from the BIP32 mnemonic list?
BIP 32 is not a mnemonic specification, so it has 0 possible combinations.
I assume you are talking about BIP 39. In that case there are are 2048^12 combinations for 12 word mnemonics, 2048^18 for 18 ...
7
votes
Accepted
How are Electrum addresses connected to my private key?
how did Electrum create a new address?
Electrum, and most modern wallets are Hierarchical Deterministic (HD) Wallets. They derive a series of private-keys from the "master private-key".
If ...
7
votes
Accepted
musig2 with BIP-32 style nonce chain
I wonder, could the public nonce list be generated from a chain code in the same manner that BIP-32 allows a list of public keys to be generated?
Absolutely not. (private) nonces need to be entirely ...
7
votes
Accepted
Is it possible to identify UTXOs signed by HD wallets?
Almost every wallet today uses HD key derivation. You'd need to go back to software from 2016 or earlier to find any that don't. So I'd say your question is moot.
That said, there certainly are ...
7
votes
How (un)safe is it to use non-random seed words?
There is a lot to unwrap here. I'll go over the points that need addressing, most important first:
Don't try to invent your own cryptographic scheme
If you read the manual to your wallet, it most ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
bip32-hd-wallets × 503wallet × 97
mnemonic-seed × 72
bitcoin-core × 69
private-key × 63
public-key × 42
bip44 × 32
electrum × 31
address-generation × 30
address × 29
xpub × 27
deterministic-wallets × 27
seed × 25
python × 20
multi-signature × 19
wallet-recovery × 19
transactions × 18
bitcoind × 18
bip × 16
hardened-derivation × 13
blockchain × 11
security × 11
cryptography × 11
wallet-security × 10
api × 9