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 [signature]

This tag should be used for questions regarding digital signatures. A digital signature proves that the owner of a private key produced or endorsed a given message. These are used in transactions to prove that an output can be spent in a transaction.

0
votes
1answer
49 views

Why are the inputs of Bitcoin transactions signed?

This is my understanding of what a transaction looks like: inputs: input0: txid: <funding tx0 TXID> outputID: <output ID of UTXO in the funding tx0> scriptSig: <...
2
votes
0answers
18 views

NBitcoin get signature without signing

After creating a new NBitcoin transaction (with a single non-standard pay-to-script input and multiple outputs), is there any way to calculate the transaction signature and manually put it in the ...
0
votes
1answer
17 views

Multi-sig signature computation

I don't understand, how multi-sig signatures are generated. I've seen that inputs redeeming a multi-sig output, can be signed and signed over repeatedly, with different private keys using bitcoind's ...
3
votes
3answers
101 views

allowed DER encoding format violations for signatures in bitcoin: implications for libraries?

I have recently changed verification code in python-bitcointx to use libsecp256k1 library. In the python-bitcoinlib code (that python-bitcointx is a derivative of), openssl functions were used for ...
3
votes
1answer
159 views

How is Public Key extracted from (message, digital signature, address)

I'm under the impression that a public key is revealed when you sign a message. Given these 3 inputs. P2PKH Address, Digital Signature, Message. Is the public key exposed? If so, how do you extract ...
1
vote
2answers
18 views

What happens when the verification of a manipulated transaction fail?

If a malicious miner changes the amount in a given transaction, the hash value of the block changes. Thus, he has to find the required hash value again in that block. Let's say he successfully found ...
0
votes
1answer
31 views

Signature generation

I am trying to unwrap bitcoin transaction generation process. A bit confused about signing part. My understanding is the transaction is sha256'd, then sha256'd one more time, then ECDSA'd. Based ...
1
vote
1answer
35 views

Transaction Malleability, if i want to change signature, what part should I change, so that it would remain valid?

I know what transaction malleability is, but I don't understand how someone can change my signature so that it would remain valid. For example, If I want to change signature what part should I change, ...
1
vote
0answers
50 views

How verify p2sh spending transaction signature using public key with btcsuite?

I'm trying to verify inputs signatures in Go using Verify Signature script of package btcec. Decoding this p2sh spending transaction rawSpendingTxd := ...
0
votes
1answer
42 views

How to add a signature to a transaction which I can broadcast

I am using ledger and multi sig to sign a transaction I got signature hash where both party signed the transaction. How can I attached this signature to the transaction so that I can broadcast it to ...
0
votes
1answer
31 views

Retrieve money back from wrong prefix address

Normally, p2pkh address is generate by Base58(Prefix+ PublicKeyHash + Checksum), and prefix is set 0x00. What if by accidently, prefix is set 0x05, then the address prefix becomes 3, which becomes ...
0
votes
1answer
31 views

P2PKH - Sharing a wallet address does not reveal my pub key?

Is it technically correct to say that if I share my address with the network, nobody has access to my pubkey still? But if I share a valid signature to a P2PKH UTXO, someone can derive my pubkey and ...
1
vote
1answer
30 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 ...
1
vote
1answer
36 views

What happens if I use same k twice in DSA algorithm?

To sign a message , we choose nonce k but what happens if we use same k twice to sign a message using DSA algorithm?
1
vote
1answer
43 views

How OP_CHECKSIG knows the source of sig in pay to pubkey hash transaction

https://en.bitcoin.it/wiki/Script#Standard_Transaction_to_Bitcoin_address_.28pay-to-pubkey-hash.29 The last step of pay to pubkey hash transaction is to check the signature of the previous ...
1
vote
1answer
44 views

How does a Doge public key is created from a private key?

I am looking for the differences between the creation of Doge public keys and Bitcoin public keys when inserting a private key. I am trying to make a small web-app that signs messages. There are a ...
3
votes
1answer
94 views

What exactly is hashed and signed in a segwit transaction

