Skip to main content

Questions tagged [checksig]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
47 views

Why does OP_CHECKSIG/OP_CHECKMULTISIG remove the signature from the subscript?

When OP_CHECKSIG is used, all instances of the signature are removed from the subScript before it's included in a transaction template to be verified. See also step 3 in this excellent diagram. The ...
Lee's user avatar
  • 877
3 votes
1 answer
216 views

Validation of segwit v0-v1 tx automatically adds OP_CHECKSIG?

When I create a segwit transaction v0 (P2WPKH) or v1 (P2TR key-path spend) I do like that (let's spend a P2TR output): Locking Script (of the P2TR output I'm spending): OP_1 PK_size PK Witness: 1 (...
alemaz98's user avatar
  • 143
0 votes
1 answer
259 views

Can't Make Sense of Why OP_CHECKSIG Fails Here

I'm try to get to grips with verifying the signature of a P2PKH transaction. I have an example transaction: 9ec4bc49e828d924af1d1029cacf709431abbde46d59554b62bc270e3b29c4b1 I am trying to verify the ...
Martin's user avatar
  • 329
1 vote
2 answers
809 views

How does this simple script use the OP_CHECKSIG opcode?

I have this Script P2PKH <A Signature> <A Public Key> OP_DUP OP_HASH160 <A Public Key Hash> OP_EQUALVERIFY OP_CHECKSIG The bitcoin.org documentation say this The entire ...
vincenzopalazzo's user avatar
0 votes
1 answer
293 views

Bitcoin Signature Verification

I am trying to implement the OP_CHECKSIG opcode of Bitcoin and verify whether a signature is valid or not. I have the signature that I recieve from the transaction data and the public key(the hex ...
Shubham Saxena's user avatar
0 votes
1 answer
144 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 ...
nick carraway's user avatar
2 votes
2 answers
418 views

How is subscript computed for OP_CHECKMULTISIG?

I'm trying to learn the Bitcoin protocol by implementing it, and I've got OP_CHECKSIG working (following instructions in https://en.bitcoin.it/wiki/OP_CHECKSIG), but I can't get an transaction input ...
Andreas Blaesus's user avatar
3 votes
1 answer
2k views

"mandatory-script-verify-flag-failed (signature must be zero for failed check(multi)sig operation)"

I forked the openwallet-android so that I could add my coin - (placeholders) placeh.io. The openwallet-android connects to electrumx server. I am able to get my chain to load correctly in electrumx ...
xagau's user avatar
  • 51
2 votes
1 answer
342 views

Why do we need public key as part of Witness in P2WPKH transactions?

As we want to minimize the data payload in a blockchain, which also led to concepts like SegWit, and is matter of discussion in Signature aggregation etc, I wonder why do we actually need to supply ...
jakob's user avatar
  • 313
1 vote
1 answer
160 views

How do people know how to construct the OPCodes?

The scriptSig is: OP_DUP OP_HASH160 404371705fa9bd789a2fcd52d2c580b65d35549d OP_EQUALVERIFY OP_CHECKSIG How did people know that this was the correct permutation of OPCodes and data?
Kyle Graham's user avatar
0 votes
1 answer
331 views

funding and spending a "no-multisig/no segwit" P2SH tx

I got inspired by this thread: Single signature P2SH redeem script Assume I want to "hide" my address as long as can be. So I want a P2SH tx, which only shows a redeemscript (hash of my pubkey) on ...
pebwindkraft's user avatar
  • 5,096
0 votes
1 answer
698 views

What is type 'pubkey' in a scriptpubkey output from getrawtransaction?

Here is an output from getrawtransaction: { ... "vout": [ { "value": 12.50000000, "n": 0, "scriptPubKey": { "asm": "...
Jus12's user avatar
  • 1,365
1 vote
1 answer
3k views

Signature verification in python

When trying to implement OP_CHECKSIG, I am unable to figure out how to do the actual signature verification in python (python3) I obtained the signature, public key, and hashed message digest of a ...
Samarth Hattangady's user avatar
0 votes
1 answer
500 views

Bitcoin P2PKH transaction - two questions

Trying to learn the basics of the bitcoin's standard transaction script here. For a transaction where Alice has sent coins to Bob, who is now trying to redeem them, we have the concatenated scriptSig ...
user1936752's user avatar
3 votes
2 answers
903 views

Quadratic hashing problem: Why not just create new OP code "CHECKSIG2" to fix?

Why can't "we" fix the quadratic hashing problem with OP_CHECKSIG with a soft fork? Update NO_OPx to OP_CHECKSIG2 with soft fork, where OP_CHECKSIG2 doesn't quadratically hash (uses a single tx hash ...
pinhead's user avatar
  • 5,164
5 votes
1 answer
391 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 ...
pinhead's user avatar
  • 5,164
3 votes
1 answer
453 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:...
Adam Langsner's user avatar
5 votes
1 answer
266 views

p2sh checksig failing

I'm attempting to validate a p2sh transaction from the live bitcoin blockchain, however it is failing the checksig. I am using pybitcointools for the checksig and I have successfully validated lots of ...
mulllhausen's user avatar
  • 1,713
2 votes
2 answers
528 views

(CHECKSIG) Why is the ScriptPubKey from tx-inputs part of the signature?

I was checking OP_CHECKSIG today and see that the signature of a transaction will be computed from the transaction but copying the ScriptPubKey from the transaction referenced as input into the SigKey ...
Bjarne Magnussen's user avatar
1 vote
2 answers
823 views

blockchain checksig fail

i'm attempting to verify a checksig from a transaction in the live blockchain. it is failing on my debian jessie pc with openssl 1.0.1k, failing on my ubuntu 12.04 virtual machine with openssl 1.0.1 ...
mulllhausen's user avatar
  • 1,713