Bitcoin Forum
May 03, 2024, 03:45:04 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: Is it possible to convert WIF to seed phrases (BIP39)?  (Read 479 times)
shield132 (OP)
Hero Member
*****
Offline Offline

Activity: 2212
Merit: 853



View Profile
February 09, 2024, 08:59:38 PM
 #1

I have a vanity Bitcoin address that I have been safely holding for years. I just love vanity addresses and I want to generate some more but I want to back up and safely store them on paper as seed phrases instead of long and ugly WIF key format. Is this possible? I spent a lot of times with Google and I wasn't able to not only find an answer but to find a question too. I hope this is not a stupid question but it's probably a shame from such an old user.
Btw it's okay for me to generate a new vanity address if there is a program like vanitygen or vanitysearch that will generate results in seeds instead of WIF keys.

▄▄███████▄▄
▄██████████████▄
▄██████████████████▄
▄████▀▀▀▀███▀▀▀▀█████▄
▄█████████████▄█▀████▄
███████████▄███████████
██████████▄█▀███████████
██████████▀████████████
▀█████▄█▀█████████████▀
▀████▄▄▄▄███▄▄▄▄████▀
▀██████████████████▀
▀███████████████▀
▀▀███████▀▀
.
 MΞTAWIN  THE FIRST WEB3 CASINO   
.
.. PLAY NOW ..
1714707904
Hero Member
*
Offline Offline

Posts: 1714707904

View Profile Personal Message (Offline)

Ignore
1714707904
Reply with quote  #2

1714707904
Report to moderator
1714707904
Hero Member
*
Offline Offline

Posts: 1714707904

View Profile Personal Message (Offline)

Ignore
1714707904
Reply with quote  #2

1714707904
Report to moderator
1714707904
Hero Member
*
Offline Offline

Posts: 1714707904

View Profile Personal Message (Offline)

Ignore
1714707904
Reply with quote  #2

1714707904
Report to moderator
"Bitcoin: mining our own business since 2009" -- Pieter Wuille
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714707904
Hero Member
*
Offline Offline

Posts: 1714707904

View Profile Personal Message (Offline)

Ignore
1714707904
Reply with quote  #2

1714707904
Report to moderator
1714707904
Hero Member
*
Offline Offline

Posts: 1714707904

View Profile Personal Message (Offline)

Ignore
1714707904
Reply with quote  #2

1714707904
Report to moderator
1714707904
Hero Member
*
Offline Offline

Posts: 1714707904

View Profile Personal Message (Offline)

Ignore
1714707904
Reply with quote  #2

1714707904
Report to moderator
Charles-Tim
Legendary
*
Offline Offline

Activity: 1540
Merit: 4837



View Profile
February 09, 2024, 09:08:17 PM
Merited by pooya87 (2), Pmalek (2), ABCbits (1), dkbit98 (1)
 #2

I think this kind of question was asked some weeks ago. You can not generate vanity address using seed phrase. Although, it is possible, but there is no known available tool that you can use to generate it.

Edit:
This is the thread that I am referring to: Mass BTC Wallet Generator with mnemonic andbip39. You can go through it and see some people's reply.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Zaguru12
Hero Member
*****
Offline Offline

Activity: 686
Merit: 867



View Profile
February 09, 2024, 09:28:02 PM
Merited by pooya87 (2)
 #3

Btw it's okay for me to generate a new vanity address if there is a program like vanitygen or vanitysearch that will generate results in seeds instead of WIF keys.

Base on previous answers there is no direct program to do that since you cannot derive a seed phrase from a private key. The way will be to generate the seed phrase, then the seed, the extended private key, its private key and then public keys. It is this public keys that could actually give you addresses. You see this is complex. Also there’s possibility that this seed phrase wouldn’t recover your vanity address if you import it.

A way out is to covert that WIF keys to a mnemonic to make the back up easier as you have wanted. Here is a an old post by hosseinimr93 on how to convert wif key to mnemonic

.BEST..CHANGE.███████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
███████████████
..BUY/ SELL CRYPTO..
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10530



View Profile
February 10, 2024, 07:01:36 AM
 #4

Btw it's okay for me to generate a new vanity address if there is a program like vanitygen or vanitysearch that will generate results in seeds instead of WIF keys.
If there is enough demand for such a tool (considering how I keep seeing topics like this pop up), it could be created very easily. You'd start from a random seed (128 to 256 bits) then keep incrementing it (+1) and derive the first child key at a predefined derivation path until you get the desired vanity address. Obviously this is MUCH slower than vanitygen style algorithm but it is possible to brute force small number of initial characters this way.

Other than that, just generate a vanity key then convert that WIF to a mnemonic (256-bit entropy to 24 words) to make it easier to write it down.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
FatFork
Legendary
*
Offline Offline

Activity: 1582
Merit: 2587


Top Crypto Casino


View Profile WWW
February 10, 2024, 09:40:08 AM
 #5

I have a vanity Bitcoin address that I have been safely holding for years. I just love vanity addresses and I want to generate some more but I want to back up and safely store them on paper as seed phrases instead of long and ugly WIF key format. Is this possible?

No, that's not possible.

Basically, you can turn any random 128 or 256 bits string into a BIP39 mnemonic. But that seed phrase won't be able to spit out a particular private key you wanted. Every BIP39 mnemonic you feed into the wallet must go through the hash function first, which is a one-way function and cannot be reversed.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
nc50lc
Legendary
*
Offline Offline

Activity: 2408
Merit: 5581


Self-proclaimed Genius


View Profile
February 13, 2024, 06:40:24 AM
 #6

-snip- but I want to back up and safely store them on paper as seed phrases instead of long and ugly WIF key format.
Isn't WIF already in "easy to copy, easy to write" format with confusing characters omitted since it's in BASE58;
And it's not long either; the common 12-word seed phrase is even longer than it even with the spaces removed.

Is this possible?
Yes, start from "entropy->mnemonic->seed->master private key-.....->child private key"
(but you'll have to write your own script since i can't find one that does that)

But it will be more confusing than WIF since you'll have to take note of the derivation path (the "..." above) to use to restore the private key of that vanity address.
Wallets will also restore more addresses than just your vanity address if it's generated from a BIP39 seed phrase, not that it's an issue.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Pmalek
Legendary
*
Offline Offline

Activity: 2758
Merit: 7125



View Profile
February 13, 2024, 07:23:01 PM
 #7

Isn't WIF already in "easy to copy, easy to write" format with confusing characters omitted since it's in BASE58;
And it's not long either; the common 12-word seed phrase is even longer than it even with the spaces removed.
It's still a long string of characters and numbers that make no apparent sense to the human eye in the format they are written it. Even if a recovery phrase is longer, it's made up of familiar words you have seen thousands of times, making it easy to back up and even remember if you are into mind tricks. Making a physical backup of a WIF key still requires more patience not to mess something up as it can have devastating consequences if you do.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
shield132 (OP)
Hero Member
*****
Offline Offline

Activity: 2212
Merit: 853



View Profile
February 15, 2024, 10:40:58 AM
 #8

Btw it's okay for me to generate a new vanity address if there is a program like vanitygen or vanitysearch that will generate results in seeds instead of WIF keys.
If there is enough demand for such a tool (considering how I keep seeing topics like this pop up), it could be created very easily.
I don't think there is or will ever be enough demand to motivate someone to create such a tool, it will stay on a hobby level. Can you create such a tool by the way?

Other than that, just generate a vanity key then convert that WIF to a mnemonic (256-bit entropy to 24 words) to make it easier to write it down.
When I google, I only see mnemonic to WIF converters, not WIF to mnemonic.

I checked threads that you guys linked here.  As far as I understand, it's possible to convert WIF to mnemonic but it's impossible to import them in Electrum or other wallet but why? If it's not possible, then there is no point in converting WIF to mnemonic as I understand.

-snip- but I want to back up and safely store them on paper as seed phrases instead of long and ugly WIF key format.
Isn't WIF already in "easy to copy, easy to write" format with confusing characters omitted since it's in BASE58;
And it's not long either; the common 12-word seed phrase is even longer than it even with the spaces removed.
It's not as long but there is a very unusual combination of big and small characters and numbers. Words, while being longer, are still a better choice to my mind.

▄▄███████▄▄
▄██████████████▄
▄██████████████████▄
▄████▀▀▀▀███▀▀▀▀█████▄
▄█████████████▄█▀████▄
███████████▄███████████
██████████▄█▀███████████
██████████▀████████████
▀█████▄█▀█████████████▀
▀████▄▄▄▄███▄▄▄▄████▀
▀██████████████████▀
▀███████████████▀
▀▀███████▀▀
.
 MΞTAWIN  THE FIRST WEB3 CASINO   
.
.. PLAY NOW ..
NotATether
Legendary
*
Online Online

Activity: 1596
Merit: 6726


bitcoincleanup.com / bitmixlist.org


View Profile WWW
February 15, 2024, 11:48:03 AM
 #9

Technically you can "stretch" the private key bytes of the vanity address into seed phrase bytes, minus the entropy of course, and then convert that to a mnemonic phrase. In doing so you will generate a new set of private keys and addresses. But if the method gets found out then there is no security in doing so obviously.

Btw it's okay for me to generate a new vanity address if there is a program like vanitygen or vanitysearch that will generate results in seeds instead of WIF keys.
If there is enough demand for such a tool (considering how I keep seeing topics like this pop up), it could be created very easily.
I don't think there is or will ever be enough demand to motivate someone to create such a tool, it will stay on a hobby level. Can you create such a tool by the way?

I don't think so. It is very hard to coordinate public addresses at any given derivation path to use the same address prefix or range.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
nc50lc
Legendary
*
Offline Offline

Activity: 2408
Merit: 5581


Self-proclaimed Genius


View Profile
February 15, 2024, 02:30:10 PM
 #10

Isn't WIF already in "easy to copy, easy to write" format with confusing characters omitted since it's in BASE58;
And it's not long either; the common 12-word seed phrase is even longer than it even with the spaces removed.
It's still a long string of characters and numbers that make no apparent sense to the human eye in the format they are written it. Even if a recovery phrase is longer, it's made up of familiar words you have seen thousands of times, making it easy to back up and even remember if you are into mind tricks.
Then I suppose Base58 failed at accomplishing its very own purpose in some cases, being "human-friendly".
IDK but WIF private keys don't look intimidating to copy for me since each characters look different from each other.

Based from OP's latest reply, I guess this is a matter of preference rather than actual (dis)advantage when it comes to writing backups.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Forsyth Jones
Hero Member
*****
Offline Offline