I have an unsigned raw segwit transaction on my regtest network: ...
0
votes
1answer
72 views

Sign Bitcoin transaction with several inputs using bitcoinj. Broadcasting of transaction failed

Good day! I'm working with low level API to make tx and sign it offline. But after all preparations I try to broadcast it and than i get an error from network: 16: mandatory-script-verify-flag-...
0
votes
1answer
108 views

Unable to validate a signed message from Ledger

Using Ledger Nano S you can sign a message, either through the UI (which is a Google Chrome app) or through Javascript by calling Ledger.signMessage as specified here. Using this, I get the following ...
2
votes
1answer
414 views

What is the maximum size of a DER encoded ECDSA signature?

I've been told by a seasoned Bitcoin contributor that signatures in Bitcoin could be up to 75 bytes. I'm curious to find out how that maximum comes to pass. According to this answer on Why the ...
0
votes
0answers
42 views

Bitcoin testnet transaction getting dropped with prefix on S

So a weird thing is happening lately. The transaction of a particular format is being accepted by blockcypher but it is not getting confirmations, and therefore gets dropped after a day. So the ...
0
votes
1answer
44 views

Link to Algorithmic behind signatures verification [duplicate]

Does anyone know a good paper where the process of signature verification is explained (message+signature+public key = valid/not_valid) ??? And I mean it at a low level, with the code or pseudo-code ...
0
votes
1answer
52 views

What does a bitcoin transaction contain?

I'm learning about basic transactions and know that a transaction should contain: i) Signature of the sender using some operator: sign(private key,message) ii) Receivers Public key (wallet address) ...
1
vote
0answers
28 views

Can you use Schnorr to sign inputs individually?

Can personA build a transaction and sign his inputs, then personB signs his and that be added into one transaction using Schnorr. Or are SIGHASHes still needed?
2
votes
1answer
138 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 ...
0
votes
0answers
32 views

Can I sign hex-data using Ledger UI?

Is it possible to sign hex data, for example the hash preimage of a P2SH transaction, by using the Ledger Wallet UI? I can only see the option of signing ASCII data, i.e., text.
0
votes
1answer
130 views

How are P and ((z1*s2 - z2*s1)/(r*(s1-s2))) calculated?

Given: p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 r = 0xd47ce4c025c35ec440bc81d99834a624875161a26bf56ef7fdc0f5d52f843ad1 s1 = ...
4
votes
1answer
83 views

Why is my P2SH sigScript field prepended with 0x00?

I created a P2SH transaction and signed it using coinb.in. The sigScript field for this transaction is: da 00 47 3044 0220 ...
1
vote
3answers
278 views

Public key cryptography question - Is Private or Public key used to sign? Confusion between which key is used to sign and which is used to encrypt

I am relatively new to cryptography and blockchain and am learning about how public key cryptography works, and its application in Bitcoin's environment. I read two different articles , the 1st which ...
0
votes
1answer
69 views

Possible to check who signed the transaction in a multi-sig transaction case?

Say you have a multi-sig tx that originated from a 2-of-3 P2SH address. Is it possible to say who signed the transaction? i.e. you can get access to the redeem script once the tx is broadcasted, and ...
3
votes
2answers
42 views

How a transaction proves its ownership of the its source, which can be one or multiple unspent output?

I read the following from the book << Mastering Bitcoin >> "As you may notice, the transaction contains an empty scriptSig because we haven’t signed it yet. Without a signature, this ...
0
votes
1answer
44 views

Why is the signature hash different for each input in a multi-input transaction?

In pre-BIP143 signature hashes, I know that the signature hash differs because you have to substitute the previous scriptPubKey for each input and thus the serialization changes. The question is why? ...
0
votes
1answer
42 views

SignatureHash description

