Bitcoin Forum
May 11, 2024, 10:23:52 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to find the public key of btc address  (Read 319 times)
Morexl (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 1


View Profile
October 28, 2022, 09:17:50 PM
Merited by bitmover (1)
 #1

Hello everyone,

I want to know how I can find the public key (compressed or uncompressed) of any address, because i see there are too many addresses but they didn't have the public key so i check them blockchair.com and other explorer but they also didn't show the public key.

Here is the sample address: 1N45DoSuhiNi5dCqMTpC2k3tfSaHEw1uKk
1715423032
Hero Member
*
Offline Offline

Posts: 1715423032

View Profile Personal Message (Offline)

Ignore
1715423032
Reply with quote  #2

1715423032
Report to moderator
1715423032
Hero Member
*
Offline Offline

Posts: 1715423032

View Profile Personal Message (Offline)

Ignore
1715423032
Reply with quote  #2

1715423032
Report to moderator
1715423032
Hero Member
*
Offline Offline

Posts: 1715423032

View Profile Personal Message (Offline)

Ignore
1715423032
Reply with quote  #2

1715423032
Report to moderator
Transactions must be included in a block to be properly completed. When you send a transaction, it is broadcast to miners. Miners can then optionally include it in their next blocks. Miners will be more inclined to include your transaction if it has a higher transaction fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715423032
Hero Member
*
Offline Offline

Posts: 1715423032

View Profile Personal Message (Offline)

Ignore
1715423032
Reply with quote  #2

1715423032
Report to moderator
1715423032
Hero Member
*
Offline Offline

Posts: 1715423032

View Profile Personal Message (Offline)

Ignore
1715423032
Reply with quote  #2

1715423032
Report to moderator
hosseinimr93
Legendary
*
Offline Offline

Activity: 2394
Merit: 5235



View Profile
October 28, 2022, 09:39:37 PM
Last edit: October 28, 2022, 10:14:05 PM by hosseinimr93
Merited by BlackHatCoiner (4), pooya87 (2), ABCbits (2), bitmover (2)
 #2

If the address isn't yours (I mean you don't own its private key) and there isn't any transaction made from that address, there is no way to find the public key of the address.
You can't derive public key from the address. The address is derived from the public key through a one way function.

If there's a transaction made from the address, you can find its public key by checking the transaction details in a block explorer.
If the address is P2PKH (legacy), the public key is the second part of Sigscript.
If the the address is P2WPKH (native segwit) or P2WPKH-P2SH (nested segwit), the public key is the second part of witness.


Here is the sample address: 1N45DoSuhiNi5dCqMTpC2k3tfSaHEw1uKk
Since no transaction has been made from this address, there is no way to find its public key.
To know the public key of this address, you need its private key.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
d3bt3
Jr. Member
*
Offline Offline

Activity: 51
Merit: 20


View Profile WWW
October 29, 2022, 03:14:39 AM
Merited by NotATether (4), BlackHatCoiner (4), vapourminer (2), ABCbits (1)
 #3

Signing a message with the address in question would also reveal the public key.

https://altquick.com/exchange/market/BitcoinTestnet
n0nce
Hero Member
*****
Offline Offline

Activity: 882
Merit: 5829


not your keys, not your coins!


View Profile WWW
October 29, 2022, 11:07:21 AM
 #4

You can't derive public key from the address. The address is derived from the public key through a one way function.
Should I tell OP they can try breaking SHA256 and RIPEMD160 to reverse the public key hash into a public key or will it just cause more confusion? Grin