Activity: 1162
Merit: 617


Press F for Leo


View Profile WWW
February 16, 2024, 02:55:11 AM
 #11

Doing this as you described is impossible nowadays, if there is a solution similar to what you want to do, it may be unsafe in the long term due to several factors: the generated seed may be useless as it does not follow the BIP39 standard, incompatibility or inconsistency, not being recognized by any wallet when restoring it.

One solution for you today is to use Bitcoin Core, create the wallet, import the WIF private key from your current vanity address and back up that file. Subsequent balances received at this address, if there is a difference, will be transferred to the change address of your Core wallet (currently Core is the only wallet that allows this). This way you back up your wallet from the wallet.dat file.

.
 airbet 
██
██
██
██
██
██
██
██
██
██
██
██
██
 .

▄████▄▄▄██████▄
███████████████
███████████████
███████▀▀▀▀████
██████████████
▀███▀███████▄██
██████████▄███
██████████████
███████████████
███████████████
██████████████
█████▐████████
██████▀███████▀
▄███████████████▄
████████████████
█░██████████████
████████████████
████████████████
█████████████████
█████████████████
███████░█░███████
████████████████
█████████████████
██████████████░█
████████████████
▀███████████████▀
.
.
.
.
██▄▄▄
████████▄▄
██████▀▀████▄
██████▄░░████▄
██████████████
████████░░▀███▌
░████████▄▄████
██████████████▌
███░░░█████████
█████████░░░██▀
░░░███████████▀
██████░░░██▀
░░▀▀███▀

  
|.
....
██
██
██
██
██
██
██
██
██
██
██
██
██
.
 PLAY NOW 
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10530



View Profile
February 16, 2024, 05:49:56 AM
 #12

I don't think there is or will ever be enough demand to motivate someone to create such a tool, it will stay on a hobby level. Can you create such a tool by the way?
Writing the code for such a tool is easy, the hard part is optimizing it and writing the code to run it on GPUs. As you said there isn't enough demand for such a tool so the effort and the time is better spent on something more useful.

Quote
When I google, I only see mnemonic to WIF converters, not WIF to mnemonic.

I checked threads that you guys linked here.  As far as I understand, it's possible to convert WIF to mnemonic but it's impossible to import them in Electrum or other wallet but why? If it's not possible, then there is no point in converting WIF to mnemonic as I understand.
The idea I used in this post is basically seeing a WIF as a 256-bit data that can be encoded any way you like, such as using the algorithm similar to what BIP-39 uses (split into 11-bit limbs and convert to words from a 2048-word long list). I used this tool by the way.

The point of doing this is not to be able to enter the mnemonic result into a wallet like Electrum. The point was to introducing a way to convert a hard to write down WIF (base-58 characters) into an easy to write down set of words with a checksum.
In order to be able to import it into any wallet, you have to do this in reverse first (mnemonic to entropy, entropy to WIF).

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Saint-loup
Legendary
*
Offline Offline

Activity: 2604
Merit: 2352



View Profile
February 16, 2024, 09:50:40 PM
Last edit: February 17, 2024, 09:53:52 PM by Saint-loup
 #13

I have a vanity Bitcoin address that I have been safely holding for years. I just love vanity addresses and I want to generate some more but I want to back up and safely store them on paper as seed phrases instead of long and ugly WIF key format. Is this possible? I spent a lot of times with Google and I wasn't able to not only find an answer but to find a question too. I hope this is not a stupid question but it's probably a shame from such an old user.
Btw it's okay for me to generate a new vanity address if there is a program like vanitygen or vanitysearch that will generate results in seeds instead of WIF keys.
You should be able to do it thanks to Libbitcoin Explorer tool

In order to transform the WIF key into a phrase with BIP39 words (without checksum), you can do that this way :
First, thanks to Bx base58check-decode you can get the hexadecimal value of the key.

Now you will "just" need to convert this hexadecimal number into a binary one, and with your hands, to split it into groups of 11 bits, each encoding a number from 0-2047, serving as an index into a wordlist as BIP39 does and to find the word corresponding to the index(+1) into the BIP39 dictionary of the language of your choice.


For decyphering your seed you'll consecutively take the index(-1) from the dictionary of each word of your phrase, convert each decimal index into its 11bits binary value (with enough 0 for padding) , group the 11bits words into a whole binary number that will be converted into its hexadecimal value, and apply bx base58check-encode to this value to get back your WIF key.

██
██
██
██
██
██
██
██
██
██
██
██
██
... LIVECASINO.io    Play Live Games with up to 20% cashback!...██
██
██
██
██
██
██
██
██
██
██
██
██
JohanM
Member
**
Offline Offline

Activity: 137
Merit: 35


View Profile
March 17, 2024, 01:56:46 PM
Merited by Saint-loup (1)
 #14

If you just want to backup a single WIF key using the word list, that is perfectly possible:

So let's take an example WIF key:
5JphUWRuWJwZktUdGBUmtsazoc1GGuRXFBxoTkJWZGpXjUzXXa7

We recalculate to the hex SEED using base58CheckDecode, this gives us the 32 bytes seed:
84A1A9C49C1257DE2D4FF2EEC4F6CF109E6BE3DF6E075EFB9AD895EFEAB20201

In binary this gives:
1000010010100001101010011100010010011100000100100101011111011110001011010100111 1111100101110111011000100111101101100111100010000100111100110101111100011110111 1101101110000001110101111011111011100110101101100010010101111011111110101010110 0100000001000000001

The SHA-256 checksum of this is:
45F4FD103DAAB39409C60F715E9A4B66D32322C7926ED2364169F232998D5808 or in binary
0100010111110100111111010001000000111101101010101011001110010100000010011100011 0000011110111000101011110100110100100101101100110110100110010001100100010110001 1110010010011011101101001000110110010000010110100111110010001100101001100110001 1010101100000001000

We take the first 8 bits of this hash to add at the end of the first binary bits:
So we add 01000101
and it becomes:
1000010010100001101010011100010010011100000100100101011111011110001011010100111 1111100101110111011000100111101101100111100010000100111100110101111100011110111 1101101110000001110101111011111011100110101101100010010101111011111110101010110 010000000100000000101000101
This is 264 bits length (which is divisible by 11 = 24 words)

Translating this to the BIP wordlist gives us:
lucky ask illness deal century upper release wrestle uphold chicken record cancel trade vehicle laundry science galaxy system renew cloth wrong flip amount chunk

This wordlist can be retranslated to the WIF at any time. It also contains an 8 bit checksum so you know. There is only a 0.4% chance that replacing one word will give you a correct checksum (1 in 256).

alexeyneu
Member
**
Offline Offline

Activity: 312
Merit: 30


View Profile
March 18, 2024, 09:49:02 AM
Last edit: March 22, 2024, 09:37:12 AM by alexeyneu
 #15

well i see enough demand for this to make it. we need a standard for 32 bytes -> 12 words thing. So someone then can figure out how to recover this stuff if tool is lost. i think to snoop it from monero, they support phrases from the start.

But better way is this: just to scale base58 lib which now does [0..255] ⇆ [0..57] to [0..2047] ⇆ [0..57]. So we'll have 32 bytes -> base58 of it -> words. it then could be applied to wif or whatever. amount will be not 12 ofc and not fixed
upd
number of words appear to be fixed either for wif or 32-byte  block. so it's straight transition
JohanM
Member
**
Offline Offline

Activity: 137
Merit: 35


View Profile
March 18, 2024, 04:03:14 PM
 #16

well i see enough demand for this to make it. we need a standard for 32 bytes -> 12 words thing. So someone then can figure out how to recover this stuff if tool is lost. i think to snoop it from monero, they support phrases from the start.

But better way is this: just to scale base58 lib which now does [0..255] ⇆ [0..57] to [0..2047] ⇆ [0..57]. So we'll have 32 bytes -> base58 of it -> words. it then could be applied to wif or whatever. amount will be not 12 ofc and not fixed

With 12 words you can only encode 16 bytes (128 bits). For 32 bytes you need 24 words. The word list contains 2048 words so 11 bits.
alexeyneu
Member
**
Offline Offline

Activity: 312
Merit: 30


View Profile
March 20, 2024, 11:18:39 AM
Last edit: March 24, 2024, 01:29:10 AM by alexeyneu
 #17

Code:
//compressor



#include "CMakeProject1.h"
#include <openssl/sha.h>
#include <openssl/bn.h>
#include <vector>
#include <string>
#include <algorithm>
#include <fstream>
#include <cstring>




struct offstring
{
static const std::vector<std::string> disclaimer;
};

