21
votes
Accepted
What are the advantages of Schnorr vs ECDSA?
Your question seems to assume that the only goal is minimizing on-chain transaction size. Reducing size and related costs is certainly something that can be improved upon, but it's far from the only ...
9
votes
Accepted
How to tell which part of the previous tx I need to make the hash to sign for an old given tx?
Disclaimer: I am going to assume that you are not completely clueless and that you know what an array is, how to count from 0, and how to match brackets, quotes, and colons so that you can read JSON ...
9
votes
Accepted
How is Public Key extracted from (message, digital signature, address)
An algorithm called Public Key Recovery exists for ECDSA, which lets you construct the public keys for which a given pair of message and signature would be valid.
To explain the algorithm, remember ...
7
votes
Accepted
For what purposes do we need "Sign message"?
You can sign a message to prove ownership of a particular private key, without sharing the private key or spending any funds. For example, you could sign a message that says "My name is John Doe". You ...
6
votes
Accepted
Is It Possible to Prove Ownership of Public Key Hash without Public Key?
The simple answer is no.
A hashing algorithm is ment to be a one-way function. If it is possible to recreate the public key from the hash, this means that the hashing algorithm is broken.
However ...
5
votes
Accepted
how do you sign and verify a message that you own a bitcoin address using javascript?
bitcoinjs-lib and bitcore-lib are both javascript libraries that allow for key signing.
For example with bitcore-lib:
var Message = require('bitcore-message');
var privateKey = new bitcore....
5
votes
Accepted
Why does blockwide signature aggregation prevent adaptor signatures?
There is a simple information theoretic argument: when two parties produce an adaptor signature, one party will learn a secret tweak from the eventually published on-chain signature, by comparing it ...
4
votes
Accepted
How can I sign a message with a litecoin private key and also generate a litecoin address from a string?
bitcoinjs already has support for litecoin, a quick look at /src/network.js and the README reveals this.
https://github.com/bitcoinjs/bitcoinjs-lib/blob/d853806/test/integration/basic.js#L30
See how ...
4
votes
Accepted
online tool to play around with ECDSA public keys, message signature verification?
Here are a few I'd recommend:
https://bitcore.io/playground/#/address (private key - public key)
https://brainwalletx.github.io/#generator (signing and verifying but bitcoin specific)
Or play with ...
4
votes
Where is the public key corresponding to my address stored?
Yes, a transaction includes the public key. So, only when you spend the coins from an address a public key actually becomes public (unless you have shared it with anyone otherwise).
So, as long as ...
4
votes
Accepted
message signing: is it safe to publish the address, message and hash
It shouldn't compromise the private key. Notice that publishing a message along with a signature is a common thing, and is necessary to verify the signature. Publishing also de Bitcoin address is ...
4
votes
Accepted
Why are miners allowed to change a tx id?
BIP 62 proposed to make transaction malleability impossible.
No it didn't. It would have outlawed a limited number of known and addressable forms of malleability.
In particular, it did not prevent ...
4
votes
Accepted
How to determine first byte (recovery ID) for signatures (message signing)?
FWIW this is what I have found regarding this question. Basically there are two ways of finding what libraries call "recid" or recovery ID. Most of them use the first method but there is ...
4
votes
Accepted
How does a hardware wallet interact with the bitcoin network?
No.
The hardware wallet company sometimes runs a node, but you could just as easily use a client like Electrum instead, and use Electrum nodes instead with your hardware wallet. All the node is used ...
3
votes
Accepted
Why the signature of the same message changes in some wallets, but not all?
You're seeing the effect of RFC6979.
When generating a signature, some randomness is needed (called the nonce), as there are multiple valid signatures for the same message/key pair. The algorithm ...
3
votes
Accepted
Can you include a signature in a bitcoin payment?
No. This is not possible, although, technically it could be possible by adding n child transaction each formed as a tx out of you original transaction. The child transaction then could each have a ...
3
votes
online tool to play around with ECDSA public keys, message signature verification?
closest I can come up with are these:
http://coinig.com/
http://gobittest.appspot.com/Address
https://www.bitaddress.org/bitaddress.org-v3.2.0-SHA256-...
3
votes
Is It Possible to Prove Ownership of Public Key Hash without Public Key?
1) Generate a random private key just to be used to prove ownership.
2) Create a message with the corresponding public key to the key generated in step one and the public key you wish to prove ...
3
votes
Accepted
How are Bitcoin Signed Messages generated?
The message that is signed is prepended with
"\x18Bitcoin Signed Message:\n" + compactSizeEncoding( len(message) )
\x18 is Python syntax for unicode character 0x18. This new text string is then ...
3
votes
Difference between Sign Message and Sign Transaction
Is the difference that for "Sign Message", first a digest is created, which is then signed, while for "Sign Transaction" (in the meaning written above), the input is already a digest, so it shouldn't ...
3
votes
Accepted
signmessage and verifymessage CLI commands not accepting Address from getnewaddress?
signmessage and verifymessage only work with legacy type addresses. They do not work with segwit addresses. There is ongoing work to introduce a new message signing standard that will work regardless ...
3
votes
Why is full blockwide signature aggregation of schnorr signatures non-interactive?
First a definition:
A multisignature scheme is a scheme where multiple parties jointly produce a signature on a single message, which can be verified against the set of all participating public keys.
...
3
votes
why do we need to hash before we use a private key to digitally sign a transaction? isn't just using a private key enough?
I addition to Claris' answer, if your question is about ECDSA, the hashing step is actually an essential part of the signature scheme and not just a step we choose to do before invoking it. Without ...
2
votes
How can I sign a message with a multi signature address?
Signing message is proof of ownership of private key
Multisignature/P2SH address is hash of several (including zero) public keys
So, signing message with M private keys and disclosing the "contents" ...
2
votes
Accepted
How can I prove control of HD wallet through message signing?
It proves that you control all children of that address (i.e. the ones further down the chain). It does not prove that you own the parents of that address (i.e. the ones further up the chain), since ...
2
votes
How to sign a message using Bitcoin private key?
Using bitcoind and bitcoin-cli you can do it as follows:
bitcoin-cli signmessage 1DiWX6p3FdHPZqN88vMeGVXSwAQ1h7BeVj 'Hello world!'
2
votes
Accepted
What is the strMessageMagic good for?
Imagine if that weren't there. What if someone tricked you into signing a Bitcoin transaction with your key? They could put the signature they got from you along with your public key into the input ...
2
votes
Best simple linux cmd tool for offline transaction creation and signing?
There are many command line tools for creating and signing raw transactions offline, most of them written in Python: pycoin, python-bitcoinlib, pybitcointools and others.
If you use Electrum wallet, ...
2
votes
online tool to play around with ECDSA public keys, message signature verification?
Here is an ECC calculator for the Secp256k1 curve that I'm programming in Java.
https://github.com/MrMaxweII/Secp256k1-Calculator
2
votes
Accepted
What is wrong with my ScriptSig? I get 64: scriptsig-not-pushonly
Your signature is not correct. First of all, its length can't be 74 bytes long. According to the Bitcoin wiki:
Signatures are either 73, 72, or 71 bytes long, with probabilities approximately 25%, ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
message-signing × 84signature × 28
message-verification × 14
transactions × 13
bitcoin-core × 10
address × 7
multi-signature × 7
ecdsa × 6
public-key × 5
schnorr-signatures × 5
segregated-witness × 4
hash × 4
transaction-verification × 4
verification × 4
private-key × 3
blockchain × 2
wallet × 2
bitcoind × 2
json-rpc × 2
electrum × 2
script × 2
privacy × 2
raw-transaction × 2
bech32-address × 2
javascript × 2