note 57134 deleted from function.md5 by mazzanet

From: Date: Sun, 25 Sep 2005 00:19:43 +0000
Subject: note 57134 deleted from function.md5 by mazzanet
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-95729@lists.php.net to get a copy of this message
Note Submitter: evildictaitor at hotmail dot com ---- Md5 hashing is not designed for storing passwords in a secure way, nor is it designed for securing information. It was designed with the purpose of checking/validating data packages, e.g. I can send a package of 1 megabyte of data to my server, and send a 32byte string following it, which is a calculation from the package. If the calculated hash of the package does not match the 32 byte string, one or other was corrupted on route. It is actually this system that allows uploading of files via nearly every ftp program, and packet transfer via the internet. MD5 is also used for creating simplified data structures where the length is important. This is used in Mircosoft Word's dictionary, for example, where the array size would have to be large to allow for antireestablishmentarianism, or complex words (e.g. 1-2-dimethylethyl2floro3chlorobenzanol), as the memory consumption would be huge, as all words would have the same space allocation. Since the recurrance rate of the md5 algorithm is small (approx 128!/26!x2^128), we store the 32 byte hashes instead. this is more efficient. MD5 is not a secure algorithm for the internet, and was never intended to be. SSL uses SHA1 and SHA2, which is a SECURE HASHING ALGORITHM. This is intended for passwords, and is used by microsoft programs using password locking. Please note that information is LOST by rehashing on hashes (chaining), and makes them less secure, even if the hashes are different. Also note that due to the information loss, it is practically impossible to reconstruct a string from it's hash, despite the low reccurrance rate. Statistically, you are most likely to have a secure password if you use an almalgamation of a large amount of data, and then SHA1 it. This data should include the username, password, and any other unique information about the user that you know at the time of logging in. This way, you are more likely to have a secure password system, and this can be statistically proven.

« previous php.notes (#95729) next »