{"id":34355,"date":"2018-02-20T23:50:30","date_gmt":"2018-02-20T23:50:30","guid":{"rendered":"https:\/\/writemyessayfree.com\/establish-a-secure-communication-channel-10"},"modified":"2017-08-16T06:25:51","modified_gmt":"2017-08-16T06:25:51","slug":"establish-a-secure-communication-channel-10","status":"publish","type":"post","link":"https:\/\/www.benedictsol.com\/blogs\/establish-a-secure-communication-channel-10\/","title":{"rendered":"Establish a secure communication channel"},"content":{"rendered":"<div class=\"the_content_wrapper\">\n<p><strong>Advanced Network Security<\/strong><\/p>\n<p><strong>Assignment<\/strong><\/p>\n<p>Objectives<\/p>\n<p>On completion of this assignment you should be able to:<\/p>\n<p>\u2013 Understand some basic techniques for building a secure channel.<br \/> \u2013 Understand network programming.<\/p>\n<p>Write (Java or C\/C++) UDP programs allowing two parties to establish a secure communication channel. For simplicity, let us call the programs \u201cHost\u201d and \u201cClient\u201d, which are executed by Alice and Bob, respectively.<\/p>\n<p>Alice and Bob share a common password PW which contains 8 alphanumeric characters. They want to establish a secure communication channel that can provide data confidentiality and integrity. They aim to achieve this goal via the following steps: (1) use the password to establish a shared session key; (2) use the shared key to secure the communication.<\/p>\n<p>Step 1 is done via the following key exchange protocol:<\/p>\n<p>1: A \u2192 B: EPW(KA)<br \/> 2: B \u2192 A: EPW (KB)<\/p>\n<p>Alice and Bob then compute the shared key as K = Hash(KA||KB). KA and KB are both 128-bit random binary strings, and || denotes string concatenation. Alice and Bob decide to use AES as the encryption function, and MD5 as the Hash function.<\/p>\n<p>After establishing the session key, step 2 is achieved as follows:<\/p>\n<p>1. whenever Alice wants to send a message M to Bob, Alice first computes H = Hash(K||M), and then computes C = EK(M||H) and sends C to Bob.<\/p>\n<p>2. upon receiving a ciphertext C, Bob first runs the decryption algorithm to obtain M||H = DK(C). After that, Bob computes H\u2019 = Hash(K||M) and checks if H = H\u2019. If the equation holds, then Bob accepts M; otherwise, Bob rejects the ciphertext.<\/p>\n<p>3. the same operations are performed when Bob sends a message to Alice.<\/p>\n<p>Implementation guidelines<\/p>\n<p>\u2013 Place Host and Client in two separate directories: Alice and Bob. The shared password is located in a file under each directory.<\/p>\n<p>\u2013 Alice executes Host.<\/p>\n<p>\u2013 Host is running and listening to the opened port (you need to select a port for your code).<\/p>\n<p>\u2013 Bob executes Client.<\/p>\n<p>\u2013 Client (Bob) sends a connection request to Host.<\/p>\n<p>\u2013 Client is ready and listens to the port.<\/p>\n<p>\u2013 Host generates a random KA, encrypts it using AES, and sends the ciphertext to Client.<\/p>\n<p>\u2013 Upon receiving the message from the Host, Client decrypts the message to obtain KA, randomly chooses KB, encrypts it and sends the ciphertext to Host. Client then computes the shared key K based on KA and KB.<\/p>\n<p>\u2013 Upon receiving the message from Client, Host performs the decryption to obtain KB and then computes the shared key K.<\/p>\n<p>\u2013 Now, the secure channel is established.<\/p>\n<p>\u2013 Either Alice or Bob can send a message encrypted and authenticated by the key K. They type the message on their own terminal. The message is processed by their code (Host or Client) according to the step 2 description given above.<\/p>\n<p>\u2013 The received message is printed on the screen if decryption is successful. Otherwise, print \u201cdecryption error\u201d on the screen.<\/p>\n<p>\u2013 To quit the program, the client should type \u201cexit\u201d.<\/p>\n<p>Coding requirement:<\/p>\n<p>You need to write two programs: Host and Client. You should name your programs: host.cpp or host.java and client.cpp or client.java.<\/p>\n<p>You can choose to use some existing libraries or free source code to implement AES and MD5. You should cite the source if you use a downloaded code. Important: make sure your programs can be complied and executed in banshee (banshee.uow.edu.au).<\/p>\n<p>How to run?<\/p>\n<p>Your programs should run according to the protocol. Host and Client should be executed on different windows. For convenience of marking, please use the local IP: 127.0.0.1 for the submitted version. For simplicity, there is no GUI required in this assignment. That is, messages are simply typed on the window and printed on the receiver\u2019s window. The looping should continue until the moment the user types \u201cexit\u201d to exit.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Advanced Network Security Assignment Objectives On completion of this assignment you should be able to: \u2013 Understand some basic techniques for building a secure channel. \u2013 Understand network programming. Write (Java or C\/C++) UDP programs allowing two parties to establish <a href=\"https:\/\/www.benedictsol.com\/blogs\/establish-a-secure-communication-channel-10\/\" class=\"read-more\">Read More &#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-34355","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts\/34355","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/comments?post=34355"}],"version-history":[{"count":0,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts\/34355\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/media?parent=34355"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/categories?post=34355"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/tags?post=34355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}