I was reading up on using bcrypt and what not, and one thing I thought about is, can you predict how long it would take for it run on a certain work level?
PHP has a function called crypt, and one of the algorithms you can use is blowfish. bcrypt uses a custom version of it, but for this test, it's good enough (I hope, if someone knows of language that uses bcrypt and runs on Windows, let me know)
Anyway, I want to see if I can find a algorithm that would allow a program to predict how long it may take to run bcrypt with a given work load, assuming we time how long it takes to run a short one.
I attached a script I used to time it. Just run it and attach the log. Near the top, you'll see this line define('MAXTIME', 30.0); which can be changed to reflect how long a crypt function call can be before the script says it's done. If you want to provide more data (maybe at the expense of losing use of a core for some minutes) up that number. As is, the script uses 4 passwords, so 30*4 for how long a work load will take (well, there is the fact that on my machine, WL at 19 took 36.5 seconds to run on each crypt() call, so remember about that)
Based on this one computer, it appears to be 2 ^ wl[1]
Latest version will always be here: https://bitbucket.org/miquelfire/random_scripts/raw/default/crypt_time.php

Here you go:
WL Pass 1 Pass 2 Pass 3 Pass 4 == ======== ======== ======== ======== 04 00.00011 00.00005 00.00003 00.00003 05 00.00002 00.00002 00.00002 00.00002 06 00.00002 00.00002 00.00002 00.00002 07 00.00002 00.00002 00.00002 00.00002 08 00.00002 00.00002 00.00002 00.00002 09 00.00002 00.00002 00.00002 00.00002 10 00.00002 00.00002 00.00002 00.00002 11 00.00002 00.00002 00.00002 00.00002 12 00.00002 00.00002 00.00002 00.00002 13 00.00002 00.00002 00.00002 00.00002 14 00.00002 00.00002 00.00002 00.00002 15 00.00002 00.00002 00.00002 00.00002 16 00.00002 00.00002 00.00002 00.00002 17 00.00002 00.00002 00.00002 00.00002 18 00.00002 00.00002 00.00002 00.00002 19 00.00002 00.00002 00.00002 00.00002 20 00.00002 00.00002 00.00002 00.00002 21 00.00002 00.00002 00.00002 00.00002 22 00.00002 00.00002 00.00002 00.00002 23 00.00002 00.00002 00.00002 00.00002 24 00.00002 00.00002 00.00002 00.00002 25 00.00002 00.00002 00.00002 00.00002 26 00.00002 00.00002 00.00002 00.00002 27 00.00002 00.00002 00.00002 00.00002 28 00.00002 00.00002 00.00002 00.00002 29 00.00002 00.00002 00.00002 00.00002 30 00.00002 00.00002 00.00002 00.00002 31 00.00002 00.00002 00.00002 00.00002 32 00.00002 00.00002 00.00002 00.00002 33 00.00002 00.00002 00.00002 00.00002 34 00.00002 00.00002 00.00002 00.00002 35 00.00002 00.00002 00.00002 00.00002 36 00.00002 00.00002 00.00002 00.00002 37 00.00002 00.00002 00.00002 00.00002 38 00.00002 00.00002 00.00002 00.00002 39 00.00002 00.00002 00.00002 00.00002 40 00.00002 00.00002 00.00002 00.00002 41 00.00002 00.00002 00.00002 00.00002 42 00.00002 00.00002 00.00002 00.00002 43 00.00002 00.00002 00.00002 00.00002 44 00.00002 00.00002 00.00002 00.00002 45 00.00002 00.00002 00.00002 00.00002 46 00.00002 00.00002 00.00002 00.00002 47 00.00002 00.00002 00.00002 00.00002 48 00.00002 00.00002 00.00002 00.00002 49 00.00002 00.00002 00.00002 00.00002 50 00.00002 00.00002 00.00002 00.00002 51 00.00002 00.00002 00.00002 00.00002 52 00.00002 00.00002 00.00002 00.00002 53 00.00002 00.00002 00.00002 00.00002 54 00.00002 00.00002 00.00002 00.00002 55 00.00002 00.00002 00.00002 00.00002 56 00.00002 00.00002 00.00002 00.00002 57 00.00002 00.00002 00.00002 00.00002 58 00.00002 00.00002 00.00002 00.00002 59 00.00002 00.00002 00.00002 00.00002 60 00.00003 00.00002 00.00002 00.00002 61 00.00002 00.00002 00.00002 00.00002 62 00.00002 00.00002 00.00002 00.00002 63 00.00002 00.00002 00.00002 00.00002 64 00.00002 00.00002 00.00002 00.00002 65 00.00002 00.00002 00.00002 00.00002 66 00.00002 00.00002 00.00002 00.00002 67 00.00002 00.00002 00.00002 00.00002 68 00.00002 00.00002 00.00002 00.00002 69 00.00002 00.00002 00.00002 00.00002 70 00.00002 00.00002 00.00002 00.00002 71 00.00002 00.00002 00.00002 00.00002 72 00.00002 00.00002 00.00002 00.00002 73 00.00002 00.00002 00.00002 00.00002 74 00.00002 00.00002 00.00002 00.00002 75 00.00002 00.00002 00.00002 00.00002 76 00.00002 00.00002 00.00002 00.00002 77 00.00002 00.00002 00.00002 00.00002 78 00.00002 00.00002 00.00002 00.00002 79 00.00002 00.00002 00.00002 00.00002 80 00.00002 00.00002 00.00002 00.00002 81 00.00002 00.00016 00.00002 00.00002 82 00.00002 00.00002 00.00002 00.00002 83 00.00002 00.00002 00.00002 00.00002 84 00.00002 00.00002 00.00002 00.00002 85 00.00002 00.00002 00.00002 00.00002 86 00.00002 00.00002 00.00002 00.00002 87 00.00002 00.00002 00.00002 00.00002 88 00.00002 00.00002 00.00002 00.00002 89 00.00002 00.00002 00.00002 00.00002 90 00.00002 00.00002 00.00002 00.00002 91 00.00002 00.00002 00.00002 00.00002 92 00.00002 00.00002 00.00002 00.00002 93 00.00002 00.00002 00.00002 00.00002 94 00.00002 00.00002 00.00002 00.00002 95 00.00002 00.00002 00.00002 00.00002 96 00.00002 00.00002 00.00002 00.00002 97 00.00002 00.00002 00.00002 00.00002 98 00.00002 00.00002 00.00002 00.00002
If your results are like Vanneto's, then you need to upgrade to PHP 5.3+
Windows users, that is a requirement. Forgot to add checks for that. (And now it's there, along with some other minor tweaks)
Jesus, MiquelFire.
Here:[1]

Since I don't know what these numbers can tell you I'm just going to trust that you aren't h4xing my box with them.
