-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
How to use keyed hashing? #25
Comments
Or rather, I found this reference to it, but doesn't seem to have first-class support since it's hidden away in the hazmat section. Any plans to make a high-level interface to keyed hashing? |
I’m afraid the Argon2 ref implementation I’m wrapping never made this stuff part of their…let’s call it “user APIs” and I’m not comfortable to implement it using But cases like these are the reason why I’m exposing those very low-level structures at all. |
Hmm, yeah, I can see that it's classified as "low-level API" in the reference code. But I think it should be Fairly Easy(tm) to use context's when using the PasswordHasher interface, since that is practically a python-level context you're keeping around anyway, and would expose a very useful feature to a wider audience. Would you accept a PR that made PasswordHasher use the low-level argon APIs to expose this, or would you prefer that this is done elsewhere using the core stuff you already expose? |
@hynek For what it's worth, I wrote a proof-of-concept implementation of PasswordHasher that wraps the context and core functions here. Since this library doesn't guarantee any stability of the low-level interface it's also impossible to publish this in a separate package that depends on this library without constantly releasing new versions in lock-step, which sounds like a nice bowl of pain. If this is cleaned up and tests added, would you accept a PR replacing the implementation of the current PasswordHasher? |
I appreciate your effort but at this point I’m not comfortable to both implement these things ourselves and frankly to use such half-public functions from Argon2’s API. I just don’t trust them too much. My suggestion: try to convince the Argon2 authors to promote keyed hashing into their public APIs and I’ll add it to argon2_cffi happily. As for the stability of the low-level interface: it’s not really that I don’t guarantee it: it’s just that I have to follow the Argon2 lib interfaces. I change as little as I can. |
Fair enough, thanks. I'll put this in another lib then, I wouldn't think the interface to |
I'm struggling to figure out how to use the keyed hashing that argon2 provides, any hints? Can't find any mentions of it in the docs, only thing I can find is the ffi declaration. How can this be set from python?
The text was updated successfully, but these errors were encountered: