Bitcoin Forum
May 29, 2024, 11:20:23 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to get the pubkey of other's address?  (Read 897 times)
gpmn (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
February 07, 2014, 04:28:11 PM
 #1

Besides they tell me, Is it possible to get other's public key?

such as from the signed message?
gpmn (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
February 07, 2014, 05:16:03 PM
 #2

Oh, I just take a look in the code, the signed message do have  the public key;

but it seems that the code is not so easy to be reused. Is any document mentions about how does the message encode?

Besides they tell me, Is it possible to get other's public key?

such as from the signed message?

piotr_n
Legendary
*
Offline Offline

Activity: 2053
Merit: 1354


aka tonikt


View Profile WWW
February 07, 2014, 10:46:29 PM
 #3

Quick answer: no, you can't get public key from an address.

Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
gpmn (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
February 08, 2014, 03:18:06 AM
 #4

not from address, but from the signed message;

I saw the code,  the old version, 2 years ago, bitcoind feeded back the pubkey, while now it just feeds back ok or not;

I think the most fast way is to clone the code and add such output.

Quick answer: no, you can't get public key from an address.
Bitcoin-Monster
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
February 08, 2014, 03:19:58 AM
 #5

It is (quite) impossible to compute the public key of an address, as the address is computed from the hash of the public key
Evil-Knievel
Legendary
*
Offline Offline

Activity: 1260
Merit: 1168



View Profile
February 08, 2014, 10:18:08 PM
Last edit: April 17, 2016, 09:07:18 PM by Evil-Knievel
 #6

This message was too old and has been purged
BurtW
Legendary
*
Offline Offline

Activity: 2646
Merit: 1136

All paid signature campaigns should be banned.


View Profile WWW
February 08, 2014, 10:33:00 PM
 #7

If there has ever been a send transaction from the Bitcoin address then the public key is in the blockchain and you can just read it out.  But if there are no send transactions from the address then it is impossible to calculate the public key from the Bitcoin address.

Our family was terrorized by Homeland Security.  Read all about it here:  http://www.jmwagner.com/ and http://www.burtw.com/  Any donations to help us recover from the $300,000 in legal fees and forced donations to the Federal Asset Forfeiture slush fund are greatly appreciated!
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
February 08, 2014, 10:36:04 PM
 #8

In fact it is pretty easy.

- Go to the address in blockchain.info.
- Search for an outgoing transaction and click it
- Show Input/Output Scripts
- In the Input Scripts the value starting with 04.... is the public key.

What is the pubkey of this address?

112xBKNMa2Cj7g9DT8MJYYwUDoKFmYB3EM

Evil-Knievel
Legendary
*
Offline Offline

Activity: 1260
Merit: 1168



View Profile
February 08, 2014, 10:39:53 PM
Last edit: April 17, 2016, 09:07:05 PM by Evil-Knievel
 #9

This message was too old and has been purged
BurtW
Legendary
*
Offline Offline

Activity: 2646
Merit: 1136

All paid signature campaigns should be banned.


View Profile WWW
February 08, 2014, 10:45:23 PM
 #10

EK, just wondering if you have been able to crack any of the 200,000 public keys that Greg gave you.  How is that going?

Our family was terrorized by Homeland Security.  Read all about it here:  http://www.jmwagner.com/ and http://www.burtw.com/  Any donations to help us recover from the $300,000 in legal fees and forced donations to the Federal Asset Forfeiture slush fund are greatly appreciated!
Evil-Knievel
Legendary
*
Offline Offline

Activity: 1260
Merit: 1168



View Profile
February 08, 2014, 10:58:02 PM
Last edit: April 17, 2016, 09:06:59 PM by Evil-Knievel
 #11

This message was too old and has been purged
gpmn (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
February 10, 2014, 12:47:41 PM
 #12

I changed the code of bitcoin src/rpcmisc.cpp then recompiled it
I ask for their signed messages, then I can get pubkey from the signed message

Value verifymessage(const Array& params, bool fHelp)
....
...
    CPubKey pubkey;
    Object obj;
    if (!pubkey.RecoverCompact(ss.GetHash(), vchSig)){
      obj.push_back(Pair("pubkey",  ""));
      obj.push_back(Pair("valid",   false));
    }else{
      obj.push_back(Pair("pubkey",  HexStr(pubkey.begin(), pubkey.end())));
      obj.push_back(Pair("valid",   pubkey.GetID() == keyID));
    }

    return obj;

    // return (pubkey.GetID() == keyID);
}

In fact it is pretty easy.

- Go to the address in blockchain.info.
- Search for an outgoing transaction and click it
- Show Input/Output Scripts
- In the Input Scripts the value starting with 04.... is the public key.

What is the pubkey of this address?

112xBKNMa2Cj7g9DT8MJYYwUDoKFmYB3EM



You can only determine the Public Key once an outgoing transaction has been made. As this address is "blank" it is impossible in this case.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!