cdepillabout / cdepillabout/password

Function to strengthen passwords

Open
#22 2 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
Haskell
Stars
61
Forks
16
PR merge metrics
No merged PRs in 30d

Description

A nice additional functionality might be a way to create new hashes after validating a password.

This would be a modified version of `checkPassword` that returns a new hash that has new parameters. (Using Argon2 as a concrete example, the idea would be implemented for all algorithms)

```hs
Data.Argon2.checkPasswordRenew
:: Argon2Params
-> Password
-> PasswordHash Argon2
-> Maybe (PasswordHash Argon2)
checkPasswordRenew currentParams pw pwh mNewPw
```

This would have some way of indicating that the check was successful or not, and if successful it would return the new hash that can be used to overwrite the previously stored hash.

Not quite sure if we'd want to limit it to strengthening passwords, with an opt-in to be able to make passwords weaker; or just to put the responsibility on the user, since there are legitimate reasons to decrease the hashing cost programmatically.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.