0x397f5aa7b90de4
What if you want to set the public key of this one 0x5aa7b90de4 and then try all combinations for the first 4 missing characters? as I understand it, no tool exist to scan selected parts of a range, or do they exist?
You would have to give a better example of how many leading characters, because what you have now would only take a few seconds/minute, to iterate all possible combos, even with a single thread python script. Even if you do not know the leading character, you are looking at 16^4 combos, 65,536 possible combos.
But initially, I was thinking the same thing as albert0bsd was, it is similar to BSGS, because BSGS basically cuts off the last x characters, depending on your baby step file (how many public keys it contains), but for your specific example, you would need a baby step file with 2^40 keys, or modify the keys known down, to use a smaller size file.
But as is, without mod, you would merely start with 0x1000 + 0x5aa7b90de4; and increment 0x1000 by +=1 until match is found. 0x1000, 0x1001, 0x1002, etc. Not a very difficult script to put together, using python.
Buuuuuuut,
Even if you knew the first 5 characters (which there is no way that you do), that does not mean much in the scope of this challenge, for example #130, because that would leave you with 2^112 left to search. Which can be done now via subtraction/division with a file full of 2^18 keys. But let's be real, as far as this challenge goes, people may say they know the leading x amount of characters, which they obviously do not; but maybe you have a different purpose/reason for what you are wanting to do.