Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

hello, i am studying cryptography and i couldn't solve this particular problem. i would really appreciate any help. (any programming language is fine) I. Task

hello, i am studying cryptography and i couldn't solve this particular problem. i would really appreciate any help. (any programming language is fine)

I. Task Description In this assignment, you will implement encrypted communications between two parties, Alice and Bob, and evaluate the performance of AES and RSA under different parameters. For simplicity, Alice and Bob will be simulated by two programs running on the same computer. When Alice sends a message to Bob, she writes the message to a file. Bob receives the message through reading from the file.

Part 1: Implement encryption and decryption using AES with 192-bit key. Assume that Alice and Bob already have a shared secret key k (e.g., they can read the key from the same file). Alice encrypts an 18-byte message m (the message is manually input from command line), and writes the ciphetext into a file named ctext. Bob reads the ciphertext from the file, decrypts it, and prints the message m. The encryption should use the CBC mode.

Part 2: Implement encryption and decryption using RSA with 2048-bit key. Assume that Alice already has got Bobs public key (you need to figure out a way to do this). Alice encrypts an 18- byte message m (the message is manually input from command line) using Bobs public key, and writes the ciphetext into a file named ctext. Bob reads the ciphertext from the file, decrypts it, and prints the message m.

Part 3: Measure the performance of AES under different parameters. Take a 7-byte message manually input from command line. Implement AES with 128-bit, 192-bit, and 256-bit keys. For each key size, run the encryption over the 7-byte message and decryption of its ciphertext for one thousand times, measure the average time needed for one encryption, and measure the average time needed for one decryption. Implement RSA with 1024-bit, 2048-bit, and 4096-bit keys. For each key size, run the encryption over the 7-byte message and decryption of its ciphertext for one thousand times, measure the average time needed for one encryption, and measure the average time needed for one decryption. Print the average time of encryption and decryption for each key size for AES and RSA

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions

Question

1 . Television News channels importantance of our Life pattern ?

Answered: 1 week ago

Question

1. How is the newspaper help to our daily life?

Answered: 1 week ago

Question

1. Prepare a short profile of Mikhail Zoshchenko ?

Answered: 1 week ago

Question

What is psychology disorder?

Answered: 1 week ago