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.

1
vote
1answer
42 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 ...
1
vote
1answer
20 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
23 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
64 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
45 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 ...
0
votes
0answers
43 views

How to sign multisig transaction in Go

I'm trying to sign a multisig transaction (3 of 4 signatories) in Go using some btcd packages. The following function should sign the transaction: func SignMultisigTransaction(rawTransaction []byte, ...
0
votes
1answer
22 views

Representation of coordinates in signature. OpenSSL

I want to calculate the v-value from the signature obtained using the OpenSSL ECDSA_do_sign function. I found that this value is calculated using the parity of y-coordinate of r. Here I also found ...
2
votes
1answer
56 views

Bitcoin ECDSA signature in the compact format

I would like to understand how to get Bitcoin ECDSA signature in a compact format, when it's exactly 65 bytes. In the bitcoin-core repository, secp256k1_ecdsa_recoverable_signature_load is ...
2
votes
1answer
61 views

How to determine first byte (recovery ID) for signatures (message signing)?

I do realize that in bitcoin when we return the signature result for signing a message the first byte includes information for recovering the public key required for verification using a formula like ...
0
votes
1answer
67 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
1answer
51 views

NBitcoin get signature, use spending P2SH transaction with non-standard script

After creating a new NBitcoin transaction (with a single pay-to-script hash input and multiple outputs), is there any way to calculate the transaction signature and manually put it in the inputs[0]....
0
votes
1answer
25 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
124 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
183 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
22 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
45 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
45 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
82 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
74 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
35 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
35 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
38 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
55 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
71 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
63 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
139 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
90 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
2answers
176 views

How are Bitcoin Signed Messages generated?

Ledger Nano S and other pieces of Bitcoin software and hardware can sign messages using the private key associated with an address. Doing this, I get the following output: -----BEGIN BITCOIN SIGNED ...
2
votes
1answer
642 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
45 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
46 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
55 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
31 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
144 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
35 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
166 views

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

Given: p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 r = 0xd47ce4c025c35ec440bc81d99834a624875161a26bf56ef7fdc0f5d52f843ad1 s1 = ...
4
votes
1answer
96 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
363 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
86 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
48 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
52 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
75 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
47 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
50 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
26 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
96 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
743 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
249 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
83 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 ...