Skip to main content

All Questions

Filter by
Sorted by
Tagged with
10 votes
1 answer
9k views

Difference between a SegWit address and a P2SH address

Let there be an address 3ABCDEFGHJKDJHDH.... How can I understand if it's a SegWit address or a MultiSig address?
MCCCS's user avatar
  • 10.2k
9 votes
2 answers
3k views

What the difference between old segwit (3) and new segwit address (bc)?

i'm not that kind of person who understands cryptography and math, can you tell me simply the main purpose of new segwit address? are transactions fee the same for new segwit (bc1)? instead of "Old ...
JackSmith's user avatar
  • 103
8 votes
3 answers
11k views

What is the Witness and what data does it contain?

I've learned about the Segregated Witness but couldn't find info on breaking it down. I know usually when legacy addresses are used the public keys for example will be under Scriptig. With P2SH, I ...
Robert's user avatar
  • 351
6 votes
2 answers
806 views

Why are P2WSH addresses larger than P2SH addresses?

One would, perhaps naively, assume that both addresses are hashes of scripts and therefore ought to be the same size.
Bertram Lund's user avatar
5 votes
2 answers
2k views

Birthday attack on P2SH

The Segwit Benefits document has this to say about P2SH security for base transactions: Multisig payments currently use P2SH which is secured by the 160-bit HASH160 algorithm (RIPEMD of SHA256). ...
Rich Apodaca's user avatar
  • 2,431
5 votes
1 answer
129 views

Why wasn't P2SH-wrapped P2WPK added to any BIP?

Pieter Wuille wrote this: There is no such thing as P2WPK; the only valid witness v0 programs are P2WPKH (OP_0 + hash160 of pubkey) or P2WSH (OP_0 + sha256 of script). But I don't understand the ...
Mercedes's user avatar
  • 872
4 votes
1 answer
4k views

How to generate a native Segwit address and P2SH Segwit address from a standard WIF?

Can I have the steps to generate a native Segwit address from a standard WIF? And the steps to generate a P2SH Segwit address from the same WIF? How do these two formats differ and why are there two?...
arshbot's user avatar
  • 1,808
4 votes
1 answer
2k views

Redeem script for segwit addresses

How does one derive the Redeem Script for the new Pay-to-Witness Pubkey Hash addresses? With existing P2SH it's revealed after providing N number of Public Keys through a createmultisig function in ...
m1xolyd1an's user avatar
  • 5,676
3 votes
1 answer
145 views

Why does SegWit implement new address formats?

I would consider myself quite up-to-par with the concept and in-depth functionalities of SegWit (segregated witness). I just don't understand one key aspect of it; P2SH and bech32 addresses. why on ...
bitcash complex's user avatar
3 votes
1 answer
2k views

How to quickly find the private key from Segwit P2SH address?

I have a very large list of Segwit addresses for bitcoin, starting with '3' and do not know the corresponding legacy '1' address for them. How can I quickly find the corresponding legacy address to ...
Joe's user avatar
  • 31
2 votes
1 answer
667 views

What is the purpose of P2WPKH-P2SH?

When I ask the google what is the purpose of P2WPKH nested in P2SH, it says the following: This allows the user to send funds to a SegWit (Segregated Witness) address using a non-SegWit transaction, ...
dassd's user avatar
  • 1,099
2 votes
2 answers
230 views

If I was developing a Bitcoin wallet, should I support both legacy and compatibility addresses?

To receive funds, I was thinking of giving a user the option of displaying two QR codes: Legacy - p2phk e.g. 1AKDDsfTh8uY4X3ppy1m7jw1fVMBSMkzjP Compatibility - p2sh(p2wpkh) e.g. ...
Malone's user avatar
  • 207
2 votes
1 answer
212 views

What is the link between address and use of the UTXO?

I state that I'm still a beginner. I need some clarification. I am using the Testnet. This is the information regarding the address I used to receive funds from a Faucet bitcoin-cli validateaddress ...
MaXbeMan's user avatar
  • 125
2 votes
2 answers
4k views

Bitcoin - Technical difference between P2PKH and P2SH address generation?

I was convinced that the only difference between the generation of addresses starting with '1' and '3' was simply changing the prefix added to the digest from 0x00 to 0x05 after the ripemd160 part. ...
fortesp's user avatar
  • 25
2 votes
1 answer
736 views

How to properly backup a address with private key after 'addwitnessaddress' command

