cocagne / pysrp

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

Added padding to g during k calculation #31

Closed irfansehic closed 6 years ago

irfansehic commented 6 years ago

Hey! Love your implementation, helped me with a project. I noticed there is an error in the code! Namely, the calculation H(N, g) requires both N and g to be of the same length (i.e. length of N). For this reason, g must be padded. You can check this php implementation and test vectors as reference: https://gist.github.com/paresy/9d407d8a7170d510ba1c5ae3eb4d33f1 Cheers!