int main(int argc, char *argv[])
{

if (argc > 3)
{
std::cerr << std::endl << "no go" << std::endl;
return 0;
}
if (argc == 1)
{
std::cerr << std::endl << "where's the" << std::endl;
return 0;
}
if (argc == 3 && ((std::string(argv[1]) == "-wif24") == false))
{
std::cerr << std::endl << "no go" << std::endl;
return 0;
}

std::vector<std::string> b;

std::ifstream fw(argc == 3 ? argv[2] : argv[1]);
if (fw.fail())
{
std::cerr << std::endl << "not found" << std::endl;
return 0;
}

do
{
std::string last;
fw >> last;
if (fw.fail()) break;
b.insert(b.cend(), last);
} while (fw.bad() == false);



unsigned char fx = 58;
BIGNUM* balance_eth_f = BN_lebin2bn(&fx, 1, NULL);
unsigned short wa = 2048;
BIGNUM* balance_eth_lake = BN_lebin2bn((unsigned char *)&wa, 2, NULL);

    BN_CTX *bz = BN_CTX_new();

bool w = false;

BIGNUM* balance_eth_ex_e = BN_new();
BIGNUM* balance_eth_exm_e = BN_new();
BIGNUM* balance_eth_remmi_e = BN_new();
BIGNUM* balance_eth_h_e = BN_new();

BN_zero(balance_eth_ex_e);
BN_one(balance_eth_h_e);
int zerocount = 0;

while (std::find(offstring::disclaimer.cbegin(), offstring::disclaimer.cend(), *b.cbegin()) == offstring::disclaimer.cbegin())
{
zerocount++;
b.erase(b.cbegin());
}

for (int kwe = b.size() - 1; kwe + 1> 0; kwe--)
{
auto rexx = std::find(offstring::disclaimer.cbegin(), offstring::disclaimer.cend(), b[kwe]);

if (rexx == offstring::disclaimer.cend())
{
BN_free(balance_eth_ex_e);
BN_free(balance_eth_exm_e);
BN_free(balance_eth_remmi_e);
BN_free(balance_eth_h_e);
BN_free(balance_eth_f);
BN_free(balance_eth_lake);
BN_CTX_free(bz);


return -4;

}

unsigned int exp = std::distance(offstring::disclaimer.cbegin(), rexx) ;
BIGNUM* balance_eth_exmk_e = BN_lebin2bn((unsigned char*)&exp, 4, NULL);
BN_mul(balance_eth_exm_e, balance_eth_h_e, balance_eth_exmk_e, bz);
BN_add(balance_eth_ex_e, balance_eth_ex_e, balance_eth_exm_e);
BN_mul(balance_eth_h_e, balance_eth_h_e, balance_eth_lake, bz);
BN_free(balance_eth_exmk_e);
}
int cw = 0;
unsigned short tr_e = 0;

static const char b58digits_ordered[59] = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
std::string harbour;

while (w == false)
{
BN_div(balance_eth_ex_e, balance_eth_remmi_e, balance_eth_ex_e, balance_eth_f, bz);
BN_bn2lebinpad(balance_eth_remmi_e, (unsigned char*)&tr_e, 2);
harbour = harbour + b58digits_ordered[tr_e];

w = BN_is_zero(balance_eth_ex_e);
}
std::reverse((unsigned char*)&harbour[0], (unsigned char*)&harbour[0] + harbour.size());

for (int h = 0; h < zerocount; h++)
harbour.insert(harbour.cbegin(), '1');

if (argc == 2)
{
std::cout << std::endl << harbour << std::endl;
BN_free(balance_eth_ex_e);
BN_free(balance_eth_exm_e);
BN_free(balance_eth_remmi_e);
BN_free(balance_eth_h_e);
BN_free(balance_eth_f);
BN_free(balance_eth_lake);
BN_CTX_free(bz);
}
else
{
if (b.size() == 24 == false)
{
std::cerr << std::endl << "do not mess with it" << std::endl;
BN_free(balance_eth_ex_e);
BN_free(balance_eth_exm_e);
BN_free(balance_eth_remmi_e);
BN_free(balance_eth_h_e);
BN_free(balance_eth_f);
BN_free(balance_eth_lake);
BN_CTX_free(bz);
return -5;
}
unsigned char bc[7250] = {};
size_t wq = 7250;
bool ho = b58tobin((void*)bc, &wq, harbour.c_str(), harbour.length());
ho = b58tobin((void*)bc, &wq, harbour.c_str(), harbour.length());

unsigned char wb_final[250] = {};
unsigned char wb_f[250] = {};
wb_final[0] = 0x80;

memcpy(wb_final + 1, bc, wq);
unsigned char h[250] = {};
unsigned char hf[250] = {};
memcpy(wb_f, wb_final, wq + 1);
SHA256(wb_f, 33, h);
SHA256(h, 32, hf);
memcpy(wb_final + 33, hf, 4);
char* t = new char[7250]();
size_t cw = 7250;
b58enc(t, &cw, (void*)wb_final, (size_t)(1 + 32 + 4));

std::string whydah = t;
std::cout << std::endl << whydah << std::endl;
BN_free(balance_eth_ex_e);
BN_free(balance_eth_exm_e);
BN_free(balance_eth_remmi_e);
BN_free(balance_eth_h_e);
BN_free(balance_eth_f);
BN_free(balance_eth_lake);
BN_CTX_free(bz);
delete[] t;
}
return 0;
}


