Argon2: Reconsider MKPC, OMP_SCALE, benchmark hashes
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.6k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
I notice that in 6b9f850a1654e2d176eb3e59a51a275c9f224ab7 we got:
-#define MAX_KEYS_PER_CRYPT 1
+#define MAX_KEYS_PER_CRYPT 2
-#define OMP_SCALE 16
+#define OMP_SCALE 8 // tuned w/ MKPC for core i7m
These values puzzle me. For something as slow as Argon2 normally is, I'd expect us to be able to set all of these to 1 without performance loss. Like we have them in the scrypt format.
We should re-test this with different values on different systems.
Also, our default benchmark hashes for the Argon2 formats are rather unusual - they use 4 MiB. In scrypt, we use 16 MiB. We could want to upgrade these to 16 MiB as well, which would contribute to lower MKPC and OMP_SCALE being optimal.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining commit 6b9f850a1654e2d176eb3e59a51a275c9f224ab7 and the Argon2 benchmarking configuration. Re-test MAX_KEYS_PER_CRYPT and OMP_SCALE with different values on different systems, compare the 4 MiB and 16 MiB benchmark hashes, and document which settings are optimal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- performance, security
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100