This essay has been submitted by a student. This is not an example of the work written by professional essay writers.
Uncategorized

Write a program that takes a key and message as input and performs the following operations to send messages from Alice to Bob.

Pssst… we can write an original essay just for you.

Any subject. Any type of essay. We’ll even meet a 3-hour deadline.

GET YOUR PRICE

writers online

 

Write a program that takes a key and message as input and performs the following operations to send messages from Alice to Bob.

 

Alice:

 

For every message Mi , i = 1, …, n, Compute

  1. Ciphertext: Ci = Enc(ki, Mi)
  2. MAC: Si = MAC(ki, Ci)

 

  1. Aggregate MAC: S1,i = H(S1, i-1 || Si)

 

  1. Update ki+1 = H(ki) and delete Ki, Si, S1, i-1 Send <C1, C2, …, Cn> , S1, n

 

Bob:

 

After receiving the data from Alice, for every ciphertext Ci , i = 1, …, n. Compute

  1. MAC: Si = MAC(ki, Ci)

 

  1. Aggregate MAC: S1,i = H(S1, i-1 || Si)

 

  1. Update ki+1 = H(ki) and delete Si, Ki, S1, i-1

 

If the aggregate MAC matches with the one that the client sent, then for every ciphertext Ci , i = 1, …, n, Compute

 

  1. Plaintext Mi = DEC(ki, Ci)

 

  1. Update ki+1 = H(ki) and delete Ki

 

 

Input:

 

  • Take 16 byte key and initialization vector (IV) as input for both Alice and Bob. It is also alright, if you hard-code it.

 

  • Read the messages from a file. Each message is 1024 byte and total number of messages is 100.

 

Output:

 

  • For Alice, print the ciphertexts and aggregate MAC in the console.

 

  • For Bob, write the plaintexts in a file.

 

Grading Criteria:
•  Read messages from file.[5P]
Print output in console for Alice and write output to file for Bob.[5P]
Use ZeroMQ to send and receive messages.[10P]

 

 

•  Generating the chain of keys.[20P]
Compute MAC and aggregate MAC.[30P]
Use AES-CTR mode for encryption-decryption.[30P]

 

Submission:

 

You can do this assignment individually or form a group of two persons. Submit a zip file in Canvas. The zip file should contain the sender and receiver code. You can use C/C++/Python.

 

Some figures are added for your better understanding.

 

  • Computing ciphertext and MAC.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • Computing MAC to verify the aggregate MAC

 

 

 

  • Decrypting ciphertexts if the aggregate MAC matches.

  Remember! This is just a sample.

Save time and get your custom paper from our expert writers

 Get started in just 3 minutes
 Sit back relax and leave the writing to us
 Sources and citations are provided
 100% Plagiarism free
error: Content is protected !!
×
Hi, my name is Jenn 👋

In case you can’t find a sample example, our professional writers are ready to help you with writing your own paper. All you need to do is fill out a short form and submit an order

Check Out the Form
Need Help?
Dont be shy to ask