const std::vector<std::string> offstring::disclaimer = { "abandon" , "ability" , "able" , "about" , "above" , "absent" , "absorb" , "abstract" , "absurd" , "abuse" , "access" , "accident" , "account" , "accuse" , "achieve" , "acid" , "acoustic" , "acquire" ,
"across" , "act" , "action" , "actor" , "actress" , "actual" , "adapt" , "add" , "addict" , "address" , "adjust" , "admit" , "adult" , "advance" , "advice" , "aerobic" , "affair" , "afford" , "afraid" , "again" , "age" , "agent" , "agree" , "ahead" ,
"aim" , "air" , "airport" , "aisle" , "alarm" , "album" , "alcohol" , "alert" , "alien" , "all" , "alley" , "allow" , "almost" , "alone" , "alpha" , "already" , "also" , "alter" , "always" , "amateur" , "amazing" , "among" , "amount" , "amused" ,
"analyst" , "anchor" , "ancient" , "anger" , "angle" , "angry" , "animal" , "ankle" , "announce" , "annual" , "another" , "answer" , "antenna" , "antique" , "anxiety" , "any" , "apart" , "apology" , "appear" , "apple" , "approve" , "april" , "arch" ,
"arctic" , "area" , "arena" , "argue" , "arm" , "armed" , "armor" , "army" , "around" , "arrange" , "arrest" , "arrive" , "arrow" , "art" , "artefact" , "artist" , "artwork" , "ask" , "aspect" , "assault" , "asset" , "assist" , "assume" , "asthma" ,
"athlete" , "atom" , "attack" , "attend" , "attitude" , "attract" , "auction" , "audit" , "august" , "aunt" , "author" , "auto" , "autumn" , "average" , "avocado" , "avoid" , "awake" , "aware" , "away" , "awesome" , "awful" , "awkward" , "axis" ,
"baby" , "bachelor" , "bacon" , "badge" , "bag" , "balance" , "balcony" , "ball" , "bamboo" , "banana" , "banner" , "bar" , "barely" , "bargain" , "barrel" , "base" , "basic" , "basket" , "battle" , "beach" , "bean" , "beauty" , "because" , "become" ,
"beef" , "before" , "begin" , "behave" , "behind" , "believe" , "below" , "belt" , "bench" , "benefit" , "best" , "betray" , "better" , "between" , "beyond" , "bicycle" , "bid" , "bike" , "bind" , "biology" , "bird" , "birth" , "bitter" , "black" ,
"blade" , "blame" , "blanket" , "blast" , "bleak" , "bless" , "blind" , "blood" , "blossom" , "blouse" , "blue" , "blur" , "blush" , "board" , "boat" , "body" , "boil" , "bomb" , "bone" , "bonus" , "book" , "boost" , "border" , "boring" , "borrow" ,
"boss" , "bottom" , "bounce" , "box" , "boy" , "bracket" , "brain" , "brand" , "brass" , "brave" , "bread" , "breeze" , "brick" , "bridge" , "brief" , "bright" , "bring" , "brisk" , "broccoli" , "broken" , "bronze" , "broom" , "brother" , "brown" ,
"brush" , "bubble" , "buddy" , "budget" , "buffalo" , "build" , "bulb" , "bulk" , "bullet" , "bundle" , "bunker" , "burden" , "burger" , "burst" , "bus" , "business" , "busy" , "butter" , "buyer" , "buzz" , "cabbage" , "cabin" , "cable" , "cactus" ,
"cage" , "cake" , "call" , "calm" , "camera" , "camp" , "can" , "canal" , "cancel" , "candy" , "cannon" , "canoe" , "canvas" , "canyon" , "capable" , "capital" , "captain" , "car" , "carbon" , "card" , "cargo" , "carpet" , "carry" , "cart" , "case" ,
"cash" , "casino" , "castle" , "casual" , "cat" , "catalog" , "catch" , "category" , "cattle" , "caught" , "cause" , "caution" , "cave" , "ceiling" , "celery" , "cement" , "census" , "century" , "cereal" , "certain" , "chair" , "chalk" , "champion" ,
"change" , "chaos" , "chapter" , "charge" , "chase" , "chat" , "cheap" , "check" , "cheese" , "chef" , "cherry" , "chest" , "chicken" , "chief" , "child" , "chimney" , "choice" , "choose" , "chronic" , "chuckle" , "chunk" , "churn" , "cigar" ,
"cinnamon" , "circle" , "citizen" , "city" , "civil" , "claim" , "clap" , "clarify" , "claw" , "clay" , "clean" , "clerk" , "clever" , "click" , "client" , "cliff" , "climb" , "clinic" , "clip" , "clock" , "clog" , "close" , "cloth" , "cloud" ,
"clown" , "club" , "clump" , "cluster" , "clutch" , "coach" , "coast" , "coconut" , "code" , "coffee" , "coil" , "coin" , "collect" , "color" , "column" , "combine" , "come" , "comfort" , "comic" , "common" , "company" , "concert" , "conduct" ,
"confirm" , "congress" , "connect" , "consider" , "control" , "convince" , "cook" , "cool" , "copper" , "copy" , "coral" , "core" , "corn" , "correct" , "cost" , "cotton" , "couch" , "country" , "couple" , "course" , "cousin" , "cover" , "coyote" ,
"crack" , "cradle" , "craft" , "cram" , "crane" , "crash" , "crater" , "crawl" , "crazy" , "cream" , "credit" , "creek" , "crew" , "cricket" , "crime" , "crisp" , "critic" , "crop" , "cross" , "crouch" , "crowd" , "crucial" , "cruel" , "cruise" ,
"crumble" , "crunch" , "crush" , "cry" , "crystal" , "cube" , "culture" , "cup" , "cupboard" , "curious" , "current" , "curtain" , "curve" , "cushion" , "custom" , "cute" , "cycle" , "dad" , "damage" , "damp" , "dance" , "danger" , "daring" , "dash" ,
"daughter" , "dawn" , "day" , "deal" , "debate" , "debris" , "decade" , "december" , "decide" , "decline" , "decorate" , "decrease" , "deer" , "defense" , "define" , "defy" , "degree" , "delay" , "deliver" , "demand" , "demise" , "denial" , "dentist" ,
"deny" , "depart" , "depend" , "deposit" , "depth" , "deputy" , "derive" , "describe" , "desert" , "design" , "desk" , "despair" , "destroy" , "detail" , "detect" , "develop" , "device" , "devote" , "diagram" , "dial" , "diamond" , "diary" , "dice" ,
"diesel" , "diet" , "differ" , "digital" , "dignity" , "dilemma" , "dinner" , "dinosaur" , "direct" , "dirt" , "disagree" , "discover" , "disease" , "dish" , "dismiss" , "disorder" , "display" , "distance" , "divert" , "divide" , "divorce" , "dizzy" ,
"doctor" , "document" , "dog" , "doll" , "dolphin" , "domain" , "donate" , "donkey" , "donor" , "door" , "dose" , "double" , "dove" , "draft" , "dragon" , "drama" , "drastic" , "draw" , "dream" , "dress" , "drift" , "drill" , "drink" , "drip" , "drive" ,
"drop" , "drum" , "dry" , "duck" , "dumb" , "dune" , "during" , "dust" , "dutch" , "duty" , "dwarf" , "dynamic" , "eager" , "eagle" , "early" , "earn" , "earth" , "easily" , "east" , "easy" , "echo" , "ecology" , "economy" , "edge" , "edit" , "educate" ,
"effort" , "egg" , "eight" , "either" , "elbow" , "elder" , "electric" , "elegant" , "element" , "elephant" , "elevator" , "elite" , "else" , "embark" , "embody" , "embrace" , "emerge" , "emotion" , "employ" , "empower" , "empty" , "enable" , "enact" ,
"end" , "endless" , "endorse" , "enemy" , "energy" , "enforce" , "engage" , "engine" , "enhance" , "enjoy" , "enlist" , "enough" , "enrich" , "enroll" , "ensure" , "enter" , "entire" , "entry" , "envelope" , "episode" , "equal" , "equip" , "era" ,
"erase" , "erode" , "erosion" , "error" , "erupt" , "escape" , "essay" , "essence" , "estate" , "eternal" , "ethics" , "evidence" , "evil" , "evoke" , "evolve" , "exact" , "example" , "excess" , "exchange" , "excite" , "exclude" , "excuse" , "execute" ,
"exercise" , "exhaust" , "exhibit" , "exile" , "exist" , "exit" , "exotic" , "expand" , "expect" , "expire" , "explain" , "expose" , "express" , "extend" , "extra" , "eye" , "eyebrow" , "fabric" , "face" , "faculty" , "fade" , "faint" , "faith" ,
"fall" , "false" , "fame" , "family" , "famous" , "fan" , "fancy" , "fantasy" , "farm" , "fashion" , "fat" , "fatal" , "father" , "fatigue" , "fault" , "favorite" , "feature" , "february" , "federal" , "fee" , "feed" , "feel" , "female" , "fence" ,
"festival" , "fetch" , "fever" , "few" , "fiber" , "fiction" , "field" , "figure" , "file" , "film" , "filter" , "final" , "find" , "fine" , "finger" , "finish" , "fire" , "firm" , "first" , "fiscal" , "fish" , "fit" , "fitness" , "fix" , "flag" ,
"flame" , "flash" , "flat" , "flavor" , "flee" , "flight" , "flip" , "float" , "flock" , "floor" , "flower" , "fluid" , "flush" , "fly" , "foam" , "focus" , "fog" , "foil" , "fold" , "follow" , "food" , "foot" , "force" , "forest" , "forget" ,
"fork" , "fortune" , "forum" , "forward" , "fossil" , "foster" , "found" , "fox" , "fragile" , "frame" , "frequent" , "fresh" , "friend" , "fringe" , "frog" , "front" , "frost" , "frown" , "frozen" , "fruit" , "fuel" , "fun" , "funny" , "furnace" ,
"fury" , "future" , "gadget" , "gain" , "galaxy" , "gallery" , "game" , "gap" , "garage" , "garbage" , "garden" , "garlic" , "garment" , "gas" , "gasp" , "gate" , "gather" , "gauge" , "gaze" , "general" , "genius" , "genre" , "gentle" , "genuine" ,
"gesture" , "ghost" , "giant" , "gift" , "giggle" , "ginger" , "giraffe" , "girl" , "give" , "glad" , "glance" , "glare" , "glass" , "glide" , "glimpse" , "globe" , "gloom" , "glory" , "glove" , "glow" , "glue" , "goat" , "goddess" , "gold" , "good" ,
"goose" , "gorilla" , "gospel" , "gossip" , "govern" , "gown" , "grab" , "grace" , "grain" , "grant" , "grape" , "grass" , "gravity" , "great" , "green" , "grid" , "grief" , "grit" , "grocery" , "group" , "grow" , "grunt" , "guard" , "guess" , "guide" ,
"guilt" , "guitar" , "gun" , "gym" , "habit" , "hair" , "half" , "hammer" , "hamster" , "hand" , "happy" , "harbor" , "hard" , "harsh" , "harvest" , "hat" , "have" , "hawk" , "hazard" , "head" , "health" , "heart" , "heavy" , "hedgehog" , "height" ,
"hello" , "helmet" , "help" , "hen" , "hero" , "hidden" , "high" , "hill" , "hint" , "hip" , "hire" , "history" , "hobby" , "hockey" , "hold" , "hole" , "holiday" , "hollow" , "home" , "honey" , "hood" , "hope" , "horn" , "horror" , "horse" , "hospital" ,
"host" , "hotel" , "hour" , "hover" , "hub" , "huge" , "human" , "humble" , "humor" , "hundred" , "hungry" , "hunt" , "hurdle" , "hurry" , "hurt" , "husband" , "hybrid" , "ice" , "icon" , "idea" , "identify" , "idle" , "ignore" , "ill" , "illegal" ,
"illness" , "image" , "imitate" , "immense" , "immune" , "impact" , "impose" , "improve" , "impulse" , "inch" , "include" , "income" , "increase" , "index" , "indicate" , "indoor" , "industry" , "infant" , "inflict" , "inform" , "inhale" , "inherit" ,
"initial" , "inject" , "injury" , "inmate" , "inner" , "innocent" , "input" , "inquiry" , "insane" , "insect" , "inside" , "inspire" , "install" , "intact" , "interest" , "into" , "invest" , "invite" , "involve" , "iron" , "island" , "isolate" ,
"issue" , "item" , "ivory" , "jacket" , "jaguar" , "jar" , "jazz" , "jealous" , "jeans" , "jelly" , "jewel" , "job" , "join" , "joke" , "journey" , "joy" , "judge" , "juice" , "jump" , "jungle" , "junior" , "junk" , "just" , "kangaroo" , "keen" ,
"keep" , "ketchup" , "key" , "kick" , "kid" , "kidney" , "kind" , "kingdom" , "kiss" , "kit" , "kitchen" , "kite" , "kitten" , "kiwi" , "knee" , "knife" , "knock" , "know" , "lab" , "label" , "labor" , "ladder" , "lady" , "lake" , "lamp" , "language" ,
"laptop" , "large" , "later" , "latin" , "laugh" , "laundry" , "lava" , "law" , "lawn" , "lawsuit" , "layer" , "lazy" , "leader" , "leaf" , "learn" , "leave" , "lecture" , "left" , "leg" , "legal" , "legend" , "leisure" , "lemon" , "lend" , "length" ,
"lens" , "leopard" , "lesson" , "letter" , "level" , "liar" , "liberty" , "library" , "license" , "life" , "lift" , "light" , "like" , "limb" , "limit" , "link" , "lion" , "liquid" , "list" , "little" , "live" , "lizard" , "load" , "loan" , "lobster" ,
"local" , "lock" , "logic" , "lonely" , "long" , "loop" , "lottery" , "loud" , "lounge" , "love" , "loyal" , "lucky" , "luggage" , "lumber" , "lunar" , "lunch" , "luxury" , "lyrics" , "machine" , "mad" , "magic" , "magnet" , "maid" , "mail" , "main" ,
"major" , "make" , "mammal" , "man" , "manage" , "mandate" , "mango" , "mansion" , "manual" , "maple" , "marble" , "march" , "margin" , "marine" , "market" , "marriage" , "mask" , "mass" , "master" , "match" , "material" , "math" , "matrix" , "matter" ,
"maximum" , "maze" , "meadow" , "mean" , "measure" , "meat" , "mechanic" , "medal" , "media" , "melody" , "melt" , "member" , "memory" , "mention" , "menu" , "mercy" , "merge" , "merit" , "merry" , "mesh" , "message" , "metal" , "method" , "middle" ,
"midnight" , "milk" , "million" , "mimic" , "mind" , "minimum" , "minor" , "minute" , "miracle" , "mirror" , "misery" , "miss" , "mistake" , "mix" , "mixed" , "mixture" , "mobile" , "model" , "modify" , "mom" , "moment" , "monitor" , "monkey" ,
"monster" , "month" , "moon" , "moral" , "more" , "morning" , "mosquito" , "mother" , "motion" , "motor" , "mountain" , "mouse" , "move" , "movie" , "much" , "muffin" , "mule" , "multiply" , "muscle" , "museum" , "mushroom" , "music" , "must" ,
"mutual" , "myself" , "mystery" , "myth" , "naive" , "name" , "napkin" , "narrow" , "nasty" , "nation" , "nature" , "near" , "neck" , "need" , "negative" , "neglect" , "neither" , "nephew" , "nerve" , "nest" , "net" , "network" , "neutral" ,
"never" , "news" , "next" , "nice" , "night" , "noble" , "noise" , "nominee" , "noodle" , "normal" , "north" , "nose" , "notable" , "note" , "nothing" , "notice" , "novel" , "now" , "nuclear" , "number" , "nurse" , "nut" , "oak" , "obey" ,
"object" , "oblige" , "obscure" , "observe" , "obtain" , "obvious" , "occur" , "ocean" , "october" , "odor" , "off" , "offer" , "office" , "often" , "oil" , "okay" , "old" , "olive" , "olympic" , "omit" , "once" , "one" , "onion" , "online" ,
"only" , "open" , "opera" , "opinion" , "oppose" , "option" , "orange" , "orbit" , "orchard" , "order" , "ordinary" , "organ" , "orient" , "original" , "orphan" , "ostrich" , "other" , "outdoor" , "outer" , "output" , "outside" , "oval" , "oven" ,
"over" , "own" , "owner" , "oxygen" , "oyster" , "ozone" , "pact" , "paddle" , "page" , "pair" , "palace" , "palm" , "panda" , "panel" , "panic" , "panther" , "paper" , "parade" , "parent" , "park" , "parrot" , "party" , "pass" , "patch" , "path" ,
"patient" , "patrol" , "pattern" , "pause" , "pave" , "payment" , "peace" , "peanut" , "pear" , "peasant" , "pelican" , "pen" , "penalty" , "pencil" , "people" , "pepper" , "perfect" , "permit" , "person" , "pet" , "phone" , "photo" , "phrase" ,
"physical" , "piano" , "picnic" , "picture" , "piece" , "pig" , "pigeon" , "pill" , "pilot" , "pink" , "pioneer" , "pipe" , "pistol" , "pitch" , "pizza" , "place" , "planet" , "plastic" , "plate" , "play" , "please" , "pledge" , "pluck" , "plug" ,
"plunge" , "poem" , "poet" , "point" , "polar" , "pole" , "police" , "pond" , "pony" , "pool" , "popular" , "portion" , "position" , "possible" , "post" , "potato" , "pottery" , "poverty" , "powder" , "power" , "practice" , "praise" , "predict" ,
"prefer" , "prepare" , "present" , "pretty" , "prevent" , "price" , "pride" , "primary" , "print" , "priority" , "prison" , "private" , "prize" , "problem" , "process" , "produce" , "profit" , "program" , "project" , "promote" , "proof" , "property" ,
"prosper" , "protect" , "proud" , "provide" , "public" , "pudding" , "pull" , "pulp" , "pulse" , "pumpkin" , "punch" , "pupil" , "puppy" , "purchase" , "purity" , "purpose" , "purse" , "push" , "put" , "puzzle" , "pyramid" , "quality" , "quantum" ,
"quarter" , "question" , "quick" , "quit" , "quiz" , "quote" , "rabbit" , "raccoon" , "race" , "rack" , "radar" , "radio" , "rail" , "rain" , "raise" , "rally" , "ramp" , "ranch" , "random" , "range" , "rapid" , "rare" , "rate" , "rather" , "raven" ,
"raw" , "razor" , "ready" , "real" , "reason" , "rebel" , "rebuild" , "recall" , "receive" , "recipe" , "record" , "recycle" , "reduce" , "reflect" , "reform" , "refuse" , "region" , "regret" , "regular" , "reject" , "relax" , "release" , "relief" ,
"rely" , "remain" , "remember" , "remind" , "remove" , "render" , "renew" , "rent" , "reopen" , "repair" , "repeat" , "replace" , "report" , "require" , "rescue" , "resemble" , "resist" , "resource" , "response" , "result" , "retire" , "retreat" ,
"return" , "reunion" , "reveal" , "review" , "reward" , "rhythm" , "rib" , "ribbon" , "rice" , "rich" , "ride" , "ridge" , "rifle" , "right" , "rigid" , "ring" , "riot" , "ripple" , "risk" , "ritual" , "rival" , "river" , "road" , "roast" , "robot" ,
"robust" , "rocket" , "romance" , "roof" , "rookie" , "room" , "rose" , "rotate" , "rough" , "round" , "route" , "royal" , "rubber" , "rude" , "rug" , "rule" , "run" , "runway" , "rural" , "sad" , "saddle" , "sadness" , "safe" , "sail" , "salad" ,
"salmon" , "salon" , "salt" , "salute" , "same" , "sample" , "sand" , "satisfy" , "satoshi" , "sauce" , "sausage" , "save" , "say" , "scale" , "scan" , "scare" , "scatter" , "scene" , "scheme" , "school" , "science" , "scissors" , "scorpion" , "scout" ,
"scrap" , "screen" , "script" , "scrub" , "sea" , "search" , "season" , "seat" , "second" , "secret" , "section" , "security" , "seed" , "seek" , "segment" , "select" , "sell" , "seminar" , "senior" , "sense" , "sentence" , "series" , "service" ,
"session" , "settle" , "setup" , "seven" , "shadow" , "shaft" , "shallow" , "share" , "shed" , "shell" , "sheriff" , "shield" , "shift" , "shine" , "ship" , "shiver" , "shock" , "shoe" , "shoot" , "shop" , "short" , "shoulder" , "shove" , "shrimp" ,
"shrug" , "shuffle" , "shy" , "sibling" , "sick" , "side" , "siege" , "sight" , "sign" , "silent" , "silk" , "silly" , "silver" , "similar" , "simple" , "since" , "sing" , "siren" , "sister" , "situate" , "six" , "size" , "skate" , "sketch" , "ski" ,
"skill" , "skin" , "skirt" , "skull" , "slab" , "slam" , "sleep" , "slender" , "slice" , "slide" , "slight" , "slim" , "slogan" , "slot" , "slow" , "slush" , "small" , "smart" , "smile" , "smoke" , "smooth" , "snack" , "snake" , "snap" , "sniff" ,
"snow" , "soap" , "soccer" , "social" , "sock" , "soda" , "soft" , "solar" , "soldier" , "solid" , "solution" , "solve" , "someone" , "song" , "soon" , "sorry" , "sort" , "soul" , "sound" , "soup" , "source" , "south" , "space" , "spare" , "spatial" ,
"spawn" , "speak" , "special" , "speed" , "spell" , "spend" , "sphere" , "spice" , "spider" , "spike" , "spin" , "spirit" , "split" , "spoil" , "sponsor" , "spoon" , "sport" , "spot" , "spray" , "spread" , "spring" , "spy" , "square" , "squeeze" ,
"squirrel" , "stable" , "stadium" , "staff" , "stage" , "stairs" , "stamp" , "stand" , "start" , "state" , "stay" , "steak" , "steel" , "stem" , "step" , "stereo" , "stick" , "still" , "sting" , "stock" , "stomach" , "stone" , "stool" , "story" ,
"stove" , "strategy" , "street" , "strike" , "strong" , "struggle" , "student" , "stuff" , "stumble" , "style" , "subject" , "submit" , "subway" , "success" , "such" , "sudden" , "suffer" , "sugar" , "suggest" , "suit" , "summer" , "sun" , "sunny" ,
"sunset" , "super" , "supply" , "supreme" , "sure" , "surface" , "surge" , "surprise" , "surround" , "survey" , "suspect" , "sustain" , "swallow" , "swamp" , "swap" , "swarm" , "swear" , "sweet" , "swift" , "swim" , "swing" , "switch" , "sword" ,
"symbol" , "symptom" , "syrup" , "system" , "table" , "tackle" , "tag" , "tail" , "talent" , "talk" , "tank" , "tape" , "target" , "task" , "taste" , "tattoo" , "taxi" , "teach" , "team" , "tell" , "ten" , "tenant" , "tennis" , "tent" , "term" ,
"test" , "text" , "thank" , "that" , "theme" , "then" , "theory" , "there" , "they" , "thing" , "this" , "thought" , "three" , "thrive" , "throw" , "thumb" , "thunder" , "ticket" , "tide" , "tiger" , "tilt" , "timber" , "time" , "tiny" , "tip" ,
"tired" , "tissue" , "title" , "toast" , "tobacco" , "today" , "toddler" , "toe" , "together" , "toilet" , "token" , "tomato" , "tomorrow" , "tone" , "tongue" , "tonight" , "tool" , "tooth" , "top" , "topic" , "topple" , "torch" , "tornado" ,
"tortoise" , "toss" , "total" , "tourist" , "toward" , "tower" , "town" , "toy" , "track" , "trade" , "traffic" , "tragic" , "train" , "transfer" , "trap" , "trash" , "travel" , "tray" , "treat" , "tree" , "trend" , "trial" , "tribe" , "trick" ,
"trigger" , "trim" , "trip" , "trophy" , "trouble" , "truck" , "true" , "truly" , "trumpet" , "trust" , "truth" , "try" , "tube" , "tuition" , "tumble" , "tuna" , "tunnel" , "turkey" , "turn" , "turtle" , "twelve" , "twenty" , "twice" , "twin" ,
"twist" , "two" , "type" , "typical" , "ugly" , "umbrella" , "unable" , "unaware" , "uncle" , "uncover" , "under" , "undo" , "unfair" , "unfold" , "unhappy" , "uniform" , "unique" , "unit" , "universe" , "unknown" , "unlock" , "until" , "unusual" ,
"unveil" , "update" , "upgrade" , "uphold" , "upon" , "upper" , "upset" , "urban" , "urge" , "usage" , "use" , "used" , "useful" , "useless" , "usual" , "utility" , "vacant" , "vacuum" , "vague" , "valid" , "valley" , "valve" , "van" , "vanish" ,
"vapor" , "various" , "vast" , "vault" , "vehicle" , "velvet" , "vendor" , "venture" , "venue" , "verb" , "verify" , "version" , "very" , "vessel" , "veteran" , "viable" , "vibrant" , "vicious" , "victory" , "video" , "view" , "village" , "vintage" ,
"violin" , "virtual" , "virus" , "visa" , "visit" , "visual" , "vital" , "vivid" , "vocal" , "voice" , "void" , "volcano" , "volume" , "vote" , "voyage" , "wage" , "wagon" , "wait" , "walk" , "wall" , "walnut" , "want" , "warfare" , "warm" , "warrior" ,
"wash" , "wasp" , "waste" , "water" , "wave" , "way" , "wealth" , "weapon" , "wear" , "weasel" , "weather" , "web" , "wedding" , "weekend" , "weird" , "welcome" , "west" , "wet" , "whale" , "what" , "wheat" , "wheel" , "when" , "where" , "whip" , "whisper" ,
"wide" , "width" , "wife" , "wild" , "will" , "win" , "window" , "wine" , "wing" , "wink" , "winner" , "winter" , "wire" , "wisdom" , "wise" , "wish" , "witness" , "wolf" , "woman" , "wonder" , "wood" , "wool" , "word" , "work" , "world" , "worry" , "worth" ,
"wrap" , "wreck" , "wrestle" , "wrist" , "write" , "wrong" , "yard" , "year" , "yellow" , "you" , "young" , "youth" , "zebra" , "zero" , "zone" , "zoo" };
alexeyneu
Member
**
Offline Offline

