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

Create matlab simulink model for dc-dc buck converter with screenshot. Note: provide matlab code for the...
Create matlab simulink model for dc-dc buck converter with screenshot. Note: provide matlab code for the output of dc-dc buck converter if possible.
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...
Write the null and alternative hypotheses in notation for each of the following statements. 3a. [1...
Write the null and alternative hypotheses in notation for each of the following statements. 3a. [1 point] The μ for scores on the Wechsler Adult Intelligence Test is 100. 3b. [1 point] For a population of 25- to 54-year-old women, the mean amount of television watched each day is 4.4 hours. 3c. [1 point] The mean reaction time of 19-year-old males to a simple stimulus is at least 423.0 milliseconds. Given the following information, test whether the population mean is...
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,...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT