Comments (6)
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?
from argon2-cffi.
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 core
and context
myself.
But cases like these are the reason why I’m exposing those very low-level structures at all.
from argon2-cffi.
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?
from argon2-cffi.
@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?
from argon2-cffi.
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.
from argon2-cffi.
Fair enough, thanks. I'll put this in another lib then, I wouldn't think the interface to argon2_core
would change much since it's used by practically everything, but if that turns out to be the case I'll reevaluate how to approach this.
from argon2-cffi.
Related Issues (20)
- RFC is no longer a draft (RFC9106); default parameter choice out of date HOT 4
- 21.2.0: pep517 does not build cython modules HOT 6
- 21.1.0: `notebook` test suite is crashing with SIGILL in _cffi_backend.cpython.*so DSO HOT 11
- Inconsistent advice for key derivation HOT 5
- How to avoid timing attacks? HOT 1
- hash function return + / verify issue with sqlite HOT 3
- Question: Can output from argon2.low_level.hash_secret_raw() → bytes directly used to derive aes key? HOT 3
- Associated data cannot be specified in the low_level functions HOT 10
- Support password verification without sending the password from client to server HOT 5
- Make hash verification return True or False HOT 4
- Second salt HOT 1
- hash() got an unexpected keyword argument 'salt' HOT 1
- ImportError: cannot import name 'PasswordHasher' from partially initialized module 'argon2' HOT 1
- Install with poetry on python 3.11.7 --obsolete
- Failed Source Build on Apple Silicon HOT 9
- Wheel support for linux aarch64 HOT 4
- Unable to install on Xavier NX HOT 1
- Fail to install by pip on macOS 11.0.1 Big Sur HOT 11
- 20.1.0: sphinx warnings HOT 4
- 20.1.0: pytest warnings HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from argon2-cffi.