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
3
votes
1answer
25 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 ...
0
votes
1answer
15 views

Difficulty in verifying bitcoin-core signing keys

How can I verify bitcoin0.19 signature bwith gpg? I read I should use gpg --recv-keys signingkey, but I don't understand where is the file signiggkey. I tried to download Bitcoin Core Release Signing ...
2
votes
1answer
112 views

Bitcoin and encryption

To the best of my understanding Bitcoin uses encryption to create the digital signature, basically, by encrypting the hashed message (transaction?). Would like to get your expert opinion to my claim ...
0
votes
1answer
28 views

Cannot sign txn with change address using bitcoinjs-lib psbt

I am having a difficult time figuring out how to sign a spend from a change address. I get Error: cannot sign for this input with the key <value>. The initial transaction works fine, where I ...
1
vote
0answers
38 views

How can I check my transaction signature is correct?

I have tried recreating the exact transaction from "Appendix B: Funding Transaction Test Vectors" from BOLT 3 from the Lightning RFCs. My transaction looks exactly the same when parsed, except my ...
0
votes
0answers
32 views

Getting Error “Unable to sign input, invalid stack size (possibly missing key)”

I have created a key from using coinstring, and then imported it into my wallet. Then I ran: bitcoin-cli signrawtransactionwithkey "$rawtxhex" "[\"$mykey$\"]" But it results in: Unable to sign ...
1
vote
0answers
26 views

Is possible extract the original script P2MS from the transaction locked with the P2SH address?

This is a stupid question because if the P2SH contains the hash160 (and the hash160 contains the sha256) of the P2MS doesn't possible return to the original hex P2MS. So, but for verifying the P2SH I ...
2
votes
0answers
52 views

How to Validate Signature with SigScript length 8b?

I created a raw Transaction: ...
2
votes
1answer
80 views

how difficult is it to generating an ECDSA (or Schnorr) signature with a certain number of leading zeros?

If both the public key and the private key are known ahead of time (public knowledge), and the goal is to choose a message/nonce that generates a signature with, for example, a certain number of ...
0
votes
1answer
36 views

Multiple inputs with one signature

From this question I've learned that a transaction with N inputs requires N sign operations. But what if there a huge amount of inputs? E.g. I have a coffee shop and I sell 5000 pcs coffee every day ...
6
votes
1answer
415 views

Will Schnorr Multi-signatures completely replace ECDSA?

I stumbled upon the fact that schnorr signatures will most probably replace the current ECDSA system in a future BIP. Is it worth learning about ECDSA or this will become obsolete/useless/confusing ...
0
votes
2answers
72 views

Difference between Sign Message and Sign Transaction

Using "Sign Message" one can prove ownership of an address. This happens by signing a human-readable string using the private key belonging to the address. The owner then provides the address, message ...
1
vote
0answers
53 views

How to sign an Altcoin transaction manually with 2 inputs and 2 outputs

So i'm working with the altcoin denarius which has the following raw TX structure. This is a transaction I am try to sign: Original: ...
0
votes
1answer
39 views

Source and (mis)handling of the private key for a basic tx

I'm looking to get "hands on" with signing, however when I adapt Runeks' thorough answer at https://bitcoin.stackexchange.com/a/5241/89798 my code invariably fails reporting that I've used the wrong ...
1
vote
1answer
79 views

Verifying a bitcoin Signature and what is the transaction data that is signed?

Given a bitcoin transaction where it is able to redeem it's UTXO's, how can I verify in Java if the signature is actually a valid signature or not. I was trying to use the Bouncy Castle library where ...
0
votes
0answers
45 views

Bitcoin Transaction Generation: Signature Verification Error

I have the following raw transaction (basic P2PKH) which I am trying to send to the Bitcoin Testnet 3: ...
0
votes
1answer
31 views

What is the relationship between the Digital Signature and the Public Key

