Bitcoin Forum
October 19, 2017, 10:19:05 PM *
News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Good reference for converting Bitcoin public key to address  (Read 365 times)
pilotniq
Jr. Member
*
Offline Offline

Activity: 31


View Profile
May 24, 2013, 08:37:49 AM
 #1

I was debugging some code to convert a bitcoin public key to an address, and had great use of this diagram posted by etothepi:

http://dl.dropbox.com/u/1139081/BitcoinImg/PubKeyToAddr.png
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1508451545
Hero Member
*
Offline Offline

Posts: 1508451545

View Profile Personal Message (Offline)

Ignore
1508451545
Reply with quote  #2

1508451545
Report to moderator
1508451545
Hero Member
*
Offline Offline

Posts: 1508451545

View Profile Personal Message (Offline)

Ignore
1508451545
Reply with quote  #2

1508451545
Report to moderator
1508451545
Hero Member
*
Offline Offline

Posts: 1508451545

View Profile Personal Message (Offline)

Ignore
1508451545
Reply with quote  #2

1508451545
Report to moderator
JahPowerBit
Sr. Member
****
Offline Offline

Activity: 291


Counterparty Developer


View Profile
May 24, 2013, 09:41:09 AM
 #2

Look at this code : https://github.com/weex/addrgen

you can do something like this:

pubkey = ".........".decode('hex')
hash160 = rhash(pubkey)
addr = base58_check_encode(hash160, self.version)

Je suis Charlie!
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!