-
Notifications
You must be signed in to change notification settings - Fork 2k
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
scrypt: recommending larger values in 2021 #184
base: master
Are you sure you want to change the base?
Conversation
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
I have noticed the values kept being from 2017, despite single-core performance getting faster, for example with Apple's ARM M1 offering. So, I re-tested the N parameter, with the code from here https://blog.filippo.io/the-scrypt-parameters/ The results, on M1 Macbook Air: N = 2^14 26ms N = 2^15 53ms N = 2^16 108ms N = 2^17 219ms N = 2^18 441ms N = 2^19 901ms N = 2^20 1778ms N = 2^21 3675ms N = 2^22 7530ms strictly speaking, it should be 2^15, but this is an entry-level laptop and 108 ms is almost 100, so I increased N. I do not really understand r, but, according to this discussion https://news.ycombinator.com/item?id=25660467 M1 has double cache line size, so I doubled r. I don't really expect this to be accepted I guess - IETF still recommends the lower values, in 2021 - https://tools.ietf.org/id/draft-ietf-kitten-password-storage-01.html - but I guess to open a discussion?
This PR (HEAD: d9e526e) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/crypto/+/320390 to see it. Tip: You can toggle comments from me using the |
Message from Go Bot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/320390. |
The new M1 chips (fall 2021) seem to be even faster; but the single-core performance is actually very similar. So I think this won't move the numbers that much. |
I have noticed the values kept being from 2017, despite single-core
performance getting faster, for example with Apple's ARM M1 offering.
So, I re-tested the N parameter, with the code from here
https://blog.filippo.io/the-scrypt-parameters/
The results, on M1 Macbook Air:
N = 2^14 26ms
N = 2^15 53ms
N = 2^16 108ms
N = 2^17 219ms
N = 2^18 441ms
N = 2^19 901ms
N = 2^20 1778ms
N = 2^21 3675ms
N = 2^22 7530ms
strictly speaking, it should be 2^15, but this is an entry-level laptop and 108 ms is almost 100, so I increased N.
I do not really understand r, but, according to this discussion
https://news.ycombinator.com/item?id=25660467
M1 has double cache line size, so I doubled r.
I don't really expect this to be accepted I guess - IETF still recommends the lower values, in 2021 -
https://tools.ietf.org/id/draft-ietf-kitten-password-storage-01.html -
but I guess to open a discussion?