Bitcoin Forum
May 04, 2024, 12:38:20 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: Need Help Understanding Base58Check Encoding...  (Read 1358 times)
ExabyteMiner (OP)
Member
**
Offline Offline

Activity: 82
Merit: 10


View Profile
April 13, 2016, 11:39:46 PM
 #21

OK, I am very close, I am able to reliably produce correct results all the way up to the actual Base58 encoding now.

After finding and adding the checksum to the end of my string from step 3, I have:
Code:
8044d00f6eb2e5491cd7ab7e7185d81b67a23c4980f62b2ed0914d32b7eb1c55815b0e9051


Now, how do I do the final Base58 encoding to turn that result into:
Code:
5JLbJxi9koHHvyFEAERHLYwG7VxYATnf8YdA9fiC6kXMghkYXpk
The block chain is the main innovation of Bitcoin. It is the first distributed timestamping system.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714826300
Hero Member
*
Offline Offline

Posts: 1714826300

View Profile Personal Message (Offline)

Ignore
1714826300
Reply with quote  #2

1714826300
Report to moderator
1714826300
Hero Member
*
Offline Offline

Posts: 1714826300

View Profile Personal Message (Offline)

Ignore
1714826300
Reply with quote  #2

1714826300
Report to moderator
1714826300
Hero Member
*
Offline Offline

Posts: 1714826300

View Profile Personal Message (Offline)

Ignore
1714826300
Reply with quote  #2

1714826300
Report to moderator
achow101
Staff
Legendary
*
Offline Offline

Activity: 3388
Merit: 6581


Just writing some code


View Profile WWW
April 13, 2016, 11:51:26 PM
 #22

OK, I am very close, I am able to reliably produce correct results all the way up to the actual Base58 encoding now.

After finding and adding the checksum to the end of my string from step 3, I have:
Code:
8044d00f6eb2e5491cd7ab7e7185d81b67a23c4980f62b2ed0914d32b7eb1c55815b0e9051


Now, how do I do the final Base58 encoding to turn that result into:
Code:
5JLbJxi9koHHvyFEAERHLYwG7VxYATnf8YdA9fiC6kXMghkYXpk
The base58 conversion is specific to Bitcoin. There is pseudocode and a chart of characters here: https://en.bitcoin.it/wiki/Base58Check_encoding#Base58_symbol_chart

ExabyteMiner (OP)
Member
**
Offline Offline

Activity: 82
Merit: 10


View Profile
April 14, 2016, 12:03:42 AM
 #23

OK, I am very close, I am able to reliably produce correct results all the way up to the actual Base58 encoding now.

After finding and adding the checksum to the end of my string from step 3, I have:
Code:
8044d00f6eb2e5491cd7ab7e7185d81b67a23c4980f62b2ed0914d32b7eb1c55815b0e9051


Now, how do I do the final Base58 encoding to turn that result into:
Code:
5JLbJxi9koHHvyFEAERHLYwG7VxYATnf8YdA9fiC6kXMghkYXpk
The base58 conversion is specific to Bitcoin. There is pseudocode and a chart of characters here: https://en.bitcoin.it/wiki/Base58Check_encoding#Base58_symbol_chart

Sorry, again, I am self-taught when it comes to coding, I do not fully understand the pseudocode... From what I understand I have to change "8044d00f6eb2e5491cd7ab7e7185d81b67a23c4980f62b2ed0914d32b7eb1c55815b0e9051" into a "big integer" and then perform some math on it. How do i convert a plain text string to a "big integer"?
achow101
Staff
Legendary
*
Offline Offline

Activity: 3388
Merit: 6581


Just writing some code


View Profile WWW
April 14, 2016, 12:11:39 AM
 #24

Sorry, again, I am self-taught when it comes to coding, I do not fully understand the pseudocode... From what I understand I have to change "8044d00f6eb2e5491cd7ab7e7185d81b67a23c4980f62b2ed0914d32b7eb1c55815b0e9051" into a "big integer" and then perform some math on it. How do i convert a plain text string to a "big integer"?
It means treat that hex string as a really big integer encoded in hex (base16). The easiest thing is to go to a site like http://www.wolframalpha.com/ and type that string followed by " convert to decimal" and it will give you a really large decimal integer. Then you just use that number to do the conversions.

Also, when working with hex, you always need to think of hex not as a string but as bytes and integers.

ExabyteMiner (OP)
Member
**
Offline Offline

Activity: 82
Merit: 10


View Profile
April 14, 2016, 12:29:11 AM
 #25

Sorry, again, I am self-taught when it comes to coding, I do not fully understand the pseudocode... From what I understand I have to change "8044d00f6eb2e5491cd7ab7e7185d81b67a23c4980f62b2ed0914d32b7eb1c55815b0e9051" into a "big integer" and then perform some math on it. How do i convert a plain text string to a "big integer"?
It means treat that hex string as a really big integer encoded in hex (base16). The easiest thing is to go to a site like http://www.wolframalpha.com/ and type that string followed by " convert to decimal" and it will give you a really large decimal integer. Then you just use that number to do the conversions.

Also, when working with hex, you always need to think of hex not as a string but as bytes and integers.

When i go to that site and type:
Code:
8044d00f6eb2e5491cd7ab7e7185d81b67a23c4980f62b2ed0914d32b7eb1c55815b0e9051 convert to decimal

I get:
Code:
Wolfram|Alpha doesn't understand your query

Showing instead result for query: decimal
achow101
Staff
Legendary
*
Offline Offline

Activity: 3388
Merit: 6581


Just writing some code


View Profile WWW
April 14, 2016, 12:34:21 AM
 #26

Sorry, again, I am self-taught when it comes to coding, I do not fully understand the pseudocode... From what I understand I have to change "8044d00f6eb2e5491cd7ab7e7185d81b67a23c4980f62b2ed0914d32b7eb1c55815b0e9051" into a "big integer" and then perform some math on it. How do i convert a plain text string to a "big integer"?
It means treat that hex string as a really big integer encoded in hex (base16). The easiest thing is to go to a site like http://www.wolframalpha.com/ and type that string followed by " convert to decimal" and it will give you a really large decimal integer. Then you just use that number to do the conversions.

Also, when working with hex, you always need to think of hex not as a string but as bytes and integers.

When i go to that site and type:
Code:
8044d00f6eb2e5491cd7ab7e7185d81b67a23c4980f62b2ed0914d32b7eb1c55815b0e9051 convert to decimal

I get:
Code:
Wolfram|Alpha doesn't understand your query

Showing instead result for query: decimal
Oh, you need to prepend it with a 0x and use base10, not decimal, sorry. So 0x8044d.... convert to base10

Pages: « 1 [2]  All
  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!