Write programs to encrypt data using symmetric encryption

Assignment Help Computer Engineering
Reference no: EM132212089

Question :

You are to write programs to encrypt (and decrypt) data using symmetric encryption and MAC. For encryption you should use the 32 bit encryption program provided and if you want a hash, use a 32-bit hash function.

Step 1: Design a method to compute a MAC. You can use the standard HMAC function nor design your own. If you have a "keyed MAC", use the same key that you use for encryption

Step 2: Create two files one containing ASCII text and one containing binary data. Both files should be exactly 1024 bytes long. A binary file is provided here, you can choose to use it or create your own. Do step 3 and 4 for both files, separately.

Step 3: Read the 1024 byte file into a 1024 byte buffer called plain_buff (in memory). Encrypt plain_buf (and add MAC) and put the result into cipher_buff. Note that cipher_buf will be larger than plain_buff. There will be one MAC for the entire buffer. Same key is used for encryption and MAC.

Step 4: Decrypt the data cipher_buff and put the result into decr_buff. Check the MAC to ensure the decryption was fine. Also double check that the data in plain_buff and decr_buff are identical. Once you are done with the above do the following experiments:

1. Can you decrypt cipher_buff with a wrong key? Do you get a hash mismatch?

2. Can you modify and cipher_buf and decrypt with correct key?

3. Can you, in any way, modify cipher_buff and decrypt with any key that results in a successful MAC verify.

4. Assume you do not know the key used for encryption and MAC. Can you brute force and decrypt cipher_buff and get correct decryption (without any assumptions about the data type in the original plain_buff.

SUBMIT : A short report explaining what you did and how is good enough, or a pseudocode. Code isn't really needed. Pseudocode doesn't need to be in any specific language, just a brief description will do.

Reference no: EM132212089

Questions Cloud

Specific strategies will management team use to motivate : What specific strategies will the management team use to motivate this particular team of individuals?
Calculate the wait time for an available table : Write a pseudo code for calculating the wait time for an available table at a restaurant for a party size of 1-2, party size of 3-4 and party size of 5.
How shakespeare hamlet externalizes the inner thoughts : Explain how Shakespeare's Hamlet externalizes the inner thoughts of Hamlet. Develop a soliloquy that dramatizes a selected character's point of view.
Amazon approaches workplace learning : How your Amazon approaches workplace learning. A brief overview of the context/setting
Write programs to encrypt data using symmetric encryption : For encryption you should use the 32 bit encryption program provided and if you want a hash, use a 32-bit hash function.
What product is associated with the brand name : List five brand names and indicate what product is associated with the brand name. Evaluate the strengths and weaknesses of the brand name.
Explain the consequences of a team : Explain the consequences of a team that does not trust its leader in terms of patient safety. Describe strategies team members can use to build trust among.
Write pseudo-code for an algorithm that given a set s : Write pseudo-code for an algorithm that given a set S. Determines whether or not there exists two elements in S whose sum is exactly x.
Tax benefits of health savings account : Which types of jobs are less likely to afford this type of flexibility? Explain. What are 5 key features or tax benefits of a Health Savings Account (HSA)?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Write a java program to manipulate grades

Write a Java program to manipulate grades.Print the arrays (using the enhanced for) and list shuld be from least to greatest.

  Sources must be cited in apa formatnbsp your response

sources must be cited in apa format.nbsp your response should be a minimum of one single-spaced pagenbspto anbspmaximum

  Write a method that will sort an array in ascending order

Write a method that will sort an array in ascending order. Display these contents of the array before sorting and then display the contents after sorting.

  Find a commercial tool that aids in the design

Many of the tools used to design databases are pictorial in nature. What are the benefits of this?

  Write a program that draws a rainbow

Write a program that draws a simple fence with vertical, equally spaced slats backed by two horizontal support boards. Behind the fence show a simple house.

  Provide the partition results as well as the number

Provide the partition results as well as the number of comparison and exchanges used.

  Create a test file with long lines

The program reads characters until EOF from its standard input and displays that information on screen, with at most 50 characters per line.

  Grading for this assignment will be based on answer

write a 2-3 page paper in which youidentify and describe the challenges when implementing groupware.explain the

  Write a recursive descent subprogram

Write a recursive descent subprogram that corresponds to the following EBNF production (taken from the specification of Java).

  Compare the different service provide types rbocs and ilec

In a 1-page paper, compare the different service provide types: RBOCS, ILEC, CLEC, MSO and ISP

  Examine your thoughts on the effects of indexes

Discuss the thoughts on the effects of indexes, data types, filegroups, and transaction logs on space considerations. Which of those database constructs do you feel are most important to manage when it comes to database size considerations.

  How would i code this in the problem in python

You should demonstrate the following concepts: dictionaries, loops, decision logic, user input, and other concepts you feel are necessary.

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