note 49276 deleted from function.md5 by mazzanet
| From: | mazzanet@php.net | Date: | Mon, 03 Oct 2005 09:36:31 +0000 |
| Subject: | note 49276 deleted from function.md5 by mazzanet | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-96264@lists.php.net to get a copy of this message | ||
Note Submitter: scott at rocketpack dot net
----
Just some numbers to toy with...
In terms of numbers - while many may be shying away from MD5 on the grounds of security issues - md5
is still pretty impressive (not to say that other methods are less impressive).
Looking at it from a standpoint of combinations, md5 has 32^16 (32 digits and 16 possible values per
digit) combinations, which is (worked out):
1,208,925,819,614,629,174,706,176
(over 1.2 septillion in the U.S.)
Now, consider that each string is 32 bytes long, with 32^16 combinations; that means to store every
possible combination of md5 (just the hash, and not the corresponding hashed value) would require...
38,685,626,227,668,133,590,597,632 bytes, or...
37,778,931,862,957,161,709,568 kilobytes, or...
36,893,488,147,419,103,232 megabytes, or...
36,028,797,018,963,968 gigabytes, or...
35,184,372,088,832 terabytes.
As of right now, the worlds largest drive is Hitachi's 500Gb drive, which has a formatted
capacity of about 465Gb. So, you would need about...
77,377,282,188,379 of the worlds largest consumer, desktop hard drives to store such a massive
collection (remember, this only includes the actual hashes themselves, and not any other markup
which would be necessary if calculating the values stored in a database or other format; doing that
would likely require at least an additional 10%-20% of storage space).
This is what made md5 so popular in the first place, and what makes hashing so popular still.
(Imagine the time required for a scan of a 35+ trillion TB database, or the seek time of a 77+
trillion HDD array, not to menition the unimaginable power draw...)
The only problem is that when it comes down to actual data input, brute force can reduce any
sophisticated encryption or hashing method to the same level as any other methods. This is why flood
control is so important =).