@OP, you want to read these:
https://learnmeabitcoin.com/beginners/keys_addresses
https://learnmeabitcoin.com/technical/address
https://learnmeabitcoin.com/technical/public-key-hash

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Morexl (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 1


View Profile
October 29, 2022, 10:53:42 PM
 #5

You can't derive public key from the address. The address is derived from the public key through a one way function.
Should I tell OP they can try breaking SHA256 and RIPEMD160 to reverse the public key hash into a public key or will it just cause more confusion? Grin

@OP, you want to read these:
https://learnmeabitcoin.com/beginners/keys_addresses
https://learnmeabitcoin.com/technical/address
https://learnmeabitcoin.com/technical/public-key-hash

Ok thanks let me read these topics.
2stout
Hero Member
*****
Offline Offline

Activity: 2352
Merit: 585


View Profile
October 30, 2022, 08:29:32 PM
 #6

If there are no transactions on the address and the address doesn't belong to you, then I don't believe you will be able to find it.  However, if there is at least 1 transaction on the address, then you could search an explorer or look up the firstbits on walletexplorer.
hosseinimr93
Legendary
*
Offline Offline

Activity: 2394
Merit: 5235



View Profile
October 30, 2022, 09:08:23 PM
 #7

However, if there is at least 1 transaction on the address, then you could search an explorer or look up the firstbits on walletexplorer.
This is not accurate.  You can find the public key of an address if there's an outgoing transaction. It's not that any transaction on history of an address can help you to find its public key.  
For making a transaction, you have to reveal your public key, so nodes can verify your signature. Your public key isn't revealed when you receive a transaction.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
2stout
Hero Member
*****
Offline Offline

Activity: 2352
Merit: 585


View Profile
October 30, 2022, 09:32:50 PM
 #8

However, if there is at least 1 transaction on the address, then you could search an explorer or look up the firstbits on walletexplorer.
This is not accurate.  You can find the public key of an address if there's an outgoing transaction. It's not that any transaction on history of an address can help you to find its public key.  
For making a transaction, you have to reveal your public key, so nodes can verify your signature. Your public key isn't revealed when you receive a transaction.

I get what you're saying but you already sort of make my point as you say- if there's an outgoing transaction.
ABCbits
Legendary
*
Offline Offline

Activity: 2870
Merit: 7492


Crypto Swap Exchange


View Profile
October 31, 2022, 09:54:44 AM
Merited by hosseinimr93 (1)
 #9

I want to know how I can find the public key (compressed or uncompressed) of any address

If there's a transaction made from the address, you can find its public key by checking the transaction details in a block explorer.
If the address is P2PKH (legacy), the public key is the second part of Sigscript.
If the the address is P2WPKH (native segwit) or P2WPKH-P2SH (nested segwit), the public key is the second part of witness.

But if it's P2SH, P2WSH or P2TR address, you might have to check the redeem script manually to find any revealed public key.

However, if there is at least 1 transaction on the address, then you could search an explorer or look up the firstbits on walletexplorer.
This is not accurate.  You can find the public key of an address if there's an outgoing transaction. It's not that any transaction on history of an address can help you to find its public key. 
For making a transaction, you have to reveal your public key, so nodes can verify your signature. Your public key isn't revealed when you receive a transaction.

I get what you're saying but you already sort of make my point as you say- if there's an outgoing transaction.

You're not being explicit enough on earlier post, "1 transaction" could refer to either incoming and outgoing transaction. That might be why @hosseinimr93 said your statement isn't accurate.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
October 31, 2022, 02:08:01 PM
 #10

If you know who the address belongs to (who has access to thee private key for the address), then you could just ask them to send you the public key.

Verifying that they sent you the correct public key is a rather simple thing to program.
citb0in
Hero Member
*****
Offline Offline

Activity: 672
Merit: 657


Bitcoin g33k


View Profile
November 05, 2022, 03:47:00 PM
 #11

What exactly is the reason one is interested in the pubkey of an address ?

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
hosseinimr93
Legendary
*
Offline Offline

Activity: 2394
Merit: 5235



View Profile
November 05, 2022, 06:10:56 PM
 #12

What exactly is the reason one is interested in the pubkey of an address ?
Public key is needed only when you want to make a transaction. Your transaction should contain the public key, so the nodes can verify your signature. Since the public key is calculated automatically by your wallet and broadcast to the network, you don't really need to know the public key of your address. That's why wallets usually gives you the addresses and private keys and not the public keys.

Maybe OP is just doing some studies on how private keys and public keys are calculated.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
BlackHatCoiner
Legendary
*
Online Online

Activity: 1512
Merit: 7364


Farewell, Leo


View Profile
November 05, 2022, 06:19:33 PM
Merited by ABCbits (1), hosseinimr93 (1)
 #13

What exactly is the reason one is interested in the pubkey of an address ?
One might want to verify a transaction associated with an address. Or he might want to prove he owns it. Or you might want to send someone an encrypted message besides money; possession of the public key is necessary to confirm that the money receiver is also the message receiver. Or one might just want to educate himself about ECDSA private and public keys.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
citb0in
Hero Member
*****
Offline Offline

Activity: 672
Merit: 657


Bitcoin g33k


View Profile
November 05, 2022, 06:23:49 PM
 #14

@Morexl: What exactly do you need to know the public key for a certain address? Can you tell us, please? whats your intention ?

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
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!