Activity: 312
Merit: 30


View Profile
March 20, 2024, 11:28:26 AM
Last edit: March 24, 2024, 01:30:37 AM by alexeyneu
 #18

Code:
//dcompressor


#include "CMakeProject1.h"
#include <openssl/bn.h>
#include <vector>
#include <string>
#include <algorithm>



static const int8_t b58digits_map[128] = {
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,
-1, 0, 1, 2, 3, 4, 5, 6,  7, 8,-1,-1,-1,-1,-1,-1,
-1, 9,10,11,12,13,14,15, 16,-1,17,18,19,20,21,-1,
22,23,24,25,26,27,28,29, 30,31,32,-1,-1,-1,-1,-1,
-1,33,34,35,36,37,38,39, 40,41,42,43,-1,44,45,46,
47,48,49,50,51,52,53,54, 55,56,57,-1,-1,-1,-1,-1,
};

struct offstring
{
static const std::vector<std::string> disclaimer;
};

int main(int argc , char *argv[])
{
if (argc > 3)
{
std::cerr << std::endl << "no go" << std::endl;
return 0;
}
if (argc == 1)
{
std::cerr << std::endl << "where's the string" << std::endl;
return 0;
}
if (argc == 3 && ((std::string(argv[1]) == "-wif24") == false))
{
std::cerr << std::endl << "no go" << std::endl;
return 0;
}

std::string a = argc == 3 ? argv[2] : argv[1];
if (argc == 2 == false)
{
unsigned char bc[3250] = {};
size_t wq = a.length() * 15;
bool ho = b58tobin((void*)bc, &wq, a.c_str(), a.length());
if (wq == 37 == false)
{
std::cerr << std::endl << "do not mess with it" << std::endl;
return -5;
}
ho = b58tobin((void*)bc, &wq, a.c_str(), a.length());
unsigned char wb_final[250] = {};
memcpy(wb_final, bc + 1, 32);
char* t = new char[3250]();
size_t cw = 3250;
b58enc(t, &cw, (void*)wb_final, 32);
a = t;

delete[] t;
}

BIGNUM* balance_eth_ex = BN_new();
BIGNUM* balance_eth_exm = BN_new();
BIGNUM* balance_eth_remmi = BN_new();
BIGNUM* balance_eth_h = BN_new();
unsigned char fx = 58;
BIGNUM* balance_eth_f = BN_lebin2bn(&fx, 1, NULL);
unsigned short standon = 2048;
BIGNUM* balance_eth_lake = BN_lebin2bn((unsigned char *)&standon, 2, NULL);

    BN_CTX *bz = BN_CTX_new();
BN_zero(balance_eth_ex);
int zerocount = 0;
while (*a.cbegin() == '1')
{
zerocount++;
a.erase(0, 1);
}


for (int k = 0; k < a.length(); k++)
{
if (a[k] & 0x80)
{
BN_free(balance_eth_ex);
BN_free(balance_eth_exm);
BN_free(balance_eth_remmi);
BN_free(balance_eth_h);
BN_free(balance_eth_f);
BN_free(balance_eth_lake);
BN_CTX_free(bz);
std::cerr << std::endl << "High-bit set on invalid digit" << std::endl;

return 2;
}
if (b58digits_map[a[k]] == -1)
{
BN_free(balance_eth_ex);
BN_free(balance_eth_exm);
BN_free(balance_eth_remmi);
BN_free(balance_eth_h);
BN_free(balance_eth_f);
BN_free(balance_eth_lake);
BN_CTX_free(bz);
std::cerr << std::endl << "Invalid base58 digit" << std::endl;

return 0xff;
}

unsigned char pi = b58digits_map[a[k]];

BIGNUM*  balance_eth_exmk = BN_lebin2bn(&pi, 1, NULL);

        BN_mul(balance_eth_exm, balance_eth_ex, balance_eth_f, bz);

BN_add(balance_eth_ex, balance_eth_exm, balance_eth_exmk);
BN_free(balance_eth_exmk);
}

bool w = false;
unsigned short t = 0;
std::vector<std::string> farstone;
while (w == false)
{
BN_div(balance_eth_ex, balance_eth_remmi, balance_eth_ex, balance_eth_lake, bz);
BN_bn2lebinpad(balance_eth_remmi, (unsigned char *)&t, 2);
farstone.insert(farstone.cbegin(), offstring::disclaimer[t]);
w = BN_is_zero(balance_eth_ex);
}

for(int b = 0; b < zerocount; b++)
farstone.insert(farstone.cbegin(), offstring::disclaimer[0]);

for (auto c:farstone)
std::cout << std::endl << c << std::endl;
std::cout << std::endl;

BN_free(balance_eth_ex);
BN_free(balance_eth_exm);
BN_free(balance_eth_remmi);
BN_free(balance_eth_h);
BN_free(balance_eth_f);
BN_free(balance_eth_lake);
BN_CTX_free(bz);

return 0;
}

