Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Introduction In this assignment, you will implement secure communications between two parties, Alice and Bob. For simplicity, the sending of a message from the

1.Introduction

In this assignment, you will implement secure communications between two parties, Alice and Bob. For simplicity, the sending of a message from the sender to the receiver will be simulated through writing the message into a file by the sender and reading the message from the file by the receiver. This assignment is designed to practice key distribution, encryption/decryption, and integrity protection with secret key cryptography and public key cryptography.

2.Task Description

Communication scenario: Alice (as a Client) needs to send messages to Bob (as a Server). Alice and Bob each have a pair of under the RSA cryptosystem (their key pairs are different), and they know each others public key beforehand (the public keys can be hard coded into the program or read from a file).

Step 1: Set up a shared secret key: Alice and Bob set up a shared secret key using the following method: Alice generates a random key k, encrypts it using Bobs public key with the RSA algorithm, and sends the cipher text to Bob. Bob receives the cipher text and then decrypts it to get the key k.

Step 2: Message encryption and decryption: Alice sends a 25-byte message to Bob. This message is encrypted using AES with the key k distributed in Step 1. Bob decrypts the message using his copy of key k.

Step 3: HMAC-based Authentication: Alice sends a 30-byte message to Bob. This message is authenticated with an HMAC generated with key k (distributed in Step 1) using SHA-256 as the underlying hash algorithm. Bob verifies the HMAC to see if the message is from Alice and if it has been modified during transit.

Step 4: Digital Signature-based authentication: Alice sends a 40-byte message to Bob. This message is authenticated with a RSA signature computed over the hash of the message with the SHA-256 hash algorithm. Bob verifies the RSA signature to see if the message is from Alice and if it has been modified during transit.

To evaluate Step 1, your program needs to print the k at Alice and the k decrypted by Bob to see if they are the same.

To evaluate Step 2, your program needs to print the message at Alice and the message decrypted by Bob to see if they are the same.

To evaluate Step 3, your program needs to print the HMAC computed by Alice and the HMAC computed by Bob to see if they are the same.

To evaluate Step 4, the servers (Bobs) program needs to print the result of RSA signature verification operation over the received signature to see if it is the same as the message generated by Alice.

Code above in either C, C++, Java or Python.

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2019 Wurzburg Germany September 16 20 2019 Proceedings Part 2 Lnai 11907

Authors: Ulf Brefeld ,Elisa Fromont ,Andreas Hotho ,Arno Knobbe ,Marloes Maathuis ,Celine Robardet

1st Edition

3030461467, 978-3030461461

More Books

Students also viewed these Databases questions

Question

LO4 Provide an overview of four challenges facing HR today.

Answered: 1 week ago