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 there any way to control parallelism degree in crypto_pwhash? #986

Closed
ghost opened this issue Jul 29, 2020 · 1 comment
Closed

Is there any way to control parallelism degree in crypto_pwhash? #986

ghost opened this issue Jul 29, 2020 · 1 comment

Comments

@ghost
Copy link

ghost commented Jul 29, 2020

The Argon2 specification says that there is a parallelism degree which defines the number of parallel threads.

The documentation of libsodium also says:

What will be the highest number of threads/processes evaluating the function simultaneously (ideally, no more than 1 per CPU core)?

But, I couldn't find an API for that. Is there any way to control the parallelism degree?

I'm interested in libsodium and my application needs to use that feature.

All in all, thanks you libsodiumdevelopers who make such good crypto library!

@ghost ghost changed the title Is there a way to control parallelism degree in crypto_pwhash? Is there any way to control parallelism degree in crypto_pwhash? Jul 29, 2020
@jedisct1
Copy link
Owner

Hi,

Although existing hashes with a parallelism > 1 can be verified, crypto_pwhash doesn’t support thread-level parallelism.

Maybe this will be added at some point, for platforms that have support for threads, especially if other algorithms can take advantage of this.

But I’m not really convinced that this is necessary as more threads don’t provide a significant slowdown of the hash computation.

Repository owner locked and limited conversation to collaborators Oct 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant