Questions tagged [base58]

Base58 is a format for representing data using only letters and numbers, but no letters which might look ambiguous when printed.

Filter by
Sorted by
Tagged with
1 vote
1 answer
122 views

Creating a P2PKH address

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: ...
0 votes
2 answers
2k views

How to decrypt an encrypted private key

"addr": "193BiCSPG1fJzU4JSLhi4tvXUQ6Qr6kLiq", "compressed": false, "encrypted_privkey": "...
3 votes
1 answer
150 views

Stuck dissecting a P2PKH Bitcoin transaction, what am I doing wrong?

I'm attempting to dissect a P2PKH transaction based on guidance from Rene Pickhardt's video (link). At around the 2:54 minute mark, he calculates the Bitcoin Address from the input. I'm interested in ...
6 votes
2 answers
733 views

Why are P2WSH addresses larger than P2SH addresses?

One would, perhaps naively, assume that both addresses are hashes of scripts and therefore ought to be the same size.
17 votes
1 answer
32k views

How can I convert a SHA256 hash into a Bitcoin base58 private key?

How can I take the output of sha256sum sudofox@ubuntu:~$ echo -n 'Hi guys!' | sha256sum 7542fb6685f9fd8f37d56faf62f0bb4563684a51539e4b26f0840db361e0027c - and turn it into a Base58Check encoded ...
0 votes
1 answer
38 views

Mixing some concepts with encodings

Is it some difference between psbt hex and transaction hex or both of them are the same? I guess the psbt format is in base58 and the raw transaction and transaction id is in hex format. So before ...
0 votes
1 answer
262 views

How to use the base58 in c++

its been a while after i done with my python bitcoin miner And i realize that python is slower to do mining stuff, so i decided to rebuild it in c++ as you guys know c++ the faster than other ...
3 votes
3 answers
7k views

How do i properly encode and decode base58 in python?

I was following the tutorial here : https://hackernoon.com/how-to-generate-bitcoin-addresses-technical-address-generation-explanation-rus3z9e i imported base58 to my python project : import base58 I ...
3 votes
6 answers
20k views

Correct way to convert a 256-bit private key to WIF?

On the Bitcoin wiki it has steps to convert a private key to WIF. So I tried following these steps in attempt to get the same result. So I took the private key. ...
0 votes
1 answer
11k views

What is the math behind a private key BASE58 (P2PKH)

Using this link I can understand something about a private key BASE58 (P2PKH): "such encodings will always yield a 51-character string that starts with '5', or more specifically, either '5H', '5J'...
-3 votes
1 answer
647 views

Why is this burn address starting to get confirmations?

Can anyone explain why the burn address 1111111111111111111114oLvT2 started receiving confirmations only on 8th June? 1st transaction is 11yrs? I thought a burn address doesn't get any confirmations, ...
2 votes
4 answers
7k views

encode/decode Base-58 C++

I have built a base-58 encoder using this formula: https://www.youtube.com/watch?v=GedV3S9X89c&feature=youtu.be Is there a smarter way to encode/decode with base-58? I read somewhere that you ...
2 votes
1 answer
841 views

Is there a Base58 encoder function that runs in pure javascript without node?

I see a lot of JavaScript Base58 encoder functions online, but all of them seem to require node. Is there a simple JavaScript Base58 encoder that will just run in the browser without any node ...
0 votes
1 answer
202 views

How much can be stripped of a base58 address in a recoverable way?

