Post
Topic
Board Project Development
Merits 16 from 2 users
Re: The FinderOuter (initial release 2020-01-01)
by
Coding Enthusiast
on 18/02/2020, 18:15:41 UTC
⭐ Merited by LoyceV (12) ,hugeblack (4)
I'm trying to recover JBRai's private key with 49 out of 52 characters known. I've installed The FinderOuter (in a VM), but it asks for the locations of the missing characters.
Any chance you can add a loop to search all possible locations for the 3 missing characters? That is, assuming the rest of JBRai's key is correct.

I've tested it with a known key: it takes about 2 seconds to find 3 missing characters. To do the same on 3 unknown locations would take about 58^3 times longer, which means several days, but it'll still be manageable.

I'm not a math expert but I think it should take 20,825 times longer (583=195,112)*. There is also the fact that the underlying algorithm will also be different that lacks most of the pre-computation that the current algorithm for known missing places has so it will be slightly slower. However, as I said before I have no idea how to generalize this so I hardcoded the heck out of it (only for this special case: missing 3 chars, probably will add a couple more smaller cases later), the benefit of it is that I know how to run it in parallel so the more threads your CPU has the faster it would run and I don't think 4 billion is going to take that long to finish.

* The problem with not knowing the missing places is that you'll have to first select different locations then loop through the 58 possible characters and keys are long (52/51 characters) so things get out of hand quickly. Example:
Code:
1 missing char (assuming compressed key):
  known location   -> 58              =            58
  unknown location -> 51*58           =         2,958
2 missing chars
  known location   -> 58*58           =         3,364
  unknown location -> 1,275*58*58     =     4,289,100
3 missing chars
  known location   -> 58*58*58        =       195,112
  unknown location -> 20,825*58*58*58 = 4,063,207,400

20,825 in last example (like others) is calculated using combination in mathematics which is n!/[k!(n-k)!] where n is 51 for compressed keys (52 char long with first one fixed to K or L) and k is 3 (the 3 missing places).

https://github.com/Coding-Enthusiast/FinderOuter/commit/73e8596993cdf68be49a4f20ba52afa2b1c1a5b1
Here is a preview, will publish a released version soon (the checkbox needs to be selected to enable this "special" case):