const std::vector<std::string> offstring::disclaimer = {"abandon" , "ability" , "able" , "about" , "above" , "absent" , "absorb" , "abstract" , "absurd" , "abuse" , "access" , "accident" , "account" , "accuse" , "achieve" , "acid" , "acoustic" , "acquire" ,
"across" , "act" , "action" , "actor" , "actress" , "actual" , "adapt" , "add" , "addict" , "address" , "adjust" , "admit" , "adult" , "advance" , "advice" , "aerobic" , "affair" , "afford" , "afraid" , "again" , "age" , "agent" , "agree" , "ahead" ,
"aim" , "air" , "airport" , "aisle" , "alarm" , "album" , "alcohol" , "alert" , "alien" , "all" , "alley" , "allow" , "almost" , "alone" , "alpha" , "already" , "also" , "alter" , "always" , "amateur" , "amazing" , "among" , "amount" , "amused" ,
"analyst" , "anchor" , "ancient" , "anger" , "angle" , "angry" , "animal" , "ankle" , "announce" , "annual" , "another" , "answer" , "antenna" , "antique" , "anxiety" , "any" , "apart" , "apology" , "appear" , "apple" , "approve" , "april" , "arch" ,
"arctic" , "area" , "arena" , "argue" , "arm" , "armed" , "armor" , "army" , "around" , "arrange" , "arrest" , "arrive" , "arrow" , "art" , "artefact" , "artist" , "artwork" , "ask" , "aspect" , "assault" , "asset" , "assist" , "assume" , "asthma" ,
"athlete" , "atom" , "attack" , "attend" , "attitude" , "attract" , "auction" , "audit" , "august" , "aunt" , "author" , "auto" , "autumn" , "average" , "avocado" , "avoid" , "awake" , "aware" , "away" , "awesome" , "awful" , "awkward" , "axis" ,
"baby" , "bachelor" , "bacon" , "badge" , "bag" , "balance" , "balcony" , "ball" , "bamboo" , "banana" , "banner" , "bar" , "barely" , "bargain" , "barrel" , "base" , "basic" , "basket" , "battle" , "beach" , "bean" , "beauty" , "because" , "become" ,
"beef" , "before" , "begin" , "behave" , "behind" , "believe" , "below" , "belt" , "bench" , "benefit" , "best" , "betray" , "better" , "between" , "beyond" , "bicycle" , "bid" , "bike" , "bind" , "biology" , "bird" , "birth" , "bitter" , "black" ,
"blade" , "blame" , "blanket" , "blast" , "bleak" , "bless" , "blind" , "blood" , "blossom" , "blouse" , "blue" , "blur" , "blush" , "board" , "boat" , "body" , "boil" , "bomb" , "bone" , "bonus" , "book" , "boost" , "border" , "boring" , "borrow" ,
"boss" , "bottom" , "bounce" , "box" , "boy" , "bracket" , "brain" , "brand" , "brass" , "brave" , "bread" , "breeze" , "brick" , "bridge" , "brief" , "bright" , "bring" , "brisk" , "broccoli" , "broken" , "bronze" , "broom" , "brother" , "brown" ,
"brush" , "bubble" , "buddy" , "budget" , "buffalo" , "build" , "bulb" , "bulk" , "bullet" , "bundle" , "bunker" , "burden" , "burger" , "burst" , "bus" , "business" , "busy" , "butter" , "buyer" , "buzz" , "cabbage" , "cabin" , "cable" , "cactus" ,
"cage" , "cake" , "call" , "calm" , "camera" , "camp" , "can" , "canal" , "cancel" , "candy" , "cannon" , "canoe" , "canvas" , "canyon" , "capable" , "capital" , "captain" , "car" , "carbon" , "card" , "cargo" , "carpet" , "carry" , "cart" , "case" ,
"cash" , "casino" , "castle" , "casual" , "cat" , "catalog" , "catch" , "category" , "cattle" , "caught" , "cause" , "caution" , "cave" , "ceiling" , "celery" , "cement" , "census" , "century" , "cereal" , "certain" , "chair" , "chalk" , "champion" ,
"change" , "chaos" , "chapter" , "charge" , "chase" , "chat" , "cheap" , "check" , "cheese" , "chef" , "cherry" , "chest" , "chicken" , "chief" , "child" , "chimney" , "choice" , "choose" , "chronic" , "chuckle" , "chunk" , "churn" , "cigar" ,
"cinnamon" , "circle" , "citizen" , "city" , "civil" , "claim" , "clap" , "clarify" , "claw" , "clay" , "clean" , "clerk" , "clever" , "click" , "client" , "cliff" , "climb" , "clinic" , "clip" , "clock" , "clog" , "close" , "cloth" , "cloud" ,
"clown" , "club" , "clump" , "cluster" , "clutch" , "coach" , "coast" , "coconut" , "code" , "coffee" , "coil" , "coin" , "collect" , "color" , "column" , "combine" , "come" , "comfort" , "comic" , "common" , "company" , "concert" , "conduct" ,
"confirm" , "congress" , "connect" , "consider" , "control" , "convince" , "cook" , "cool" , "copper" , "copy" , "coral" , "core" , "corn" , "correct" , "cost" , "cotton" , "couch" , "country" , "couple" , "course" , "cousin" , "cover" , "coyote" ,
"crack" , "cradle" , "craft" , "cram" , "crane" , "crash" , "crater" , "crawl" , "crazy" , "cream" , "credit" , "creek" , "crew" , "cricket" , "crime" , "crisp" , "critic" , "crop" , "cross" , "crouch" , "crowd" , "crucial" , "cruel" , "cruise" ,
"crumble" , "crunch" , "crush" , "cry" , "crystal" , "cube" , "culture" , "cup" , "cupboard" , "curious" , "current" , "curtain" , "curve" , "cushion" , "custom" , "cute" , "cycle" , "dad" , "damage" , "damp" , "dance" , "danger" , "daring" , "dash" ,
"daughter" , "dawn" , "day" , "deal" , "debate" , "debris" , "decade" , "december" , "decide" , "decline" , "decorate" , "decrease" , "deer" , "defense" , "define" , "defy" , "degree" , "delay" , "deliver" , "demand" , "demise" , "denial" , "dentist" ,
"deny" , "depart" , "depend" , "deposit" , "depth" , "deputy" , "derive" , "describe" , "desert" , "design" , "desk" , "despair" , "destroy" , "detail" , "detect" , "develop" , "device" , "devote" , "diagram" , "dial" , "diamond" , "diary" , "dice" ,
"diesel" , "diet" , "differ" , "digital" , "dignity" , "dilemma" , "dinner" , "dinosaur" , "direct" , "dirt" , "disagree" , "discover" , "disease" , "dish" , "dismiss" , "disorder" , "display" , "distance" , "divert" , "divide" , "divorce" , "dizzy" ,
"doctor" , "document" , "dog" , "doll" , "dolphin" , "domain" , "donate" , "donkey" , "donor" , "door" , "dose" , "double" , "dove" , "draft" , "dragon" , "drama" , "drastic" , "draw" , "dream" , "dress" , "drift" , "drill" , "drink" , "drip" , "drive" ,
"drop" , "drum" , "dry" , "duck" , "dumb" , "dune" , "during" , "dust" , "dutch" , "duty" , "dwarf" , "dynamic" , "eager" , "eagle" , "early" , "earn" , "earth" , "easily" , "east" , "easy" , "echo" , "ecology" , "economy" , "edge" , "edit" , "educate" ,
"effort" , "egg" , "eight" , "either" , "elbow" , "elder" , "electric" , "elegant" , "element" , "elephant" , "elevator" , "elite" , "else" , "embark" , "embody" , "embrace" , "emerge" , "emotion" , "employ" , "empower" , "empty" , "enable" , "enact" ,
"end" , "endless" , "endorse" , "enemy" , "energy" , "enforce" , "engage" , "engine" , "enhance" , "enjoy" , "enlist" , "enough" , "enrich" , "enroll" , "ensure" , "enter" , "entire" , "entry" , "envelope" , "episode" , "equal" , "equip" , "era" ,
"erase" , "erode" , "erosion" , "error" , "erupt" , "escape" , "essay" , "essence" , "estate" , "eternal" , "ethics" , "evidence" , "evil" , "evoke" , "evolve" , "exact" , "example" , "excess" , "exchange" , "excite" , "exclude" , "excuse" , "execute" ,
"exercise" , "exhaust" , "exhibit" , "exile" , "exist" , "exit" , "exotic" , "expand" , "expect" , "expire" , "explain" , "expose" , "express" , "extend" , "extra" , "eye" , "eyebrow" , "fabric" , "face" , "faculty" , "fade" , "faint" , "faith" ,
"fall" , "false" , "fame" , "family" , "famous" , "fan" , "fancy" , "fantasy" , "farm" , "fashion" , "fat" , "fatal" , "father" , "fatigue" , "fault" , "favorite" , "feature" , "february" , "federal" , "fee" , "feed" , "feel" , "female" , "fence" ,
"festival" , "fetch" , "fever" , "few" , "fiber" , "fiction" , "field" , "figure" , "file" , "film" , "filter" , "final" , "find" , "fine" , "finger" , "finish" , "fire" , "firm" , "first" , "fiscal" , "fish" , "fit" , "fitness" , "fix" , "flag" ,
"flame" , "flash" , "flat" , "flavor" , "flee" , "flight" , "flip" , "float" , "flock" , "floor" , "flower" , "fluid" , "flush" , "fly" , "foam" , "focus" , "fog" , "foil" , "fold" , "follow" , "food" , "foot" , "force" , "forest" , "forget" ,
"fork" , "fortune" , "forum" , "forward" , "fossil" , "foster" , "found" , "fox" , "fragile" , "frame" , "frequent" , "fresh" , "friend" , "fringe" , "frog" , "front" , "frost" , "frown" , "frozen" , "fruit" , "fuel" , "fun" , "funny" , "furnace" ,
"fury" , "future" , "gadget" , "gain" , "galaxy" , "gallery" , "game" , "gap" , "garage" , "garbage" , "garden" , "garlic" , "garment" , "gas" , "gasp" , "gate" , "gather" , "gauge" , "gaze" , "general" , "genius" , "genre" , "gentle" , "genuine" ,
"gesture" , "ghost" , "giant" , "gift" , "giggle" , "ginger" , "giraffe" , "girl" , "give" , "glad" , "glance" , "glare" , "glass" , "glide" , "glimpse" , "globe" , "gloom" , "glory" , "glove" , "glow" , "glue" , "goat" , "goddess" , "gold" , "good" ,
"goose" , "gorilla" , "gospel" , "gossip" , "govern" , "gown" , "grab" , "grace" , "grain" , "grant" , "grape" , "grass" , "gravity" , "great" , "green" , "grid" , "grief" , "grit" , "grocery" , "group" , "grow" , "grunt" , "guard" , "guess" , "guide" ,
"guilt" , "guitar" , "gun" , "gym" , "habit" , "hair" , "half" , "hammer" , "hamster" , "hand" , "happy" , "harbor" , "hard" , "harsh" , "harvest" , "hat" , "have" , "hawk" , "hazard" , "head" , "health" , "heart" , "heavy" , "hedgehog" , "height" ,
"hello" , "helmet" , "help" , "hen" , "hero" , "hidden" , "high" , "hill" , "hint" , "hip" , "hire" , "history" , "hobby" , "hockey" , "hold" , "hole" , "holiday" , "hollow" , "home" , "honey" , "hood" , "hope" , "horn" , "horror" , "horse" , "hospital" ,
"host" , "hotel" , "hour" , "hover" , "hub" , "huge" , "human" , "humble" , "humor" , "hundred" , "hungry" , "hunt" , "hurdle" , "hurry" , "hurt" , "husband" , "hybrid" , "ice" , "icon" , "idea" , "identify" , "idle" , "ignore" , "ill" , "illegal" ,
"illness" , "image" , "imitate" , "immense" , "immune" , "impact" , "impose" , "improve" , "impulse" , "inch" , "include" , "income" , "increase" , "index" , "indicate" , "indoor" , "industry" , "infant" , "inflict" , "inform" , "inhale" , "inherit" ,
"initial" , "inject" , "injury" , "inmate" , "inner" , "innocent" , "input" , "inquiry" , "insane" , "insect" , "inside" , "inspire" , "install" , "intact" , "interest" , "into" , "invest" , "invite" , "involve" , "iron" , "island" , "isolate" ,
"issue" , "item" , "ivory" , "jacket" , "jaguar" , "jar" , "jazz" , "jealous" , "jeans" , "jelly" , "jewel" , "job" , "join" , "joke" , "journey" , "joy" , "judge" , "juice" , "jump" , "jungle" , "junior" , "junk" , "just" , "kangaroo" , "keen" ,
"keep" , "ketchup" , "key" , "kick" , "kid" , "kidney" , "kind" , "kingdom" , "kiss" , "kit" , "kitchen" , "kite" , "kitten" , "kiwi" , "knee" , "knife" , "knock" , "know" , "lab" , "label" , "labor" , "ladder" , "lady" , "lake" , "lamp" , "language" ,
"laptop" , "large" , "later" , "latin" , "laugh" , "laundry" , "lava" , "law" , "lawn" , "lawsuit" , "layer" , "lazy" , "leader" , "leaf" , "learn" , "leave" , "lecture" , "left" , "leg" , "legal" , "legend" , "leisure" , "lemon" , "lend" , "length" ,
"lens" , "leopard" , "lesson" , "letter" , "level" , "liar" , "liberty" , "library" , "license" , "life" , "lift" , "light" , "like" , "limb" , "limit" , "link" , "lion" , "liquid" , "list" , "little" , "live" , "lizard" , "load" , "loan" , "lobster" ,
"local" , "lock" , "logic" , "lonely" , "long" , "loop" , "lottery" , "loud" , "lounge" , "love" , "loyal" , "lucky" , "luggage" , "lumber" , "lunar" , "lunch" , "luxury" , "lyrics" , "machine" , "mad" , "magic" , "magnet" , "maid" , "mail" , "main" ,
"major" , "make" , "mammal" , "man" , "manage" , "mandate" , "mango" , "mansion" , "manual" , "maple" , "marble" , "march" , "margin" , "marine" , "market" , "marriage" , "mask" , "mass" , "master" , "match" , "material" , "math" , "matrix" , "matter" ,
"maximum" , "maze" , "meadow" , "mean" , "measure" , "meat" , "mechanic" , "medal" , "media" , "melody" , "melt" , "member" , "memory" , "mention" , "menu" , "mercy" , "merge" , "merit" , "merry" , "mesh" , "message" , "metal" , "method" , "middle" ,
"midnight" , "milk" , "million" , "mimic" , "mind" , "minimum" , "minor" , "minute" , "miracle" , "mirror" , "misery" , "miss" , "mistake" , "mix" , "mixed" , "mixture" , "mobile" , "model" , "modify" , "mom" , "moment" , "monitor" , "monkey" ,
"monster" , "month" , "moon" , "moral" , "more" , "morning" , "mosquito" , "mother" , "motion" , "motor" , "mountain" , "mouse" , "move" , "movie" , "much" , "muffin" , "mule" , "multiply" , "muscle" , "museum" , "mushroom" , "music" , "must" ,
"mutual" , "myself" , "mystery" , "myth" , "naive" , "name" , "napkin" , "narrow" , "nasty" , "nation" , "nature" , "near" , "neck" , "need" , "negative" , "neglect" , "neither" , "nephew" , "nerve" , "nest" , "net" , "network" , "neutral" ,
"never" , "news" , "next" , "nice" , "night" , "noble" , "noise" , "nominee" , "noodle" , "normal" , "north" , "nose" , "notable" , "note" , "nothing" , "notice" , "novel" , "now" , "nuclear" , "number" , "nurse" , "nut" , "oak" , "obey" ,
"object" , "oblige" , "obscure" , "observe" , "obtain" , "obvious" , "occur" , "ocean" , "october" , "odor" , "off" , "offer" , "office" , "often" , "oil" , "okay" , "old" , "olive" , "olympic" , "omit" , "once" , "one" , "onion" , "online" ,
"only" , "open" , "opera" , "opinion" , "oppose" , "option" , "orange" , "orbit" , "orchard" , "order" , "ordinary" , "organ" , "orient" , "original" , "orphan" , "ostrich" , "other" , "outdoor" , "outer" , "output" , "outside" , "oval" , "oven" ,
"over" , "own" , "owner" , "oxygen" , "oyster" , "ozone" , "pact" , "paddle" , "page" , "pair" , "palace" , "palm" , "panda" , "panel" , "panic" , "panther" , "paper" , "parade" , "parent" , "park" , "parrot" , "party" , "pass" , "patch" , "path" ,
"patient" , "patrol" , "pattern" , "pause" , "pave" , "payment" , "peace" , "peanut" , "pear" , "peasant" , "pelican" , "pen" , "penalty" , "pencil" , "people" , "pepper" , "perfect" , "permit" , "person" , "pet" , "phone" , "photo" , "phrase" ,
"physical" , "piano" , "picnic" , "picture" , "piece" , "pig" , "pigeon" , "pill" , "pilot" , "pink" , "pioneer" , "pipe" , "pistol" , "pitch" , "pizza" , "place" , "planet" , "plastic" , "plate" , "play" , "please" , "pledge" , "pluck" , "plug" ,
"plunge" , "poem" , "poet" , "point" , "polar" , "pole" , "police" , "pond" , "pony" , "pool" , "popular" , "portion" , "position" , "possible" , "post" , "potato" , "pottery" , "poverty" , "powder" , "power" , "practice" , "praise" , "predict" ,
"prefer" , "prepare" , "present" , "pretty" , "prevent" , "price" , "pride" , "primary" , "print" , "priority" , "prison" , "private" , "prize" , "problem" , "process" , "produce" , "profit" , "program" , "project" , "promote" , "proof" , "property" ,
"prosper" , "protect" , "proud" , "provide" , "public" , "pudding" , "pull" , "pulp" , "pulse" , "pumpkin" , "punch" , "pupil" , "puppy" , "purchase" , "purity" , "purpose" , "purse" , "push" , "put" , "puzzle" , "pyramid" , "quality" , "quantum" ,
"quarter" , "question" , "quick" , "quit" , "quiz" , "quote" , "rabbit" , "raccoon" , "race" , "rack" , "radar" , "radio" , "rail" , "rain" , "raise" , "rally" , "ramp" , "ranch" , "random" , "range" , "rapid" , "rare" , "rate" , "rather" , "raven" ,
"raw" , "razor" , "ready" , "real" , "reason" , "rebel" , "rebuild" , "recall" , "receive" , "recipe" , "record" , "recycle" , "reduce" , "reflect" , "reform" , "refuse" , "region" , "regret" , "regular" , "reject" , "relax" , "release" , "relief" ,
"rely" , "remain" , "remember" , "remind" , "remove" , "render" , "renew" , "rent" , "reopen" , "repair" , "repeat" , "replace" , "report" , "require" , "rescue" , "resemble" , "resist" , "resource" , "response" , "result" , "retire" , "retreat" ,
"return" , "reunion" , "reveal" , "review" , "reward" , "rhythm" , "rib" , "ribbon" , "rice" , "rich" , "ride" , "ridge" , "rifle" , "right" , "rigid" , "ring" , "riot" , "ripple" , "risk" , "ritual" , "rival" , "river" , "road" , "roast" , "robot" ,
"robust" , "rocket" , "romance" , "roof" , "rookie" , "room" , "rose" , "rotate" , "rough" , "round" , "route" , "royal" , "rubber" , "rude" , "rug" , "rule" , "run" , "runway" , "rural" , "sad" , "saddle" , "sadness" , "safe" , "sail" , "salad" ,
"salmon" , "salon" , "salt" , "salute" , "same" , "sample" , "sand" , "satisfy" , "satoshi" , "sauce" , "sausage" , "save" , "say" , "scale" , "scan" , "scare" , "scatter" , "scene" , "scheme" , "school" , "science" , "scissors" , "scorpion" , "scout" ,
"scrap" , "screen" , "script" , "scrub" , "sea" , "search" , "season" , "seat" , "second" , "secret" , "section" , "security" , "seed" , "seek" , "segment" , "select" , "sell" , "seminar" , "senior" , "sense" , "sentence" , "series" , "service" ,
"session" , "settle" , "setup" , "seven" , "shadow" , "shaft" , "shallow" , "share" , "shed" , "shell" , "sheriff" , "shield" , "shift" , "shine" , "ship" , "shiver" , "shock" , "shoe" , "shoot" , "shop" , "short" , "shoulder" , "shove" , "shrimp" ,
"shrug" , "shuffle" , "shy" , "sibling" , "sick" , "side" , "siege" , "sight" , "sign" , "silent" , "silk" , "silly" , "silver" , "similar" , "simple" , "since" , "sing" , "siren" , "sister" , "situate" , "six" , "size" , "skate" , "sketch" , "ski" ,
"skill" , "skin" , "skirt" , "skull" , "slab" , "slam" , "sleep" , "slender" , "slice" , "slide" , "slight" , "slim" , "slogan" , "slot" , "slow" , "slush" , "small" , "smart" , "smile" , "smoke" , "smooth" , "snack" , "snake" , "snap" , "sniff" ,
"snow" , "soap" , "soccer" , "social" , "sock" , "soda" , "soft" , "solar" , "soldier" , "solid" , "solution" , "solve" , "someone" , "song" , "soon" , "sorry" , "sort" , "soul" , "sound" , "soup" , "source" , "south" , "space" , "spare" , "spatial" ,
"spawn" , "speak" , "special" , "speed" , "spell" , "spend" , "sphere" , "spice" , "spider" , "spike" , "spin" , "spirit" , "split" , "spoil" , "sponsor" , "spoon" , "sport" , "spot" , "spray" , "spread" , "spring" , "spy" , "square" , "squeeze" ,
"squirrel" , "stable" , "stadium" , "staff" , "stage" , "stairs" , "stamp" , "stand" , "start" , "state" , "stay" , "steak" , "steel" , "stem" , "step" , "stereo" , "stick" , "still" , "sting" , "stock" , "stomach" , "stone" , "stool" , "story" ,
"stove" , "strategy" , "street" , "strike" , "strong" , "struggle" , "student" , "stuff" , "stumble" , "style" , "subject" , "submit" , "subway" , "success" , "such" , "sudden" , "suffer" , "sugar" , "suggest" , "suit" , "summer" , "sun" , "sunny" ,
"sunset" , "super" , "supply" , "supreme" , "sure" , "surface" , "surge" , "surprise" , "surround" , "survey" , "suspect" , "sustain" , "swallow" , "swamp" , "swap" , "swarm" , "swear" , "sweet" , "swift" , "swim" , "swing" , "switch" , "sword" ,
"symbol" , "symptom" , "syrup" , "system" , "table" , "tackle" , "tag" , "tail" , "talent" , "talk" , "tank" , "tape" , "target" , "task" , "taste" , "tattoo" , "taxi" , "teach" , "team" , "tell" , "ten" , "tenant" , "tennis" , "tent" , "term" ,
"test" , "text" , "thank" , "that" , "theme" , "then" , "theory" , "there" , "they" , "thing" , "this" , "thought" , "three" , "thrive" , "throw" , "thumb" , "thunder" , "ticket" , "tide" , "tiger" , "tilt" , "timber" , "time" , "tiny" , "tip" ,
"tired" , "tissue" , "title" , "toast" , "tobacco" , "today" , "toddler" , "toe" , "together" , "toilet" , "token" , "tomato" , "tomorrow" , "tone" , "tongue" , "tonight" , "tool" , "tooth" , "top" , "topic" , "topple" , "torch" , "tornado" ,
"tortoise" , "toss" , "total" , "tourist" , "toward" , "tower" , "town" , "toy" , "track" , "trade" , "traffic" , "tragic" , "train" , "transfer" , "trap" , "trash" , "travel" , "tray" , "treat" , "tree" , "trend" , "trial" , "tribe" , "trick" ,
"trigger" , "trim" , "trip" , "trophy" , "trouble" , "truck" , "true" , "truly" , "trumpet" , "trust" , "truth" , "try" , "tube" , "tuition" , "tumble" , "tuna" , "tunnel" , "turkey" , "turn" , "turtle" , "twelve" , "twenty" , "twice" , "twin" ,
"twist" , "two" , "type" , "typical" , "ugly" , "umbrella" , "unable" , "unaware" , "uncle" , "uncover" , "under" , "undo" , "unfair" , "unfold" , "unhappy" , "uniform" , "unique" , "unit" , "universe" , "unknown" , "unlock" , "until" , "unusual" ,
"unveil" , "update" , "upgrade" , "uphold" , "upon" , "upper" , "upset" , "urban" , "urge" , "usage" , "use" , "used" , "useful" , "useless" , "usual" , "utility" , "vacant" , "vacuum" , "vague" , "valid" , "valley" , "valve" , "van" , "vanish" ,
"vapor" , "various" , "vast" , "vault" , "vehicle" , "velvet" , "vendor" , "venture" , "venue" , "verb" , "verify" , "version" , "very" , "vessel" , "veteran" , "viable" , "vibrant" , "vicious" , "victory" , "video" , "view" , "village" , "vintage" ,
"violin" , "virtual" , "virus" , "visa" , "visit" , "visual" , "vital" , "vivid" , "vocal" , "voice" , "void" , "volcano" , "volume" , "vote" , "voyage" , "wage" , "wagon" , "wait" , "walk" , "wall" , "walnut" , "want" , "warfare" , "warm" , "warrior" ,
"wash" , "wasp" , "waste" , "water" , "wave" , "way" , "wealth" , "weapon" , "wear" , "weasel" , "weather" , "web" , "wedding" , "weekend" , "weird" , "welcome" , "west" , "wet" , "whale" , "what" , "wheat" , "wheel" , "when" , "where" , "whip" , "whisper" ,
"wide" , "width" , "wife" , "wild" , "will" , "win" , "window" , "wine" , "wing" , "wink" , "winner" , "winter" , "wire" , "wisdom" , "wise" , "wish" , "witness" , "wolf" , "woman" , "wonder" , "wood" , "wool" , "word" , "work" , "world" , "worry" , "worth" ,
"wrap" , "wreck" , "wrestle" , "wrist" , "write" , "wrong" , "yard" , "year" , "yellow" , "you" , "young" , "youth" , "zebra" , "zero" , "zone" , "zoo"};
alexeyneu
Member
**
Offline Offline

