29 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 ...
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 ...
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 - ...
19 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 ...
  • 65.4k
13 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 ...
  • 3,569
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 ...
  • 2,947
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 ...
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 ...
  • 11.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, ...
9 votes
Accepted

Can same private key generate multiple addresses?

One private key maps onto two addresses - one that uses an uncompressed public key, and one that uses a compressed public key. What you might also be interested in is a deterministic wallet - a ...
  • 42.8k
9 votes
Accepted

How do I create a new address in Electrum?

With Electrum 2.x, a wallet can contain either keys you've imported from elsewhere, or keys which are generated (deterministically) by Electrum. You cannot store both types of keys in a single ...
9 votes
Accepted

Is the SHA256 value in the bitcoin address wiki accurate?

The problem is that you're treating the pubkey as string data. What you need to do is treat it as raw binary hexadecimal. If you use fileformat.info and calculate it using Binary Hash hex bytes you do ...
  • 615
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 ...
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 (...
  • 201
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 ...
  • 863
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 ...
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) ...
  • 11.5k
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 ...
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

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 ...
7 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
  • 2,570
7 votes
Accepted

Unknown Address Format Parsing Bitcoin Addresses from Blockchair Data

Having investigated this following @MCCCS answer, the following is information about the addresses provided by Blockhair support: In fact, there are no addresses on the Bitcoin blockchain. There are ...
  • 309
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 ...
6 votes

If I were to generate an address and it happens to collide, legally speaking, would a transfer constitute theft?

IANAL. What you describe is the act of taking something that isn't yours in full knowledge that somebody else invested effort and money to accumulate it. Just as with your Swiss bank example: The ...
  • 65.4k
6 votes
Accepted

Generate address with RSA private key

Not directly. You'd first have to convert your RSA private key into an secp256k1 ECDSA private key (a 256 bit value between 0x1 and 0xFFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFE BAAE DCE6 AF48 A03B BFD2 ...
6 votes
Accepted

How to get a wallet address and set label via RPC?

You may have already read this, but make sure you read this if you want to know about how the accounts feature of the core client works: https://en.bitcoin.it/wiki/Accounts_explained. (It's somewhat ...
  • 13.8k
6 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 ...
  • 65.4k
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 ...
  • 3,305
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 ...
  • 17.5k

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