Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
WGOS opened this issue Dec 14, 2021 · 4 comments

Comments

@WGOS
Copy link

WGOS commented Dec 14, 2021

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?

@WGOS WGOS changed the title Is it possible to pre-calculate checkpoints? Is it possible to parallel calculations across differrent machines using checkpoints? Dec 14, 2021
@WGOS WGOS changed the title Is it possible to parallel calculations across differrent machines using checkpoints? Is it possible to parallel calculations across different machines using checkpoints? Dec 14, 2021
@scribblemaniac
Copy link
Contributor

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
Copy link
Author

WGOS commented Dec 15, 2021

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?

@scribblemaniac
Copy link
Contributor

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.

@cathugger
Copy link
Owner

possible - yes.
worth it - no.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants