1 Part 1 - Programming In this project you must provide an interface to some distributed cryptographic modules. You use character devices to hold the results of each encryption module and also you must implement a shared memory which is updated by memories of other character devices. Figure 1: Distributed Encryption Module You will need 3 virtual machines, one acts as an interface to user (depicted in the bottom of Figure 1) which is the only visible interface by user; and the other two act as cryptographic modules. You must provide a way of submitting a file along with a key to the interface and this program will split the file into appropriate chunks (say 60 bytes) and deliver every other chunk to two cryptographic modules. These cryptographic modules must encrypt the data and return the ciphertext to the interface machine. You may implement separate queues for each machine and you must implement a queue handling or a polling mechanism to synchronize the shared memory. Be careful about read and write permissions of each character device. For example the ordinary user which submits a file and the key to the interface 1 must not be able to write to that device. In order to have a good estimate on how this distributed system can help you do the job faster, you will have to measure the time taken to encrypt each chunk of plaintext in each module and at the end of encryption, you must output the time taken to encrypt the module as well as the pure time taken on encryption and not in transmission over network. At last you must encrypt the same file with a single module of DES and report the time as well. 1.1 DES You may download an implementation of DES from internet. You must not implement it, because it is like reinventing the wheel. A simple non-practical mode of operation is defined for encryption just to make it parallel to avoid complexities around parallel algorithms. So remember that the mode of operation is to divide the plain text into equal chunks and have each module of encryption encrypt the chunks (for instance, the first chunk for the first module, the second for the second module, the third chunk for the 1st and so on). Please avoid batch transfer of chunks (do not transfer 1st , 3rd , 5th and ... in a batch to a module). 1.2 Shared Memory You must implement a mechanism to synchronize the shared memory of the character device with other memories. Please note that cryptographic modules output ciphertext to the local character devices. 1.3 Interface You may implement the interfaces as you wish (through daemons, etc.). The communication between modules can be implemented by sockets, though there is no mandate. 1.4 Deliverables Your source code which is definitely fully commented. A document explaining your source and your approach. Also this document must include the timings specified below: 1. Time to encrypt with one module locally (remember to feed the module chunk by chunk) 2. Overall time to encrypt using two modules 3. Net time to encrypt using two modules (without transmission time) You must provide a chart for comparison of timings. 2 2 Part 2 - Code Reading You may find the code along with the video in the web site. You must explain the main parts of the code specially the methods and also why it works. Providing enough information on process structure and the way transition happens is mandatory. Meanwhile, detailed explanation of the python scripts is not required though the overall description of functionality of the scripts is obligatory. Please omit obvious code explanations and try to explain structures as well as the code. Running the code has extra bonus for you. 2.1 Deliverables Document containing above explanations. 3 Due date and considerations Due date is 5th of ”Day”. Please note that you can fulfill this assignment in groups of two. Have it in your mind that group deliverables must have better and deeper explanation of required subjects. You must compress your documents and name it in the following convention: {1st StudentN umber, 2nd StudentN umber AOSP roject2}.Zip Send the files to: [email protected] Please name your e-mails as your files bar the .Zip part. 3
© Copyright 2025 Paperzz