5
votes
Accepted
How does this simple script use the OP_CHECKSIG opcode?
Let's run through the program.
The stack starts as <A sig> <A pubkey>.
You run OP_DUP. The stack is now <A sig> <A pubkey> <A pubkey>.
You run OP_HASH160. The stack is ...
3
votes
Is SIGHASH_NONE encompassing of other signature types?
SIGHASH_NONE implies that Input 2 will only spend if Input 1 is included in the transaction.
This is false.
Input 2 is essentially a blank check. SIGHASH_NONE signs none of the outputs (I don't care ...
3
votes
Quadratic hashing problem: Why not just create new OP code "CHECKSIG2" to fix?
Note: As of 2020 this answer is obsolete, as BIP143 / SegWit has been in use for years which fixes this concern.
You can fix it this way, and someone is in the process of doing so.
The problem with ...
3
votes
Accepted
(CHECKSIG) Why is the ScriptPubKey from tx-inputs part of the signature?
AFAIK this was a design choice by Satoshi originally that is unnecessary for the reasons stated in the OP. There is a comment about this in bitcoinj
// Set the input to the script of its output. ...
3
votes
Accepted
Validation of segwit v0-v1 tx automatically adds OP_CHECKSIG?
In the original design of Bitcoin, the conditions for spending an output would be explicitly defined in the output script (scriptPubKey). P2PK, P2PKH and bare multisig are examples of this. However, ...
2
votes
Can't Make Sense of Why OP_CHECKSIG Fails Here
OP_CHECKSIG needs to have the whole transaction to hash and to verify the tx. Btcdeb has the feature of allowing the tx as an argument however the website you linked doesn't hence this opcode is ...
2
votes
Accepted
What is type 'pubkey' in a scriptpubkey output from getrawtransaction?
The script for an output describes the condition that must be satisfied for the money to move.
It means that the public key is contained in the scriptPubKey. Usually, the scriptPubKey only contains a ...
2
votes
Accepted
Signature verification in python
The way that VerifyingKey works is that it will actually hash the message before it verifies. The default hashing algorithm is sha1, so you will need to specify it to be sha256 as that is what Bitcoin ...
2
votes
Accepted
Bitcoin P2PKH transaction - two questions
The signature is mathematically generated using the private key and the message, but is not the message itself (it uses the hash of the message during the signing process, the message is not ...
2
votes
Accepted
How is subscript computed for OP_CHECKMULTISIG?
The main confusion here comes from this :
First, generate the script by concatenating [sigScript][OP_CODESEPARATOR][pubkeyScript]
Then you add :
I understand that script execution has evolved ...
2
votes
"mandatory-script-verify-flag-failed (signature must be zero for failed check(multi)sig operation)"
After some additional research and helpful information found here, I was able to conclude the following:
Transactions encoded on 0.12.X bitcoin and then broadcast on 0.15 bitcoin may encounter "...
1
vote
Accepted
Why do we need public key as part of Witness in P2WPKH transactions?
This was discussed today on the #bitcoin-wizards IRC channel. The reasons offered by Andrew Poelstra (andytoshi) were:
"Segwit had enough scope already." That is, it was already a large change that ...
1
vote
Accepted
How do people know how to construct the OPCodes?
Bitcoin Script is a programming language. As such, it is similar to other languages - You need to know what you are trying to achieve to be able to write in it.
The script you've presented is a P2PKH ...
1
vote
Accepted
funding and spending a "no-multisig/no segwit" P2SH tx
Now I understand, why there was no answer - it gets really long :-)
So I answer it by myself. I am with bitcoin core (getinfo) version 150100, on OpenBSD (ksh) and OSX (bash v3):
I solved it on ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
checksig × 20signature × 7
script × 5
transactions × 4
multi-signature × 3
transaction-verification × 3
p2pkh × 3
sighash-flags × 3
bitcoin-core × 2
bitcoind × 2
segregated-witness × 2
p2sh × 2
message-signing × 2
sighash × 2
public-key × 1
protocol × 1
bitcoin-cli × 1
utxo × 1
ecdsa × 1
scalability × 1
java × 1
taproot × 1
escrow × 1
p2pk × 1
p2tr × 1