Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [scriptsig]

The tag has no usage guidance.

2
votes
1answer
30 views

ScriptSig Conversion in Python

I'm trying to convert a scriptsig into bytes so that I can better extract R & S values, but when I try and convert, I'm missing some of elements that should be there, like x30 for example. ...
0
votes
1answer
25 views

Diferent redeemscript for the same scriptpubkey?

Most transactions to p2sh address has the follwing scriptpubkey HASH160 f45d94733d430261962932e0c847075195916a04 OP_EQUAL As I understood, this transaction do not need to be signed. Is it true? ...
0
votes
0answers
27 views

Can someone spend this input (private key included)? [duplicate]

I have a problem with spending non-standart transactions with OP_CSV Here it is: https://tchain.btc.com/46894d9dd5e20147826523b1a3ac8e8c5c64603338430d04bd6f5846af2bb9b4 Here is a private key for ...
2
votes
1answer
51 views

Cant spend input with non-standart redeemscript (OP_CSV)

I'm playing with OP_CHECKSEQUENCEVERIFY. Here is my transaction that I'm trying to spend: https://tchain.btc.com/e79d469698915aa6724288ae3a4141a31706d081f39fb7fd0b956a73a9044b22 which has the ...
3
votes
1answer
44 views

What is the maximum number of bytes the coinbase scriptSig (coinbaseaux) can hold?

Since the scriptSig of the coinbase transaction of a block can contain arbitrary data, what is the maximum number of bytes it can contain? I've seen various mentions of a limit around 100 bytes, but ...
3
votes
1answer
38 views

OP_CHECKLOCKTIMEVERIFY . Include / reject or will not included in block?