I've received my balance to my addresss that starts with 3 which is after 'addwitnessaddress' command. I'd like to know that how do I properly backup my balance to keep safety. Bitcoin Core has a ...
bitcoinlearner's user avatar
2 votes
2 answers
1k views

signrawtransaction of a P2SH-P2WPKH spend seems to be broken?

I'm trying to spend a SegWit output on testnet using the Bitcoin core's RPC commands. Without importing the private key into my wallet (i.e. w/o addwitnessaddress). I wonder if anyone had luck ...
tbee's user avatar
  • 21
1 vote
1 answer
395 views

Can The Redeem Script Consist Of Only 1 Public Key In P2SH Transactions:

I have a few questions relating to Bitcoin Signatures And P2SH: Why is P2SH used as opposed to other forms? Is it still prevalent today - has SegWit made it redundant or less useful, if not, what is ...
Jamo's user avatar
  • 177
1 vote
1 answer
117 views

Is it possible to "label" Segwit spendable output ScriptPubKeys with arbitrary bytes?

If one created a Redeem Script for a transaction output following a P2SH-P2WPKH pattern but with bytes prepended, something like: OP_PUSHBYTES_8 41206c6162656c2e OP_DROP OP_0 OP_PUSHBYTES_20 <20 ...
Lee's user avatar
  • 970
1 vote
1 answer
204 views

Are P2PKH or P2SH transactions malleable?

BIP66 fixed one source of transaction malleability and segwit, to my understanding, fixed the rest of the sources. Yet, there are still many common types of non-segwit transactions in use, like P2PKH ...
Pedro's user avatar
  • 773
1 vote
1 answer
1k views

Segwit with Multisig

I was analyzing a Bitcoin transaction that works both with Segwit and non-Segwit for multisig Scripts. Here is the transaction: https://www.blockchain.com/en/btc/tx/...
Allan Romanato's user avatar
1 vote
1 answer
3k views

How to get legacy address and private key from Segwit P2SH address?

I have a Segwit P2SH address (starting with 3...) with the corresponding private key and need to obtain the legacy address (starting with 1...) and the private key. Is this possible?
JohnDoe's user avatar
  • 13
1 vote
2 answers
1k views

Create Pay to Witness Script Hash in Pay to Script Hash Address

I'm trying to generate a multisignature, segwit compatible address as a P2WSH nested in BIP16 P2SH as described in BIP141. Basically, I want to construct a P2WSH-nested-in-P2SH address from n public ...
John Dorian's user avatar
1 vote
2 answers
143 views

In practice, are redeemScripts commonly reused?

In regards to P2SH-P2WSH transactions, are Txout-script values identical between transactions? Is it reasonable to expect a business or vendor that accepts bitcoin to be using the same redeemScript ...
Rook's user avatar
  • 333
1 vote
1 answer
374 views

segwit nested in p2sh

I understand that P2SH addresses are used to allow "segwit unaware" wallets to create outputs spendable by segwit wallets (please correct me if I got something wrong). For new clients I think I got it:...
domegabri's user avatar
1 vote
1 answer
860 views

Multisig scripts hashing (p2sh): difference between legacy and segwit

Some time ago I noticed that, given the same inputs, addmultisigaddress and createmultisig Bitcoin core's methods were generating different p2sh (addresses). I asked around and a user from the ...
Michele's user avatar
  • 113
0 votes
1 answer
346 views

Access funds on legacy address related to segwit address from which I have private key

The situation Hello. Our company running BTC pool. We've been mining BTC for a while and used segwit address 32Z3eXSPgxcHj2fnQy8d6dg66eVtZfxrBM as pool adress. But when we finally found a first ...
user3166379's user avatar
0 votes
1 answer
388 views

Why is not Bech32 address selected as default in Bitcoin Core 0.16.0?

So, thankfully Bitcoin Core 0.16.0 came to us, general people. But however, native segwit address Bech32 wasn't selected as default. Is not it better to use a Bech32 address right away rather than ...
bitcoinlearner's user avatar
0 votes
1 answer
710 views

P2SH-P2WPKH private key or revert to P2WPKH

Is there a way to get the private key out of an P2SH-P2WPKH address, using Bitcoin Core 0.15.1? If not, is there a way to get the origin P2WPKH address to get the private key out of this address?
DjangoSi's user avatar
0 votes
0 answers
287 views

Generate p2sh-segwit and address bech32

When I use bitcoin-cli getnewaddress "" "p2sh-segwit" which kind of script is inside And can I convert if in bech32?
foo_bar's user avatar