cathugger/mkp224o

Is it possible to parallel calculations across different machines using checkpoints?

Opened this issue · 4 comments

WGOS commented

Greetings!
I've seen #61 which added checkpoints to the project but as someone who not really into cryptography I can't understand how they're implemented. Is it even possible to make 4 differrent checkpoints for 1 seed and throw them to differrent machines to calculate values in parallel or it's actually necessarry to perform every step of computing keys to get certain checkpoint?

That's not what the checkpoints are designed for and they shouldn't be used for this. The checkpoints are solely for stopping and resuming the program when using a passphrase. Technically you craft custom checkpoint files for each computer and they could compute the same passphrase at different offsets, but at some point you're going to be calculating hashes that have already been tried on your other machines.

In theory it would not be that hard to extend the code to accept an instance number and the total number of instances as input and properly perform parallel computations for a passphrase, you should really just consider not using a passphrase. If you do not use a passphrase, all your machines will try different random seeds and there will be no redundant calculations. It does not get simpler than that. Another simple solution would be to use different passphrases for each machine (ex. passphrase1, passphrase2, etc.).

WGOS commented

So as far as I understand, does it mean that technically there's no difference between calculating the same seed with predefined checkpoints and random seeds on multiple machines?

There are many differences, including but not limited to:

  • You can use multiple keys generated with random seeding, but you should never use more than one key generated with the same passphrase, regardless of what you do with the checkpoints or what machine it was generated on.
  • Passphrases have far less entropy than your computer's RNG, and thus are generally less secure.
  • Using a fixed passphrase is deterministic. You can regenerate the same keys by rerunning the program with the same passphrase (even without a checkpoint, but it may take longer). Without a passphrase, the results are non-deterministic and the keys cannot be regenerated, practically speaking.

possible - yes.
worth it - no.