Activity: 312
Merit: 30


View Profile
March 20, 2024, 11:34:14 AM
Last edit: March 20, 2024, 12:15:53 PM by alexeyneu
 #19

compressor: words delivered from file. file name provided via command line

dcompressor: base58 encoded thing provided via command line
well i see enough demand for this to make it. we need a standard for 32 bytes -> 12 words thing. So someone then can figure out how to recover this stuff if tool is lost. i think to snoop it from monero, they support phrases from the start.

But better way is this: just to scale base58 lib which now does [0..255] ⇆ [0..57] to [0..2047] ⇆ [0..57]. So we'll have 32 bytes -> base58 of it -> words. it then could be applied to wif or whatever. amount will be not 12 ofc and not fixed

With 12 words you can only encode 16 bytes (128 bits). For 32 bytes you need 24 words. The word list contains 2048 words so 11 bits.
for 18 bytes block it will be 14 words
alexeyneu
Member
**
Offline Offline

Activity: 312
Merit: 30


View Profile
March 20, 2024, 04:48:02 PM
Last edit: March 24, 2024, 02:03:06 AM by alexeyneu
 #20

https://github.com/alexeyneu/base58_2048

msvc 2019 project with cmake build support.
in windows you should have libcrypto.dll next to .exe files, not included
wif key is 27 words. upd  24 w support added

if you really know what you're doing you can extract wif to 32-byte then base58 it on your own  and then supply latter to the tool. you'll have shorter phrase upd It's now there.
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!