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
136 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 ...
3
votes
1answer
264 views

can parent private key sign a transaction created by a child address?

like this: I have a private key P, and via a HDchain, it creates a child address addrChild with a child key pair: priKeyChild and pubKeyChild. When I create a rawTransaction with the addrChild, I ...
3
votes
1answer
426 views

Do new SIGHASH types need a hard fork or a soft fork?

There have been a few new sighash types proposed. SIGHASH_NORMALIZED : Use a 'normalized' TXID in the inputs when serializing for signing. This normalized transaction id is calculated by removing the ...
3
votes
1answer
533 views

If I am spending multiple inputs from the same address, must I provide a signature for each input?

Suppose I have two inputs belonging to the same address. Do I need to provide a signature script for each input that proves that I own it? Wouldn't that waste space? Also, in the standard client, ...
3
votes
1answer
2k views

Step by Step - how does sending 1 bitcoin work?

I've been reading about how BitCoin works for a few weeks now - and I'm trying to understand under-the-hood how the cryptography works. So i'll explain what I know at the moment - and if someone ...
3
votes
1answer
179 views

Is there a signature format, or cryptography has *only one* possible S value?

EDIT: This question is not specific to Bitcoin. It's applicable to any other crypto currency that is interested in using a different signature scheme than Bitcoin or the QT reference client. One ...
3
votes
1answer
194 views

How are transactions verified to ensure only the eligible person can spend a Bitcoin balance?

I know each user has a public key and private key. The users signs the transaction with his private key and sends it to a Bitcoin address. What prevents me from claiming his coins? I read something ...
3
votes
1answer
440 views

For SIGHASH_SINGLE do the outputs other than at the input index, have 8 bytes or 9 bytes including a VarInt?

The bitcoin wiki says: All other txCopy outputs aside from the output that is the same as the current input index are set to a blank script and a value of (long) -1. https://en.bitcoin.it/wiki/...
3
votes
1answer
35 views

How to verify a lnurl-auth callback with python

I want to create a Python implementation of an lnurl-auth server. I started a quick HTTP server to be the callback url, and captured the signed callback sent by BLW on Android. ?tag=login &k1=...
3
votes
2answers
325 views

How to calculate P2WSH signatures with CODESPERATOR?

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 ...
3
votes
1answer
120 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
5k views

manually signing bitcoin transaction

I'm trying to create a BTC transaction with one input and two outputs, one for change and one OP_RETURN to anchor data. And I'm doing all of that on my regtest backend. The raw unsigned transaction is ...
2
votes
2answers
616 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 ...
2
votes
2answers
184 views

For what purposes do we need “Sign message”?

I got a simple but straight question: Why do we need "Sign message". Also give explanations and examples.
2
votes
1answer
181 views

Why does re-signing a message in bitcoin-qt produce a different hash

I just noticed that if you repeatedly sign the same message in bitcoin-qt, the signature changes. Why is this?
2
votes
2answers
3k 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
2answers
76 views

The example signature in BIP143 doesn't validate?

In BIP143 the first example has a witness signature and it doesn't appear to validate/be correct?! I wrote a super simple python program to demonstrate import ecdsa import asn1 #Importing the 3 ...
2
votes
1answer
546 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 ...
2
votes
2answers
2k 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 ...
2
votes
1answer
3k views

Recovering ECDSA public key from the signature

How to recover ECDSA public key from the signature? I know that all is need is a hash of the unsigned message and signature. But may be there is some detailed method for to calculate ECDSA public ...
2
votes
2answers
824 views

Can you “undo” an nlockTime transaction by spending a single UTXO of it before lockTime's block happens?

Let's say I have a wallet X with money from 3 unspent outputs (UTXOs) A, B and C. I make an nlocktime transaction to spend 2 of my 3 UTXOs (A & B) to wallet Y, 1 month in the future, sign it, and ...
2
votes
2answers
724 views

Can Bitcoin scripting be used for double spending attacks?

A standard Bitcoin transaction deposits coins into an address and then, using Bitcoin's scripting language, states that whoever wants to spend this output must be in possess of the private key ...
2
votes
2answers
111 views

Can an attacker steal a very recent tx and alter it, broadcasting a new tx with his address on the output?

I'm reading the technical FAQs on the wiki, and what I don't see is, if I create a transaction with signed prev_outs and new outputs, do I also sign the ENTIRE new tx before broadcasting? I don't see ...
2
votes
1answer
165 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 ...
2
votes
2answers
1k 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
124 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 ...
2
votes
1answer
461 views

