Quantcast
Channel: Active questions tagged base58check - Bitcoin Stack Exchange
Viewing all articles
Browse latest Browse all 23

Creating a P2PKH address

$
0
0

I have been learning about how P2PKH addresses are generated so I thought I would try and work through one myself manually. I start with the following public key hash:

e049ccc9e524a9302c2187bf02c4d78741d9b039

Which I know should come out to address:

1MSvmgVJvYkdtCsopFqsT2g3FNNhpcoeBG

I append the 00 prefix to my hash getting:

00e049ccc9e524a9302c2187bf02c4d78741d9b039

I then go to calculate the checksum by converting this to binary:

1110000001001001110011001100100111100101001001001010100100110000001011000010000110000111101111110000001011000100110101111000011101000001110110011011000000111001

And then running this through SHA256 twice which gets me:

a66d4caa10c1b665d6bca3f06788db9fbea6e9912a9fcf8101eb5992f9e8ab78

I take the first 4 bytes a66d4caa and put them onto the end of my prefix+hash:

00e049ccc9e524a9302c2187bf02c4d78741d9b039a66d4caa

And I wind up with:

1MSvmgVJvYkdtCsopFqsT2g3FNNhsp8jXo

Can someone help me out with where I am going wrong?

EDIT: Forgot to convert it to binary first. But it still doesn't work.


Viewing all articles
Browse latest Browse all 23

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>