May 27, 2011

MD5, SHA1 checksum with Example to check the hash value for Integrity

What is hashing, everyone talks about hashing, data integrity etc.

let me explain with an example.

Download some file source or executable with md5 and sha1, for example purpose we used OpenSSL
Downloaded openssl-1.0.0d.tar.gz, MD5 and SHA1


Now we will compute md5 and sha1 from our side and verify, whether downloaded file is not modified by any other user.

Download FCIV(File Checksum Integrity Verifier) in windows. In Linux, use md5sum, sha1sum to check the integrity of the file.

I have tried the following commands in Windows

// Computing md5 of the file
E:\> fciv.exe -add openssl-1.0.0d.tar.gz
40b6ea380cc8a5bf9734c2f8bf7e701e openssl-1.0.0d.tar.gz

// Comparing with the downloaded md5 file
E:\> type openssl-1.0.0d.tar.gz.md5
40b6ea380cc8a5bf9734c2f8bf7e701e

// Computing sha1 of the file
E:\> fciv.exe -add openssl-1.0.0d.tar.gz -sha1
32ca934f380a547061ddab7221b1a34e4e07e8d5 openssl-1.0.0d.tar.gz


// Comparing with the downloaded sha1 file
E:\> type openssl-1.0.0d.tar.gz.sha1
32ca934f380a547061ddab7221b1a34e4e07e8d5

Now, we can say that, file integrity was maintained.

Please send the feedback to psrdotcom@gmail.com

No comments:

Featured Post

Java Introdcution

Please send your review and feedback to psrdotcom@gmail.com