So, I can see this is in the unlocking script: <Cafe Signature> <Cafe Public Key> Taken from mastering bitcoin. What is the difference between the two? I don`t find it easy to google.
2
votes
1answer
108 views

How to calculate p2wsh signature?

I read the bip143, but didn't understand how to calculate the scriptCode of p2wsh. bip143 told us: A new transaction digest algorithm is defined, but only applicable to sigops in version 0 witness ...
2
votes
1answer
243 views

I tried to recover the public key from the signature, but I failed

I used data that comes from https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki#p2sh-p2wpkh. It is easy to know how to get sigHash. But when I try to recover public key, everything out off ...
0
votes
1answer
29 views

How to check a signature on an arbitrary message?

I'm looking to have a p2sh transaction that inside the redeem script there is OP_CHECKSIG (or any other op-code) that verifies a signature on an arbitrary message (not a transaction). I have been ...
0
votes
2answers
75 views

Raw SegWit TX look solid and verifies, but is rejected. Need help figuring out why

Consider the following transaction expressed as hex: ...
0
votes
1answer
38 views

P2WPKH - which private key is used to generate signature?

I am looking at the BIP143 P2WPKH example. I am kind of following until the generation of the sigHash: c37af31116d1b27caf68aae9e3ac82f1477929014d5b917657d0eb49478cb670 but then that is used to ...
0
votes
1answer
52 views

ScriptSig does not validate with seemingly valid signature

I am trying to build raw transactions from scratch to improve my understanding. For comparison I am using the hexoutput from https://coinb.in/ as I can choose Testnet on there. I am trying to ...
2
votes
1answer
37 views

Why is a library's signature of a segwit tx different from Bitcoin Core signature?

I have been writing a (yet another) Bitcoin python library primarily for educational purposes; for me and my students. Signing a non-segwit transaction results in a signed tx that is identical to ...
0
votes
1answer
51 views

How does Bitcoin makes sure that nobody can duplicate a transaction?

I understand that when creating a transaction, you send in data, the hash of that data, and a signature that is created using the hash of the data and your private key. However, what is stopping ...
0
votes
1answer
72 views

How to manually sign a transaction with multiple inputs and multiple outputs?

I'm developing transaction constructor, but i faced several problems. To some of which i found answer in How to sign a transaction with multiple inputs?, for the rest i'll try to explain: When we ...
3
votes
1answer
61 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 ...
0
votes
2answers
165 views

Why did repeated “R” values occur in Bitcoin transactions before?

Please explain why earlier the repeated values of "R" occurred in Bitcoin transactions. For example, this transaction has a repetition of the value "R": https://www.blockchain.com/btc/tx/...
0
votes
0answers
38 views

Signing a Tx that has multiple UTXOs

Using Go language, I am trying to create a BTC transaction, using multiple UTXOs. I am adding the UTXOs by doing this: Tx.AddTxIn(TxIn) creating the TXOuts one for the amount to send out and one for ...
1
vote
1answer
45 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?
0
votes
2answers
136 views

How to extract raw 64 byte EC signature from an ASN1/DER encoded signature (which ranges from 70 - 72 bytes)

I see that my ASN1/DER signature contains the individual r and s values, is there a way to derive the generic 64byte signature? edit: Ive looked through the DER/ASN1 spec, seems that what Im looking ...
4
votes
1answer
445 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?
0
votes
1answer
55 views

Following SegWit implementation, is BIP-146 signalling and implementation still on the docket?

Is BIP 146, which defines using the low S value, still on the docket to be signalled and implemented given that SegWit fixed the txid malleability issue by moving the witness outside the transaction? ...
0
votes
2answers
37 views

Public Addresses: '3' vs '1' in front [Bitcoin]

I just wanted to confirm, is it true that for a bitcoin (public) address it should always have a '1' in front of it. For certain transactions though I see that there is a '3' in front. How is this ...
4
votes
1answer
111 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?
2
votes
0answers
23 views

Script and DER in P2PKH

Im trying to figure out the script and DER In P2PKH, the "first part (scriptsig)" push in stack (<sig><pubK>) because is it DER? Instead the "second part (scriptPubKey)" you can map the ...
2
votes
2answers
413 views

How can my private key be revealed if I use the same nonce while generating the signature?

I know it is well understood that it is not a good practice to use the same nonce while generating the signatures, but I am not getting the math right. Assume I have some UTXOs that are controlled ...
0
votes
1answer
56 views

Signature digital algorithm in bitcoin, to what will it change in the future?

in follow-up to the question: 85202 There, @Ugam Kamat wrote ""ECDSA is the first thing that can get vulnerable with quantum computer. signature will need to move to post quantum world much before ...
0
votes
1answer
29 views

Destination address(es) when redeeming an HTLC

Starting from this text at https://en.bitcoin.it/wiki/Script: "The script for a typical Bitcoin transfer to destination Bitcoin address D simply encumbers future spending of the bitcoins with two ...
2
votes
1answer
31 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=...
0
votes
1answer
70 views

Bitcoin Signatures are susceptible to quantum attacks - how exactly and with what practical impact? [duplicate]

@PieterWuille wrote in another thread: "" The hashing algorithm is probably the most quantum-resistant piece of cryptography right now in Bitcoin. Barring any specific breaks, SHA256 and RIPEMD160 ...
1
vote
1answer
117 views

How can you calculate the inverse of S component of signature, while you cannot do it in ECC to calculate private key from public key?

When verifying the signature in bitcoin, we calculate S^(-1) * hash(m) * G + S^(-1) * R * pub_key and verify that this is equal to the temporary public key. Given the same logic, why can't we use it ...
0
votes
0answers
47 views

OP_CHECKSIG NULLFAIL with btcdeb

I'm using btcdeb to understand script. I pick a old random P2PKH transaction form mainnet, and paste unlocking script e locking script inside. I know that this script is ok, because I can check on ...
0
votes
0answers
21 views

Swift implementation of bitcoin transaction creation

Is there a well known and widely used Swift implementation for creating raw Bitcoin transactions and getting their hash (SegWit and Non-SegWit) of signing? If not, is there a reference document that ...
1
vote
1answer
162 views

Why hash witness script instead of pubkey script in signature?

When a segwit input is signed, the signature will commit to the witness script (or a p2pkh-like script in case of p2wpkh). This is specified in BIP143: For P2WPKH witness program, the scriptCode ...
3
votes
1answer
89 views

Are sipa's standardized schnorr signatures incompatible with blind signatures?

Here, sipa proposes a standardization of schnorr signatures: https://github.com/sipa/bips/blob/bip-schnorr/bip-schnorr.mediawiki For example, sign() returns Sig{R,s} which can be encoded with 64 ...
3
votes
1answer
42 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 ...
1
vote
1answer
30 views

which was the purpose of changing the signature of a TX? or it was just a bug before segwit?

Was there any purpose in changing the signature of a transaction? Or it was a bug before segregated witness? Does segregated witness disable some wanted feature?
1
vote
2answers
547 views

Nonce usage in ECDSA signing algorithm

I'm trying to understand the signing function secp256k1_ecdsa_sig_sign(), and I'm curious about the nonce usage here. static int secp256k1_ecdsa_sig_sign(const secp256k1_ecmult_gen_context *ctx, ...
1
vote
1answer
292 views

tiny-secp256k1 and ECDSA signing determinism

I noticed in bitcoin when using the tiny-secp256k1 library to sign the signature for a signature hash of an input, the signature is always the same. However in other ECDSA secp256k1 libraries (im ...