Skip to main content
7 votes

XPRIV/XPUB type for P2TR

The concept of an xpub originates from BIP32, where it denotes an extended public key, from which multiple child keys can be derived. At the time of BIP32, there was really only one address type ...
Pieter Wuille's user avatar
4 votes

Why does each Bitcoin wallet application generate the same new receive address?

Many wallets are HD wallets. This means that keys are created using a process that is both hierarchical and deterministic. Hence H.D. Therefore address generation is deterministic. Meaning that the ...
RedGrittyBrick's user avatar
4 votes
Accepted

How can a hacker steal the funds received in the future when there is only an xpub on the server?

For websites selling goods for bitcoin it is a common practice to use xPub to derive a new address for each customer. This has two benefits 1) using a fresh address protects the merchants privacy as ...
Juha Siivikko's user avatar
3 votes
Accepted

Core-Lightning Derviation Path

The node public key is not derived using BIP32. It's derived from the hsm_secret using an HKDF. The hsmtool utility can help you derive keys from your hsm_secret. I described in this issue how every ...
Antoine Poinsot's user avatar
3 votes
Accepted

Mnemonic from Node.js app not restoring in other wallets

You are running into the gap limit. When restoring a wallet from a mnemonic, the wallet software checks the generated addresses one by one until it finds a long enough gap of addresses that have never ...
Vojtěch Strnad's user avatar
3 votes
Accepted

How is it that HD wallets can be restored from seed words without the chain code entropy being known?

From the section From mnemonic to seed in BIP39: To create a binary seed from the mnemonic, we use the PBKDF2 function with a mnemonic sentence (in UTF-8 NFKD) used as the password and the string &...
Lepus Cyberneticus's user avatar
3 votes

Python library for Multisignature HD wallets

Stepan Snigirev's embit library: https://github.com/diybitcoinhardware/embit/blob/master/src/embit/bip32.py It powers the Specter DIY hardware wallet, Specter Desktop software wallet, and the ...
Keith Mukai's user avatar
3 votes
Accepted

Advanced options of a Bitcoin wallet in bluewallet

The main trade-offs among the three Bitcoin wallet options available in BlueWallet App are related to transaction fees, compatibility, error detection, and privacy. If you prioritize having the lowest ...
deyw's user avatar
  • 550
2 votes

How is an HD Wallet Key Generated?

HMAC-SHA512 is a function that can take arbitrary length input and always produce 512 bit output. So the seed that is the input to the function can be 192, 256, or 512 bits (or really any other length)...
Ava Chow's user avatar
  • 70.5k
2 votes

I need to get BTC addresses from a 12 word phrase, but I don't understand what to do next

To get from the seed to the BIP84 address (intended for the P2WPKH), you must follow the derivation path defines in BIP84 standard and apply the appropriate derivation operation. The derivation path ...
dassd's user avatar
  • 1,079
2 votes
Accepted

Does BIP44 limit the maximum number of keys? (and some related questions)

Am I right, is this a derivation path for a Bitcoin wallet that follows this standard? Close. There is also an account level in between. Also, there is no distinction between receive and change ...
Pieter Wuille's user avatar
2 votes
Accepted

What's the point of hardened derivation when we can achieve the same effect using non-hardened derivation with a secret parent chain code?

You're quite right that in theory, there is likely no difference between using BIP32 hardened derivation, and using a secret xpub (I won't say no difference with certainty, as I'm not sure a security ...
Pieter Wuille's user avatar
2 votes
Accepted

Is there any benefit from creating hardened child keys from unhardened parents?

No, there generally is no benefit to use hardened derivation following unhardened derivation. I'm also not aware of anyone using such a construction. However there are test vectors that do this since ...
Ava Chow's user avatar
  • 70.5k
2 votes
Accepted

Need Help Deriving Extended Private Key from Bitcoin Root Extended Public Key and Non-Hardened Extended Private Key

Here's some working code for calculating a parent extended private key from a master extended public key and child extended private key. #!/usr/bin/env python3 # pip install hdwallet # pip install ...
inersha's user avatar
  • 3,083
2 votes

Lost funds? Generated child address (HD Wallet BIP32) without Node path

If you're only missing part of the derivation path, then the key can still be generated from the master private key. The issue is just that Bitcoin Core doesn't search all derivation paths (that'd be ...
Ava Chow's user avatar
  • 70.5k
1 vote
Accepted

Having Address format, infer derivation path or BIP used

No, you cannot. One issue is as you pointed out that some address types have multiple standard derivation paths/methods associated with them, and the data encoded inside the address is ...
Pieter Wuille's user avatar
1 vote
Accepted

Where does the term "derivation path" originate

Is "derivation path" the correct term and where did it come from It is very widely used and you can see part of the origins in BIP-44 from 2014-04-24 Path levels We define the following 5 ...
RedGrittyBrick's user avatar
1 vote

Lost funds? Generated child address (HD Wallet BIP32) without Node path

I managed to recover the funds thanks to Ava Chow's help! Blog blog with screenshots here I couldn't properly find the right derivation path so I used https://iancoleman.io/bip39/ I put my master ...
stifou's user avatar
  • 21
1 vote
Accepted

Why do PSBT and Descriptor enforce providing the BIP32 derivation path from the root?

There is no such requirement. Any key in a derivation path is a master key for all children derived from it. It's trivial to make xprv2 a master key within a descriptor or PSBT. Even if there were a ...
Ava Chow's user avatar
  • 70.5k
1 vote

Why does each Bitcoin wallet application generate the same new receive address?

New receive addresses in Bitcoin wallets like Sparrow, Ledger Live, BlueWallet, and Nunchuk are not randomly generated. They are derived deterministically from the wallet's seed using a specific ...
jonny's user avatar
  • 11
1 vote

How do I move (sweep, export) my private keys from my Electrum standard wallet to a new HD wallet using Electrum?

Just send your bitcoins to an address in the HW.
Abdussamad's user avatar
  • 2,699
1 vote
Accepted

Why do bip32 (HD Wallet) xprv key strings all start with

The xprv format contains some metadata about the key it contains. Part of that metadata is what level from the root it is (an xprv can be derived from another xprv, incrementing the level by one). ...
Pieter Wuille's user avatar
1 vote

I wrote down my 12 words before uninstalling my app. I put them in after reinstalling the app and it gives name a different wallet address, why i?

Current wallets create a new address every time you ask them. This is to improve your privacy. The wallet keeps track of all these addresses. If you restore a Hierarchical Deterministic (HD) wallet ...
RedGrittyBrick's user avatar
1 vote

Import existing address to BIP-32

No, that is not possible. BIP 32 is not a wallet, it is a method for deriving many keys from a master secret in a deterministic way. There is no way of deriving a specific unrelated private key from a ...
Ava Chow's user avatar
  • 70.5k

Only top scored, non community-wiki answers of a minimum length are eligible