Since P2PKH and P2SH addresses use Base58Check_encoding, the 4 byte checksum appended in binary contains some redundancy. Strictly mathematically speaking, those 4 bytes correspond to ca. floor(log(2^...
1 vote
2 answers
6k views

Keep getting non base-58 character error when trying to recover my old wallet. Any ideas on how to troubleshoot this?

Basically I made a purchase with bitcoins back in ~2014 and I remember that I had a little bit leftover. However all documentation I have is a file labelled wallet with a huge string of characters. ...
3 votes
1 answer
279 views

Why P2SH seems to be never smaller than 34 characters, unlike P2PKH?

Why base58 of P2SH invoice address seems to be never smaller than 34 characters; unlike base58 of P2PKH invoice address, in which 33 characters is very common? Bitcoin wiki tells (format and emphasis ...
0 votes
0 answers
448 views

How do you Derive Addresses from a BIP49 Master Public Key using P2WPKH-P2SH?

I am trying to derive addresses from a master public key (aka extended public key) in python. I don't fully understand the math behind the key derivation, but have been able to decode the master ...
2 votes
1 answer
558 views

What is the prefix number, in bytes, of a native segwit address?

I've seen lots of tables on which bytes to use as the prefix for types of addresses. For example 0x00 for legacy addresses starting with a 1. But what's the prefix for native segwit 'bc1q'? I've tried ...
1 vote
1 answer
1k views

How to convert script hash to base58 address?

For example : take a look at this 37d1d453311ea5682cdb31468826178db15fa731722a5dbb09525ea901f1c41c scripthash. I need help converting it to base58 address. Thank you.
1 vote
1 answer
498 views

How to convert xpub ypub and zpub in Ruby

I'm looking to convert a Bitcoin extended public key from one format to another in Ruby. In JS I've found https://github.com/jlopp/xpub-converter/blob/master/js/xpubConvert.js and Python https://...
0 votes
1 answer
69 views

What are the benifits of using Compressed Bitcoin Addresses rather than Uncompressed addresses if same length?

They are both in base58, both 34 characters long, so where exactly is the space saved? When converted to binary is there one less bit on the compressed key as opposed to the uncompressed one? (This is ...
2 votes
1 answer
101 views

ELI5: is it true that Base58 doesn't prevent typo, but Base58check does, really because there is a checksum?

I am reading the book Grokking Bitcoin by Manning 2019. It first said, if John sends the token (bitcoin) to the cafe owner but made a typo in the cafe's address (the PKH), then that token is "...
0 votes
1 answer
269 views

How to handle leading 0's (b58 1's) when base58check encoding

I'm trying to more fully understand the base58check encoding algorithm. Unfortunately, I keep running into a problem with how to handle a situation where the base58 value of an input would have ...
1 vote
0 answers
1k views

Bitcoin address to Hash160 for brainflayer

I took a script to translate the bitcoin address to hash160: http://lenschulwitz.com/b58/base58perl.txt replaced the lines for working with the list from the file: #Sample test taken from https://en....
3 votes
2 answers
5k views

Is this how to generate a bitcoin address with python?

So I have already the public key. My question is if I'm applying correctly the b58 encoding, since bitcoin uses b58check, and also adds x00 prefix. Can somebody explain me that? Thanks. import ...
1 vote
1 answer
462 views

Why does my implementation of hex to Base58check produce different results than the example?

Step 8 of this wiki page gives this hex value: 00010966776006953D5567439E5E39F86A0D273BEED61967F6 Step 9 converts it to this base58 string:16UwLL9Risc3QfPqBUvKofHmBQ7wMtjvM I'm trying to implement ...
1 vote
1 answer
143 views

Can I know if a bitcoin private/public key or address was derived from another key in an HD wallet by its structure?

If I have a bitcoin private key, public key or address, can I know if it is a root private key or some other part which derived from a root private key in an HD wallet by the structure of it? To be ...
1 vote
1 answer
369 views

How does Base58Check prefix character prediction work?

I'm trying to implement Base58Check as a learning exercise and I came across the different types of prefixes as summarised here. I wonder however how to arrive in the expected prefix characters from ...
2 votes
2 answers
1k views

Why are hashes base16 (hex) encoded rather than base58 encoded?

BTC sha256 hashes are hex encoded (as sha256 spits out bytes not a string), why is this? Surely using base58 would be more efficient as would use less space (would output a shorter string)
2 votes
0 answers
807 views

How to convert a bitcoin address to the respective hash160 using bash?

I want to convert a list of bitcoin addresses to their respective hash160 values as illustrated using bash :
0 votes
1 answer
57 views

Which source code to make "checksum bits appended"

Can anyone tell me the specified source code to make "checksum bits appended", before doing Base58 conversion? Thanks very much!!!!
1 vote
1 answer
4k views

Converting Litecoin M-addresses to a more commonly accepted format

Is there any way to convert an (LTC) M prefix address to an L prefix address? Many services an apps that accept and transfer LTC reject M-addresses as invalid, even though they are given out by ...
3 votes
3 answers
5k views

Cashaddr (bech32) to legacy address format convertor for Bitcoin Cash

Several days ago our bitcoin cash core wallet started to generate addresses using the new format: bitcoincash:q...... . That's nice and differs from the bitcoin blockchain generated addresses, but ...
5 votes
3 answers
3k views

ELI5: What is Base58Check encoding?

I've seen posts on how to do it and I've read the wiki on what it is, however these explanations are too complex. Can someone explain what it is and why it's called Base58Check encoding? Are addresses ...
6 votes
1 answer
4k views

Why is Bitcoin address encoded in base58?

Why does bitcoin address encoding use base58 instead of, for instance, base64? I don't see it is useful in any way.
0 votes
2 answers
584 views

base58 cannot get 34 chars results (as Bitcoin address does) but 68 chars

I am trying to convert public key hex to Bitcoin address. From this website http://gobittest.appspot.com/Address, I can do some test. For example, I have this public key: ...
0 votes
1 answer
358 views

Extract output address from raw script in bitcoin protocol

I'm working on bitcoin protocol and exactly i want to extract raw script from output script to gain address from tx messages. for common scripts, like scripts start with 0x76(means OP_DUP), we can ...
3 votes
1 answer
3k views

Java: Base58-encode String

I would like to Base58-encode this String: 56379c7bcd6b41188854e74169f844e8676cf8b8 My current Java code looks like this: String test9 = "56379c7bcd6b41188854e74169f844e8676cf8b8"; byte[...
0 votes
2 answers
3k views

Convert list of BTC address(base58) to Ripemd16(base16) [closed]

Are there online tool or repositories that can convert multiple base58 (BTC address) to base16 simultaneously?
1 vote
1 answer
3k views

Convert byte string into a base58 string using Base58Check encoding

I'm trying to learn every bit of the process of converting a private key to WIF (Wallet Import Format). I've been following the steps on this page and have made it all the way to the last step (Step 7 ...
2 votes
2 answers
354 views

What is the significance of the last 5 digits of Base 58 WIF?

I'm trying to understand the Base 58 WIF number. While messing around with importing on blockchain I noticed that if you change the last five (or so) digits, it doesn't appear to affect which address ...
2 votes
1 answer
2k views

How can I convert a bitcoin private key (hex) into a Bitcoin public key? [duplicate]

How can I take a bitcoin private key encoded in hex: d1d9a2e9fd3da7e7710310ea17a9edff9e08845c7a6f2ea3d650ba4ae7ee0d3b and convert it to the corresponding public key: ...
3 votes
2 answers
2k views

Encoding my Bitcoin Address with Base58 encoding

I am trying to convert my Bitcoin Address with BitcoinJ in order to look like a normal address such as this: 1J7mdg5rbQyUHENYdx39WVWK7fsLpEoXZy. I haven't found anything exept for the Base58.encode() ...
4 votes
1 answer
1k views

How to make a vanity throwaway address? Similar to 1BitcoinEaterAddressDontSendf59kuE [duplicate]

I want to write data to the Blockchain, and write to specific addresses. I want to send small amounts of Bitcoin to addresses like this: 1MikesReallyCoolApp<game_id_here>59kuE How can I do ...
2 votes
2 answers
2k views

Does the 256-bit integer secret exponent define the X, Y pair?

I'm trying to understand better how bitcoin works and I'm stuck. I've read a blog showing how to construct the WIF from the 256-bit secret integer and up to that point, I think I follow. However I'm "...
2 votes
1 answer
839 views

Secret Key value for decimal versions over 127

After reviewing the address prefixes page on the wiki, I have noticed that in Bitcoin and other altcoins that the secret key / dumped private key header is always the decimal version + 128. So with a ...
1 vote
1 answer
2k views

private key to wif - need help converting to base58encode (step 6 to step 7)

I am trying to learn more about how bitcoin addresses are created. I am following along with the tutorial at https://en.bitcoin.it/wiki/Wallet_import_format I undertsand how they do the first six ...
3 votes
2 answers
3k views

How does the bip32 version bytes convert to base58?

Converting the BIP32 version bytes - x04\x88\xad\xe4 - from base256 to base58 and base58Check returns 7irrX and 1kz713TZjju, respectively. I thought the version bytes represented xprv. What am I ...
0 votes
1 answer
2k views

What version byte will produce a Base58 encoding starting with X?

What is the Value of X in Base58? The Problem is when I referred to this table: https://en.bitcoin.it/wiki/Base58Check_encoding I in the end come up with D when I used 30, but I want X, so what will ...
1 vote
1 answer
2k views

Get private key from BigInteger

I have a BigInteger that represents a private key. How can I get that private key as a base58 encoded string? The following pseudo code does not work properly: base58.encode(bigInt.toByteArray) // ...