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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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