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

Can't decrypt MCF formatted hashes #45

Open
scottgonzalez opened this issue Feb 29, 2016 · 2 comments
Open

Can't decrypt MCF formatted hashes #45

scottgonzalez opened this issue Feb 29, 2016 · 2 comments

Comments

@scottgonzalez
Copy link

Note: I don't know much about SCrypt, so I may be describing this wrong.

I have password hashes that were generated by a different project that I need to use inside a new Rails project. The hashes start with "$s0$" which seems to mean that they use version 0 of the format with 128-bit salt and 256-bit derived key. When I pass these hashes to SCrypt::Password.new, I get an invalid hash error. Is there some other method I should be using or is this format not supported?

Here's an example hash that was generated from the string "password":
$s0$e0801$1bEUOnAzdsDd2fWCL1yKN4UCHHzV70fi5EHc6Fmk610=$Yp4N+9UaJ3hG7KoOk+1yUf9+rieAASVzuEifeqW7z44=

@scottgonzalez scottgonzalez changed the title Can't decrypt version 0 hashes Can't decrypt MCF formatted hashes Mar 8, 2016
@scottgonzalez
Copy link
Author

This is apparently the MCF format.

@stakach
Copy link
Collaborator

stakach commented Mar 8, 2016

At this point the format is not supported.

I'd be open to accepting a pull request for support of these strings. A helper method like SCrypt::Password.mcf(user.password)

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

2 participants