snapserv / keepass.io

Node.js library for reading and writing KeePass databases
Other
161 stars 30 forks source link

Multithread support for transformations #13

Open Jellyfrog opened 10 years ago

Jellyfrog commented 10 years ago

If you have a database with a high number of transformations rounds it really benefits from multithread support.

KeePass uses multithreading to compute the transformations (the master key is split up to two parts of 128 bits, which is the AES block size). On dual/multi core processors, the computation can be twice as fast as on a single core processor. http://keepass.info/help/base/security.html

ppmathis commented 10 years ago

Thanks for your suggestion, @Jellyfrog, although I'm not sure if it would make that much sense. I can't implement multithreading in the Node.js method and the native key transformation method is really fast. Do your databases have so many roudns that this would actually matter?

I could implement pthreads for sure within the library, but then it would be no longer compatible to Windows and would require more dependencies than it already does.

Jellyfrog commented 10 years ago

It is needed! Official Keepass client have an option to use the amount of rounds it can generate in 1 second. With a fast CPU, thats a lot of rounds!

For example my Macbook got 14869504 rounds, that takes 4.2-ish seconds for keepass.io to generate. And a friend got 50 million rounds on his CPU