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.

Filter by
Sorted by
Tagged with
5
votes
2answers
9k views

How do signatures work?

Just curious, if I send a transaction from one address to another, how do they verify it without knowing my private key?
5
votes
1answer
360 views

How did these 3 tx make it into a block in the main chain?

http://blockexplorer.com/block/000000000000051b42fd09195c75da7a084df7593f47ad18139cdc9cd83a112e The last three tx have a inputs with script_sig "1". This is invalid right? According to protocol ...
5
votes
1answer
212 views

How does Bitcoin decide which Alert messages to forward?

The Bitcoin protocol lists an Alert message that in the Standard Client is displayed to all users. How does the Standard Client decide which messages to forward and display, and which to ignore? Does ...
5
votes
1answer
801 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 ...
5
votes
1answer
270 views

ScriptSig content during signature (quadratic hashing)

As far as I know, the quadratic hashing problem came from the fact that every time a transaction is verified (or signed), the "unsigned transaction" that is hashed and verified changes depending on ...
5
votes
3answers
299 views

How are “message signatures” verified without having access to the public key?

In the bitcoin-qt client you can sign and verify messages using only the public address. Since the public address is a RIPEMD160 hash how is it possible that I can verify a signature since I do not ...
4
votes
1answer
3k 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 ...
4
votes
2answers
956 views

How can someone verify the signature of a Bitcoin ECDSA signature without knowing the signer's public key?

I understand how ECDSA exactly works and for verification of a signature, the public key of the signer is required. But in Bitcoin, public key is double hashed and the only information the receiver ...
4
votes
1answer
222 views

Why does Bitcoin use ECDSA, instead of plain old hashing, to secure transaction outputs?

For example, let’s say I pick a random secret and hash it. Now, in the hypothetical hash-based scheme, my hash effectively replaces my public-key hash, and my random secret effectively replaces my ...
4
votes
3answers
284 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 ...
4
votes
2answers
867 views

How much time it takes to verify a Bitcoin signature in the Satoshi client?

Assuming: An average modern computer Using a single thread, as the current Satoshi client does Using the OpenSSL library, as the Satoshi Bitcoin client does The signature is not in the signature ...
4
votes
1answer
692 views

If I set assumevalid=0 after syncing the blockchain will Bitcoin Core go back and validate historical blocks?

I originally synced my node using the Bitcoin Core default assumevalid value. If I set -assumevalid=0 in bitcoin.conf and restart my node, will my node go back and validate historical blocks?
4
votes
3answers
912 views

Why does Bitcoin uses a Script language?

