Thursday, January 28, 2010

Assignment 2: Question 2: Cryptography

Project 11-1: Installing hash generators and comparing hashes


This project works with different hash generators. The main aim is to download and use different hash generators and compare there values.

Step: 1 Open up a web browser and type in "md5deep.sourceforge.net" in the address bar and press enter. This will take u to a webpage that looks like this-



Step: 2 Click to download "md5deep"

Step: 3 Now, click on windows binary and download the latest version of the program.

Step: 4 Go to the folder where you've downloaded these files and right click on it and select "extract all". You'll need winrar/winzip installed in your computer for this purpose. If you don't have one already search winzip or winrar in google and download any one of them.

Step: 5 Now where you've extracted all the files go to that folder. Create a microsoft word document that this content- "Now is the time for all good men to come to the aid of their country." The document should look like this-



Step: 6 Now save the document as "Country1.docx" in the same directory that contains the extracted files and then close the document.




Step: 7 Now go to start>run>cmd>press "Enter". This will open up command prompt.

Step: 8 Nevigate to the location of the downloaded folder. to nevigate type in "cd c:\md5deep". you will see that you've succesfully nevigated to that folder. please be careful, as you may have to type in different address instead of "c:\md5deep" if you've extracted those file in a different location.

Step: 9 Enter "MD5DEEP Country1.docx" to start the appliocation.

In my case, I found this one wasn't working. after going through the directory with "dir" command, I came to understand that the file name need extensions aswell. So, I used this command instead- "md5deep.exe Country1.docx.rtf". This worked fine for me.

The application successfully started and produced an md5 hash of country1.docx. Which is shown in the picture below-



The length of this hash is 128 bit. (wikipedia,n.d.).

Step: 10 Now enter "MD5DEEP MD5DEEP.TXT" to start the application and create md5 hash of the accompanying document called "md5deep.txt".

Again, I found this was wrong and used this command instead- "md5deep.exe md5deep.txt". It generated a different hash for this document which looked like this-



The length of this hash is 128 bit. (wikipedia,n.d.).
When you compare the two different hash that has been generated by the md5 hash generator, the "Country1.docx" and the "md5deep.txt" has the same length, which is obvious but the genrated hash was different.
md5 is a strong hash generator, with 128 bits, which means it is very hard to crack, although not impossible. "MD5 rainbow table", which is easily accessible online by anyone, can be used to reverse codemany md5 hashes into strings.

Step: 11 Now, go back and open 'Country1.docx"

Step: 12 Remove the period (.) at the end of the sentence. the document should now look like this, with no period at the end-


Save the document as "Country2.docx" in the same folder.

Step: 13 Now in the command prompt enter "MD5DEEP Country2.docx" so that the application starts and creates hash code for that document.

Again, I found this was wrong and used this command instead- "md5deep.exe Country2.docx.rtf". It generated a different hash for this document which looked like this-


We can see, from those generated hashes that, by only removing a period, the hash that is generated is new and completely different from the other one (Country1.docx). This again shows, how strong the MD5 hash is.

Step: 14 Now lets return to the command promp and perform the same comparison of "Country1.docx" and "Country 2.docx" by using "sha1deep.exe" (Sha-1), "sha256deep.exe" (sha-256) and "whirlpooldeep.exe" (Whirlpool). The results as given below as pictures.












The length of the hashes are as below-
Sha1deep is 160 bit long for both the documents.
Sha256deep is 256 bit long for both the documents.
Whirlpooldeep is 512 bit long for both the documents.

The differences in between these hash algorithms can be told from their lengths. The more longer bits a hash algorithms use, the stronger it is, as it is more hard to crack the algorithm. So, according to that, Whirlpool is the strongest, then comes Sha256, after that sha1 and finally the weakest amongst these are MD5 algorithm.


Step: 15 Exit from the command prompt.





Case Project 11.1 Uses of hashes


Besides ATM's and passwords hashes have many other uses. 3 examples are given below with a short description of each-

In Database: Hashes are used in database for easy grouping. SQL(Structured Querry Language), a very well known querry language uses hash-based techniques for its grouping and aggregtion system. (freepatentsonline, n.d.).

In producing a hash or checksum for data: Using a specified algorithm, hash functions can be used to produce a hash or checksum of data. The value returned, which is a small size type, usually counter- is fairly unique to the given data. The hash value is used to compare large data fields: if the hash values are the same, it means the data values are identical. Thus, hash replaces a large number of very long stringwith much faster counters. (thunderstone.com, n.d.).

In Cisco Routers: Cisco uses MD5 hash algorithm in its router which includes, release description, filesize, BSD checksum, router checksum, etc. While, routing data, cisco routers checks the hash value of the dat to make routing decision. (Cisco, n.d.).

I can use, hash algorithms to store all my passwords in a document. This document can be used if i forget any of my password, but at the same time is quite secured as i have used hash technology to convert the data, so without the key no one can access it.





References:
1. http://en.wikipedia.org/wiki/MD5

2. http://forums.whirlpool.net.au/forum-replies-archive.cfm/1050625.html

3. http://en.wikipedia.org/wiki/SHA_hash_functions

4. http://en.wikipedia.org/wiki/Whirlpool_(cryptography)

5. http://www.freepatentsonline.com/5511190.html

6. http://www.thunderstone.com/site/vortexman/hash.html

7. https://www.cisco.com/en/US/docs/ios/fundamentals/configuration/guide/cf_md5_ps6350_TSD_Products_Configuration_Guide_Chapter.html#wp1054101

No comments:

Post a Comment