node-scrypt
node-scrypt copied to clipboard
Since this is deprecated, what is the recommended equivalent of scrypt.params?
scrypt.params is important because it allows you to choose an appropriate timeout for key stretching. Choosing a constant value for N would mean that your password storage would become easier and easier to crack over time. Since this is now recommending using node.js's crypto.script function instead, what is the recommended equivalent for scrypt.params to generate an N based on a maximum key stretching time?
You can see the algorithm in the source code. It shouldn't be too hard to convert this to Javascript.
However, it looks like this has already been done over in scrypt-kdf. See the pickParameters function.
https://github.com/barrysteyn/node-scrypt/pull/200