Converting a Bitcoin public key to address, technical help
12876
post-template-default,single,single-post,postid-12876,single-format-standard,bridge-core-2.3.7,ajax_fade,page_not_loaded,,qode_grid_1300,footer_responsive_adv,qode-content-sidebar-responsive,qode-theme-ver-22.3,qode-theme-bridge,disabled_footer_bottom,qode_header_in_grid,wpb-js-composer js-comp-ver-6.2.0,vc_responsive,elementor-default,elementor-kit-199

Converting a Bitcoin public key to address, technical help

Converting a Bitcoin public key to address, technical help

Hi

for learning purposes I’m trying to understand how a public key gets converted into an address. I generated a public key from bitaddress.org, the result was

04B86955D3C2EF39D389A5DE04A495BFDA120E418F05CEAEA4527F7AD7A896D7B1D560508B2865308360B696F1E5A88114C5AD5017B6611872235F67D2325AD89C

then I followed the instructions from Mastering Bitcoin to obtain my address

I SHA256 hashed it and then RIPEMD160 hashed it (the sha256 hash), the result was

2a6953d871194aea94727e4ed98ffb05a0ad2a8c

then I added a 0x00 prefix at the start and sha256 hashed it twice. The first 4 bytes (checksum) were 2272, I added that to the end of the hash

Then I put 0x002a6953d871194aea94727e4ed98ffb05a0ad2a8c2272 (prefix+data+checksum) into a Base58 Encoder online and the result had nothing to do with the actual address that was generated from bitaddress (2n88VbWGK3JKNaLfoFFwB1ZkDNRvZ73Jmz7FvZL3wjtyors8rFTdckEqgVWUdWd15T instead of 16qaecZ3pKhvHW6QWw8snTQRXADWxyS3sq)

What am I doing wrong?

submitted by /u/bulltrader2000
[link] [comments]

No Comments

Post A Comment