What happens to Private Key on Payment

If I pay someone in bitcoin, presumably I have to utilise both my private and public key in some way, and presumably this has to be verified by the network. Now does the network thus obtain my ...
2
votes
2answers
2k views

How to create the <sig> <PubK> part in “scriptSig”?

I've decoderawtransaction and see in the vin part a "scriptSig" ,which I believe to be the "unlocking script" . Assuming I have the private key in a paper wallet and someone send me transaction to my ...
2
votes
1answer
718 views

How do we verify the signature on a raw transaction using Bitcoinj?

I managed to create a raw tx using Bitcoinj but not able to figure out how to verify its signatures. Assuming I know the addresses corresponding to the (supposedly) unspent outputs used as inputs to ...
2
votes
1answer
72 views

p2pkh vs. p2pk keeping public key private

I just got into learning Bitcoin programming through Jimmy Song's Programming Bitcoin. Jimmy says that some of p2pkh's advantages over p2pk include: a smaller ScriptPubKey keeping one's public key ...
2
votes
2answers
78 views

Does every transaction have the same signature?

I want to know whether the bitcoin network generates the same signature for each transaction, because people have only one signature?
2
votes
1answer
57 views

How do we know which co-signer signature is in raw hex in multisig?

I have a raw 2of3 multisig transaction. In this transaction, one co-signer already signed. The signature is for only one input. ...
2
votes
1answer
67 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 ...
2
votes
1answer
786 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 ...
2
votes
1answer
83 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 ...
2
votes
1answer
1k views

What does “16: mandatory-script-verify-flag-failed (Non-canonical DER signature)” error mean?

What can this error mean? I've read through the code for it, and several of my transactions have not met the criteria for the error, yet are still rejected. I've tried decoding via several means (...
2
votes
2answers
241 views

Handling negative “s” values for signatures?

In comparing these test vectors to my own results, for tests #2 and #5, I end up with negative s values. My results show that for test #2, test_s = my_s * -1, as an integer, yet the hexadecimal ...
2
votes
1answer
1k views

How can I sign transaction hex with Python library

I have a unsigned transaction hex. Now I want to sign this transaction input with my private key in Python. Are there any Python libraries? Transaction Hex ...
2
votes
2answers
433 views

(CHECKSIG) Why is the ScriptPubKey from tx-inputs part of the signature?

I was checking OP_CHECKSIG today and see that the signature of a transaction will be computed from the transaction but copying the ScriptPubKey from the transaction referenced as input into the SigKey ...
2
votes
1answer
4k views

SignRawTransaction - What is scriptPubKey and redeemScript? [SOLVED] [closed]

Let me talk about how I got to the situation I'm in right now. I am using PHP and the JSON library to control bitcoind. And doing so..... I created a multisignature address requiring 2 of 3 ...
2
votes
2answers
144 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 --------- ...
2
votes
1answer
145 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 ...
2
votes
1answer
373 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 ...
2
votes
1answer
177 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 ...
2
votes
3answers
537 views

Why can't someone create a valid digital signature without knowing your private key?

I understand from the following two posts that private keys are not displayed by the sender when getting their transaction validated by the bitcoin miners: What happens to Private Key on Payment How ...
2
votes
1answer
886 views

How does the transaction signature prevent transaction duplication?

Let's say that Alice sends 1 BTC to Bob. We have then a signature of (Alice sends 1 BTC to Bob) with Alice private key. What prevents Bob from duplicating this exact same transaction and sending it to ...
2
votes
2answers
2k views

Is it possible to get the public key from a transaction input that is a 'pay to public key' output?

I am looking to be able to calculate the public key from the transaction input. The input is from a 'pay to public key' output. Can the public key of the input be generated from just the signature ...
2
votes
1answer
436 views

Signature: encoding a message - transaction to a point of curve y^2=x^3+7 and Bitcoin Core

Where should I look at in Bitcoin Core source code to figure out how the signature process trasform a message in a curve point? To sign a transaction (message) in Bitcoin system, you need to encode ...
2
votes
1answer
346 views

How many Secp256k1 signatures exist for a piece of data?

ECDSA signatures are not deterministic. That is, random information is used in calculating the signature for a piece of data. Approximately how many unique signatures exist for a piece of data? ...
2
votes
1answer
354 views

Verification of transaction once trasaction is broadcasted

I have few doubts regarding verification of transaction and am trying to find answers from last few days. I agree similar post exist in this portal but I am not getting satisfactory answer for my ...

1 2
3
4 5
8