For an assignment, we are required to crack a password from a hash given a salt.
The password will always be 4 characters that are case sensitive (ex: CMPS, cmps, CAMP, LIST).
We are to parallelize this process. What is the most efficient way to parallelize this process if we are to split it into 24 processes?
In other words, we are to split up the search for the password into 24 sub-searches.
EX: Process 1 = [AAAA - BBBB]
Process 2 = [CCCC - DDDD]
Process n = [8888 - 9999]
and so on. This is likely not to work or be efficient. What would be a better way to split the process?
What I was thinking: Make each set start with the most used letter in the English language, such that:
Process 1 = [EAAA - EZZZ]
Process 2 = [TAAA - TZZZ]
Thoughts?
If you don't presume any particular definition of "efficiency" other than generally being fast, then we can just take the worst-case scenario where you only succeed when hashing the very last possible password.
To optimize for that, you simply want the subsearches to cover the entire space of possible passwords, and divide them equally. Any scheme that splits the space into 24 mostly-equal sized pieces without overlap is efficient (presuming hashes are constant-time).
This gives you a 24x speedup relative to single-process brute force (worst-case vs worst-case).
One particular implementation: number all possible passwords. Each process knows its ID from 0-23. Process #i hashes password i, i+24, i+48, ... until done.