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
1
vote
1answer
23 views

How to Verify P2SH Signature

I am trying to debug an issue where i believe i might have a bad signature but i am trying to figure out how to approach it. What is this a signature of. Private key + what (redeem script? entire raw ...
0
votes
1answer
34 views

How to find Reused R values

I use software from https://github.com/ca333/rng-scanner , I try to find r that is reused. from the software I found results Bitcoin Address : 1GQdrgqAbkeEPUef1UpiTc4X1mUHMcyuGW In Input NR : 141 ~ ...
1
vote
2answers
55 views

Multisignature technology in bitcoin - math and code

I am interested in the math and code behind bitcoin multisignature technology. I've been looking for actual code that creates a multisignature address/pub key, and verifies transactions/digital ...
0
votes
1answer
65 views

How do I to get the r, S and Z values from a raw transaction (version 2)

For example I have this raw transaction ...
2
votes
2answers
61 views

P2SH non-segwit and no multi-sig

I have a P2SH no segwit address (regtest) I create the redeem script with SHA256 and RIPEMD160 of my public key and prepend 0x0014 ---------- Redeem Script --------- ...
0
votes
1answer
39 views

Where to find the amount that is being sent in a signed transaction? [closed]

I was looking at a transaction I just signed for USDT and I decoded it to compare stuff to my original address and amount. Just to be careful. I found the address that the data is being sent to in ...
3
votes
1answer
63 views

Sign P2SH transaction with Openssl

I have an P2SH 1-3 and I want to use openssl to sign a transaction. my redem script is ...
0
votes
2answers
36 views

Segwit Bitcoin Transaction Signing

As I could understand, we can recover the R and the S values from any transaction following the ScriptSig where we have DER serialization. Segwit transactions, where the signature will be in the ...
1
vote
1answer
73 views

Sign transaction legacy with Openssl

I want to understand how Bitcoin sign transactions with Openssl. I saw this post But I have some issues. Above my private and public keys. Private keys: $ cat chiave_priv_3.pem -----BEGIN EC ...
0
votes
0answers
35 views

Sign Raw Segwit (P2WPKH) Transaction Digest

I have a simple transaction that I want to sign the digest of, but I'm not sure if I've got the raw transaction correct, therefore my digest is incorrect. The transaction has one input and one output,...
0
votes
1answer
58 views

Signmessagewithprivkey result is different than txinwitness

I'm studying segwit and I'm doing some experiment in regtest. I create a raw transaction with P2SH address. My Transaction data without signature is: ...
0
votes
0answers
32 views

How does HASHSIG work?

I am reading an article about how HASHSIG works, but i don't understand this: Before the signature is computed, several temporary changes are made to the transaction: The signature script of the ...
1
vote
1answer
49 views

What goes in the tx hash preimage when signing with 0x83 (SINGLE|ANYONECANPAY)?

I have script to create a P2WPKH to P2WPKH transaction (1 input, 1 output) and sign it with the sighash type 0x01 SIGHASH_ALL. Which fields would I need to change in the tx digest preimage to turn ...
1
vote
2answers
516 views

What are the DER signature and SEC format

I often see those 2 elements in bitcoin documentations and tutorials but I have not yet find a proper definition on the internet for DER signature and SEC format.
0
votes
1answer
44 views

What is the signature digest for Segwit outputs

(Assume there's no OP_CODESEPERATOR) For standard P2PKH, the signature digest is generated this way: NewTransaction settle the TxOuts well set all TxIn scripts to empty insert the Previous Locking ...
5
votes
2answers
189 views

Can signature be re-used to cash out everything in the address?

I Know for the P2PK locking script it was like this [pubkey] <OP_CHECKSIG> and then an unlocking script is provided as simple as this: [sig] But if it works like this, others can simply grab ...
0
votes
1answer
34 views

Do transactions need to be signed

I always thought a transaction can be accepted when all its inputs are correctly provided with their unlock script (which usually contains a signature) ——yes transactions may also be rejected with ...
0
votes
1answer
41 views

Query Reagrding DER Signature

(For Bitcoin TestNet Only) I am working on Signed Transaction which consists More than One Inputs and More than One Outputs (Unsigned HEX Data). after that i have generated two DER Signature of both ...
1
vote
1answer
97 views

How to verify a signed message in Java?

I want to verify, in Java, a signature produced with bitcoin core's signmessagewithprivkey (equivalent to the verifymessage). I noticed a bitcoinj method similar to the bitcoin core's verifymessage - ...
3
votes
1answer
68 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
141 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
20 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
131 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
98 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
42 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
56 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
35 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
82 views

How to Validate Signature with SigScript length 8b?

I created a raw Transaction: ...
2
votes
1answer
95 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
41 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
447 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
156 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
69 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
40 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 ...
2
votes
1answer
163 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
55 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
32 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
149 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
288 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
33 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
81 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
51 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
71 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
50 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
56 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
125 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
62 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
341 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
45 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
51 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?

1
2 3 4 5
7