-
Notifications
You must be signed in to change notification settings - Fork 45
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
Calculation of B #13
Comments
Possibly. Are you asking because you're trying to root-cause a problem? Tom On Mon, Mar 21, 2016 at 12:05 AM, Doug Johnston notifications@github.com
|
I'm trying to interop with another SRP implementation, which wasn't working, and debugging. Specifically, I was seeing different key lengths for A and B. This doesn't happen with the default ng of 2048, but using 4096 as an example: salt, vkey = srp.create_salted_verification_key('testuser', 'testpassword', ng_type=srp.NG_4096)
usr = srp.User('testuser', 'testpassword', ng_type=srp.NG_4096)
uname, A = usr.start_authentication()
svr = srp.Verifier(uname, salt, vkey, A, ng_type=srp.NG_4096)
s, B = svr.get_challenge() which yields a key length of 512 for |
Okay, that makes sense. pysrp & csrp were not originally designed to Tom On Mon, Mar 21, 2016 at 11:22 AM, Doug Johnston notifications@github.com
|
I've now gotten things to work with the other SRP implementation using the rfc5054_compat branch. It does appear as if that line is now using a mod_add call, amongst a couple hashing changes. I would highly encourage merging that with master, as the branch has several bugs and missing features. There was some hesitation in #11 to make it the default for backwards compatibility reasons, but I think looking at the long-term view of this module, using RFC5054 is the right thing to do. Besides, I doubt too many people have been waiting with baited breath since the last pypi release for a point release. :) Now that I've become intimately familiar with the code, I may have a feature or two to add, including variable salt length, separating the private key generation and adding in other standard Ng options; all of which I needed to implement to use this module with the scheme I'm implementing against. In the meantime, I would also suggest adding a note to the readthedocs page indicating that it's not RFC5054, as that point is not clear currently. Thanks for the work. |
Thanks Doug. I agree with you on every point. The only reason I haven't That said, I'd be very interested in any changes you'd like to contribute Tom On Mon, Mar 21, 2016 at 10:11 PM, Doug Johnston notifications@github.com
|
It seems there is a difference between the python and C implementation of how B is calculated, notably that in the C version:
the modulo differs from the python version:
Should that be
BN_mod_add()
instead?The text was updated successfully, but these errors were encountered: