Questions tagged [sighash-flags]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
1answer
91 views

Do we still need SIGHASH_NOINPUT for Lightning Network?

In the original Lightning whitepaper, Joseph Poon advocates using SIGHASH_NOINPUT so that we can create the first commitment transaction which references the funding transaction txid without actually ...
0
votes
1answer
28 views

Is SIGHASH_NONE encompassing of other signature types?

Say I am building a transaction in private: Input 1 is signed with SIGHASH_SINGLE ( | SIGHASH_ANYONECANPAY) Input 2 is signed with SIGHASH_NONE | SIGHASH_ANYONECANPAY SIGHASH_NONE implies that ...
0
votes
1answer
81 views

How to generate the digest from a raw bitcoin transaction for verifying signature of specific input?

I'm writing a stand alone process that needs to verify that a known UTXO is part of a new transaction with a valid signature. Inputs [ UTXO, raw transaction, input_number ] How do to I verify the ...
3
votes
1answer
181 views

How was FORKID used in Bitcoin Cash at the original fork point and in all upgrades since?

References: https://github.com/bitcoincashorg/bitcoincash.org/blob/master/spec/replay-protected-sighash.md https://github.com/bitcoincashorg/bitcoincash.org/blob/master/spec/2018-nov-upgrade.md It ...
1
vote
1answer
55 views

For a transaction with a single input and output, is there a difference between SIGHASH_ALL and SIGHASH_SINGLE|SIGHASH_ANYONECANPAY

I have an signing implementation that already works for SIGHASH_ALL, and I'm trying to also support SIGHASH_SINGLE|SIGHASH_ANYONECANPAY. I'm referencing https://en.bitcoin.it/wiki/OP_CHECKSIG for the ...
0
votes
1answer
90 views

How to specify the right input and output to be signed for SIGHASH_SINGLE

For my understand, when building a new TX, need to produce a new scriptSig for the TX; and need add a sigHash code at the end of the TX. If the sighash type is SIGHASH_SINGLE, for a TX with multiple ...
1
vote
1answer
143 views

SIGHASH_SINGLE vbuterin/pybitcointools

Checking the implementation of Buterin's bitcoin tools I've noticed something strange. According to the Bitcoin developers guide, sighash_single signs only the outputs that match the input where the ...
2
votes
1answer
142 views

Why are SIGHASH flags signed as 4 bytes when only 1 byte is included in the transaction?

This article brought to my attention that SIGHASH flags are 4 bytes long when signed, but only the last byte is actually included in the transaction. Then OP_CHECKSIG adds 3 bytes 0x000000 back on ...
3
votes
1answer
349 views

I'm trying to create a new kind of escrow with bitcoin, not sure if it's possible

First off, I understand that the standard way to do escrow with bitcoin is a P2SH with a 2 of 3 multisig redeem script. I'd like to try and do escrow in the following way: names of 3 parties involved:...
1
vote
1answer
228 views

Using SIGHASH_NONE in P2SH address

I know that using SIGHASH_NONE in signatures is safe for a transaction only if at least one of the inputs is signed with SIGHASH_ALL, so that a miner can't change the outputs and reclaim the inputs. ...
7
votes
1answer
145 views

What SIGHASH flags does CoinJoin use?

What SIGHASH flags are used when constructing a CoinJoin transaction?
3
votes
2answers
2k views

How are SIGHASH flags encoded into a signature?

This page describes SIGHASH flags: OP_CHECKSIG extracts a non-stack argument from each signature it evaluates, allowing the signer to decide which parts of the transaction to sign. Since the ...