Use OpenSSL (downloadable from http://www.openssl.org/) to compute the message d
ID: 3830229 • Letter: U
Question
Use OpenSSL (downloadable from http://www.openssl.org/) to compute the message digest MD5 for a file called MD5_INPUT containing the string "<password>||<assignment_ID>||<student_number>", where you replace the <student_number> with your login name, the <assignment_ID> with “a1” and the <password> with a random 8 character string. The symbol "||" in the above expression stands for concatenation using a one "space" separator. The result will tag comments in a general listing.
From http://www.openssl.org/docs/apps/openssl.html study the input options and parameters of the openssl command ("openssl.exe" in windows, often available under specialized tools such as "md5sum.exe") and submit the needed openssl commandline used (into a file called "CMD"), as well as the output of the command (a hexadecimal string) into a file called MD5_OUTPUT". Upload the three mentioned files.
Explanation / Answer
Hi,
To calculate the MD5 digest of a text file containg the text (as you mentioned), we will use openssl utility available as open source to download from the web.
Once propery installed :
1) open command prompt
2) type "openssl dgst -md5 C:MD5_INPUT"
It will create a MD5 message digest.
I tried with the contents of MD5_INPUT as "12345678 || a1 || nikhil"
In above string, the password is "12345678", the assignment_id is "a1" and the student_number is "nikhil".
The message digest in hex form on my machine is :
MD5(C:MD5_INPUT)= 60df059ada88fba601a0bd722097c774
Probably, for more information about what "openssl" command does, type "openssl -h"
Coming to the next part of your answer,saving the hex into the CMD file :
there are options available in the "dgst" command. For example, to save the digest into the output file named CMD , type this
openssl dgst -out CMD -md5 C:MD5_INPUT
The above command will save the output in the CMD file.
Thanks
Nikhil Jain
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.