Title: Dice wallet with a twist of regret Post by: thelongcoin on February 21, 2021, 01:07:48 PM Back in 2013, I got interested in the hype a got a bitcoin from Coinbase. Thinking I was being extra cautious, I created a "paper dice wallet" by rolling a six-sided dice 99 times per the instructions at bitaddress.org.
From their website : An important part of creating a Bitcoin wallet is ensuring the random numbers used to create the wallet are truly random. Physical randomness is better than computer generated pseudo-randomness. The easiest way to generate physical randomness is with dice. To create a Bitcoin private key you only need one six sided die which you roll 99 times. Stopping each time to record the value of the die. When recording the values follow these rules: 1=1, 2=2, 3=3, 4=4, 5=5, 6=0. By doing this you are recording the big random number, your private key, in B6 or base 6 format. You can then enter the 99 character base 6 private key into the text field above and click View Details. You will then see the Bitcoin address associated with your private key. You should also make note of your private key in WIF format since it is more widely used. So I wrote down the original 99 rolls as 1330540124221 and so forth. I have the public address, and then sent the BTC to the paper wallet. Then, in a stroke Title: Re: Dice wallet with a twist of regret Post by: furyo87 on February 21, 2021, 01:46:16 PM There is a mathematical answer to your question but I am too lazy to compute it (800k+ solutions)
In any case what you need to start doing is a list of the possible solutions and start trying. It will take time but likely pay off. Title: Re: Dice wallet with a twist of regret Post by: thelongcoin on February 21, 2021, 01:49:28 PM I know a fair amount of python and have already attempted this. If the cut and paste was three consecutive numbers: There are 97 different three number groups.
1) 1st,2nd,3rd digits 2) 2nd,3rd,4th 96) 96th, 97th,98th digits 97) 97th,98th, 99th digits Assuming that cut number has to go somewhere else, there are 96 spots for it to be inserted. 97*96 = 9312 possibilities With four digits 96*95 = 9120 Assuming 5 digits 95*94 = 8930 Its trivial to write a python script to test all these possibilities, then convert the Base 6 number to the corresponding public/private key pair and test if there is a match. Conclusion: Either I'm not good enough at python, python is the wrong tool, or the cut and paste was too big to brute force. Title: Re: Dice wallet with a twist of regret Post by: furyo87 on February 21, 2021, 02:54:28 PM ok, my bad, thought you had moved groups of 3 digits 3 to 5 times.
I agree with your math. Assuming you have already tried those 30k private keys my next set would be to try strings of 2 characters and 1 character. Title: Re: Dice wallet with a twist of regret Post by: KingZee on February 21, 2021, 04:08:52 PM I know a fair amount of python and have already attempted this. If the cut and paste was three consecutive numbers: There are 97 different three number groups. 1) 1st,2nd,3rd digits 2) 2nd,3rd,4th 96) 96th, 97th,98th digits 97) 97th,98th, 99th digits Assuming that cut number has to go somewhere else, there are 96 spots for it to be inserted. 97*96 = 9312 possibilities With four digits 96*95 = 9120 Assuming 5 digits 95*94 = 8930 Its trivial to write a python script to test all these possibilities, then convert the Base 6 number to the corresponding public/private key pair and test if there is a match. Conclusion: Either I'm not good enough at python, python is the wrong tool, or the cut and paste was too big to brute force. This sounds reasonable, what's your problem? Have you successfully coded the "dice roll to private key" part? Title: Re: Dice wallet with a twist of regret Post by: thelongcoin on February 21, 2021, 06:33:01 PM I've tried 2 digit and 1 digit transposes as well. No luck. So I believe I cut 3/4/5 consecutive digits somewhere and then inserted 3/4/5 other digits. The difference possible combinations start to explode towards infinity and I fear I've lost the coin forever. Does any recovery service exist to write code that tries to recreate all this possibilities? I know most of the private key, but do I know enough?
Title: Re: Dice wallet with a twist of regret Post by: o_e_l_e_o on February 21, 2021, 07:22:48 PM I know most of the private key, but do I know enough? The problem here is that I don't think you actually know any of the private key. Let's take a simple pattern for the sake of illustration.Code: 123450123450 = 1F1E7D36 If you move the first digit to the end, you get: Code: 234501234501 = 38F7DF45 If you instead move the second digit to the end, you get: Code: 134501234502 = 23580746 Even the tiniest change in what you cut and pasted will result in a vastly different private key, so I don't think you can say with any certainty that you know any of the private key. If you have tried every cut and paste of 1, 2, 3, 4, and 5, consecutive digits, then you might as well try 6+ consecutive digits, since the number of possibilities gets progressively smaller and it is trivial to try. The next thing might be to consider if instead of cut and pasting, you actually swapped two different sets of numbers. Also, be sure you are checking both the compressed and uncompressed address, as bitaddress.org generates both. Title: Re: Dice wallet with a twist of regret Post by: DannyHamilton on February 21, 2021, 07:33:43 PM I've tried 2 digit and 1 digit transposes as well. No luck. So I believe I cut 3/4/5 consecutive digits somewhere and then inserted 3/4/5 other digits. I haven't tried the math yet, but this feels possible. Can you make some intelligent assumptions about what you did? For example:
Any little detail helps significantly reduce the number of possibilities that need to be checked. Also, we humans are creatures of habit far more than we realize, and we are horrible at creating our own randomness. Go through the steps.. Generate a list of 99 digits from 0 through 5 (preferably by dice roll exactly as you did before). Take a look at it. Then decide... If you were TODAY going to cut and paste digits for a similar purpose, how many digits would you cut and paste? Where in the string of digits would you cut them from? Where would you paste them? Now take a look at your decision. Did you happen to choose a sequence that starts and/or ends with a particular digit for the cut? Did you happen to choose a particular pair of digits to paste in between? How far from the ends did you cut? How far from the ends did you paste? In choosing the sequence to cut, did you look for any particular digits (or patterns) to exist (or not exist) in (or before, or after) the sequence?Whatever "feels about right" currently, probably "felt about right" back then. Title: Re: Dice wallet with a twist of regret Post by: thelongcoin on February 21, 2021, 09:54:39 PM I did leave myself a cryptic message that was supposed to serve as a reminder as to what the transposition was ... I wrote this message the day I did the transpose, so it stands as the best clue on how to get the bitcoin back. I believe it jogs my memory on where in the 99 digits the cut occurred, but not sure on how to interpret the message as to what the paste was and where the paste occurred. But your questions have given me fresh thoughts on how to solve it.
Title: Re: Dice wallet with a twist of regret Post by: pooya87 on February 22, 2021, 04:32:37 AM Conclusion: This may sound obvious but have you tried to actually test the code you wrote with an example? The problem may be in your code.Either I'm not good enough at python, python is the wrong tool, or the cut and paste was too big to brute force. Choose some of the variations (with 1, 2, 3, ... transposition) at random and generate their addresses then enter that address in your code and start the search to see if it can find the correct answer. This way you can be sure that your code is fine. Title: Re: Dice wallet with a twist of regret Post by: KingZee on February 22, 2021, 04:36:08 AM Conclusion: This may sound obvious but have you tried to actually test the code you wrote with an example? The problem may be in your code.Either I'm not good enough at python, python is the wrong tool, or the cut and paste was too big to brute force. Choose some of the variations (with 1, 2, 3, ... transposition) at random and generate their addresses then enter that address in your code and start the search to see if it can find the correct answer. This way you can be sure that your code is fine. This is what I meant, or share the code you used. Sorry if it sounds a bit rude but all we have is your word that "it doesnt work", have you really tested your code correctly and verified that even after iterating through all the options it didnt work? Are you sure you're generating the seed using the same method bitaddress.org uses? Are you sure you're checking the address using the right derivation? There's so many things you have to double check to see if your code is correct that I'm more inclined to believe it's something wrong on your end, not the dice roll or the cut. Title: Re: Dice wallet with a twist of regret Post by: NotATether on February 22, 2021, 05:55:36 AM I've tried 2 digit and 1 digit transposes as well. No luck. So I believe I cut 3/4/5 consecutive digits somewhere and then inserted 3/4/5 other digits. The difference possible combinations start to explode towards infinity and I fear I've lost the coin forever. Does any recovery service exist to write code that tries to recreate all this possibilities? I know most of the private key, but do I know enough? I wouldn't give up yet. You're only trying to find a standalone private key and one derived from some seed phrase, and this makes the programming task much easier. I know some Python so I'll look for some old code of mine that creates a private key WIF from hex and I'll apply it to this problem. Python is actually the right tool for this job given the extreme easiness to convert a arbitrary base to a number. You just take the string of digits as input and then pass it to int() along with the base [after you turn the 6 digits into 0]. Most other languages don't have such a function so you'd waste some more time trying to write one. Do you have a GPU? I have a feeling this search can be hardware-accelerated, and it's probably easier to write GPU code in Python than in C. Title: Re: Dice wallet with a twist of regret Post by: LoyceV on February 22, 2021, 10:01:49 AM I did leave myself a cryptic message that was supposed to serve as a reminder as to what the transposition was ... I like puzzles, can you share it (without sharing the 99 numbers)?Title: Re: Dice wallet with a twist of regret Post by: NotATether on February 24, 2021, 06:31:55 AM As promised I made a script for this. It is currently single threaded and doesn't use a GPU but if this turns out to be useful I can add that functionality too.
Code: import math This will make a file with all possible private keys, one on each line. For example, the dice sequence "123" and one character transposed, makes the private keys: Code: 5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreGRmRFDZ There are some duplicates, probably because some transposes are equivalent like swapping positions 1-2 and 2-1. The next step after retrieving all these private keys is to use LoyceV's list of addresses with a balance (https://bitcointalk.org/index.php?topic=5254914.0)to see which ones are inside both lists. edit: fixed error in sixtozero() |