Bitcoin Forum
April 27, 2024, 03:53:02 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to get the Public Keys of a bitcoin User  (Read 1446 times)
jgmBitcoin (OP)
Newbie
*
Offline Offline

Activity: 18
Merit: 8


View Profile
June 04, 2016, 08:01:27 PM
Last edit: June 04, 2016, 08:14:13 PM by jgmBitcoin
Merited by ABCbits (2)
 #1

Is there some way in which I could get the public key of a Bitcoin user ?

Lets say If I have transaction from a Bitcoin user. Is there some means by which I could get the public key of a particular Bitcoin address ?

How does https://slock.it/ guys does it ? From where do they get the public key from ?

https://www.youtube.com/watch?v=-Ht23KXic1k
1714189982
Hero Member
*
Offline Offline

Posts: 1714189982

View Profile Personal Message (Offline)

Ignore
1714189982
Reply with quote  #2

1714189982
Report to moderator
1714189982
Hero Member
*
Offline Offline

Posts: 1714189982

View Profile Personal Message (Offline)

Ignore
1714189982
Reply with quote  #2

1714189982
Report to moderator
1714189982
Hero Member
*
Offline Offline

Posts: 1714189982

View Profile Personal Message (Offline)

Ignore
1714189982
Reply with quote  #2

1714189982
Report to moderator
"In a nutshell, the network works like a distributed timestamp server, stamping the first transaction to spend a coin. It takes advantage of the nature of information being easy to spread but hard to stifle." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714189982
Hero Member
*
Offline Offline

Posts: 1714189982

View Profile Personal Message (Offline)

Ignore
1714189982
Reply with quote  #2

1714189982
Report to moderator
1714189982
Hero Member
*
Offline Offline

Posts: 1714189982

View Profile Personal Message (Offline)

Ignore
1714189982
Reply with quote  #2

1714189982
Report to moderator
1714189982
Hero Member
*
Offline Offline

Posts: 1714189982

View Profile Personal Message (Offline)

Ignore
1714189982
Reply with quote  #2

1714189982
Report to moderator
DannyHamilton
Legendary
*
Online Online

Activity: 3374
Merit: 4610



View Profile
June 04, 2016, 10:04:07 PM
Merited by ABCbits (2)
 #2

There is no certainty that any of the previous outputs that were used to fund the transaction were received at addresses under the control of the person that arranged for you to receive the bitcoins (or that those previous outputs were received at addresses at all).

However, if you are certain that you know that a particular output was received at an address that was under the control of the person that arranged for you to receive the bitcoins, then you can retrieve the public key from the transaction ScriptSig.
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
June 07, 2016, 11:39:00 AM
 #3

There is no certainty that any of the previous outputs that were used to fund the transaction were received at addresses under the control of the person that arranged for you to receive the bitcoins (or that those previous outputs were received at addresses at all).

However, if you are certain that you know that a particular output was received at an address that was under the control of the person that arranged for you to receive the bitcoins, then you can retrieve the public key from the transaction ScriptSig.

And how is this technically done?

DannyHamilton
Legendary
*
Online Online

Activity: 3374
Merit: 4610



View Profile
June 07, 2016, 12:03:38 PM
 #4

If you are certain that you know that a particular output was received at an address that was under the control of the person that arranged for you to receive the bitcoins, then you can retrieve the public key from the transaction ScriptSig.
And how is this technically done?

If you are using Bitcoin Core with tindex turned on, then you would use the following command:

Code:
getrawtransaction TRANSACTION_ID

replacing TRANSACTION_ID with the actual transaction ID of the transaction you are interested in.

Note that this only works if the user that sent you the bitcoins had previously received those bitcoins at an output that used a script requiring a an ECDSA signature for the key you are interested in. If the output script doesn't require a signature from the public key you're interested in, then you wont be able to get the public key.
deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1025



View Profile WWW
June 16, 2016, 06:29:17 AM
 #5

When I see a thread like this, the first question - what is the OP hoping to achieve? Sometimes the question asked is not the real question.

A "Bitcoin User" doesn't have a public key, a Bitcoin address has a public key. The public key is only published when a transaction spends funds previously sent to that exact address.

Only after an address has spent money can the public key be recovered from a transaction stored in the blockchain. By recommendation, addresses are often never reused. Nothing about the address or its public key informs you about other addresses the user may have or use.
amaclin
Legendary
*
Offline Offline

Activity: 1260
Merit: 1019


View Profile
June 16, 2016, 07:45:44 AM
 #6

When I see a thread like this, the first question - what is the OP hoping to achieve? Sometimes the question asked is not the real question.
A "Bitcoin User" doesn't have a public key, a Bitcoin address has a public key.
You should mention that you are talking about p2pkh outputs

The public key is only published when a transaction spends funds previously sent to that exact address.
Only after an address has spent money can the public key be recovered from a transaction stored in the blockchain.
Not only. Let us take the genesis block and its coinbase transaction
4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
The public key (belongs to Satoshi Nakamoto) is
04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef3 8c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f
The associated address 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa does not have spending transactions
deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1025



View Profile WWW
June 16, 2016, 08:49:18 AM
 #7


You should mention that you are talking about p2pkh outputs
....
The public key is only published when a transaction spends funds previously sent to that exact address.
Only after an address has spent money can the public key be recovered from a transaction stored in the blockchain.
Not only. Let us take the genesis block and its coinbase transaction
..

Well, you answered the OP's first question as "yes" (as long as that user is Satoshi). Not news to me, but informative to others:
The original generation of 50 BTCs from mining was a pay-to-pubkey script.

OP hasn't really revealed a topic of curiosity though, unless you want to send someone unsolicited op_checksig payments.
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!