From what I heard is that Bitcoin use Script to verify transactions (I'm probably wrong). Wouldn't be sufficient just signing the transaction with the private key and append the signature to the ...
4
votes
2answers
2k views

Multisig vs Multi input transaction signing

Let's say we have a 2 of 2 multisig address that we want to spend from, so the transaction should be signed by both of the private keys. Now let's say we have a transaction with two inputs, so once ...
4
votes
1answer
655 views

How to specify ECDSA nonce used in bitcoin signing code?

Below is the CECKey::Sign() code (v0.9.3). bool Sign(const uint256 &hash, std::vector<unsigned char>& vchSig) { vchSig.clear(); ECDSA_SIG *sig = ECDSA_do_sign((unsigned char*)&...
4
votes
4answers
382 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 ...
4
votes
1answer
592 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: ...
4
votes
2answers
445 views

If block sizes go up, won't sigop limits have to change too?

Gavin Andresen, one of the core developers, has discussed increasing the block size to 16.7 MB (and doubling that every two years). The maximum number of signature operations per block is currently ...
4
votes
2answers
424 views

Why does txID generation consider signatures?

I've been reading a lot about transaction malleability, and noticed that the only way to achieve it is by altering the transaction signature/s. Why does the protocol even consider the signature in ...
4
votes
1answer
183 views

Are Bitcoin's blocks signed by the miner?

To my understanding, at no point in the Bitcoin Whitepaper does it say that blocks are signed by the miner. However, one could see the advantage of having blocks signed. Thus I wonder if in the ...
4
votes
1answer
73 views

Why is the Schnorr verification formula working and actually verifying the validity of a signature?

Reading the bottom of page 2 of the Musig Paper we can find that a Schnorr Signature for a cyclic Group G of prime order p with generator g is a tuple (R,s) where R = gr for a random secret r and s=r+...
4
votes
1answer
1k views

Transaction signature algorithm

As I know, standard ECDSA digital signature algorithm returns two values (according to this article or Wikipedia), but transaction push services or APIs, like this one, require one string as a ...
4
votes
1answer
4k views

How is a transaction's output signed?

In a transaction Tx, the hash pointer of the earlier transaction (say TxE) that serves as input to Tx must be signed by the sender S of Tx. This is to show that S was the recipient of TxE. It remains ...
4
votes
1answer
766 views

ECDSA transaction signing on a smartcard?

I know that the underlying digitial signing method Bitcoin uses for transactions is ECDSA (sep256k1 if memory serves). I've also read a few papers about performing ECDSA signing on certain kinds of ...
4
votes
1answer
55 views

What is the “value” in a Segwit sig hash?

The BIP143 docs state that the value is: "value of the output spent by this input (8-byte little endian)" If I have a single UTXO of value 10,000 sats and I'm using this as an input for a ...
4
votes
1answer
1k views

Signing a raw transaction with multiple inputs

So I am creating a simple P2PKH transaction and after I researched about this found few useful posts and answers here; I was able to successfully spend a a single P2PKH UTXO but it is really getting ...
4
votes
1answer
622 views

Low-s value in bitcoin signature

What are the problems related in using the "normal" ( bigger than N/2) value of the s number in transaction signature and why we use the lower one? Is it about the math behind the ecdsa?
4
votes
1answer
1k views

How are transactions from incoming blocks verified?

Since only the hash of public keys are stored on the chain (as address), which could be validated only by miner who have access to signed transactions (which includes public key), how do other ...
4
votes
1answer
437 views

bitcoin two identical R

Blockchain transaction id 30440220d47ce4c025c35ec440bc81d99834a624875161a26bf56ef7fdc0f5d52f843ad1022044e1ff2dfd8102cf7a47c21d5c9fd5701610d04953c6836596b4fe9dd2f53e3e01 ...
4
votes
1answer
466 views

Are public keys included in signatures?

I can't easily and quickly determine from these wiki pages, 1 and 2, if the public key is included in the signed message. Are public keys included in the signed message, or are they transmitted ...
4
votes
1answer
2k views

Code sample to sign a transaction

I have the 32-bytes double hash of a transaction, a 32-bytes private key, and I would like to sign the hash using the private key. How do I do that using BouncyCastle (or anything, really), in C# or ...
4
votes
1answer
197 views

Exhaustive technical explanation of signing & verification

I apologize for such a noobish question and am ashamed that I'm not getting this yet, but I can't seem to put together all of the pieces. I've read every question I can find on the subject, the ...
4
votes
1answer
1k views

Building Signed Bitcoin Transaction in Java

I have been attempting to build my own raw transaction generator in Java which I can then broadcast on the testnet network. The problem is when I attempt to broadcast the transaction it says there is ...
3
votes
1answer
97 views

What is the O(n^2) signature hashing problem and how does SegWit solves it?

One of the many benefits of SegWit is that it solves the O(n^2) signature hashing problem. What exactly is the O(n^2) hashing problem and how segregating signatures to separate witness field solve it?
3
votes
2answers
244 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? ...
3
votes
1answer
52 views

Are UTXOs signed with a private key?

Are UTXOs signed by a private key? I'm trying to understand exactly which parts of Bitcoin use public and private keys. You need a private key in order to generate transaction output, and to create a ...
3
votes
1answer
50 views

Would signature aggregation reduce the largest feasible blocksize

If a Schnorr signature aggregation scheme were to be integrated into Bitcoin. Would the reduction in witness data versus non witness data (need less bytes for a signature therefore witness data usage ...
3
votes
1answer
82 views

What does signing a transaction mean?

What do people exactly mean when they say the person "signs" the transaction to transfer bitcoins? Is it decrypting the previous output with your private key and encrypting it with the new ...
3
votes
2answers
48 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 ...
3
votes
5answers
3k views

Got 64: non-mandatory-script-verify-flag (Signature must be zero for failed CHECK(MULTI)SIG operation) when submitting segwit transaction

I got the above error when submitting this transaction: ...
3
votes
1answer
1k views

Linking a transaction to a Bitcoin user

Has anyone tried and perhaps succeeded at linking a transaction to a possibly controversial site (such as Wikileaks) to a Bitcoin forum user by their forum signatures? I know a lot of people disclose ...
3
votes
1answer
191 views

Any idea why Bitcoin Core signature is untrusted?

It's suppose to be a trusted signature, right?. I'm downloading Bitcoin Core from bitcoin.org gpg --import laanwj-releases.asc gpg: key 90C8019E36C2E964: 51 firmas no comprobadas por falta de claves ...
3
votes
1answer
115 views

Why does a same transaction signed separately have different witness values?

I signed a bitcoin testnet transaction using nbitcoin library and got an output: ...
3
votes
1answer
189 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 ...
3
votes
2answers
1k views

How to check if raw transaction is signed?

I have a raw transaction and would like to check if signed or not. How can I do this. I tried using bitcoind and verifying a transaction from be blockchain but it says its not complete. $ bitcoin-...
3
votes
1answer
87 views

Why does blockwide signature aggregation prevent adaptor signatures?

In a recent video about half signatures Jonas Nick mentions that blockwide signature aggregation interferes with adoptor signatures and offering atomic swaps (i guess via ptlcs) I am confused what ...
3
votes
1answer
69 views

What is the rationale for inclusion of previous amount in SegWit signing process?

When spending a P2PKH output, the "data" we hash only includes the output script from previous transaction but when spending a P2WPKH (the new serialization) we also include the amount field from ...
3
votes
1answer
605 views

Why is scriptSig filled with scriptPubKey before signing a transaction?

I'm checking the transaction signing as described here Redeeming a raw transaction step by step example required. What is the reason for steps 5 and 6: temporarily filling scriptSig with scriptPubKey ...
3
votes
1answer
499 views

Test (r,s) values for signature generation?

I have some RFC6979 test vectors, but they do not simply give me the (r,s) values before DER encoding (or so it looks?), and I haven't reached that point yet. Where could I find some (r,s) values to ...
3
votes
1answer
129 views

Sign manually P2WSH native with Openssl

I'm studying the segwit part, and I want to sign P2WSH (native) manually (openssl). I just read the BIP0143 and I see the new transaction digest. Double SHA256 of the serialization of: 1. ...

1
2
3 4 5
8