Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
proposal: x/crypto/scrypt: make API match x/crypto/bcrypt #16971
Summary: The x/crypto/scrypt package has a very simple API that puts the onus of figuring out salt generation and sensible N/r/p values on the package user. We should attempt to mirror the bcrypt packages' API and provide sensible defaults.
Note that I've done most of this work in https://godoc.org/github.com/elithrar/simple-scrypt and would seek to bring most of this in.
I just added some better documentation here, so hopefully this is better now.
I'd feel uncomfortable publishing this without having some sort of standard present on the scrypt website. You could ask Colin Percival if he is interested in it.
This would be reasonable but we'd need to figure out what the hash input should be.
The API for bcrypt takes a
Thanks for taking a look at this @kevinburke (I'd forgotten myself)
Noted. I pinged Colin on Twitter, and as there isn't a specified output format (there isn't in the paper), have asked if there's any intent to specify. Unlikely, but doesn't hurt to ask.
The other two points are somewhat held up on a standard format. The alternative would be to return a struct of the params for the caller to then stringify as needed.
PS: I did note the improved params "for 2017" CL the other day, which is a good start.