Author

Topic: Address from signature. (Read 230 times)

newbie
Activity: 21
Merit: 3
June 08, 2018, 01:50:38 PM
#6
In ECDSA, the signatures used for Bitcoin, it is possible to recover the public key and thus, the addresses.

Note that usually, you will have 4 public keys, and in rare cases, 8 keys (one of which will be the real one)

See this: https://crypto.stackexchange.com/questions/18105/how-does-recovering-the-public-key-from-an-ecdsa-signature-work

And one example code here: https://github.com/scalahub/bitcoinS/blob/35eef4231538c9e329c6a88fc82ce70f03c65bf1/BitcoinS/src/sh/ecc/ECCPubKey.scala#L43
legendary
Activity: 2268
Merit: 18711
June 08, 2018, 01:45:49 PM
#5
The quickest way I use to verifiy a message is with this link: https://brainwalletx.github.io/#verify

You can either paste the entire quote from "-----BEGIN BITCOIN SIGNED MESSAGE-----" to "-----END BITCOIN SIGNED MESSAGE-----" in to the "Signed Message" tab, or alternatively, you can swap to "Bitcoin-QT" and manually paste in the address, message and signature. Either way will give you the same result (A green message verified banner or a red failed to verify one).

For a more indepth look at signing and verifying messages, I would recommend shorena's guide How to sign a message?!
jr. member
Activity: 174
Merit: 6
June 08, 2018, 12:18:58 PM
#4
This has all been a fantastic help thanks, the next thing I want to do is learn his to do verification and check some of those staked signatures. Then ,I should be able to test if for example two people claim to both own the address who really does.
legendary
Activity: 3472
Merit: 4801
June 08, 2018, 11:10:40 AM
#3
Furthermore, users can have multiple addresses.  Therefore the transactions you find from a given public key are unlikely to be all (or even most) of the transactions of the user.

Additionally, for any given public key, there are 2 possible P2PKH addresses (Addresses that start with a '1'). The compressed, and the uncompressed.  There are also approximately 1.46 X 1048 possible P2SH addresses (addresses that start with a '3').  It is also possible for a user to use a public key to create transactions that don't use addresses at all (non-standard output scripts).

staff
Activity: 3458
Merit: 6793
Just writing some code
June 06, 2018, 01:11:59 AM
#2
The point of the stake your address thread is to post your address, not just a message and a signature. You should see addresses in there, not just messages and signatures.

But even with just a message and signature, you can still get an address, it just may not be the correct one.

Signature verification requires three items: the signature, a message, and a public key. Typically you pass all three into a verification algorithm which tells you whether the signature is true or false. However, with just the signature and the message, you can get a public key which is valid for the message and signature. You can then compute the address for that public key.

Keep in mind that any signature and message combination can be used to produce a public key. That does not mean that the private key for that public key is the one that actually produced the signature or that the message is the message that was actually signed. Part of signature verification is to also provide the public key to prove that the owner of the private key for that public key signed the message, not just that the message and signature are both valid. The public key is an important part of signature verification.
jr. member
Activity: 174
Merit: 6
June 06, 2018, 12:46:27 AM
#1
Hi

Is there a way to find the public address from a signature? Either from the forum such as the stake your thread which ties account members to their accountd. Now I would like to look at the transactions of each account member, but I don't know how to get that information from blockchain explorer because I don't know what their public address is, do I need to know the adress sepratley or can I work it out from the signature somehow.
Jump to: