LinusU / secure-remote-password

A modern SRP implementation for Node.js and Web Browsers
102 stars 22 forks source link

x should be `H(s, p)`,not `H(s, H(I | ':' | p))` #27

Closed islishude closed 4 years ago

islishude commented 4 years ago

implementation

https://github.com/LinusU/secure-remote-password/blob/c12dfdf6a2b9442d03f87592206c7c7bb320a503/client.js#L24-L25

and the spec design

x = H(s, p) (s is chosen randomly)

LinusU commented 4 years ago

An implementation could choose to use x = H(s | I | p) without affecting any steps required of the host. The standard RFC2945 defines x = H(s | H ( I | ":" | p) ). Use of I within x avoids a malicious server from being able to learn if two users share the same password.

ref:


Do you have a requirement to use just p?

islishude commented 4 years ago

I get it now,thanks for your reply.