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

Migrating away from this gem #86

Open
toby-babu opened this issue Dec 1, 2022 · 0 comments
Open

Migrating away from this gem #86

toby-babu opened this issue Dec 1, 2022 · 0 comments

Comments

@toby-babu
Copy link

Hi,

We have an app that has used Scrypt for a long time. We are currently trying to move away from this and planning to use a 3rd party product for auth. But we have a number of customers using the hash generated by this gem. We were hoping to migrate the users to our new platform by using the same configs and parameters used to generate the password hashes. But that doesn't seem to work.
We created a new hash, figured out the values for n, r, p, salt and secret and generated the hash using

salt + '$' + scrypt(secret.to_s, salt_only, cost, key_len).unpack('H*').first.rjust(key_len * 2, '0')

This was found to be the same as the hash that was generated when we use this library.
But when we try to regenerate this same hash using some other product using the same params, we were not successful.
An example is this tool: https://www.browserling.com/tools/scrypt
Our 3rd party product and this tool got the same hash with these params and the hash was different from the one generated by this gem. Can I get some help in navigating this?

Thanks,
Toby

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

1 participant