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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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.

3
votes
1answer
41 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
24 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
48 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
74 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
37 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
40 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
49 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
19 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
83 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
29 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
85 views

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

Given: p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 r = 0xd47ce4c025c35ec440bc81d99834a624875161a26bf56ef7fdc0f5d52f843ad1 s1 = ...
4
votes
1answer
72 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
116 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
34 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
37 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
34 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
30 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
25 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
39 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
38 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
23 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
70 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
327 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 ...
3
votes
4answers
140 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
73 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
87 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
42 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
73 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
72 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
54 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 ...
1
vote
1answer
142 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
56 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
52 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
220 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 ...
0
votes
1answer
104 views

How does Bitcoin Core know that your private key relates to your public address? Are the private keys stored?

When a user creates an account on Bitcoin Core, he is assigned private keys. And he needs to use these private keys in order to send transactions onto the network. Does Bitcoin Core store these ...
0
votes
1answer
82 views

During Bitcoin Script execution, what is the significance of the signature verification in the stack?

During execution of the script i.e. ScriptSig + ScriptPub , the last step is the verification of the Signature against the public key provided by the recipient. How does this work and what is the ...
0
votes
0answers
78 views

Unable to broadcast native P2WPKH (SegWit) TX; malformed, but how?

I'm trying to add SegWit functionality to my app but am running into trouble building my transaction. I've read BIP143 so many times I virtually have it memorized, and I've followed it to the letter. ...
0
votes
1answer
177 views

Understanding BIP 143 [hash computation, lockTime, sequence number, witness format]

I'm trying to grasp some of the concepts presented in BIP 143. These are the things I'm stuck on: (1) A new hash format is presented. This new format is used to create a hash, which when signed with ...
3
votes
3answers
439 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 ...
0
votes
1answer
60 views

When the transaction been signed?

I understand that if Bob gets a transaction (BTC) from Alice and want to send it to Charlie he must provide a key which proof that he is the owner of the transaction. But in what stage Bob actually ...
0
votes
2answers
349 views

How can I fix this: (Non-canonical signature: S value is unnecessarily high)

I've written a small script that will create a bitcoin transaction from scratch, using an ECDSA library. It works, but sometimes I get this error: 64: non-mandatory-script-verify-flag (Non-canonical ...
1
vote
0answers
33 views

aggregated signatures for combining payments over a low bandwidth mesh network

Background I'm researching how in a low bandwidth mesh network payment transactions from nodes can be combined to reduce the bandwidth used for payments. Aggregated signatures seem like a useful ...
2
votes
1answer
56 views

Why does P2SH-P2WPKH use DER encoded signatures?

If we simply assumed 32 bytes of r and s each, then signatures can be 64 bytes. Now they are on average 71 bytes in DER plus an additional byte to declare their size, effectively making them use 72 ...
0
votes
2answers
70 views

How Bitcoin system prevents the previous owner of a Bitcoin to spend it?

I am a Bitcoin noob. As per my knowledge, a Bitcoin is a digital signature. Owner of a bitcoin knows the private key of it. If I spend my bitcoin, I still know the private key of it, using which I ...
1
vote
1answer
376 views

Signing transaction with SSL - private key to PEM

Given a private key: 3cd0560f5b27591916c643a0b7aa69d03839380a738d2e912990dcc573715d2c, And a tx hash: 456f9e1b6184d770f1a240da9a3c4458e55b6b4ba2244dd21404db30b3131b94, I would like to sign, using SSL ...
2
votes
1answer
604 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-...
0
votes
0answers
118 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 ...
3
votes
1answer
100 views

Who witnesses a Segregated Witness transaction and what incentive do they have to witness the extended block containing signatures?

This video claims Segregated Witness is insecure because no one has an incentive to process (witness) the extended signature block. https://www.youtube.com/watch?v=VoFb3mcxluY It claims that as the ...
0
votes
0answers
303 views

Error: mandatory-script-verify-flag-failed

I have created a raw transaction from myElectrum wallet, but when I try to broadcast it I get this error: mandatory-script-verify-flag-failed Why is this happening? The transaction is below: ...
1
vote
1answer
177 views

How can I verify the PGP signature of https://liteaddress.org on Windows?

Suppose I want to download a copy of https://liteaddress.org in order to run it offline in a safe environment. Then how can I verify that the website hasn't been hacked? How can I verify that the ...