Skip to content
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

SRP: Pure get_password_verifier function #17

Closed
est31 opened this issue Apr 7, 2019 · 5 comments
Closed

SRP: Pure get_password_verifier function #17

est31 opened this issue Apr 7, 2019 · 5 comments

Comments

@est31
Copy link
Contributor

est31 commented Apr 7, 2019

It would be awesome if the function get_password_verifier wouldn't require a client but just had a signature like fn get_password_verifier<D: Digest>(private_key: &[u8], params, &[u8]) -> Vec<u8> or something.

@est31
Copy link
Contributor Author

est31 commented Apr 7, 2019

For backwards compat, you could still keep the old function around but add a second one directly inside the root module.

@newpavlov
Copy link
Member

Hm, I guess it's indeed worth to add a standalone function get_password_verifier<D: Digest>(private_key: &[u8], group: &'a SrpGroup) -> Vec<u8>. I can add it in the next version.

On a side note: I think srp needs a certain redesign, e.g. we could pull entropy automatically, so if you have any suggestions I will be happy to hear them out!

@est31
Copy link
Contributor Author

est31 commented Apr 12, 2019

I guess it's indeed worth to add a standalone function

Thanks! I do think that a function right on the client struct is a good choice, as it is most convenient, but there should also be a "pure" one.

we could pull entropy automatically

Yeah, that would be a good idea. However, there should still be the option to provide the numbers yourself so that e.g. your unit tests could be deterministic.

As for further ideas for the redesign, one thing that I found a bit weird was the UserRecord struct. All the function needs from the struct is the verifier, and the other members of the struct aren't used anywhere in the API. Otherwise I'm okay with the API.

@warner warner changed the title Pure get_password_verifier function SRP: Pure get_password_verifier function Aug 8, 2019
@jbis9051
Copy link
Contributor

jbis9051 commented Jan 6, 2022

@tarcieri
Copy link
Member

Fixed in #79

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants