Compare DES encryption and RSA encryption

Assignment Help Computer Network Security
Reference no: EM131469845

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 <login1>.<login2>.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

Reference no: EM131469845

Questions Cloud

Discuss ethical concerns related to this policy : Discuss ethical concerns related to this policy and health care problem as well.Draw some conclusions about the current state of affairs regarding the policy.
Describe and analyze the evidence-based management model : What is evidence-based management? Describe and analyze the evidence-based management model. What is the importance of collecting data in decision making?
What are the drawbacks for organizations using social media : What are the advantages and drawbacks for organizations using social media to communicate with various employees, customers, or the global communities?
Determine the mean failure time : The mean value of a Weibull random variable is given by the formula, Compute the expected failure time for Example regarding copier equipment.
Compare DES encryption and RSA encryption : Compare DES encryption and RSA encryption. Explain your observations. Compare RSA encryption and decryption times. Explain your observations
Identify gaps that must be closed in order to progress : Identify gaps that must be closed in order for you to progress to the next level of leadership. Be sure to connect research to your analysis.
Define the exponential failure law : Suppose that a particular light bulb is advertised as having an average lifetime of 2,000 hours and is known to satisfy an exponential failure law.
Is there a difference in weight gain between patients : Is there a difference in mean age between patients on the fast-track protocol, and those receiving standard care?
What is the failure rate function for the piece of equipment : Applicational Materials sells several pieces of equipment used in the manufacture of silicon-based microprocessors. In 2003 the company filled 130 orders.

Reviews

len1469845

4/22/2017 12:55:26 AM

Points will be deducted if any of the deliverables in Section 6 is missing. Further, points will be deducted if the program implemented in section 3 Does not have a name as specified in section 6.a, (or) Does not compile (or) Does not produce the expected results. Please make sure you compare your results against the given test case. The final part of this lab consist on measuring the time DES, and RSA take to process files of different sizes.

Write a Review

Computer Network Security Questions & Answers

  An overview of wireless lan security - term paper

Computer Science or Information Technology deals with Wireless LAN Security. Wireless LAN Security is gaining importance in the recent times. This report talks about how vulnerable are wireless LAN networks without any security measures and also talk..

  Computer networks and security against hackers

This case study about a company named Magna International, a Canada based global supplier of automotive components, modules and systems. Along with the company analysis have been made in this assignment.

  New attack models

The Internet evolution is and is very fast and the Internet exposes the connected computers to attacks and the subsequent losses are in rise.

  Islamic Calligraphy

Islamic calligraphy or Arabic calligraphy is a primary form of art for Islamic visual expression and creativity.

  A comprehensive study about web-based email implementation

Conduct a comprehensive study about web-based email implementation in gmail. Optionally, you may use sniffer like wireshark or your choice to analyze the communication traffic.

  Retention policy and litigation hold notices

The purpose of this project is to provide you with an opportunity to create a document retention policy. You will also learn how to serve a litigation hold notice for an educational institute.

  Tools to enhance password protection

A report on Tools to enhance Password Protection.

  Analyse security procedures

Analyse security procedures

  Write a report on denial of service

Write a report on DENIAL OF SERVICE (DoS).

  Phising email

Phising email It is multipart, what are the two parts? The HTML part, is it inviting the recepient to click somewhere? What is the email proporting to do when the link is clicked?

  Express the shannon-hartley capacity theorem

Express the Shannon-Hartley capacity theorem in terms of where is the Energy/bit and is the psd of white noise.

  Modern symmetric encryption schemes

Pseudo-random generators, pseudo-random functions and pseudo-random permutations

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd