cocagne / pysrp

Python implementation of the Secure Remote Password protocol (SRP)
MIT License
113 stars 42 forks source link

Support custom k value #12

Closed mic159 closed 2 years ago

mic159 commented 8 years ago

I'm trying to use this to log into a 3rd party device that has a broken SRP implementation. They use a different k calculation... Would it be possible to add a k_hex parameter to User to bypass the standard calculation?

cocagne commented 8 years ago

Yeah, that'd definitely be possible. I didn't originally design pysrp with compatibility with other implementations in mind but there have been several requests and enhancements over time in that direction. This is the first request for k_hex I've seen though. It's should be pretty easy to implement, just a little time consuming (guess 4 hours of dev/test). It'll be a while before I can get around to this though so if you know C in addition to Python you might want to take a crack at it yourself. Assuming the code is clean, I'll merge the patch into the mainline.

Tom

On Sat, Jan 16, 2016 at 11:54 PM, Michael notifications@github.com wrote:

I'm trying to use this to log into a 3rd party device that has a broken SRP implementation. They use a different k calculation... Would it be possible to add a k_hex parameter to User to bypass the standard calculation?

— Reply to this email directly or view it on GitHub https://github.com/cocagne/pysrp/issues/12.