How to choose parameters for Argon2 for password vault
The parallelism was probably one reason why Argon2 won the Password Hashing Competition.
The use of processor cores allows for greater memory hardness (security)
without increasing the execution time accordingly.
The drawback is that developers have since then been wondering what value they take for their application.
Paralellisms depends on the number of available cores.
If you want your application to run on different devices,
the execution time will vary greatly with higher parallelism factor.
As of that time, about 50 percent have quad-core processors in their computer.
This would suggest to increase the parallelism factor to 8 (twice the number of cores),
but for smartphones with a single core this would roughly quadruple the execution time.
There is no clear solution for this.
I personally find the choice of libsodium too extreme, even though it is most likely to be cross-device.
But you are thus missing out on a major advantage of Argon2.
If you assume that the vast majority of your users have at least two processor cores,
you can set the parallelism factor to 4, if you are more careful, to 2.
Then you can set the assumed available memory (there is no clear solution for this too, at least 64 MiB?)
and at the end set the time-factor that the execution time is maybe one second.