-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Open
Labels
NeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.Proposal-AcceptedProposal-CryptoProposal related to crypto packages or other security issuesProposal related to crypto packages or other security issues
Milestone
Description
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.
Details:
- Add a
GenerateFromPasswordfunction that generates output in the formN$r$p$salt$dk(noting that there is no 'standard' for scrypt here) - Add a
CompareHashAndPasswordfunction - Add a
Costfunction that can return the cost of a given output (i.e. for determining whether to upgrade or not) - Provide sensible default params that provide reasonable values of N, r, p and document why/when you may wish to change them.
- Potentially provide a way to automatically determine values of N, r, p given memory (MB) and time (ms) constraints.
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
NeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.Proposal-AcceptedProposal-CryptoProposal related to crypto packages or other security issuesProposal related to crypto packages or other security issues
Type
Projects
Status
Accepted