Skip to main content
31 votes
Accepted

Is it possible to convert a taproot address into a native segwit address?

I am afraid the sent coins are irrevocably burned. The reason is that P2TR addresses encode a (tweaked) public key, while P2WSH addresses encode a script hash. If someone would take a P2TR address so ...
Pieter Wuille's user avatar
26 votes
Accepted

Is a bitcoin address collision possible if generating 90 million addresses every 4 hours?

Because of the Birthday paradox, you only need 280 addresses (despite there existing 2160 different address combinations) before a collision becomes probable. Thankfully, that is still an enormous ...
Pieter Wuille's user avatar
25 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

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
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 ...
Murch's user avatar
  • 76k
15 votes
Accepted

Why is Bitcoin address encoded in base58?

Why base-58 instead of standard base-64 encoding? Don't want 0OIl characters that look the same in some fonts and could be used to create visually identical looking account numbers. A string with ...
Tailer's user avatar
  • 3,669
10 votes
Accepted

Which wallet libraries officially intend to use Bech32 addresses, and will the addresses generated by them be compatible?

Bech32 is an address format that was only recently proposed. While its design had input from multiple wallet authors, it is way too early to say anything about adoption. It is important to realize ...
Pieter Wuille's user avatar
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 ...
skaht's user avatar
  • 3,077
10 votes
Accepted

Replacing ECDSA (SECP256k1) with Schnorr signatures

Schnorr will replace ECDSA, the signing algorithm, but both still use the same elliptic curve and thus the same public and private keys, etc. Regardless, compatibility with ECDSA must be kept too ...
meshcollider's user avatar
  • 11.9k
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

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 ...
Sven Williamson'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
8 votes
Accepted

How to generate addresses in PHP

Use BitWasp Bitcoin-php library https://github.com/Bit-Wasp/bitcoin-php <?php use BitWasp\Bitcoin\Bitcoin; use BitWasp\Bitcoin\Key\PrivateKeyFactory; $network = Bitcoin::getNetwork(); $privateKey ...
Farghaly's user avatar
  • 883
8 votes

How do I create a new address in Electrum?

For one new wallet type in electrum console: wallet.create_new_address(False) For 100 new wallets type in electrum-console: for i in range(0, 100): print wallet.create_new_address(False) or just (...
Geograph's user avatar
  • 201
8 votes

How is a Litecoin address generated?

Litecoin uses exactly the same procedure to generate addresses, the only difference is the network prefix. On step 4 (Add version byte in front of RIPEMD-160 hash) instead of 0x00 for bitcoin use ...
Stepan Snigirev's user avatar
8 votes

What is the difference between your address and your public keys

cited: A Bitcoin address is a 160-bit hash of the public portion of a public/private ECDSA keypair. a picture may make it easier to understand how an address is generated from a public key; Image ...
Cyker's user avatar
  • 257
8 votes

Is a bitcoin address collision possible if generating 90 million addresses every 4 hours?

A very relevant answer can be found here: Is Each Bitcoin Address Unique? This is a question of the birthday attack on the hashes. Bitcoin addresses (assuming the "normal" style starting with a 1) ...
meshcollider's user avatar
  • 11.9k
8 votes
Accepted

How does the Bitcoin protocol deal with address collisions in wallets?

Creation of an address is an entirely offline operation; there is no communication with the network. If you'd (with unfathomable luck) create the same address as someone else, then you'll see incoming ...
Pieter Wuille's user avatar
7 votes

What's stopping someone from taking over all the bitcoin addresses?

There are about 2^256 private keys, 2^256 public keys, and 2^160 (simple) addresses. There are other addresses (multisig) that have more than one corresponding public key and thus more than one ...
Andrey Dzhukov's user avatar
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)....
Pieter Wuille's user avatar
7 votes
Accepted

How to generate a testnet address?

Bitaddress.org itself allows you to create Testnet addresses (hat tip to Nick ODell). The generator for testnet addresses can be found by appending ?testnet=true to the URL. The site now appears to ...
Murch's user avatar
  • 76k
7 votes
Accepted

Unknown Address Format Parsing Bitcoin Addresses from Blockchair Data

Having investigated this following @MCCCS's answer, the following is information about the addresses provided by Blockchair support in response to the issue I raised in their GitHub: In fact, there ...
Martin's user avatar
  • 329
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 ...
RedGrittyBrick's user avatar
7 votes
Accepted

How do blockchain explorers know if the address is really generated?

Bitcoin transactions on-chain do not have addresses. They have scripts as output. In theory, pretty much any script is legal on-chain (ignoring standardness rules), including many unspendable ones. To ...
Pieter Wuille's user avatar
6 votes
Accepted

python-bitcoinlib | Create Private Keys, Public Keys and Addresses - How to Do It?

Sorry I am not familiar with python-bitcoinlib but if your goal is to just create keys/addresses you can use this library (disclosure: I wrote it) the following way: Generating a private key ...
Mike D's user avatar
  • 3,569
6 votes
Accepted

How is it possible that the same WIF Private Key generates two different addresses?

The same private key can be used to derive a couple of different addresses. For example, there will be a different address generated depending on whether you use a compressed or uncompressed public ...
chytrik's user avatar
  • 18.3k
6 votes
Accepted

Does Bitcoin Core accepts uncompressed address generation?

You can import an old uncompressed key. It'll work fine. Getnewaddress always uses scripts with 'compressed' keys now. BIP-143 (segwit) style inputs also require compression. The smaller key format ...
G. Maxwell's user avatar
  • 7,727
5 votes
Accepted

What's the relationship of Bitcoin addresses to public keys?

you generate a Bitcoin address basically by hashing a public key with a RIPEMD160 hash function, You use HASH160, actually. HASH160 is RIPEMD160(SHA256(x)). This is a good resource for learning how ...
Nick ODell's user avatar
  • 29.4k
5 votes

How does one create a brain wallet from a seed using SHA256?

A bitcoin generator can generate an address. i.e. https://brainwalletx.github.io/
user289394's user avatar

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