-
Notifications
You must be signed in to change notification settings - Fork 772
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
Use secrets.choice and 600,000 iterations for WAMP-CRA keygen helper #1633
Comments
thanks for looking closely and for your suggestions! rgd 1.: yes, indeed, seems IOW, we should use https://docs.python.org/3/library/secrets.html#secrets.choice here
do you have a source for that statement? |
I copy the following content from Wiki: |
agreed, even though this might have "breaking consequences" for users practically - as I seem to remember, at least historically, using large number of iterations basically made the function stuck for ages depending on language/run-time .. due to maybe historically bad (performance wise) implementations ... not sure, long ago;) however, I would like to take the chance to underline:
Further, WAMP-cryptosign should be used with the secret private key stored in a hardware secure module. Or even better: the secret should be derived inside the hardware security module using a https://en.wikipedia.org/wiki/Physical_unclonable_function The hardware security module must be protected against even a physical attacker ... such stuff is available up to Common Criteria EAL6+ ... and Crossbar.io can be used in such settings! For both client (== WAMP session) authentication and authorization and for WAMP application payload end-to-end encryption! Only the latter takes out the router operator as a possible attacker from the point-of-view of the application sessions! Just saying;) |
To be honest, learned a lot, LOL. |
sure! that's only part of the story though;) you know, I am an absolute no-jokes security fanatic. what are you after? are you implementing a new WAMP router? |
Actually, I'm designing a new tool for detecting cryptographic vulnerabilities in Python. |
fantastic! I'd say, this is always highly welcome! and hey, you identified an issue in this repo - and we will fix it. of course "will fix": no one is paying for it, and I am not personally using it, so it might take time. typical OSS problem. anyways, we - that is WAMP at the protocol level, and this implementation (Autobahn, and Crossbar.io) as well - take security very important .. a must have no discussions or excuses approach the security goals of WAMP go far beyond mere "secure session authentication" .. we are "almost there";) as in, full application payload end-to-end encryption, thus no implicit trust of WAMP app clients into WAMP infra (routers) or anything in between full decentralized trust management is the final layer: via Ethereum smart contracts for managing trust relations fwiw, let me also dump 2 links which might be interesting in this context: functional / integration testing of all WAMP authentication methods in Crossbar.io: https://github.com/crossbario/crossbar-examples/tree/master/authentication the Python classes internally used to abstract away the secure key storage or key ops: autobahn-python/autobahn/wamp/interfaces.py Line 881 in 359f868
autobahn-python/autobahn/xbr/_secmod.py Line 271 in 359f868
I do have an implementation of |
Sounds interesting! |
I've got some suggestions which may be useful and can help make it more secure.
Adopting "os.urandom" or functions from the 'secrets' module may be a feasible solution.
You can increase the iteration to at least 10000 to fix it.
The text was updated successfully, but these errors were encountered: