Skip to main content
36 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. ...
arubi's user avatar
  • 1,864
24 votes
Accepted

How can I manually (on paper) calculate a Bitcoin public key from a private key?

I've spent a fair bit of time thinking about this and can provide a fairly comprehensive answer about the state of the art. But unfortunately the TL;DR is that we don't know how to do this (yet) in ...
Andrew Poelstra's user avatar
22 votes
Accepted

How would one "Encrypt" a message using a Bitcoin *public key* and use its private key to decrypt it?

Yes, this is possible. However, I want to upfront state that this is not advisable for multiple reasons: Bitcoin keys are intended to be single use for privacy reasons, and leveraging them for ...
Pieter Wuille's user avatar
22 votes
Accepted

Is any 256-bit combination a Bitcoin private key?

A secp256k1 private key is an integer between 1 and 115792089237316195423570985008687907852837564279074904382605163141518161494336, inclusive. The latter can be written as 2256 - ...
Pieter Wuille's user avatar
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 ...
Jestin's user avatar
  • 8,812
14 votes
Accepted

The length of the Bitcoin's private keys

Bitcoin uses the secp256k1 elliptic curve with 256 bit private/public key pair cryptography to render ECDSA functionality. The two bitcoin explorer (bx) commands below replicate statements/results in ...
skaht's user avatar
  • 3,057
14 votes

How do I protect my paper wallet from use by a different human who has used a random generator?

"Improbable" is an understatement. There are 2256 possible keys. In the entire universe, there are estimated to be "only" 2100 atoms. So the odds of someone else ending up with the exact same ...
abelenky's user avatar
  • 1,344
13 votes
Accepted

What makes an extended public or private key?

The extended public key contains just a bit more information than the public key and chaincode, but the public key and chaincode are all that matter for key derivation. The rest is just metadata about ...
Ava Chow's user avatar
  • 70.5k
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 ...
Jonas Schnelli's user avatar
11 votes

How can I get the private key from wallet.dat from 2011 Bitcoin software on WinXP?

The wallet.dat was created with Bitcoin Core (in 2011 it was called "Bitcoin"). You should install the newest version of Bitcoin-Core (0.14.2 by the time of writing). The wallet.dat from 2011 should ...
Jonas Schnelli's user avatar
11 votes
Accepted

What are the chances of getting duplicate wallet using bitcoinlib in python3?

When you create a private key, this process is (or at least should be) completely random - meaning that in theory, the probability of creating some specific private key is 1/N where N is the number of ...
mxbi's user avatar
  • 336
11 votes
Accepted

How can a deterministic wallet have one private key but multiple public keys

No, there is not one private key. There is one Master private key. The master private key is then used to generate more private keys in a deterministic fashion, i.e. using the same master private key, ...
Ava Chow's user avatar
  • 70.5k
10 votes
Accepted

Why do compressed and uncompressed public keys have to produce different addresses?

My question is: Why cant you just uncompress the compressed public key (effectively making it an uncompressed public key) and then derive the address. That way even if you use the compressed key, ...
Pieter Wuille's user avatar
9 votes

Does the private key of Bitcoin change everytime the address changes?

You have many private keys Quintessentially, a wallet is a key chain for your private keys plus optional convenience and usability functions. When you create a wallet, at least one but usually lots ...
Murch's user avatar
  • 75.5k
9 votes
Accepted

What is the safest physical to store a private key only to be accessed after death?

If you are comfortable with a command line, I have used ssss-split and ssss-combine for sharding encryption keys in a n-of-m scheme. These utilities use Shamir's Secret Sharing Scheme to safely break ...
Jestin's user avatar
  • 8,812
9 votes

Convert WIF to private key

converts WIF private key back to basic private key format import hashlib import base58 import binascii private_key_WIF = input("WIF: ") first_encode = base58.b58decode(private_key_WIF) ...
george7n's user avatar
9 votes
Accepted

