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

scrypt results are not deterministic across different installation methods #55

Open
wrboyce opened this issue May 16, 2016 · 0 comments

Comments

@wrboyce
Copy link

wrboyce commented May 16, 2016

I switched from including this repo as a submodule and including browser/triplesec.js to using browserify in my project and things stopped working.

Upon further investigation it seems the output of to_utf8 differs across both installations, despite both claiming to be v3.0.15

> var git, npm;
> triplesec.scrypt({
            key: triplesec.WordArray.from_utf8('password'),
            salt: triplesec.WordArray.from_utf8('salt'),
            dkLen: 1024}, (k) => git=k);
> triplesec_npm.scrypt({
            key: triplesec_npm.WordArray.from_utf8('password'),
            salt: triplesec_npm.WordArray.from_utf8('salt'),
            dkLen: 1024}, (k) => npm=k);
> git.to_hex() == npm.to_hex()
true
> git.to_utf8() == npm.to_utf8()
false
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