Bitcoin Forum
November 24, 2017, 02:25:43 AM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 [2]  All
  Print  
Author Topic: Need Help Understanding Base58Check Encoding...  (Read 1168 times)
ExabyteMiner
Jr. Member
*
Offline Offline

Activity: 48


View Profile WWW
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

BATforN - bitcointalk.org/index.php?topic=1409955
Join ICO Now A blockchain platform for effective freelancing
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1511490343
Hero Member
*
Offline Offline

Posts: 1511490343

View Profile Personal Message (Offline)

Ignore
1511490343
Reply with quote  #2

1511490343
Report to moderator
1511490343
Hero Member
*
Offline Offline

Posts: 1511490343

View Profile Personal Message (Offline)

Ignore
1511490343
Reply with quote  #2

1511490343
Report to moderator
achow101
Staff
Legendary
*
Offline Offline

Activity: 1232


17kKQppUsngUiByDsce4JXoZEjjpvX9bpR


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

          ▄█████▄
        ▄█████████▄
      ▄████▀   ▀████▄
    ▄████▀   ▄ ▄█▀████▄
  ▄████▀   ▄███▀   ▀████▄
▄████▀   ▄███▀   ▄   ▀████▄
█████   ███▀   ▄███   █████
▀████▄   ▀██▄▄███▀   ▄████▀
  ▀████▄   ▀███▀   ▄████▀
    ▀████▄       ▄████▀
      ▀████▄   ▄████▀
        ▀███  ████▀
          ▀█▄███▀
.
|
.
|
          ▄█████▄
        ▄█████████▄
      ▄████▀   ▀████▄
    ▄████▀   ▄ ▄█▀████▄
  ▄████▀   ▄███▀   ▀████▄
▄████▀   ▄███▀   ▄   ▀████▄
█████   ███▀   ▄███   █████
▀████▄   ▀██▄▄███▀   ▄████▀
  ▀████▄   ▀███▀   ▄████▀
    ▀████▄       ▄████▀
      ▀████▄   ▄████▀
        ▀███  ████▀
          ▀█▄███▀
unthy
ExabyteMiner
Jr. Member
*
Offline Offline

Activity: 48


View Profile WWW
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"?

BATforN - bitcointalk.org/index.php?topic=1409955
achow101
Staff
Legendary
*
Offline Offline

Activity: 1232


17kKQppUsngUiByDsce4JXoZEjjpvX9bpR


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.

          ▄█████▄
        ▄█████████▄
      ▄████▀   ▀████▄
    ▄████▀   ▄ ▄█▀████▄
  ▄████▀   ▄███▀   ▀████▄
▄████▀   ▄███▀   ▄   ▀████▄
█████   ███▀   ▄███   █████
▀████▄   ▀██▄▄███▀   ▄████▀
  ▀████▄   ▀███▀   ▄████▀
    ▀████▄       ▄████▀
      ▀████▄   ▄████▀
        ▀███  ████▀
          ▀█▄███▀
.
|
.
|
          ▄█████▄
        ▄█████████▄
      ▄████▀   ▀████▄
    ▄████▀   ▄ ▄█▀████▄
  ▄████▀   ▄███▀   ▀████▄
▄████▀   ▄███▀   ▄   ▀████▄
█████   ███▀   ▄███   █████
▀████▄   ▀██▄▄███▀   ▄████▀
  ▀████▄   ▀███▀   ▄████▀
    ▀████▄       ▄████▀
      ▀████▄   ▄████▀
        ▀███  ████▀
          ▀█▄███▀
unthy
ExabyteMiner
Jr. Member
*
Offline Offline

Activity: 48


View Profile WWW
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

BATforN - bitcointalk.org/index.php?topic=1409955
achow101
Staff
Legendary
*
Offline Offline

Activity: 1232


17kKQppUsngUiByDsce4JXoZEjjpvX9bpR


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

          ▄█████▄
        ▄█████████▄
      ▄████▀   ▀████▄
    ▄████▀   ▄ ▄█▀████▄
  ▄████▀   ▄███▀   ▀████▄
▄████▀   ▄███▀   ▄   ▀████▄
█████   ███▀   ▄███   █████
▀████▄   ▀██▄▄███▀   ▄████▀
  ▀████▄   ▀███▀   ▄████▀
    ▀████▄       ▄████▀
      ▀████▄   ▄████▀
        ▀███  ████▀
          ▀█▄███▀
.
|
.
|
          ▄█████▄
        ▄█████████▄
      ▄████▀   ▀████▄
    ▄████▀   ▄ ▄█▀████▄
  ▄████▀   ▄███▀   ▀████▄
▄████▀   ▄███▀   ▄   ▀████▄
█████   ███▀   ▄███   █████
▀████▄   ▀██▄▄███▀   ▄████▀
  ▀████▄   ▀███▀   ▄████▀
    ▀████▄       ▄████▀
      ▀████▄   ▄████▀
        ▀███  ████▀
          ▀█▄███▀
unthy
Pages: « 1 [2]  All
  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!