replace blake2 with blake3. I think node being a wrapper around openSSL makes it slow. 481,000ops/s vs 1,970,000ops/s decrease token length and hash length to 128bits(argon2 waiting for pr to land: https://github.com/ranisalt/node-argon2/pull/266) https://security.stackexchange.com/questions/102157/do-you-need-more-than-128-bit-entropy "128 bits of entropy are enough. if you generate a 256-bit AES key from a 128-bit seed and a strong PRNG, then you do not really have a 256-bit key." https://crypto.stackexchange.com/a/29618 "if you had random binary tokens, a token longer than [hash function digest length]bits would be useless." hex encode instead of base64 there exists a timing attack via dictionary reduction on hash prefix discovery therefore, not applicable to lobomj. password hashes are salted(if the salt is known, so is the hash) and tokens are of sufficient entropy to make brute force/dictionary infeasible. https://github.com/codahale/bcrypt-ruby/pull/43#issuecomment-15797932 https://github.com/aj-code/TimingIntrusionTool5000/blob/master/TimingAttackPresentation2012.pdf slide 21 https://crypto.stackexchange.com/questions/25607 https://security.stackexchange.com/questions/9192 https://crypto.stackexchange.com/questions/40433 "If "honey7dew" is replaced by something with high entropy (hopeless to guess), there demonstrably is no attack enabled by timing of the comparison: if there was one, it would break the first preimage resistance of the hash."

Created by  boogerlad  on July 30, 2020
RAN5QU4U2OVNLDGZVVTJNCXDN5GNAVPXGKHADZO2ML3Y5KLU4QPQC
Change contents