How to sweep a segwit bech32 private key?

Use Electrum 3.1.1 and prepend "p2wpkh:" to the private key before importing or sweeping it. For example: p2wpkh:5Kkzs8XrJNAmf9VQDFeGBfaRvSByAvPK6DbDXw5BVqswWaXSG2Y
Abdussamad's user avatar
  • 2,699
9 votes

Importing private keys creates different address

Prepend "p2wpkh-p2sh:" to the private key before importing it into Electrum. For example: p2wpkh-p2sh:5Kkzs8XrJNAmf9VQDFeGBfaRvSByAvPK6DbDXw5BVqswWaXSG2Y
Abdussamad's user avatar
  • 2,699
9 votes

Can I recover btc sent to an incorrect address? (electrum)

Can I recover btc sent to an incorrect address? Confirmed Bitcoin transactions cannot be cancelled, reversed, undone or recovered. The only person who can give you your money back is the recipient, ...
RedGrittyBrick's user avatar
8 votes

Does the private key of Bitcoin change everytime the address changes?

If you are posting different questions I suggest, posting them up in different threads. But I'll try to answer all of them. 1) It doesn't work like that. Every address is a pair (private key, public ...
galileopy's user avatar
  • 344
8 votes

Import private key to coinbase?

Coinbase no longer supports any sort of wallet import (wonder why?). To quote Coinbase (June 2016 on https://support.coinbase.com/customer/en/portal/articles/2285419-how-do-i-import-an-existing-wallet-...
Jon Nylander's user avatar
8 votes
Accepted

How can my private key be revealed if I use the same nonce while generating the signature?

Let me rewrite your question in a different notation, where all lowercase values are integers and uppercase values are points. The group generator is G (a known constant). The private key is q, its ...
Pieter Wuille's user avatar
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 ...
Ugam Kamat's user avatar
  • 7,408
8 votes
Accepted

A security need for Bitcoin to fork to quantum resistant algorithm in a few years?

asymmetric ciphers Ones based on specific primitives, like RSA and ECDSA specifically. Symmetric algorithms are supposed to be safe. With approximately half the number of bits of security due to ...
Claris's user avatar
  • 15.4k
8 votes
Accepted

Is Sharding a Good Alternative to MultiSig?

Advantages of OP_CHECKMULTISIG over Shamir Secret Sharing for k-of-n: There is no need to reconstruct the actual secret key on one specific machine. With SSS, you're inherently relying on that one ...
Pieter Wuille's user avatar
8 votes

What exactly is "privatekeys.pw"?

The site is a joke, or at best a confusing attempt to educate. It literally lists all private keys, from low to high, as private keys are just numbers. There are of course way more than can be ...
Pieter Wuille's user avatar
7 votes

What roles of WIF(Wallet Import Format)?

Besides for the checksum, the WIF key is encoded in base58, where similar looking letters, such as uppercase "O" and "I", lowercase "l", and the number "0" are omitted. WIF does not hide the private ...
shmuli's user avatar
  • 295
7 votes
Accepted

Why do wallets use multiple private keys instead of one each?

Why is that so, don't you only need 1 private key to hold all bitcoins and manage them? Sure you could use only one private key and its associated address, but that is not recommended. It is more ...
Ava Chow's user avatar
  • 70.5k
7 votes

How to sweep private extended key from mycellium for bitcoin cash coins?

How to transfer unspent Bitcoin Cash from Mycelium to Coinomi? or: How to identify the internal and external addresses which hold unspent output and transfer/sweep the funds to another wallet? or: How ...
KOld's user avatar
  • 176
7 votes
Accepted

Every bitcoin wallet user has one Private Key or every address has one private key?

There seem to be a couple of misunderstandings that I will try to clarify (briefly). In public-key cryptography a pair of keys is used; a private and a public. The private is kept secret and the ...
karask's user avatar
  • 2,540

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