Question

In: Computer Science

Creating SHA-1 Hashes. Provide a screenshot for each of questions 3a – 3d. a. Create a...

Creating SHA-1 Hashes. Provide a screenshot for each of questions 3a – 3d.

a. Create a SHA-1 hash of your last name using the code on page 43 in your lab book. Put your name in all lowercase letters. Is the MD the same length as your last name? (20 points)

b. Using the up arrow, change the first character of your last name to be an uppercase letter. Changing one character in your last name changes how many characters in the MD? (20 points)

c. Create a SHA-1 hash for the following text: Itwasthebestoftimesitwastheworstoftimesitwastheageofwisdomitwastheageoffool ishnessitwastheepochofbeliefitwastheepochofincredulityitwastheseasonoflightitwasthes easonofdarknessitwasthespringofhopeitwasthewinterofdespair (20 points)

d. Compare the length of this MD with the MD of your last name. What conclusions can you draw from the MDs? (20 points)

Solutions

Expert Solution

Here is the snippet of the code that is used to create the Message Digest for the SHA-1 Hashing algortihm.

Note: Since no code is provided to calculate, the Crypto library in nodeJS is used to create the MD for the string.

//importing the crypto library
var crypto = require('crypto');

//creating hash object 
var hash = crypto.createHash('sha1');

//input string
data = hash.update('sutariya', 'utf-8');

//Creating MD in hex
generate_hash= data.digest('hex');

//Printing the output
console.log("hash : " + generate_hash);

Question-1)

  • The MD created by SHA-1 algorithm for my last name 'sutariya' in lowercase is a8d0a208f6051bbf1f96df52753035f502ecd27e.
  • The MD created is not the same length as my last name.

Ques-2 )

  • On changing the first character to uppercase the MD created is : 6b3fb6a9385b0c07e6d3ac204c850137de03409e
  • On changing only the first character all the characters in MD are changed except the last character.

Ques-3)

  • Hash created for the given string without spaces is  : 1109f966c316116c967fecbacd4bc29b2c015930.

Question-4)

  • On comparing the MD from last name and the given string we can say that the MD created is irrespective of the length of string data provided. SHA1 hashing algorithm always produces a MD of 160 bits.

Related Solutions

Use CYGWIN TERMINAL to create this script. COPY AND PASTE the screenshot. Script 1: 1.   Perform...
Use CYGWIN TERMINAL to create this script. COPY AND PASTE the screenshot. Script 1: 1.   Perform a ls -al on the files within the user's home directory and save it to a file called ls.dat within your ~ directory 2.   Save the tree information for the /home directory in a file called tree.dat within your ~directory 3.   Create a new directory in your home directory called "backups" 4.   Move the files you just created to the new directory 5.   Rename...
Describe four (4) guidelines for creating a positioning statement and provide an example for each.
Describe four (4) guidelines for creating a positioning statement and provide an example for each.
In complete sentences, provide an answer to each of the following discussion questions: 1) Barry and...
In complete sentences, provide an answer to each of the following discussion questions: 1) Barry and Sue want to have Martin replace Sue as a party to their contract using assignment. Sue wants to make sure that she is discharged from all further obligations under the contract with Barry. From Sue's perspective, what should occur to achieve Sue's discharge objective? 2) Briefly describe the difference between compensatory damage  liquidated damages. If your contract has a provision for liquidated damages, what important...
Read the "Creating a Methodology" and then answer one (1) of the questions 1. What can...
Read the "Creating a Methodology" and then answer one (1) of the questions 1. What can you determine about the corporate culture from the fact that they waited this long to consider the development of an EPM system? 2. Can a PMO accelerate the implementation process? 3. Is it acceptable for the PMO to report to the chief information officer or to someone else? 4. Why is it best to have six or less life-cycle phases in an EPM system?...
Question 1: Using the appropriate interest table, provide the solution to each of the following questions...
Question 1: Using the appropriate interest table, provide the solution to each of the following questions by computing the unknowns. (a) What is the amount of the payments that Jonathon must make at the end of each of 12 years to accumulate a fund of $220,000 by the end of the twelfth year, if the fund earns 6% interest, compounded annually? (b) Amanda is 30 years old today and she wishes to accumulate $2,500,000 by her sixty- eighth birthday so...
Please provide answer for each questions 1. Describe how ethics and the law have an impact...
Please provide answer for each questions 1. Describe how ethics and the law have an impact on the various health care professions discussed in this chapter. (LLO #1) 2. Discuss the ethical and legal implications of practicing outside one’s scope of practice. (LLO #1) 3. Discuss the circumstances under which a hospital has a duty to provide emergency services to the public? (LLO #1) 4. Are sexual improprieties acceptable with clients as long as they do not take place during...
Sketch base pieces to illustrate each computation for questions 1 – 4. Provide a brief description...
Sketch base pieces to illustrate each computation for questions 1 – 4. Provide a brief description of the process taking place, regrouping, etc. (5 points each) 1)14fivex4 2) 48 / 4 * using base 10 pieces, illustrating long division 3)18 / 3 * using the Sharing (partitive) concept 4) 24 / 6*using the Measurement (subtractive) concept Compute the product using the given method. Describe an advantage of the method. (6 points) 5) 248 x 367 * solve using lattice multiplication
Create two posts, each with an answer to these questions: What is “The Fed”? What are...
Create two posts, each with an answer to these questions: What is “The Fed”? What are its functions? What changes in the functions of The Fed arose through the Financial Crisis? I am particularly interested in the third part of this question. Use support from your text and one citation. Below are two hypothetical ways The Fed may be appointed. Would you favor either one of these two methods over the present method? Why or why not? In your answer,...
Questions: 1. Include examples of pertinent positive and pertinent negative data associated with each?. 2. Provide...
Questions: 1. Include examples of pertinent positive and pertinent negative data associated with each?. 2. Provide rationales for your examples? Objective Data Merci was diagnosed with celiac disease at about 11 months of age. Approximately 4 months after she started on solid foods. She had a term birth at 39 4/7 weeks of gestation with an Apgar 9/10. She developed normally until she began to have gastrointestinal symptoms and refused feeding. Smaller stature Merci is 30months old Slim with a...
Use the following information for questions 1-10: A researcher is creating a new treatment protocol for...
Use the following information for questions 1-10: A researcher is creating a new treatment protocol for Myelodysplastic Syndrome (MDS), a form of preleukemia. Following the old treatment protocol, 32% of patients with MDS will develop leukemia within 5 years of MDS diagnosis. He believes his new treatment protocol will lead to fewer MDS patients developing leukemia. He takes a random sample of 100 individuals on his new treatment protocol. Of these 100 individuals, 27 develop leukemia within 5 years of...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT