Giter VIP home page Giter VIP logo

scrypt-pbkdf's People

Contributors

juanelas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

scrypt-pbkdf's Issues

Library is actually slower than `scrypt-js` with `setImmediate` polyfill

It appears the library is actually around 25% slower than scrypt-js when the polifill for setImmediate is provided (otherwise it fallbacks to setTimeout which is slower due to being run in the tasks queue not micro tasks queue).

Input: {"P":"pleaseletmein","S":"SodiumChloride","N":65536,"r":8,"p":1,"dkLen":64}
  scrypt-pbkdf — mean time: 626ms ±1.84% (9 runs sampled)
  scrypt-js — mean time: 485ms ±3.34% (9 runs sampled)
  scryptsy — mean time: 23649ms ±267.28% (8 runs sampled)

Input: {"P":"pleaseletmein","S":"SodiumChloride","N":131072,"r":8,"p":1,"dkLen":64}
  scrypt-pbkdf — mean time: 1292ms ±4.10% (7 runs sampled)
  scrypt-js — mean time: 946ms ±2.58% (9 runs sampled)
  scryptsy — mean time: 10943ms ±186.85% (6 runs sampled)

Input: {"P":"pleaseletmein","S":"SodiumChloride","N":262144,"r":8,"p":1,"dkLen":64}
  scrypt-pbkdf — mean time: 2529ms ±1.60% (6 runs sampled)
  scrypt-js — mean time: 1888ms ±1.64% (7 runs sampled)
  scryptsy — mean time: 5179ms ±0.14% (5 runs sampled)

Faster chromium version

Hi! this gist (another implementationt of scrypt also based on Web Crypto) seems to be REALLY noticeably faster when running in chromium derived versions (tried on Google Chrome and Iron Browser).

Also tried in Firefox but it doesn't work due to this bug (yet more info here) . Happily it can be easily fixed using this lib also by juanelas. Once applied the fix, the speed is much similar to scrypt-pbkdf but still slighty faster.

Haven't tried with other browsers and I do not know whether the implementation is correct or not. I am not the developer of the gist and frankly the math behind cryptographic algorithms I don't think is my thing so I can't say.
But I think it's worth it to @juanelas to take a look.

Hope it helps! (And thanks for your work!)

Feature requests

Similar to scrypt js, progress callback support and non-blocking behavior, perhaps via webworker.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.