Information Technology

CSC8520 Open SSL and Bash Scripting for Cryptography

23 June 2023 06:44 AM | UPDATED 1 year ago

CSC8520 Open SSL and Bash Scripting for Cryptography :

CSC8520 Open SSL and Bash Scripting for Cryptography
CSC8520 Open SSL and Bash Scripting for Cryptography
Text Box: Copyright⃝c 2022, University of Southern Queensland.


The openssl toolkit The openssl is a suite of open source programs that has been implemented on Linux, Windows, Mac OS. You should be able to use the Command Line Interface (CLI) utility to complete Question 1 in Assignment 1.

On the submission Please submit your solutions to the the online Assignment 1 submission portal on your CSC8520 Studeydesk. You must compress all files into a compressed file (.tar, .Z, .Zip, etc) before you make a submission. Note that Linux has a compress utility called tar, which you should apply.
CSC8520 Opening SSL and Bash Scripting for Cryptography

The objective of the assessment is to assess the understanding of basics of Symmetric Key Cryptography. There are two questions in Assignment 1. Assignment 1 has weight 20% in the overall assessment of the course.

Question 1: Substitution Cipher. Full marks: 8 marks

You are given a substitution-box (ie. S-box) as shown below:

 00011011
000011100011110001
011010011001011011
101110110101000010
110111000010011100
CSC8520 Opening SSL and Bash Scripting for Cryptography

.

  • Your task: for full marks, you must list all the steps of finding the substitutions for the decimal numbers 14, 8, and 3.
  • Submission: a .pdf file listing all the steps of finding the substitutions for the decimal numbers 14, 8, and 3.

Question 2 (12 marks): Write a bash script to check the hash value of a file (using the openssl toolkit).

You are given a folder hash files.zip containing five binary files (named as hash val i.bin for i = 1, 2, 3, 4, 5), which contain five different hash values (you can read the values by opening the files). Out of the five files, we’re looking for a specific file which matches the hash value returned by implementing the hashing al- gorithm SHA1 on the file rainbrowcrack1.7linux64.zip. (Note: this question is not about rainbow cracking, but about hashing the file rainbrowcrack1.7linux64.zip.)

  • Your task: Please write a bash script to find the correct file. More specifically, you have to generate the SHA1 value of the file rainbrowcrack1.7linux64.zip, and then go through each the five files to determine which file contains the SHA1 value you generated. An expected output is shown in Figure. 1 below (yes, the correct file is hash val 3.bin).

Figure 1: An expected output for Question 2

• Submission for CSC8520 Open SSL and Bash Scripting for Cryptography:

  • your bash script file with proper and sufficient comments.
    • your testing result, i.e., the output after running your bash script. An expected output is shown in Figure. 1.CSC8520 Opening SSL and Bash Scripting for Cryptography

Notes:

  • The folder hash files.zip can be downloaded by using the command:

$ wget ’https://docs.google.com/uc?export=download&id=1gqDEuYMdpJP3X5-CkMXX4Ggyt1j_4aAD’ -O hash_files.zip

.

  • The file rainbrowcrack1.7linux64.zip can be downloaded by (the same as Step 1 of Question 3 in Practicum 2)

$ wget http://project-rainbowcrack.com/rainbowcrack-1.7-linux64.zip

.

Assignment 1 Marking Rubrics for Bash Scripting

  • Question 1:
  • 1 marks for retrieving correct binary numbers of 14, 8, and 3
  • 1 marks for retrieving correct decimal numbers after substitution.
  • 6 marks for correct steps for each number 14, 8, and 3. (You have to list the steps for each number)
  • Question 2:
  • 8 marks for writing a bash script to go through the five hash value files and find the correct file before ending the program. This includes 2 marks for generating the SHA1 value of the file rainbrowcrack1.7linux64.zip, 2 marks for writing a loop, and 4 marks for finding the correct file.
  • 1 mark for proper and sufficient comments
  • 3 marks for displaying the output as shown in Figure. 1.
  • CSC8520 Opening SSL and Bash Scripting for Cryptography

Visit:https://auspali.info/

Also visit:https://www.notesnepal.com/archives/767