Post
Topic
Board Bitcoin Technical Support
Merits 1 from 1 user
Re: Private Key missing 4 characters
by
Thirdspace
on 19/05/2018, 11:11:35 UTC
⭐ Merited by Welsh (1)
The total search space (for the private key without the first 2 chars) therefore is 46 * 47 * 48 * 49 * (58 choose 4) = 2.1574231*1012.
Multiplied with 4 (combinations the priv key can start with) = total amount of combinations = 8.6296925 * 1012
I don't understand where you come up with 46 * 47 * 48 * 49 and (58 choose 4)
we're not choosing 4 out of 58, but we pick 1 of 58, do 4 times (positions) = 58*58*58*58 = 58^4
 
I am pretty sure you made a small mistake there. You do ignore the order of the 4 missing words with your statement: ( 49! / 4! (49-4)! )
You do iterate through each position with your words, but you have to iterate within the words too.

There are 58 choose 4 possible combinations to pick the 4 correct chars from the charspace (without considering the order).
why 58 choose 4? the 4 chars are not guaranteed distinct
what I do is C(n,k) = n choose k = 49 choose 4 , but not for chars
I'm doing this ( 49! / 4! (49-4)! ) for possible position combinations of the missing 4 chars
then for each possible position combination, there are 58^4 possible char combinations

49 positions, 45 known chars (order sequence assumed) and trying to fill 4 chars in any 4 positions
so total = (49 choose 4) * 58^4 = 211,876 * 58^4 = 2,397,693,906,496 = 2.39 * 1012



small example:
4 positions, 2 known chars (order sequence assumed) and trying to fill 2 chars in any 2 positions
4 choose 2 = ( 4! / 2! (4-2)! ) = ( 1*2*3*4 / 1*2*1*2 ) = 6 possible position combinations
so total = 6*58*58 = (4 choose 2) * 58^2
Code:
5 K x x x x
1. 5 K _ _ x x 58*58
2. 5 K _ x _ x 58*58
3. 5 K _ x x _ 58*58
4. 5 K x _ _ x 58*58
5. 5 K x _ x _ 58*58
6. 5 K x x _ _ 58*58