Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Network & Security Expert

Lab/Programming Assignment

1. General Description

The notion of cryptography consists of hiding secret information from non trusted peers by mangling messages into unintelligible text that only trusted peers can rearrange. In this lab, we will use and compare two different techniques commonly employed to hide or encrypt information: secret key cryptography (DES), public key cryptography (RSA).

There is a group of built in functions that will help you complete this assignment. These functions are included in Openssl. Openssl is an open source toolkit that implements security protocols such as SSL but also includes a general purpose cryptography library which you will use. Openssl is usually part of most of the recent linux distributions.

2. File with sample codes and results

We are giving a group of files (compressed in tar.gz) as a reference on how to use certain built in functions that we will mention in this handout and that you must use in your implementations. These files are just skeletons that you should modify in order to obtain the expected results. Included in the compressed file is also a test case for your DES-CBC implementation (test.txt and test.des) and a file with general descriptions of some built in functions. Please download the file lab1.tar.gz.

3. DES encryption / decryption

In this part of the lab, we will be coding a tool to encrypt and decrypt files using DES in mode CBC (Cipher Block Chaining). "tempdes.c" is a skeleton file that encrypts/decrypts a fixed 64-bit block. In this assignment, you will extend this skeleton code to take an arbitrarily sized input file and encrypt/decrypt it, by implementing the Cipher Block Chaining DES mode of operation. You must actually implement the CBC mode, and you are not allowed to use any built-in function besides what is present in tempdes.c. You can find information about DES-CBC in your text book.

You may want to check your work against the input file "test.txt". If you have implemented the algorithm correctly, you should get the output in "test.des". These files are part of lab1.tar.gz.

3.1 Requirements

a. Just use the built in functions that appear in tempdes.c

b. Your code should result in an executable of the following form:

./tempdes          iv             key         inputfile               outputfile

The parameters description is as follows:

- iv: the actual IV to use: this must be represented as a string comprised only of hexadecimal digits.

- key: the actual key to use: this must be represented as a string comprised only of hexadecimal digits.

- inputfile: input file name

- outputfile: output file name

For example:

./tempdes          fecdba9876543210           0123456789abcdef           test.txt                                 test.des

If any of the arguments is invalid, your code should return an appropriate message to the user. Be sure to consider the case when the keys are invalid.

4. Performance measures for DES, RSA and SHA1

The final part of this lab consist on measuring the time DES, and RSA take to process files of different sizes.

a. Generate text files with the following sizes:

- For DES (in bytes): 8, 64, 512, 4096, 32768, 262144, 2047152

- For RSA (in bytes): 2, 4, 8, 16, 32, 64, 128

b. Encrypt and decrypt all these files using the DES function that you wrote in part 3. Measure the time it takes to encrypt and decrypt each of the files. To do this, you might want to use the C function "gettimeofday". Add these timing functions to your implementation of part 3.

c. Measure the time for RSA encryption and decryption for the file sizes listed in part a. To do this, make appropriate changes to the file "temprsa.c". This skeleton code shows how to use built-in RSA encryption and decryption functions, but you will need to augment it to allow for reading from arbitrary files, and to insert necessary instrumentation code for timing purposes.

d. Prepare a report of your observations in the format requested under "Deliverables" (section 6).

5. Deliverables:

a. A soft copy of the file tempdes.c.  Name your file ..des.c, where login1 and login2 are login names of the two members of the group. For example: sanjay.rtorresg.des.c. Screen shot of running of the program and the output of the program.

b. Printout.

Turn in a typed report with the following information:

- C code implemented in parts 3, and 4.c

- Graphs showing: (i) DES encryption / decryption times; (ii) RSA encryption times; (iii)  RSA decryption times;

-  In each of these graphs, the  X axis  should plot the file sizes in units of bytes, and the Y axis should plot time measurements in units of microseconds (µs).

Answer the following questions:

  • Compare DES encryption and RSA encryption. Explain your observations.
  • Compare RSA encryption and decryption times. Explain your observations?

Attachment:- Assignment Files.rar

Computer Network & Security, Computer Science

  • Category:- Computer Network & Security
  • Reference No.:- M92278584

Have any Question?


Related Questions in Computer Network & Security

Since quotas do not raise revenues but have the same trade

Since quotas do not raise revenues but have the same trade effects as do tariffs, why not just have tariffs? Why would the government impose quotas when tariffs not only would reduce imports but also bring in new revenue ...

Advanced network design assessment - human factors in

Advanced Network Design Assessment - Human factors in network analysis and design Purpose of the assessment - This assignment is designed to assess students' knowledge and skills related to the following learning outcome ...

Compare the importance of three categories described in the

Compare the importance of three categories described in the article: 1. window of exposure, 2. full public disclosure, 3. reasonable disclosure for three types of software applications: 4. military, 5. medical, 6. educat ...

Assume that the number of customers who arrive at a water

Assume that the number of customers who arrive at a water ice stand follows the Poisson distribution with an average rate of 6.4 per 30 minutes. What is the probability that more than one customer will arrive during the ...

Assignment - network implementationbackgroundwidgets and

Assignment - Network Implementation Background Widgets and Gadgets (WaG) have recently acquired a business, We Make Stuff (WMS), in another city. Before work can commence on integrating WMS's network into WaG's, WMS actu ...

Overview of network security assessment - security

Overview of Network Security Assessment - Security Challenges in Emerging Networks Purpose of the assessment - The purpose of this assignment is to develop skills to independently think of innovation. Students will be ab ...

Content analysis assignmentoverviewthis assignment has

Content Analysis Assignment Overview This assignment has three major aims: - To help students gain good understanding of all ITECH1102 theoretical and practical material. - To encourage students to use content analysis s ...

Toms income is 480and he spends it on two goods x and y his

Tom's income is $480and he spends it on two goods, X and Y. His utility function is U = XY. Both X and Y sells for $8 per unit.   a. Use lagrangian function to calculate Tom's utility-maximizing purchases of X and Y.  b. ...

Objectives-to learn about more advanced network security

Objectives -To learn about more advanced network security and vulnerability scanning tools Lab Outcome: · To complete the lab procedures & correctly answer the questions in the Blackboard quiz. Lab Deliverables · Answer ...

Question explain the meaning of computer networkingexplain

Question: Explain the meaning of computer networking. Explain the meaning of Information and give at least three examples of it. The response must be typed, single spaced, must be in times new roman font (size 12) and mu ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As