SignatureHash takes in as input a scriptCode: uint256 SignatureHash( const CScript& scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType, const ...
0
votes
1answer
48 views

Extended keys and signing TX

I have couple of keys of path m/0/0 TPriv- Extended private key (pvt key+chain code) TPub- Extended public key (public key+chain code) Now I generate an address of of the TPub key and revived ...
0
votes
1answer
44 views

Can op codes be used instead of signatures?

Are there any op codes or combination of opcodes that can be used instead of a digital signature when creating a transaction?
0
votes
1answer
46 views

Why does bitcoin use signatures to verify transactions?

Why does bitcoin use signatures to verify transactions in order for them to be broadcasted and mined and is there any other method that could be used instead of signatures?
0
votes
2answers
24 views

Create a transaction which sends bitcoin to the address it's being sent from?

Let's say address X has 1 btc. Can you create a transaction which would send the 1 btc from X back to X and broadcast it without having to sign it, since the 1 btc is going back into the address it is ...
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 ...
2
votes
1answer
601 views

Signature verification in python using compressed public key

I am trying to learn bitcoin blockchain programming. I am trying to verify signature in Transaction with txid: 4269fdc239d027922dcec96f1ae283dbaff10e2d1bd49605661d091e79714956 I am getting ...
4
votes
4answers
212 views

Why bother checking both public key and signature in P2PKH transactions?

In a P2PKH pubkey script, first, the public key provided by the intended spender is verified to be correct and then this key is used to verify the spender's signature. I wonder why just verifying the ...
0
votes
2answers
76 views

Is it safe to share bitcoin address and signature generated from electrum wallet

Some bitcoin airdrops are asking to prove ownership on bitcoin address by sharing signature. My question is if one shares bitcoin address and signature is there any risk of a attacker to compute the ...
0
votes
1answer
259 views

How the Recipient's public key is used in bitcoin transaction

In the second paragraph the white paper by Nakatomo, we have this image: It says a coin is a set of digital signature. For what I understand the whole process is the following: Hash together the ...
0
votes
2answers
47 views

When manually creating a raw bitcoin tx, how does one determine whether the r or s values require more zeros?

Supposedly, if an R or S value will equal a "negative" number, one must append zeros to it and alter the "length" descriptor for the value to reflect that. When manually creating a raw tx how does ...
1
vote
2answers
112 views

Error when sending rawtransaction

I tried to write a transaction on my own in python to better understand how things work; when i decode the raw transaction, it seems properly written. When I use the rpc method sendrawtransaction I ...
0
votes
2answers
89 views

How is a transaction formated/signed?

Every transaction takes unspent outputs as inputs and creates new outputs. The creator of the transaction uses his private key to sign the transaction and nodes validate that transaction by using the ...
0
votes
2answers
76 views

Why is this script invalid, and how can I generate valid public key/digital signature pairs?

Why does the default P2PKH transaction at http://bitcoin-script-debugger.visvirial.com/ return NULL rather than true? I haven't tried to swallow the gory details of OP_CHECKSIG yet, but everything ...
2
votes
1answer
229 views

33 byte private key?

I have read that private key is 256 bits or 32 byte. see here I generated a key on bitcoin-test network. WIF: cVe4tA6QHduboeSiQD6Y6nzV1QjaVpDVG2YHbqbtJiSCxsNDYYUF HEX: ...
0
votes
0answers
83 views

Trying to sign a transaction, but python crashing.

I am trying to sign a transaction. I have been able to achieve a point where I have the private key (in bytes) and the transaction. Here is my code : sign transaction script: #HARDWARE WALLET OR ...
2
votes
1answer
62 views

Can I use uncompressed public keys in Bitcoin Cash transactions?

It have read that Bitcoin Cash uses BIP 143 to generate the signatures and that BIP 143 does not accept uncompressed public keys. Does that mean that you cannot send a Bitcoin Cash transaction using ...
4
votes
1answer
314 views

How do I generate the Bitcoin Cash hash preimage?

I am attempting to manually generate a signed transaction which is to be sent from my address 1GiJZtN7wjUuL4V5i7ZYYDAvFtqi5AhCDr which is bitcoincash:qzk9nxh6qpd9yt3hvv6vvun78s834f3escdhu2vdjp in the ...