Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Constants.cs: Reduce the Argon2id memory size to 256 MiB.
And update the specification. See LoupVaillant/Monocypher#274. With libsodium, 512 MiB and 3 iterations provides a reasonable delay on my desktop and M1 MacBook Air. With Monocypher, the delay is ~1 second on my desktop. However, it's ~10 seconds on an M1 MacBook with Low Power Mode and ~6 seconds without. That's unusably bad. That's even too much delay for disk encryption. Dropping to 256 MiB with 3 iterations will be ~5 seconds with Low Power Mode and ~3 seconds without, which is somewhat acceptable. Multiple iterations is preferable imo. I went with Monocypher to avoid the vcruntime requirement with libsodium on Windows, which is problematic for portable/self-contained applications. I also wanted to play around with another library. However, this is a good example of where security would be improved by using libsodium due to its superior performance.
- Loading branch information