In argon2 there is a concept of parallelism (called lanes). Generally you'd want to have at least as many threads as you have lanes since otherwise you are trading advantage to an attacker, but OpenSSL maintains a global thread limit (as well as allowing building with no-threads). So to use threads in this you must both set the global thread limit to greater than 1 and then also pass a thread count to the underlying EVP_KDF_derive function.
For this PR we simply always set threads to 1, and follow-ups will expose the global thread limit APIs and then make use of potential parallelism.
In argon2 there is a concept of parallelism (called lanes). Generally you'd want to have at least as many threads as you have lanes since otherwise you are trading advantage to an attacker, but OpenSSL maintains a global thread limit (as well as allowing building with
no-threads
). So to use threads in this you must both set the global thread limit to greater than 1 and then also pass a thread count to the underlyingEVP_KDF_derive
function.For this PR we simply always set threads to 1, and follow-ups will expose the global thread limit APIs and then make use of potential parallelism.