<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.cas.mcmaster.ca/skins/common/feed.css?207"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.cas.mcmaster.ca/index.php?feed=atom&amp;target=Yuw7&amp;title=Special%3AContributions</id>
		<title>Computing and Software Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.cas.mcmaster.ca/index.php?feed=atom&amp;target=Yuw7&amp;title=Special%3AContributions"/>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/Special:Contributions/Yuw7"/>
		<updated>2026-04-08T20:28:43Z</updated>
		<subtitle>From Computing and Software Wiki</subtitle>
		<generator>MediaWiki 1.15.1</generator>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T03:26:11Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes, assuming that the clear-text associated with the hashed key is insgnificant.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Explanation''': In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 7 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Cost''': With a terabyte of memory costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5,200 in order to store the rainbow table.  With 52 terabytes of information stored, it would still take a decent amount of time to search through each entry.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Conclusion''': We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slower than MD5, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding more items to the menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  From the earlier example, it allowed each letter to have 62 different possibilities.  If we were to allow a user to enter three more character, say ~, ! and @, we can calculate that for 7 letter words, there are 4,902,227,890,625 possibilities.  Comparing this to the our example, we can see that by allowing an addition 3 symbols, it increases the variations by 500 billion different possibilities.&lt;br /&gt;
&lt;br /&gt;
=== Frequently Changing the Order ===&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant.  This is perhaps the easiest method, however it places more responsibility on the user's end.&lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  So when a user first enters a clear-text message, the server will hash the message to make the first hashed-key, then it will hash it again and store the final key.  By doing this, the attacker must now have two rainbow tables in order to determine the original message.  The first table would be a clear-text message with associated hashed key table, while the other table would be a table of hashed-keys with its associated hashes.  A full rainbow table of hashed-keys with its associated hashes would required 16 ^ 32 entries.  This calculation was derived by knowing that a hashed-key is 32 bits in length and each bit is represented in hexadecimal (16 variations).&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
* &amp;quot;Rainbow table&amp;quot;, Wikipedia, March 28, 2009 [http://en.wikipedia.org/wiki/Rainbow_table http://en.wikipedia.org/wiki/Rainbow_table] &lt;br /&gt;
* &amp;quot;Md5&amp;quot;, Wikipedia, April 10, 2009 [http://en.wikipedia.org/wiki/Md5 http://en.wikipedia.org/wiki/Rainbow_table]&lt;br /&gt;
* &amp;quot;NIST hash function competition&amp;quot;, Wikipedia, April 10, 2009 [http://en.wikipedia.org/wiki/SHA-3 http://en.wikipedia.org/wiki/SHA-3]&lt;br /&gt;
* Atwood, &amp;quot;Rainbow Hash Cracking&amp;quot;, Coding Horror [http://www.codinghorror.com/blog/archives/000949.html Rainbow Hash Cracking]&lt;br /&gt;
* Kuliukas, &amp;quot;How Rainbow Tables work&amp;quot; [http://kestas.kuliukas.com/RainbowTables/ http://kestas.kuliukas.com/RainbowTables/]&lt;br /&gt;
* Ptacek, &amp;quot;Enough With The Rainbow Tables: What You Need To Know About Secure Password Schemes&amp;quot;, Matasano Chargen [http://www.matasano.com/log/958/enough-with-the-rainbow-tables-what-you-need-to-know-about-secure-password-schemes/ http://www.matasano.com/log/958/enough-with-the-rainbow-tables-what-you-need-to-know-about-secure-password-schemes/]&lt;br /&gt;
* Davis, &amp;quot;Password Cracking and Time-Memory Trade Off&amp;quot;, NewOrder March 13, 2005 [http://neworder.box.sk/newsread.php?newsid=13362 http://neworder.box.sk/newsread.php?newsid=13362]&lt;br /&gt;
* &amp;quot;Dangers of MD5, Common Passwords&amp;quot;, System Techs, November 10, 2009 [http://neworder.box.sk/newsread.php?newsid=13362 http://neworder.box.sk/newsread.php?newsid=13362] &lt;br /&gt;
* Keane, &amp;quot;Building an MD5 Rainbow Table&amp;quot;, Lamp Security February 24, 2009 [http://www.lampsecurity.org/node/17 http://www.lampsecurity.org/node/17]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Information_security_awareness Information Security Awareness]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Cryptography_in_Information_Security Cryptography in Information Security]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Public_Key_Authentication Public Key Authentication]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Bots_%26_Botnets Bots &amp;amp; Botnets]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Blowfish Blowfish]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Conventional_Encryption_Algorithms Conventional Encryption Algorithms]&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
* [http://www.ethicalhacker.net/content/view/94/24/ The Ethical Hacker Network - Tutorial: Rainbow Tables and Rainbow Crack]&lt;br /&gt;
* [http://project-rainbowcrack.com/ RainbowCrack (program) - Crack Hashes with Rainbow Tables]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 23:26, 12 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T03:25:44Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes, assuming that the clear-text associated with the hashed key is insgnificant.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Explanation''': In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 7 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Cost''': With a terabyte of memory costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5,200 in order to store the rainbow table.  With 52 terabytes of information stored, it would still take a decent amount of time to search through each entry.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Conclusion''': We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slower than MD5, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding more items to the menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  From the earlier example, it allowed each letter to have 62 different possibilities.  If we were to allow a user to enter three more character, say ~, ! and @, we can calculate that for 7 letter words, there are 4,902,227,890,625 possibilities.  Comparing this to the our example, we can see that by allowing an addition 3 symbols, it increases the variations by 500 billion different possibilities.&lt;br /&gt;
&lt;br /&gt;
=== Frequently Changing the Order ===&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant.  This is perhaps the easiest method, however it places more responsibility on the user's end.&lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  So when a user first enters a clear-text message, the server will hash the message to make the first hashed-key, then it will hash it again and store the final key.  By doing this, the attacker must now have two rainbow tables in order to determine the original message.  The first table would be a clear-text message with associated hashed key table, while the other table would be a table of hashed-keys with its associated hashes.  A full rainbow table of hashed-keys with its associated hashes would required 16 ^ 32 entries.  This calculation was derived by knowing that a hashed-key is 32 bits in length and each bit is represented in hexadecimal (16 variations).&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
* &amp;quot;Rainbow table&amp;quot;, Wikipedia, March 28, 2009 [http://en.wikipedia.org/wiki/Rainbow_table http://en.wikipedia.org/wiki/Rainbow_table] &lt;br /&gt;
* &amp;quot;Md5&amp;quot;, Wikipedia, April 10, 2009 [http://en.wikipedia.org/wiki/Md5 http://en.wikipedia.org/wiki/Rainbow_table]&lt;br /&gt;
* &amp;quot;NIST hash function competition&amp;quot;, Wikipedia, April 10, 2009 [http://en.wikipedia.org/wiki/SHA-3 http://en.wikipedia.org/wiki/SHA-3]&lt;br /&gt;
* Atwood, &amp;quot;Rainbow Hash Cracking&amp;quot;, Coding Horror [http://www.codinghorror.com/blog/archives/000949.html Rainbow Hash Cracking]&lt;br /&gt;
* Kuliukas, &amp;quot;How Rainbow Tables work&amp;quot; [http://kestas.kuliukas.com/RainbowTables/ http://kestas.kuliukas.com/RainbowTables/]&lt;br /&gt;
* Ptacek, &amp;quot;Enough With The Rainbow Tables: What You Need To Know About Secure Password Schemes&amp;quot;, Matasano Chargen [http://www.matasano.com/log/958/enough-with-the-rainbow-tables-what-you-need-to-know-about-secure-password-schemes/ http://www.matasano.com/log/958/enough-with-the-rainbow-tables-what-you-need-to-know-about-secure-password-schemes/]&lt;br /&gt;
* Davis, &amp;quot;Password Cracking and Time-Memory Trade Off&amp;quot;, NewOrder March 13, 2005 [http://neworder.box.sk/newsread.php?newsid=13362 http://neworder.box.sk/newsread.php?newsid=13362]&lt;br /&gt;
* &amp;quot;Dangers of MD5, Common Passwords&amp;quot;, System Techs, November 10, 2009 [http://neworder.box.sk/newsread.php?newsid=13362 http://neworder.box.sk/newsread.php?newsid=13362] &lt;br /&gt;
* Keane, &amp;quot;Building an MD5 Rainbow Table&amp;quot;, Lamp Security February 24, 2009 [http://www.lampsecurity.org/node/17 http://www.lampsecurity.org/node/17]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Information_security_awareness Information Security Awareness]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Cryptography_in_Information_Security Cryptography in Information Security]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Public_Key_Authentication Public Key Authentication]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Bots_%26_Botnets Bots &amp;amp; Botnets]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Blowfish Blowfish]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Conventional_Encryption_Algorithms Conventional Encryption Algorithms]&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
* [http://www.ethicalhacker.net/content/view/94/24/ The Ethical Hacker Network - Tutorial: Rainbow Tables and Rainbow Crack]&lt;br /&gt;
* [http://project-rainbowcrack.com/ RainbowCrack (program) - Crack Hashes with Rainbow Tables]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 22:38, 12 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T02:38:26Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes, assuming that the clear-text associated with the hashed key is insgnificant.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Explanation''': In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 7 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Cost''': With a terabyte of memory costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5,200 in order to store the rainbow table.  With 52 terabytes of information stored, it would still take a decent amount of time to search through each entry.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Conclusion''': We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slower than MD5, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding more items to the menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  From the earlier example, it allowed each letter to have 62 different possibilities.  If we were to allow a user to enter three more character, say ~, ! and @, we can calculate that for 7 letter words, there are 4,902,227,890,625 possibilities.  Comparing this to the our example, we can see that by allowing an addition 3 symbols, it increases the variations by 500 billion different possibilities.&lt;br /&gt;
&lt;br /&gt;
=== Frequently Changing the Order ===&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant.  This is perhaps the easiest method, however it places more responsibility on the user's end.&lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  So when a user first enters a clear-text message, the server will hash the message to make the first hashed-key, then it will hash it again and store the final key.  By doing this, the attacker must now have two rainbow tables in order to determine the original message.  The first table would be a clear-text message with associated hashed key table, while the other table would be a table of hashed-keys with its associated hashes.  A full rainbow table of hashed-keys with its associated hashes would required 16 ^ 32 entries.  This calculation was derived by knowing that a hashed-key is 32 bits in length and each bit is represented in hexadecimal (16 variations).&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
* &amp;quot;Rainbow table&amp;quot;, Wikipedia, March 28, 2009 [http://en.wikipedia.org/wiki/Rainbow_table http://en.wikipedia.org/wiki/Rainbow_table] &lt;br /&gt;
* &amp;quot;Md5, Wikipedia, Wikipedia, April 10, 2009 [http://en.wikipedia.org/wiki/Md5 http://en.wikipedia.org/wiki/Rainbow_table]&lt;br /&gt;
* Atwood, &amp;quot;Rainbow Hash Cracking&amp;quot;, Coding Horror [http://www.codinghorror.com/blog/archives/000949.html Rainbow Hash Cracking]&lt;br /&gt;
* Kuliukas, &amp;quot;How Rainbow Tables work&amp;quot; [http://kestas.kuliukas.com/RainbowTables/ http://kestas.kuliukas.com/RainbowTables/]&lt;br /&gt;
* Ptacek, &amp;quot;Enough With The Rainbow Tables: What You Need To Know About Secure Password Schemes&amp;quot;, Matasano Chargen [http://www.matasano.com/log/958/enough-with-the-rainbow-tables-what-you-need-to-know-about-secure-password-schemes/ http://www.matasano.com/log/958/enough-with-the-rainbow-tables-what-you-need-to-know-about-secure-password-schemes/]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Information_security_awareness Information Security Awareness]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Cryptography_in_Information_Security Cryptography in Information Security]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Public_Key_Authentication Public Key Authentication]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Bots_%26_Botnets Bots &amp;amp; Botnets]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Blowfish Blowfish]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Conventional_Encryption_Algorithms Conventional Encryption Algorithms]&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
* [http://www.ethicalhacker.net/content/view/94/24/ The Ethical Hacker Network - Tutorial: Rainbow Tables and Rainbow Crack]&lt;br /&gt;
* [http://project-rainbowcrack.com/ RainbowCrack (program) - Crack Hashes with Rainbow Tables]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 22:38, 12 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T02:35:57Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes, assuming that the clear-text associated with the hashed key is insgnificant.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Explanation''': In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 7 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Cost''': With a terabyte of memory costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5,200 in order to store the rainbow table.  With 52 terabytes of information stored, it would still take a decent amount of time to search through each entry.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Conclusion''': We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slower than MD5, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding more items to the menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  From the earlier example, it allowed each letter to have 62 different possibilities.  If we were to allow a user to enter three more character, say ~, ! and @, we can calculate that for 7 letter words, there are 4,902,227,890,625 possibilities.  Comparing this to the our example, we can see that by allowing an addition 3 symbols, it increases the variations by 500 billion different possibilities.&lt;br /&gt;
&lt;br /&gt;
=== Frequently Changing the Order ===&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant.  This is perhaps the easiest method, however it places more responsibility on the user's end.&lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  So when a user first enters a clear-text message, the server will hash the message to make the first hashed-key, then it will hash it again and store the final key.  By doing this, the attacker must now have two rainbow tables in order to determine the original message.  The first table would be a clear-text message with associated hashed key table, while the other table would be a table of hashed-keys with its associated hashes.  A full rainbow table of hashed-keys with its associated hashes would required 16 ^ 32 entries.  This calculation was derived by knowing that a hashed-key is 32 bits in length and each bit is represented in hexadecimal (16 variations).&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
* &amp;quot;Rainbow table&amp;quot;, Wikipedia, March 28, 2009 [http://en.wikipedia.org/wiki/Rainbow_table http://en.wikipedia.org/wiki/Rainbow_table] &lt;br /&gt;
* &amp;quot;Md5, Wikipedia, Wikipedia, April 10, 2009 [http://en.wikipedia.org/wiki/Md5 http://en.wikipedia.org/wiki/Rainbow_table]&lt;br /&gt;
* Atwood, &amp;quot;Rainbow Hash Cracking&amp;quot;, Coding Horror [http://www.codinghorror.com/blog/archives/000949.html Rainbow Hash Cracking]&lt;br /&gt;
* Kuliukas, &amp;quot;How Rainbow Tables work&amp;quot; [http://kestas.kuliukas.com/RainbowTables/ http://kestas.kuliukas.com/RainbowTables/]&lt;br /&gt;
* Ptacek, &amp;quot;Enough With The Rainbow Tables: What You Need To Know About Secure Password Schemes&amp;quot;, Matasano Chargen [http://www.matasano.com/log/958/enough-with-the-rainbow-tables-what-you-need-to-know-about-secure-password-schemes/ http://www.matasano.com/log/958/enough-with-the-rainbow-tables-what-you-need-to-know-about-secure-password-schemes/]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Information_security_awareness Information Security Awareness]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Cryptography_in_Information_Security Cryptography in Information Security]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Public_Key_Authentication Public Key Authentication]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Bots_%26_Botnets Bots &amp;amp; Botnets]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Blowfish Blowfish]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Conventional_Encryption_Algorithms Conventional Encryption Algorithms]&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
* [http://www.ethicalhacker.net/content/view/94/24/ The Ethical Hacker Network - Tutorial: Rainbow Tables and Rainbow Crack]&lt;br /&gt;
* [http://project-rainbowcrack.com/ RainbowCrack (program) - Crack Hashes with Rainbow Tables]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 22:30, 12 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T02:30:51Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes, assuming that the clear-text associated with the hashed key is insgnificant.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Explanation''': In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 7 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Cost''': With a terabyte of memory costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5,200 in order to store the rainbow table.  With 52 terabytes of information stored, it would still take a decent amount of time to search through each entry.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Conclusion''': We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slower than MD5, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding more items to the menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  From the earlier example, it allowed each letter to have 62 different possibilities.  If we were to allow a user to enter three more character, say ~, ! and @, we can calculate that for 7 letter words, there are 4,902,227,890,625 possibilities.  Comparing this to the our example, we can see that by allowing an addition 3 symbols, it increases the variations by 500 billion different possibilities.&lt;br /&gt;
&lt;br /&gt;
=== Frequently Changing the Order ===&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant.  This is perhaps the easiest method, however it places more responsibility on the user's end.&lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  So when a user first enters a clear-text message, the server will hash the message to make the first hashed-key, then it will hash it again and store the final key.  By doing this, the attacker must now have two rainbow tables in order to determine the original message.  The first table would be a clear-text message with associated hashed key table, while the other table would be a table of hashed-keys with its associated hashes.  A full rainbow table of hashed-keys with its associated hashes would required 16 ^ 32 entries.  This calculation was derived by knowing that a hashed-key is 32 bits in length and each bit is represented in hexadecimal (16 variations).&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
* &amp;quot;Rainbow table&amp;quot;, Wikipedia, March 28, 2009 [http://en.wikipedia.org/wiki/Rainbow_table http://en.wikipedia.org/wiki/Rainbow_table] &lt;br /&gt;
* &amp;quot;Md5, Wikipedia, Wikipedia, April 10, 2009 [http://en.wikipedia.org/wiki/Md5 http://en.wikipedia.org/wiki/Rainbow_table]&lt;br /&gt;
* Atwood, &amp;quot;Rainbow Hash Cracking&amp;quot;, Coding Horror [http://www.codinghorror.com/blog/archives/000949.html Rainbow Hash Cracking]&lt;br /&gt;
* Kuliukas, &amp;quot;How Rainbow Tables work&amp;quot; [http://kestas.kuliukas.com/RainbowTables/ http://kestas.kuliukas.com/RainbowTables/]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Information_security_awareness Information Security Awareness]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Cryptography_in_Information_Security Cryptography in Information Security]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Public_Key_Authentication Public Key Authentication]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Bots_%26_Botnets Bots &amp;amp; Botnets]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Blowfish Blowfish]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Conventional_Encryption_Algorithms Conventional Encryption Algorithms]&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
* [http://www.ethicalhacker.net/content/view/94/24/ The Ethical Hacker Network - Tutorial: Rainbow Tables and Rainbow Crack]&lt;br /&gt;
* [http://project-rainbowcrack.com/ RainbowCrack (program) - Crack Hashes with Rainbow Tables]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 22:30, 12 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T02:30:36Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes, assuming that the clear-text associated with the hashed key is insgnificant.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Explanation''': In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 7 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Cost''': With a terabyte of memory costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5,200 in order to store the rainbow table.  With 52 terabytes of information stored, it would still take a decent amount of time to search through each entry.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Conclusion''': We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slower than MD5, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding more items to the menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  From the earlier example, it allowed each letter to have 62 different possibilities.  If we were to allow a user to enter three more character, say ~, ! and @, we can calculate that for 7 letter words, there are 4,902,227,890,625 possibilities.  Comparing this to the our example, we can see that by allowing an addition 3 symbols, it increases the variations by 500 billion different possibilities.&lt;br /&gt;
&lt;br /&gt;
=== Frequently Changing the Order ===&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant.  This is perhaps the easiest method, however it places more responsibility on the user's end.&lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  So when a user first enters a clear-text message, the server will hash the message to make the first hashed-key, then it will hash it again and store the final key.  By doing this, the attacker must now have two rainbow tables in order to determine the original message.  The first table would be a clear-text message with associated hashed key table, while the other table would be a table of hashed-keys with its associated hashes.  A full rainbow table of hashed-keys with its associated hashes would required 16 ^ 32 entries.  This calculation was derived by knowing that a hashed-key is 32 bits in length and each bit is represented in hexadecimal (16 variations).&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
* &amp;quot;Rainbow table&amp;quot;, Wikipedia, March 28, 2009 [http://en.wikipedia.org/wiki/Rainbow_table http://en.wikipedia.org/wiki/Rainbow_table] &lt;br /&gt;
* &amp;quot;Md5, Wikipedia, Wikipedia, April 10, 2009 [http://en.wikipedia.org/wiki/Md5 http://en.wikipedia.org/wiki/Rainbow_table]&lt;br /&gt;
* Atwood, &amp;quot;Rainbow Hash Cracking&amp;quot;, Coding Horror [http://www.codinghorror.com/blog/archives/000949.html Rainbow Hash Cracking]&lt;br /&gt;
* Kuliukas, &amp;quot;How Rainbow Tables work&amp;quot; [http://kestas.kuliukas.com/RainbowTables/ http://kestas.kuliukas.com/RainbowTables/]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Information_security_awareness Information Security Awareness]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Cryptography_in_Information_Security Cryptography in Information Security]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Public_Key_Authentication Public Key Authentication]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Bots_%26_Botnets Bots &amp;amp; Botnets]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Blowfish Blowfish]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Conventional_Encryption_Algorithms Conventional Encryption Algorithms]&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
* [http://www.ethicalhacker.net/content/view/94/24/ The Ethical Hacker Network - Tutorial: Rainbow Tables and Rainbow Crack]&lt;br /&gt;
* [http://project-rainbowcrack.com/ RainbowCrack (program) - Crack Hashes with Rainbow Tables]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 22:30, 12 April 2009 (EDT)--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T02:28:41Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes, assuming that the clear-text associated with the hashed key is insgnificant.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Explanation''': In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 7 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Cost''': With a terabyte of memory costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5,200 in order to store the rainbow table.  With 52 terabytes of information stored, it would still take a decent amount of time to search through each entry.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Conclusion''': We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slower than MD5, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding more items to the menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  From the earlier example, it allowed each letter to have 62 different possibilities.  If we were to allow a user to enter three more character, say ~, ! and @, we can calculate that for 7 letter words, there are 4,902,227,890,625 possibilities.  Comparing this to the our example, we can see that by allowing an addition 3 symbols, it increases the variations by 500 billion different possibilities.&lt;br /&gt;
&lt;br /&gt;
=== Frequently Changing the Order ===&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant.  This is perhaps the easiest method, however it places more responsibility on the user's end.&lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  So when a user first enters a clear-text message, the server will hash the message to make the first hashed-key, then it will hash it again and store the final key.  By doing this, the attacker must now have two rainbow tables in order to determine the original message.  The first table would be a clear-text message with associated hashed key table, while the other table would be a table of hashed-keys with its associated hashes.  A full rainbow table of hashed-keys with its associated hashes would required 16 ^ 32 entries.  This calculation was derived by knowing that a hashed-key is 32 bits in length and each bit is represented in hexadecimal (16 variations).&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
* &amp;quot;Rainbow table&amp;quot;, Wikipedia, March 28, 2009 [http://en.wikipedia.org/wiki/Rainbow_table http://en.wikipedia.org/wiki/Rainbow_table] &lt;br /&gt;
* &amp;quot;Md5, Wikipedia, Wikipedia, April 10, 2009 [http://en.wikipedia.org/wiki/Md5 http://en.wikipedia.org/wiki/Rainbow_table]&lt;br /&gt;
* Atwood, &amp;quot;Rainbow Hash Cracking&amp;quot;, Coding Horror [http://www.codinghorror.com/blog/archives/000949.html Rainbow Hash Cracking]&lt;br /&gt;
* Kuliukas, &amp;quot;How Rainbow Tables work&amp;quot; [http://kestas.kuliukas.com/RainbowTables/ http://kestas.kuliukas.com/RainbowTables/]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Information_security_awareness Information Security Awareness]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Cryptography_in_Information_Security Cryptography in Information Security]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Public_Key_Authentication Public Key Authentication]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Bots_%26_Botnets Bots &amp;amp; Botnets]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Blowfish Blowfish]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Conventional_Encryption_Algorithms Conventional Encryption Algorithms]&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
* [http://www.ethicalhacker.net/content/view/94/24/ The Ethical Hacker Network - Tutorial: Rainbow Tables and Rainbow Crack]&lt;br /&gt;
* [http://project-rainbowcrack.com/ RainbowCrack (program) - Crack Hashes with Rainbow Tables]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T02:25:36Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* '''Links''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes, assuming that the clear-text associated with the hashed key is insgnificant.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Explanation''': In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 7 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Cost''': With a terabyte of memory costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5,200 in order to store the rainbow table.  With 52 terabytes of information stored, it would still take a decent amount of time to search through each entry.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Conclusion''': We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slower than MD5, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding more items to the menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  From the earlier example, it allowed each letter to have 62 different possibilities.  If we were to allow a user to enter three more character, say ~, ! and @, we can calculate that for 7 letter words, there are 4,902,227,890,625 possibilities.  Comparing this to the our example, we can see that by allowing an addition 3 symbols, it increases the variations by 500 billion different possibilities.&lt;br /&gt;
&lt;br /&gt;
=== Frequently Changing the Order ===&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant.  This is perhaps the easiest method, however it places more responsibility on the user's end.&lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  So when a user first enters a clear-text message, the server will hash the message to make the first hashed-key, then it will hash it again and store the final key.  By doing this, the attacker must now have two rainbow tables in order to determine the original message.  The first table would be a clear-text message with associated hashed key table, while the other table would be a table of hashed-keys with its associated hashes.  A full rainbow table of hashed-keys with its associated hashes would required 16 ^ 32 entries.  This calculation was derived by knowing that a hashed-key is 32 bits in length and each bit is represented in hexadecimal (16 variations).&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
* &amp;quot;Rainbow table&amp;quot;, Wikipedia, March 28, 2009 [http://en.wikipedia.org/wiki/Rainbow_table http://en.wikipedia.org/wiki/Rainbow_table] &lt;br /&gt;
* &amp;quot;Md5, Wikipedia, Wikipedia, April 10, 2009 [http://en.wikipedia.org/wiki/Md5 http://en.wikipedia.org/wiki/Rainbow_table]&lt;br /&gt;
* [http://www.codinghorror.com/blog/archives/000949.html Rainbow Hash Cracking]&lt;br /&gt;
* [http://kestas.kuliukas.com/RainbowTables/ How Rainbow Tables work]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Information_security_awareness Information Security Awareness]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Cryptography_in_Information_Security Cryptography in Information Security]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Public_Key_Authentication Public Key Authentication]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Bots_%26_Botnets Bots &amp;amp; Botnets]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Blowfish Blowfish]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Conventional_Encryption_Algorithms Conventional Encryption Algorithms]&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
* [http://www.ethicalhacker.net/content/view/94/24/ The Ethical Hacker Network - Tutorial: Rainbow Tables and Rainbow Crack]&lt;br /&gt;
* [http://project-rainbowcrack.com/ RainbowCrack (program) - Crack Hashes with Rainbow Tables]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T02:24:09Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* '''Links''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes, assuming that the clear-text associated with the hashed key is insgnificant.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Explanation''': In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 7 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Cost''': With a terabyte of memory costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5,200 in order to store the rainbow table.  With 52 terabytes of information stored, it would still take a decent amount of time to search through each entry.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Conclusion''': We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slower than MD5, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding more items to the menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  From the earlier example, it allowed each letter to have 62 different possibilities.  If we were to allow a user to enter three more character, say ~, ! and @, we can calculate that for 7 letter words, there are 4,902,227,890,625 possibilities.  Comparing this to the our example, we can see that by allowing an addition 3 symbols, it increases the variations by 500 billion different possibilities.&lt;br /&gt;
&lt;br /&gt;
=== Frequently Changing the Order ===&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant.  This is perhaps the easiest method, however it places more responsibility on the user's end.&lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  So when a user first enters a clear-text message, the server will hash the message to make the first hashed-key, then it will hash it again and store the final key.  By doing this, the attacker must now have two rainbow tables in order to determine the original message.  The first table would be a clear-text message with associated hashed key table, while the other table would be a table of hashed-keys with its associated hashes.  A full rainbow table of hashed-keys with its associated hashes would required 16 ^ 32 entries.  This calculation was derived by knowing that a hashed-key is 32 bits in length and each bit is represented in hexadecimal (16 variations).&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
* &amp;quot;Rainbow table&amp;quot;, Wikipedia, March 28, 2009 [http://en.wikipedia.org/wiki/Rainbow_table http://en.wikipedia.org/wiki/Rainbow_table] &lt;br /&gt;
* [http://en.wikipedia.org/wiki/Md5 Md5]&lt;br /&gt;
* [http://www.codinghorror.com/blog/archives/000949.html Rainbow Hash Cracking]&lt;br /&gt;
* [http://kestas.kuliukas.com/RainbowTables/ How Rainbow Tables work]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Information_security_awareness Information Security Awareness]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Cryptography_in_Information_Security Cryptography in Information Security]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Public_Key_Authentication Public Key Authentication]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Bots_%26_Botnets Bots &amp;amp; Botnets]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Blowfish Blowfish]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Conventional_Encryption_Algorithms Conventional Encryption Algorithms]&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
* [http://www.ethicalhacker.net/content/view/94/24/ The Ethical Hacker Network - Tutorial: Rainbow Tables and Rainbow Crack]&lt;br /&gt;
* [http://project-rainbowcrack.com/ RainbowCrack (program) - Crack Hashes with Rainbow Tables]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T01:16:40Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* See Also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes, assuming that the clear-text associated with the hashed key is insgnificant.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Explanation''': In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 7 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Cost''': With a terabyte of memory costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5,200 in order to store the rainbow table.  With 52 terabytes of information stored, it would still take a decent amount of time to search through each entry.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Conclusion''': We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slower than MD5, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding more items to the menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  From the earlier example, it allowed each letter to have 62 different possibilities.  If we were to allow a user to enter three more character, say ~, ! and @, we can calculate that for 7 letter words, there are 4,902,227,890,625 possibilities.  Comparing this to the our example, we can see that by allowing an addition 3 symbols, it increases the variations by 500 billion different possibilities.&lt;br /&gt;
&lt;br /&gt;
=== Frequently Changing the Order ===&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant.  This is perhaps the easiest method, however it places more responsibility on the user's end.&lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  So when a user first enters a clear-text message, the server will hash the message to make the first hashed-key, then it will hash it again and store the final key.  By doing this, the attacker must now have two rainbow tables in order to determine the original message.  The first table would be a clear-text message with associated hashed key table, while the other table would be a table of hashed-keys with its associated hashes.  A full rainbow table of hashed-keys with its associated hashes would required 16 ^ 32 entries.  This calculation was derived by knowing that a hashed-key is 32 bits in length and each bit is represented in hexadecimal (16 variations).&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Rainbow_table Rainbow table] &lt;br /&gt;
* [http://en.wikipedia.org/wiki/Md5 Md5]&lt;br /&gt;
* [http://www.codinghorror.com/blog/archives/000949.html Rainbow Hash Cracking]&lt;br /&gt;
* [http://kestas.kuliukas.com/RainbowTables/ How Rainbow Tables work]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Information_security_awareness Information Security Awareness]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Cryptography_in_Information_Security Cryptography in Information Security]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Public_Key_Authentication Public Key Authentication]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Bots_%26_Botnets Bots &amp;amp; Botnets]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Blowfish Blowfish]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Conventional_Encryption_Algorithms Conventional Encryption Algorithms]&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
* [http://www.ethicalhacker.net/content/view/94/24/ The Ethical Hacker Network - Tutorial: Rainbow Tables and Rainbow Crack]&lt;br /&gt;
* [http://project-rainbowcrack.com/ RainbowCrack (program) - Crack Hashes with Rainbow Tables]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T01:13:40Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* '''Links''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes, assuming that the clear-text associated with the hashed key is insgnificant.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Explanation''': In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 7 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Cost''': With a terabyte of memory costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5,200 in order to store the rainbow table.  With 52 terabytes of information stored, it would still take a decent amount of time to search through each entry.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Conclusion''': We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slower than MD5, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding more items to the menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  From the earlier example, it allowed each letter to have 62 different possibilities.  If we were to allow a user to enter three more character, say ~, ! and @, we can calculate that for 7 letter words, there are 4,902,227,890,625 possibilities.  Comparing this to the our example, we can see that by allowing an addition 3 symbols, it increases the variations by 500 billion different possibilities.&lt;br /&gt;
&lt;br /&gt;
=== Frequently Changing the Order ===&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant.  This is perhaps the easiest method, however it places more responsibility on the user's end.&lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  So when a user first enters a clear-text message, the server will hash the message to make the first hashed-key, then it will hash it again and store the final key.  By doing this, the attacker must now have two rainbow tables in order to determine the original message.  The first table would be a clear-text message with associated hashed key table, while the other table would be a table of hashed-keys with its associated hashes.  A full rainbow table of hashed-keys with its associated hashes would required 16 ^ 32 entries.  This calculation was derived by knowing that a hashed-key is 32 bits in length and each bit is represented in hexadecimal (16 variations).&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Rainbow_table Rainbow table] &lt;br /&gt;
* [http://en.wikipedia.org/wiki/Md5 Md5]&lt;br /&gt;
* [http://www.codinghorror.com/blog/archives/000949.html Rainbow Hash Cracking]&lt;br /&gt;
* [http://kestas.kuliukas.com/RainbowTables/ How Rainbow Tables work]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Information_security_awareness Information Security Awareness]&lt;br /&gt;
* [http://www.cas.mcmaster.ca/wiki/index.php/Cryptography_in_Information_Security Cryptography in Information Security]&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
* [http://www.ethicalhacker.net/content/view/94/24/ The Ethical Hacker Network - Tutorial: Rainbow Tables and Rainbow Crack]&lt;br /&gt;
* [http://project-rainbowcrack.com/ RainbowCrack (program) - Crack Hashes with Rainbow Tables]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T01:06:40Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* External Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes, assuming that the clear-text associated with the hashed key is insgnificant.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Explanation''': In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 7 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Cost''': With a terabyte of memory costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5,200 in order to store the rainbow table.  With 52 terabytes of information stored, it would still take a decent amount of time to search through each entry.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Conclusion''': We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slower than MD5, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding more items to the menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  From the earlier example, it allowed each letter to have 62 different possibilities.  If we were to allow a user to enter three more character, say ~, ! and @, we can calculate that for 7 letter words, there are 4,902,227,890,625 possibilities.  Comparing this to the our example, we can see that by allowing an addition 3 symbols, it increases the variations by 500 billion different possibilities.&lt;br /&gt;
&lt;br /&gt;
=== Frequently Changing the Order ===&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant.  This is perhaps the easiest method, however it places more responsibility on the user's end.&lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  So when a user first enters a clear-text message, the server will hash the message to make the first hashed-key, then it will hash it again and store the final key.  By doing this, the attacker must now have two rainbow tables in order to determine the original message.  The first table would be a clear-text message with associated hashed key table, while the other table would be a table of hashed-keys with its associated hashes.  A full rainbow table of hashed-keys with its associated hashes would required 16 ^ 32 entries.  This calculation was derived by knowing that a hashed-key is 32 bits in length and each bit is represented in hexadecimal (16 variations).&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Rainbow_table Rainbow table] &lt;br /&gt;
* [http://en.wikipedia.org/wiki/Md5 Md5]&lt;br /&gt;
* [http://www.codinghorror.com/blog/archives/000949.html Rainbow Hash Cracking]&lt;br /&gt;
* [http://kestas.kuliukas.com/RainbowTables/ How Rainbow Tables work]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
* [http://www.ethicalhacker.net/content/view/94/24/ The Ethical Hacker Network - Tutorial: Rainbow Tables and Rainbow Crack]&lt;br /&gt;
* [http://project-rainbowcrack.com/ RainbowCrack (program) - Crack Hashes with Rainbow Tables]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T01:04:47Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes, assuming that the clear-text associated with the hashed key is insgnificant.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Explanation''': In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 7 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Cost''': With a terabyte of memory costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5,200 in order to store the rainbow table.  With 52 terabytes of information stored, it would still take a decent amount of time to search through each entry.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Conclusion''': We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slower than MD5, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding more items to the menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  From the earlier example, it allowed each letter to have 62 different possibilities.  If we were to allow a user to enter three more character, say ~, ! and @, we can calculate that for 7 letter words, there are 4,902,227,890,625 possibilities.  Comparing this to the our example, we can see that by allowing an addition 3 symbols, it increases the variations by 500 billion different possibilities.&lt;br /&gt;
&lt;br /&gt;
=== Frequently Changing the Order ===&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant.  This is perhaps the easiest method, however it places more responsibility on the user's end.&lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  So when a user first enters a clear-text message, the server will hash the message to make the first hashed-key, then it will hash it again and store the final key.  By doing this, the attacker must now have two rainbow tables in order to determine the original message.  The first table would be a clear-text message with associated hashed key table, while the other table would be a table of hashed-keys with its associated hashes.  A full rainbow table of hashed-keys with its associated hashes would required 16 ^ 32 entries.  This calculation was derived by knowing that a hashed-key is 32 bits in length and each bit is represented in hexadecimal (16 variations).&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Rainbow_table Rainbow table] &lt;br /&gt;
* [http://en.wikipedia.org/wiki/Md5 Md5]&lt;br /&gt;
* [http://www.codinghorror.com/blog/archives/000949.html Rainbow Hash Cracking]&lt;br /&gt;
* [http://kestas.kuliukas.com/RainbowTables/ How Rainbow Tables work]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T01:01:18Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* '''Links''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes, assuming that the clear-text associated with the hashed key is insgnificant.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Explanation''': In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 7 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Cost''': With a terabyte of memory costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5,200 in order to store the rainbow table.  With 52 terabytes of information stored, it would still take a decent amount of time to search through each entry.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Conclusion''': We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slower than MD5, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding more items to the menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  From the earlier example, it allowed each letter to have 62 different possibilities.  If we were to allow a user to enter three more character, say ~, ! and @, we can calculate that for 7 letter words, there are 4,902,227,890,625 possibilities.  Comparing this to the our example, we can see that by allowing an addition 3 symbols, it increases the variations by 500 billion different possibilities.&lt;br /&gt;
&lt;br /&gt;
=== Frequently Changing the Order ===&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant.  This is perhaps the easiest method, however it places more responsibility on the user's end.&lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  So when a user first enters a clear-text message, the server will hash the message to make the first hashed-key, then it will hash it again and store the final key.  By doing this, the attacker must now have two rainbow tables in order to determine the original message.  The first table would be a clear-text message with associated hashed key table, while the other table would be a table of hashed-keys with its associated hashes.  A full rainbow table of hashed-keys with its associated hashes would required 16 ^ 32 entries.  This calculation was derived by knowing that a hashed-key is 32 bits in length and each bit is represented in hexadecimal (16 variations).&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Rainbow_table Rainbow table] &lt;br /&gt;
* [http://en.wikipedia.org/wiki/Md5 Md5]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T00:56:35Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* Double the Serving */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes, assuming that the clear-text associated with the hashed key is insgnificant.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Explanation''': In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 7 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Cost''': With a terabyte of memory costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5,200 in order to store the rainbow table.  With 52 terabytes of information stored, it would still take a decent amount of time to search through each entry.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Conclusion''': We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slower than MD5, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding more items to the menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  From the earlier example, it allowed each letter to have 62 different possibilities.  If we were to allow a user to enter three more character, say ~, ! and @, we can calculate that for 7 letter words, there are 4,902,227,890,625 possibilities.  Comparing this to the our example, we can see that by allowing an addition 3 symbols, it increases the variations by 500 billion different possibilities.&lt;br /&gt;
&lt;br /&gt;
=== Frequently Changing the Order ===&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant.  This is perhaps the easiest method, however it places more responsibility on the user's end.&lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  So when a user first enters a clear-text message, the server will hash the message to make the first hashed-key, then it will hash it again and store the final key.  By doing this, the attacker must now have two rainbow tables in order to determine the original message.  The first table would be a clear-text message with associated hashed key table, while the other table would be a table of hashed-keys with its associated hashes.  A full rainbow table of hashed-keys with its associated hashes would required 16 ^ 32 entries.  This calculation was derived by knowing that a hashed-key is 32 bits in length and each bit is represented in hexadecimal (16 variations).&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T00:50:43Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* Frequently Changing the Order */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes, assuming that the clear-text associated with the hashed key is insgnificant.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Explanation''': In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 7 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Cost''': With a terabyte of memory costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5,200 in order to store the rainbow table.  With 52 terabytes of information stored, it would still take a decent amount of time to search through each entry.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Conclusion''': We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slower than MD5, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding more items to the menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  From the earlier example, it allowed each letter to have 62 different possibilities.  If we were to allow a user to enter three more character, say ~, ! and @, we can calculate that for 7 letter words, there are 4,902,227,890,625 possibilities.  Comparing this to the our example, we can see that by allowing an addition 3 symbols, it increases the variations by 500 billion different possibilities.&lt;br /&gt;
&lt;br /&gt;
=== Frequently Changing the Order ===&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant.  This is perhaps the easiest method, however it places more responsibility on the user's end.&lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T00:49:31Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* '''Solutions''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes, assuming that the clear-text associated with the hashed key is insgnificant.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Explanation''': In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 7 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Cost''': With a terabyte of memory costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5,200 in order to store the rainbow table.  With 52 terabytes of information stored, it would still take a decent amount of time to search through each entry.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Conclusion''': We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slower than MD5, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding more items to the menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  From the earlier example, it allowed each letter to have 62 different possibilities.  If we were to allow a user to enter three more character, say ~, ! and @, we can calculate that for 7 letter words, there are 4,902,227,890,625 possibilities.  Comparing this to the our example, we can see that by allowing an addition 3 symbols, it increases the variations by 500 billion different possibilities.&lt;br /&gt;
&lt;br /&gt;
=== Frequently Changing the Order ===&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T00:49:11Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* '''Solutions''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes, assuming that the clear-text associated with the hashed key is insgnificant.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Explanation''': In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 7 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Cost''': With a terabyte of memory costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5,200 in order to store the rainbow table.  With 52 terabytes of information stored, it would still take a decent amount of time to search through each entry.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Conclusion''': We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
== Adding salt==&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slower than MD5, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding more items to the menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  From the earlier example, it allowed each letter to have 62 different possibilities.  If we were to allow a user to enter three more character, say ~, ! and @, we can calculate that for 7 letter words, there are 4,902,227,890,625 possibilities.  Comparing this to the our example, we can see that by allowing an addition 3 symbols, it increases the variations by 500 billion different possibilities.&lt;br /&gt;
&lt;br /&gt;
=== Frequently Changing the Order ===&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T00:48:57Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* '''Solutions''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes, assuming that the clear-text associated with the hashed key is insgnificant.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Explanation''': In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 7 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Cost''': With a terabyte of memory costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5,200 in order to store the rainbow table.  With 52 terabytes of information stored, it would still take a decent amount of time to search through each entry.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Conclusion''': We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slower than MD5, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding more items to the menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  From the earlier example, it allowed each letter to have 62 different possibilities.  If we were to allow a user to enter three more character, say ~, ! and @, we can calculate that for 7 letter words, there are 4,902,227,890,625 possibilities.  Comparing this to the our example, we can see that by allowing an addition 3 symbols, it increases the variations by 500 billion different possibilities.&lt;br /&gt;
&lt;br /&gt;
=== Frequently Changing the Order ===&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T00:48:47Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* '''Solutions''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes, assuming that the clear-text associated with the hashed key is insgnificant.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Explanation''': In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 7 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Cost''': With a terabyte of memory costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5,200 in order to store the rainbow table.  With 52 terabytes of information stored, it would still take a decent amount of time to search through each entry.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Conclusion''': We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slower than MD5, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Adding more items to the menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  From the earlier example, it allowed each letter to have 62 different possibilities.  If we were to allow a user to enter three more character, say ~, ! and @, we can calculate that for 7 letter words, there are 4,902,227,890,625 possibilities.  Comparing this to the our example, we can see that by allowing an addition 3 symbols, it increases the variations by 500 billion different possibilities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Frequently Changing the Order ===&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T00:48:28Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* Frequently Changing the Order */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes, assuming that the clear-text associated with the hashed key is insgnificant.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Explanation''': In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 7 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Cost''': With a terabyte of memory costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5,200 in order to store the rainbow table.  With 52 terabytes of information stored, it would still take a decent amount of time to search through each entry.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Conclusion''': We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slower than MD5, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding more items to the menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  From the earlier example, it allowed each letter to have 62 different possibilities.  If we were to allow a user to enter three more character, say ~, ! and @, we can calculate that for 7 letter words, there are 4,902,227,890,625 possibilities.  Comparing this to the our example, we can see that by allowing an addition 3 symbols, it increases the variations by 500 billion different possibilities.&lt;br /&gt;
&lt;br /&gt;
=== Frequently Changing the Order ===&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T00:48:16Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* Adding to the Menu */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes, assuming that the clear-text associated with the hashed key is insgnificant.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Explanation''': In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 7 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Cost''': With a terabyte of memory costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5,200 in order to store the rainbow table.  With 52 terabytes of information stored, it would still take a decent amount of time to search through each entry.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Conclusion''': We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slower than MD5, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding more items to the menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  From the earlier example, it allowed each letter to have 62 different possibilities.  If we were to allow a user to enter three more character, say ~, ! and @, we can calculate that for 7 letter words, there are 4,902,227,890,625 possibilities.  Comparing this to the our example, we can see that by allowing an addition 3 symbols, it increases the variations by 500 billion different possibilities.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T00:41:41Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* Using Variety */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes, assuming that the clear-text associated with the hashed key is insgnificant.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Explanation''': In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 7 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Cost''': With a terabyte of memory costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5,200 in order to store the rainbow table.  With 52 terabytes of information stored, it would still take a decent amount of time to search through each entry.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Conclusion''': We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slower than MD5, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding to the Menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T00:40:31Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* Time-Memory Tradeoff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes, assuming that the clear-text associated with the hashed key is insgnificant.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Explanation''': In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 7 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Cost''': With a terabyte of memory costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5,200 in order to store the rainbow table.  With 52 terabytes of information stored, it would still take a decent amount of time to search through each entry.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Conclusion''': We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slow, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding to the Menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T00:40:19Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* Time-Memory Tradeoff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes, assuming that the clear-text associated with the hashed key is insgnificant.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Explanation''': In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 7 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Cost''': With a terabyte of memory costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5,200 in order to store the rainbow table.  With 52 terabytes of information stored, it would still take a decent amount of time to search through each entry.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Conclusion''': We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slow, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding to the Menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T00:38:26Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* Time-Memory Tradeoff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes, assuming that the clear-text associated with the hashed key is insgnificant.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Explanation''': In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 7 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Cost''': With a terabyte of memory costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5,200 in order to store the rainbow table.  With 52 terabytes of information stored, it would still take a decent amount of time to search through each entry.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Conclusion''': We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slow, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding to the Menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T00:37:52Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* Time-Memory Tradeoff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes, assuming that the clear-text associated with the hashed key is insgnificant.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Explanation''': In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 7 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Cost''': With a terabyte of memory costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5,200 in order to store the rainbow table.  With 52 terabytes of information stored, it would still take a decent amount of time to search through each entry.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Conclusion''': We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slow, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding to the Menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T00:32:09Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* Time-Memory Tradeoff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'Explanation': In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 8 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cost:&lt;br /&gt;
With a terabyte of space costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5200 in order to store it.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Conclusion:&lt;br /&gt;
We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slow, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding to the Menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T00:31:52Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* Time-Memory Tradeoff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Explanation: In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 8 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cost:&lt;br /&gt;
With a terabyte of space costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5200 in order to store it.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Conclusion:&lt;br /&gt;
We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slow, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding to the Menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T00:31:26Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* Time-Memory Tradeoff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Explanation: In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 8 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cost:&lt;br /&gt;
With a terabyte of space costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5200 in order to store it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Conclusion:&lt;br /&gt;
We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slow, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding to the Menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T00:30:46Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* Time-Memory Tradeoff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 384.4 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 23,832.8 millisecond = 23.83 seconds&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 24.63 minutes&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 25.45 hours&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 65.74 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 51.25 tb || 11.17 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Explanation: In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 8 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cost:&lt;br /&gt;
With a terabyte of space costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5200 in order to store it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Conclusion:&lt;br /&gt;
We can see from the table that as a rainbow table holds more variations, both the amount of room and compilation time increases exponentially.&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slow, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding to the Menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T00:23:32Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* Time-Memory Tradeoff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || 6.2 millisecond&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 61504 bytes ~ 60 kb || 38440 millisecond = 38.44 second &lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238,328|| 3.6 mb || 2,383,280 millisecond = 39.72 miuntes&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| 225.5 mb || 147,763,360 millisecond = 41.05 hours&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| 13.65 gb || 9,161,328,320 = 106 days&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| 846.39 gb || 18 years&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^7 = 35,216,114,606,208|| 846.39 gb || 18 years&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Explanation: In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 0.1 millisecond = 6.2 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 0.1 millisecond = 384.4 millisecond&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 8 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cost:&lt;br /&gt;
With a terabyte of space costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5200 in order to store it.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slow, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding to the Menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T00:04:19Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* Time-Memory Tradeoff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || 992 bytes || ###&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || 6154 bytes ~ 60 kb || ###&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 23,8328|| ### || ###&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| ### || ###&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| ### || ###&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| ### || ###&lt;br /&gt;
|-&lt;br /&gt;
| 7 || 62^7 = 3,521,614,606,208|| ### || ###&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 62^8 = 218,340,105,584,896|| ### || ###&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Explanation: In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 10 millisecond = 620 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 10 millisecond = 38440 millisecond = 38.44 seconds&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 8 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cost:&lt;br /&gt;
With a terabyte of space costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5200 in order to store it.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slow, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding to the Menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-13T00:02:46Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* Time-Memory Tradeoff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || ### || ###&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3,844 || ### || ###&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 23,8328|| ### || ###&lt;br /&gt;
|-&lt;br /&gt;
| 4 || 62^4 = 14,776,336|| ### || ###&lt;br /&gt;
|-&lt;br /&gt;
| 5 || 62^5 = 916,132,832|| ### || ###&lt;br /&gt;
|-&lt;br /&gt;
| 6 || 62^6 = 56,800,235,584|| ### || ###&lt;br /&gt;
|-&lt;br /&gt;
| 7 || 62^7 = 3,521,614,606,208|| ### || ###&lt;br /&gt;
|-&lt;br /&gt;
| 8 || 62^8 = 218,340,105,584,896|| ### || ###&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Explanation: In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 10 millisecond = 620 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 10 millisecond = 38440 millisecond = 38.44 seconds&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 8 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cost:&lt;br /&gt;
With a terabyte of space costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5200 in order to store it.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slow, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding to the Menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-12T23:57:49Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* Time-Memory Tradeoff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3844 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238328|| ###&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Explanation: In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 10 millisecond = 620 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 10 millisecond = 38440 millisecond = 38.44 seconds&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 8 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cost:&lt;br /&gt;
With a terabyte of space costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5200 in order to store it.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.  With a better processor, each hash would take less time to calculate, thus reducing table compilation time.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slow, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding to the Menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-12T23:56:07Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* Time-Memory Tradeoff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions*:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9) = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3844 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238328|| ###&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Explanation: In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 10 millisecond = 620 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 10 millisecond = 38440 millisecond = 38.44 seconds&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 8 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cost:&lt;br /&gt;
With a terabyte of space costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5200 in order to store it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slow, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding to the Menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-12T23:54:28Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* Time-Memory Tradeoff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9)* = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3844 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238328|| ###&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Explanation: In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes and a compile time of 62 x 10 millisecond = 620 millisecond. &amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes and a compile time of 3844 x 10 millisecond = 38440 millisecond = 38.44 seconds&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 8 characters, we get the last entry in the table.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cost:&lt;br /&gt;
With a terabyte of space costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5200 in order to store it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slow, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding to the Menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-12T23:48:53Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* Time-Memory Tradeoff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&amp;lt;br&amp;gt;&lt;br /&gt;
Assumptions:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9)* = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 6 characters, we get 908803769344 bytes = 846.39 Gigabytes&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3844 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238328|| ###&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With a terabyte of space costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5200 in order to store it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slow, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding to the Menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-12T23:48:33Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* Time-Memory Tradeoff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&lt;br /&gt;
Assumptions:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Each hash takes 10 milliseconds to compute.&lt;br /&gt;
&amp;lt;li&amp;gt; One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9)* = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 6 characters, we get 908803769344 bytes = 846.39 Gigabytes&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3844 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238328|| ###&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With a terabyte of space costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5200 in order to store it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slow, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding to the Menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-12T23:45:26Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* Time-Memory Tradeoff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&lt;br /&gt;
&lt;br /&gt;
One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes&amp;lt;br&amp;gt;&lt;br /&gt;
One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9)* = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 6 characters, we get 908803769344 bytes = 846.39 Gigabytes&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|'''Time required to compile table'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3844 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238328|| ###&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With a terabyte of space costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5200 in order to store it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slow, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding to the Menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-12T23:41:06Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* '''Solutions''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&lt;br /&gt;
&lt;br /&gt;
One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes&amp;lt;br&amp;gt;&lt;br /&gt;
One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9)* = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 6 characters, we get 908803769344 bytes = 846.39 Gigabytes&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3844 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238328|| ###&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With a terabyte of space costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5200 in order to store it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slow, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
=== Adding to the Menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-12T23:38:23Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&lt;br /&gt;
&lt;br /&gt;
One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes&amp;lt;br&amp;gt;&lt;br /&gt;
One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9)* = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 6 characters, we get 908803769344 bytes = 846.39 Gigabytes&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3844 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238328|| ###&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With a terabyte of space costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5200 in order to store it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slow, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Adding to the Menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-12T23:37:41Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* How it works */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  MD5 hashing algorithm is particularly fast to calculate, normally in the order of milliseconds.  However, when there are billions and billions of variations, the milliseconds quickly accumulate to days and months.  So, by computing a large number of variations once and storing these values into a table, a user can just tell a computer to find a match for a particular hash key which eliminates the need to calculate any hashes.  The only problem the user faces now is the amount of room required to store all this information.  The principle of sacrificing memory for less computing time is called time-memory tradeoff, which will be explained in the later sections.  If the hashed key is not found in the rainbow table, it means message rainbow table did not contain clear text message.  This will force the attacker to either build a bigger rainbow table, brute-force it or give up.&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&lt;br /&gt;
&lt;br /&gt;
One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes&amp;lt;br&amp;gt;&lt;br /&gt;
One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9)* = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 6 characters, we get 908803769344 bytes = 846.39 Gigabytes&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3844 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238328|| ###&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With a terabyte of space costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5200 in order to store it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slow, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Adding to the Menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-12T23:13:35Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* How it works */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to [http://en.wikipedia.org/wiki/Brute_force_attack brute-force attack] the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  When brute-force is used, a non-matching hash that was calculated would just be discarded, forcing the user to recalculate the discarded hash again the next time they stumble upon a new hash key.&lt;br /&gt;
&lt;br /&gt;
Since the MD5 algorithm is just one single function that transforms a password to an encrypted hashed key after passing an algorithm, one can make a complete table of all the different combination.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The main key to using rainbow tables instead of cracking on the fly is that rainbow tables offer a time-memory tradeoff.  Cracking on the fly may take a very long time with a much lower percentage of success.  However, by having all the combination that are possible in a table, one can just compare the stolen hashed key to find a match in the table and they will have discovered the original password.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&lt;br /&gt;
&lt;br /&gt;
One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes&amp;lt;br&amp;gt;&lt;br /&gt;
One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9)* = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 6 characters, we get 908803769344 bytes = 846.39 Gigabytes&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3844 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238328|| ###&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With a terabyte of space costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5200 in order to store it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slow, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Adding to the Menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-12T23:10:19Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* How it works */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they can try to retrieve the corresponding clear text message by getting a computer to brute-force attack the hashed key.  However, for a message length of 7 characters, this may take hundreds of days; at which time, the message may no longer be relevant.  When brute-force is used, a non-matching hash that was calculated would just be discarded, forcing the user to recalculate the discarded hash again the next time they stumble upon a new hash key.&lt;br /&gt;
&lt;br /&gt;
Since the MD5 algorithm is just one single function that transforms a password to an encrypted hashed key after passing an algorithm, one can make a complete table of all the different combination.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The main key to using rainbow tables instead of cracking on the fly is that rainbow tables offer a time-memory tradeoff.  Cracking on the fly may take a very long time with a much lower percentage of success.  However, by having all the combination that are possible in a table, one can just compare the stolen hashed key to find a match in the table and they will have discovered the original password.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&lt;br /&gt;
&lt;br /&gt;
One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes&amp;lt;br&amp;gt;&lt;br /&gt;
One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9)* = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 6 characters, we get 908803769344 bytes = 846.39 Gigabytes&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3844 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238328|| ###&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With a terabyte of space costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5200 in order to store it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slow, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Adding to the Menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-12T23:01:14Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* What are Rainbow Tables? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This is known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they try and retrieve the corresponding clear text message by getting a computer to brute-force attack the hashed key.  However, this can get very time consuming&lt;br /&gt;
&lt;br /&gt;
Since the MD5 algorithm is just one single function that transforms a password to an encrypted hashed key after passing an algorithm, one can make a complete table of all the different combination.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The main key to using rainbow tables instead of cracking on the fly is that rainbow tables offer a time-memory tradeoff.  Cracking on the fly may take a very long time with a much lower percentage of success.  However, by having all the combination that are possible in a table, one can just compare the stolen hashed key to find a match in the table and they will have discovered the original password.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&lt;br /&gt;
&lt;br /&gt;
One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes&amp;lt;br&amp;gt;&lt;br /&gt;
One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9)* = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 6 characters, we get 908803769344 bytes = 846.39 Gigabytes&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3844 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238328|| ###&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With a terabyte of space costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5200 in order to store it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slow, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Adding to the Menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-12T22:58:19Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* What is MD5? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
Message-Digest 5 (MD5) hashing is an algorithm which converts a message into a 128-bit encrypted key, often called a hashed key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they try and retrieve the corresponding clear text message by getting a computer to brute-force attack the hashed key.  However, this can get very time consuming&lt;br /&gt;
&lt;br /&gt;
Since the MD5 algorithm is just one single function that transforms a password to an encrypted hashed key after passing an algorithm, one can make a complete table of all the different combination.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The main key to using rainbow tables instead of cracking on the fly is that rainbow tables offer a time-memory tradeoff.  Cracking on the fly may take a very long time with a much lower percentage of success.  However, by having all the combination that are possible in a table, one can just compare the stolen hashed key to find a match in the table and they will have discovered the original password.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&lt;br /&gt;
&lt;br /&gt;
One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes&amp;lt;br&amp;gt;&lt;br /&gt;
One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9)* = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 6 characters, we get 908803769344 bytes = 846.39 Gigabytes&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3844 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238328|| ###&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With a terabyte of space costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5200 in order to store it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slow, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Adding to the Menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-12T03:59:10Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* '''Solutions''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
MD5 hashing is an algorithm which converts a password into an encrypted key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they try and retrieve the corresponding clear text message by getting a computer to brute-force attack the hashed key.  However, this can get very time consuming&lt;br /&gt;
&lt;br /&gt;
Since the MD5 algorithm is just one single function that transforms a password to an encrypted hashed key after passing an algorithm, one can make a complete table of all the different combination.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The main key to using rainbow tables instead of cracking on the fly is that rainbow tables offer a time-memory tradeoff.  Cracking on the fly may take a very long time with a much lower percentage of success.  However, by having all the combination that are possible in a table, one can just compare the stolen hashed key to find a match in the table and they will have discovered the original password.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&lt;br /&gt;
&lt;br /&gt;
One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes&amp;lt;br&amp;gt;&lt;br /&gt;
One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9)* = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 6 characters, we get 908803769344 bytes = 846.39 Gigabytes&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3844 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238328|| ###&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With a terabyte of space costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5200 in order to store it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
&lt;br /&gt;
=== Adding salt===&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Using Variety ===&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slow, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Adding to the Menu ===&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Double the Serving ===&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-12T03:56:49Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* '''Solutions''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
MD5 hashing is an algorithm which converts a password into an encrypted key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they try and retrieve the corresponding clear text message by getting a computer to brute-force attack the hashed key.  However, this can get very time consuming&lt;br /&gt;
&lt;br /&gt;
Since the MD5 algorithm is just one single function that transforms a password to an encrypted hashed key after passing an algorithm, one can make a complete table of all the different combination.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The main key to using rainbow tables instead of cracking on the fly is that rainbow tables offer a time-memory tradeoff.  Cracking on the fly may take a very long time with a much lower percentage of success.  However, by having all the combination that are possible in a table, one can just compare the stolen hashed key to find a match in the table and they will have discovered the original password.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&lt;br /&gt;
&lt;br /&gt;
One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes&amp;lt;br&amp;gt;&lt;br /&gt;
One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9)* = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 6 characters, we get 908803769344 bytes = 846.39 Gigabytes&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3844 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238328|| ###&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With a terabyte of space costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5200 in order to store it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
&lt;br /&gt;
== Adding salt==&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Using Variety ==&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slow, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Adding to the Menu ==&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Double the Serving ==&lt;br /&gt;
Another solution is to hash a hashed key.  By hashing a hashed key, it increases the difficulty in finding the original message by many factors.&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-12T03:35:54Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* How it works */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
MD5 hashing is an algorithm which converts a password into an encrypted key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Each time a cracker obtains a hashed key, they try and retrieve the corresponding clear text message by getting a computer to brute-force attack the hashed key.  However, this can get very time consuming&lt;br /&gt;
&lt;br /&gt;
Since the MD5 algorithm is just one single function that transforms a password to an encrypted hashed key after passing an algorithm, one can make a complete table of all the different combination.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The main key to using rainbow tables instead of cracking on the fly is that rainbow tables offer a time-memory tradeoff.  Cracking on the fly may take a very long time with a much lower percentage of success.  However, by having all the combination that are possible in a table, one can just compare the stolen hashed key to find a match in the table and they will have discovered the original password.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&lt;br /&gt;
&lt;br /&gt;
One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes&amp;lt;br&amp;gt;&lt;br /&gt;
One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9)* = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 6 characters, we get 908803769344 bytes = 846.39 Gigabytes&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3844 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238328|| ###&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With a terabyte of space costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5200 in order to store it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
&lt;br /&gt;
== Adding salt==&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Using Variety ==&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slow, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Adding to the Menu ==&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	<entry>
		<id>http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables</id>
		<title>MD5 Rainbow Tables</title>
		<link rel="alternate" type="text/html" href="http://wiki.cas.mcmaster.ca/index.php/MD5_Rainbow_Tables"/>
				<updated>2009-04-12T03:17:28Z</updated>
		
		<summary type="html">&lt;p&gt;Yuw7:&amp;#32;/* What are Rainbow Tables? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:hash_table_example.jpg|thumb|500px| An example of a hash table containing only 1 character]]&lt;br /&gt;
&lt;br /&gt;
A popular way of storing passwords for many websites, forums and other applications are through the use of MD5 hashing.  When a user registers for a subscription and enters a password, that password is more than like passed through a MD5 hash function which outputs an encrypted key.  This encrypted key is stored on a server, to keep a record of it for log in purposes.  The next time the user tries to log in, they enter a password and this password is once again passed through the MD5 hash function and generates a temporary encrypted key.  This temporary key is compared to the encrypted key that is previously stored and if they match then the server grants this user access.  If the server is compromised, the attacker will only be able to retrieve a collection of hashed keys instead of the actual password of the users.  However, through the use of MD5 rainbow tables, it allows the attacker to retrieve the original passwords as we shall see.&lt;br /&gt;
&lt;br /&gt;
== What is MD5? ==&lt;br /&gt;
MD5 hashing is an algorithm which converts a password into an encrypted key.  This hashing method works as a one way hash, meaning that original password is not retrievable from the hashed key alone.  It has been implemented by many applications because it is a standard in RFC 1321.  Recently, researchers have discovered that MD5 hashed keys were not collision proof.  This means that two different passwords, when hashed together can result in the same hashed key.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== What are Rainbow Tables? ==&lt;br /&gt;
Rainbow tables are tables which contain a hashed key and the clear text message/password associated with the hashed key.  This essentially makes a rainbow table a look up table, which allows an attacker to discover original passwords associated with a hashed key in a very short amount of time given that the rainbow table contains the hashed key.  As one can guess, the more variations of hashed keys that are stored in a rainbow table, the more memory this table will require and the more time a computer would require to compile this table.  This known as the time-memory trade off.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== How it works ==&lt;br /&gt;
Since the MD5 algorithm is just one single function that transforms a password to an encrypted hashed key after passing an algorithm, one can make a complete table of all the different combination.  The main key to using rainbow tables instead of cracking on the fly is that rainbow tables offer a time-memory tradeoff.  Cracking on the fly may take a very long time with a much lower percentage of success.  However, by having all the combination that are possible in a table, one can just compare the stolen hashed key to find a match in the table and they will have discovered the original password.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time-Memory Tradeoff ==&lt;br /&gt;
Time-memory trade off is the act of sacrificing memory in order to reduce computation time or vice-versa.  For our particular application of rainbow tables, we can demonstrate this idea by the following example:&lt;br /&gt;
&lt;br /&gt;
One MD5 Hash entry in a rainbow table = 128 bits = 16 bytes&amp;lt;br&amp;gt;&lt;br /&gt;
One character can have (26 uppercase letters) or (26 lowercase letters) or (10 numbers 0-9)* = 62 choices&amp;lt;br&amp;gt;&lt;br /&gt;
In order for a rainbow table to store all the variations of 1 character with all the combination's, it would require 16 bytes x 62 = 992 bytes.&amp;lt;br&amp;gt;&lt;br /&gt;
If we increase it to 2 characters, it would be 62 choices for the first letter and 62 choices for the second letter, giving a total of 3844 different choices.&amp;lt;br&amp;gt;&lt;br /&gt;
To store this combination, it would require 3844 * 16 bytes = 61504 bytes ~ 60 kilobytes&amp;lt;br&amp;gt;&lt;br /&gt;
Continuing this trend to 6 characters, we get 908803769344 bytes = 846.39 Gigabytes&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Various Rainbow Table Sizes with Associated Number of Characters'''&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;100&amp;quot;|'''Number of Characters''' &lt;br /&gt;
|'''Total number of variations'''&lt;br /&gt;
|'''Total memory required'''&lt;br /&gt;
|-&lt;br /&gt;
| 1 || 62 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 2 || 62x62 = 3844 || ###&lt;br /&gt;
|-&lt;br /&gt;
| 3 || 62^3 = 238328|| ###&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With a terabyte of space costing around 100 dollars in today's market, a rainbow table with all combination's up to 6 character can easily be stored.&amp;lt;br&amp;gt;&lt;br /&gt;
However, if we increase the number of characters to just 1 more, we see that it will require 51.25 Terabytes.  Costing about $5200 in order to store it.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[*]This is a very general scenario, most online applications allow special symbols such as @,# etc and even spaces.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= '''Solutions''' =&lt;br /&gt;
&lt;br /&gt;
== Adding salt==&lt;br /&gt;
Salt, in security, is the act of appending a number of bits (random or defined) to a password to increase its length.  For every salt bit we add to the password, the number of raw brute-force attempts required increases by a factor of 2.  So say we add 32 salt-bits to a password, it increases the attempts required to find the original password to (4,294,967,296) x (length of original password).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Using Variety ==&lt;br /&gt;
Many researchers agree that MD5 hashing algorithm is full of flaws and that it is not longer secure enough.  So instead of using MD5, people can employ a different hashing algorithm such as MD6, SHA or wait for SHA-3 to be completed.  As mentioned earlier, the time required for a rainbow table depends heavily on the hashing algorithm.  So by choosing an algorithm that is slow, even a fast computer will take a long time to compile a table with a modest amount of variations.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Adding to the Menu ==&lt;br /&gt;
For every symbol that a system allows a user to use, it increases the variations in a rainbow table by a factor.  For example, if a system only allows lower-case alphabet letters as passwords and limited to 6 letters, then a rainbow table only requires 26^6 = 308,915,776 entries.  If a similar system allows the use of an extra symbol (!,@,# etc) then the calculation would be 27^6 = 387,420,489, which is an increase of nearly 80 million.  As mentioned before, most systems now use upper-case, lower-case and numbers, required passwords to be of length at least 8.  This would require:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;62^{8} \times 2.18340106 \times 10^{14}&amp;lt;math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As we can see, this number is still not much problem for a decent computer with enough space.&lt;br /&gt;
&lt;br /&gt;
== Frequently Changing the Order ==&lt;br /&gt;
By imposing a security policy which forces users to modify sensitive information, such as passwords, on a frequent basis, then there may be a chance that by the time an attacker finds a match in their rainbow table, the information that the attacker holds is no longer relevant. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
='''Links'''=&lt;br /&gt;
== References  ==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.miraclesalad.com/webtools/md5.php MD5 Hash Generator]&lt;br /&gt;
* [http://www.tmto.org/search/ Database with 160Gb Rainbow Table]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
--[[User:Yuw7|Yuw7]] 20:14, 7 April 2009 (EDT)&lt;/div&gt;</summary>
		<author><name>Yuw7</name></author>	</entry>

	</feed>