This little timer calculates how long it would take to brute
force an encrypted text to find out what it says, by going
through every possible character combination in a key. It will
go through a key length of 20 characters and a possible 80
different characters.
It is cyclying through every possible combination of letters,
even though you may not see it on the display. The display only
updates every second to prevent the browser from running out of
memory. Also I have it running as fast as it can without the
browser crashing.
If this code was programmed into some other language instead of
Javascript it could probably run faster. However, I think this
timer gives a pretty good estimate of how long it would take
because a full brute force attack program would also have to apply
the key to the encrypted text which would take time and the
program would have to check the text against a dictionary to see
if it found the correct key. Considering all that, I don't think
a real brute force attack would be faster then the times here.
My computer is a Pentium 4 running at 2.6Ghz with 512MB RAM.
On my computer the timer estimated that to brute force a key that
is a length of 1 character would take 0 seconds, 3 characters
would take 36 seconds, 4 characters would take 3600 seconds(1 hour). According to my calculations, to crack a key that is 5 characters
in length the program would have to go through that 1 hour of time
80 different times, for the 80 different characters. So it would
take about 80 hours to crack a 5 character key. If I am
incorrect in these calculations please let me know. Here is my
estimates of time for my computer to crack keys of different lengths:
|