-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Adding RFC 9106 cost profiles? #8
Comments
As there are several competing recommendations, I wanted to avoid over-specifying the various parameters (aside from picking the OWASP recommendation as a safe default that traded-off RAM usage with CPU to accommodate use in memory-constrained environments such as cheap web VMs). What were you imagining, a new |
I understand, adding options to choose from invites confusion and misconfiguration. I was imagining providing some simple constants that could splat into Argon2id::Password.create("opensesame", **Argon2id::RFC_9106_LOW_MEM) I think, that's whats Argon2 is doing behind the scenes as well. Since Argin2id can be globally configured, |
I like the suggestion of the constants that can be passed as keyword arguments to I wonder if we can avoid having a “dangerous” method per profile and have a more generic method that takes each parameter as a keyword so you can call it like |
GitHub: #8 Allow users to choose from recommended parameters from RFC 9106 and the OWASP Password Storage Cheat Sheet by providing them as constants on `Argon2id`. To allow users to use this as defaults without having to pass them to every call to `Argon2id::Password.create`, add a new `Argon2id.set_defaults` (and corresponding `Argon2id.defaults`) method for setting multiple parameters at once.
I've raised a draft PR in #9 that provides these new parameter presets as well as a new Argon2id.set_defaults(**Argon2id::RFC_9106_HIGH_MEMORY) Please let me know what you think. |
GitHub: #8 Allow users to choose from recommended parameters from RFC 9106 and the OWASP Password Storage Cheat Sheet by providing them as constants on `Argon2id`. To allow users to use this as defaults without having to pass them to every call to `Argon2id::Password.create`, add a new `Argon2id.set_defaults` method for setting multiple parameters at once. Note that `Argon2id.set_defaults` returns `nil` as it is purely for side-effects only.
GitHub: #8 Allow users to choose from recommended parameters from RFC 9106 and the OWASP Password Storage Cheat Sheet by providing them as constants on `Argon2id`. To allow users to use this as defaults without having to pass them to every call to `Argon2id::Password.create`, add a new `Argon2id.set_defaults` method for setting multiple parameters at once. Note that `Argon2id.set_defaults` returns `nil` as it is purely for side-effects only.
Sorry for the late reply. Looks nice! |
RFC 9106 describes different default profiles depending on available memory:
Apart from the memory cost factors, they differ from the OWASP recommendation using p=4 lanes.
Also, for testing, it might be useful to have a pre-configured cheapest option with t=1, m=2^3, p=1
The text was updated successfully, but these errors were encountered: