Questions tagged [checksig]

18 questions
5
votes
1 answer

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 other txhash/pubkey/signature sets so I don't…
mulllhausen
  • 1,713
  • 2
  • 14
  • 33
4
votes
1 answer

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 before verifying the signature. The article…
pinhead
  • 4,932
  • 2
  • 23
  • 38
3
votes
1 answer

"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 server. The openwallet correctly reads the balance…
xagau
  • 51
  • 4
3
votes
2 answers

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 of all data for each input maybe?). Create a new…
pinhead
  • 4,932
  • 2
  • 23
  • 38
3
votes
1 answer

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: money source escrow agent money…
2
votes
2 answers

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 using OP_CHECKMULTISIG to pass signature…
2
votes
1 answer

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 public key in order to spend? It's needless 33B of…
jakob
  • 303
  • 1
  • 8
2
votes
2 answers

(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 of the new transaction. I guess this has…
Bjarne Magnussen
  • 937
  • 5
  • 16
2
votes
1 answer

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 (witness_count) SIG_size SIG So I'm wondering, the…
alemaz98
  • 133
  • 8
1
vote
1 answer

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
  • 662
  • 8
  • 23
1
vote
2 answers

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 and validating correctly on my debian wheezy pc…
mulllhausen
  • 1,713
  • 2
  • 14
  • 33
0
votes
1 answer

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 field of a P2PKH transaction should contain both). I…
0
votes
1 answer

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 Input 2 will only spend if Input 1 is included in the…
nick carraway
  • 243
  • 1
  • 11
0
votes
1 answer

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 the blockchain until spent. I try to go analog to a…
pebwindkraft
  • 5,086
  • 2
  • 13
  • 34
0
votes
1 answer

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

Here is an output from getrawtransaction: { ... "vout": [ { "value": 12.50000000, "n": 0, "scriptPubKey": { "asm": "03d81b3d2ac76e322dcb2e713cb8fdeaf68cb83406c0e4d28dcd10a880ef172a6a OP_CHECKSIG", "hex":…
Jus12
  • 1,365
  • 1
  • 14
  • 24
1
2