Bitcoin Forum
May 05, 2024, 01:46:35 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Good reference for converting Bitcoin public key to address  (Read 459 times)
pilotniq (OP)
Newbie
*
Offline Offline

Activity: 31
Merit: 0


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
"With e-currency based on cryptographic proof, without the need to trust a third party middleman, money can be secure and transactions effortless." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714873595
Hero Member
*
Offline Offline

Posts: 1714873595

View Profile Personal Message (Offline)

Ignore
1714873595
Reply with quote  #2

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

Activity: 335
Merit: 255


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)
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!