What happened if I translate to network transaction with the folowing redeem script: [now + 3 months] CHECKLOCKTIMEVERIFY DROP DUP HASH160 [Bob's Public Key Hash] EQUALVERIFY CHECKSIG This tx will ...
1
vote
1answer
44 views

Is it safe to store bitcoins on p2sh (no multisig)?

I've just generated p2sh btc address and look in the output script: HASH160 PUSHDATA(20)[e5c32bdc7f7fb1e6ae7aa1baf42a429803054d2c] EQUALVERIFY while normal (legacy btc address) transaction has ...
0
votes
1answer
16 views

i don't know if there is an error in the scriptsig generation method of input in p2psh

I don't know if there is an error in the scriptsig generation method of input in P2PSH. My address is a single signing address with one Private key, I created a transaction that will generate hex ...
0
votes
1answer
12 views

When do scripts executed?

Can anyone explain when does a script executed exactly? There are several information about "how scripts are executed" but no information about "when".
0
votes
1answer
49 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 ...
0
votes
1answer
75 views

how generate <sig> part of scriptSig in bitcoin transactions

I studied many links about bitcoin trxs and about generating scriptSig. Finally I couldn't understand how to make this part. for example I read this links: What is relation between scriptSig and ...
1
vote
1answer
119 views

Can I prove a double spend attempt with a signed tx with same input?

I am designing an cross-chain atomic swap in a custom blockchain - Protoblock. I think it can be done as long as Protoblock knows how to parse p2pkh bitcoin transactions. The critical part is being ...
1
vote
2answers
44 views

Why are my Signature Scripts Different from my professors?

bob_addr = "1NWzVg38ggPoVGAG2VWt6ktdWMaV6S1pJk"#"1FMb8Jnn1jSh7yjDFfonC8xCCH3ittoEzB" bob_hashed_pubkey = base58check.b58decode(bob_addr)[1:] bob2_hashed_pubkey = b'\xec\x06\xb2\xbf\x18\xc8\x97\x06\...
0
votes
0answers
32 views

Bitcoin transaction scripts : does ScriptSig or ScriptPubkey run first? [duplicate]

I'm confused as to the order regarding which script is run. For examples sake: say I want to spend 1 Bitcoin which was given to me by Alice in a single transaction of value 1 Bitcoin. I understand ...
1
vote
1answer
96 views

Can you help me with a puzzle transaction?

I am hoping there is someone out there that can help me with probably a simple bit coin scripting question...but maybe there is something more to it. I am trying to fully test a custom script on a ...
2
votes
1answer
49 views

Why this transaction is valid?

The before transaction is @ https://www.blocktrail.com/tBTC/tx/da58f6688b0727a7f1bf3eec899099bde1f18b9c7099f9d2c79556db238e623d Its output script is "OP_HASH160 ...
0
votes
0answers
25 views

How to create contracts using bitcoin?

Is there a way to create contracts with bitcoin such as allowing a transaction being funded by segwit outputs to be broadcasted only if the receiver signs it or only if the scriptsig contains a ...
1
vote
1answer
76 views

What prevents anyone from spending utxos from a native segwit address?

I read that transactions spending utxos from a native segwit address ( an address starting with bc1) are seen as anyone can spend transactions by legacy nodes. So what prevents someone from taking a ...
2
votes
1answer
180 views

How do I fix my check-multisig if-else output script?

I'm trying to create a custom script with if/else and a multisig operation in one branch. Currently, my script looks thus: OP_IF <pub1> OP_CHECKSIG OP_ELSE OP_2 <pub2> ...
1
vote
1answer
270 views

How to create a p2sh transaction with a scriptsig of OP_true?

How can I create a p2sh transaction with a scriptsig containing OP_TRUE only, removing the need for a digital signature, which will be broadcasted and mined? Also could some one provide an example of ...
0
votes
2answers
81 views

Transactions without signatures?

Do all transactions require a siganture to be broadcasted and signed or is it possible to have a unsigned transaction be mined? Could you not just use op codes to allow a transaction to be validated ...
0
votes
0answers
54 views

P2sh transaction with non standard script

How can you relay a p2sh transaction with a non standard script, such as a scriptsig that only contains OP_True and get it mined? Example: https://blockchain.info/tx/...
0
votes
0answers
37 views

What information is the sender signing in the scriptsig? [duplicate]

In a transaction a sender must provide the digital signature to say that they own that transaction. What information is the sender signing in the scriptSig? I was thinking that It was: The ...
1
vote
1answer
73 views

Ho to identify a multisig transaction?

79fbae117dc38effafb33304af83ce4894589747aee1ef992f63280567f52f5ba870678b4ab4ff6c8ea600bd217870a8b4f1f09f3a8e8353aeffffffff0130d90000000000001976a914569076ba39fc4ff6a2291d9ea9196d8c08f9c7ab88ac00000000 ...
1
vote
1answer
45 views

How to calculate variable length fields?

Some parts of bitcoin tx Ex: Script are of variable length var_int. Can someone explain how to calculate its value from that var_int table. Ex: In the below tx, the bolded part is script-length. its ...
2
votes
1answer
529 views

Decoding ScriptSig

I noticed that there can be what seems to be more than 1 signature in a ScriptSig. The transaction in question is: https://blockchain.info/tx/...
1
vote
0answers
43 views

what are ScriptSig? [duplicate]

I was studying bitcoin script, and upon watching this transaction in blockexplorer i was confused , what exactly is ScriptSig and scriptPubKey is of reciever? According to what I know, the receiver ...
0
votes
1answer
141 views

P2PKH why the hash and not the address itself

In a pay-to-public-key-hash script, what is the reason of storing the hash of the address and not the address itself, since anybody can copy the hash from a previous tx resolved by the same hash (i.e. ...
1
vote
1answer
121 views

Signing a transaction with openSSL

I've read a bit about signing a transaction using openSSL, I've tried implementing it but it seems like the signatures generated are not accepted. So I'm wondering if the following commands provide a ...
2
votes
2answers
150 views

Testnet transaction - OPCODE MISSING OR NOT UNDERSTOOD error

I'm trying to broadcast a manually generated raw testnet transaction. I'm getting the following error from SmartBit: PUSH TRANSACTION ERROR: 16: MANDATORY-SCRIPT-VERIFY-FLAG-FAILED (OPCODE MISSING OR ...
0
votes
1answer
124 views

Is scriptSig different for each input?

Since scriptSig is a signed transaction hash with the spender's private key, how is the scriptsig different for each input?
1
vote
1answer
215 views

ScriptSig - what am I signing exactly?

So the scriptsig field in the transaction, is created with the signature and public key. In order to create the signature, we need the R and S values of a ECDSA signature. I figured how to sign a ...
3
votes
1answer
1k views

Step by step example to redeem a P2SH output required

I have been following BIP16 in creating a P2SH transaction. I want to create a simple (one signature) P2SH. I am getting an error when trying to broadcast the tx. Error is 16: mandatory-script-verify-...
1
vote
1answer
109 views

Why does ScriptSig contain public key, since it can be recovered from the signature and message?

Using ECDSA, given a signature and the message signed, it is possible to recover the public key. So it seems to be a waste of up to 65 bytes in each transaction. Why does bitcoin do it? Which ...
0
votes
0answers
177 views

What are the R and S values from an ECDSA signature?

I'm trying to build a transaction and in order to calculate the scriptSig, I'm in need of the R and S values of the ECDSA signature. What do they stand for, and how do I calculate / extract them? In ...
2
votes
1answer
120 views

how to spend an utxo when the corresponding scriptsig is longer than 256 bytes?

I am trying to spend an utxo sent to a p2sh address. The scriptsig (including the redeem script) is longer than 256 bytes. When the transaction is serialized there is only one byte to indicate the ...
1
vote
1answer
419 views

How to restore redeem script from a spent transaction?

What is the procedure to restore redeem script of P2SH address from a transaction sent from that address? The script is stored on the blockchain in the tx data, the question is how to extract it?
0
votes
3answers
1k views

What is wrong with my ScriptSig? I get 64: scriptsig-not-pushonly

I currently try to create and sign transaction from scratch. I made it to construct and sign a transaction. If I verify it manually it looks good but using a "proper" wallet my transaction is refused: ...
0
votes
1answer
169 views

Why is using a simple SHA1 in a scriptPubKey to emulate a “password” a security problem?

I'm independently working my way through an excellent online course on bitcoin, made available from Stanford. (https://crypto.stanford.edu/cs251). One of the problems in the homework challenges the ...
3
votes
1answer
696 views

Missing public key in transaction input

I'm in the process of understanding scriptSigs of transaction inputs and encountered some transactions with inputs that seem to be missing a public key. This is what I expect to see as a scriptSig. A ...
0
votes
2answers
465 views

How do you create a scriptsig for a new raw tx?

Could someone please explain how to do this is in a detailed step by step manner that correlates to a real linked transaction such that a n00b can comprehend? Is it just copy and paste a particular ...