advertisement

CS 444 Networks Security Assignment1: Crypto Note1: Use the programming language YOU LIKE and the LIBRARIES you want to accomplish the required tasks. Note2: You should submit your work to f.abuhjeela@gmail.com and moealsaleh@gmail.com ; the subject MUST be “CS444 Assignment1”. You MUST include two attachments named part1.java (or .cpp) and part2.java (or .cpp). Note3: Each group must have only ONE submission that includes all the group names, their serial numbers, and student number, as the following: Name serial number student number Note4: Each group MUST see Fatima to discuss their solution with her. ALL group members MUST show up. If you don’t show up you will get ZERO. Note5: Your code MUST be FULLY DOCUMENTED/COMMENTED. Note6: The submission due date is March 24th. NO LATE SUBMISSIONS will be considered for whatever reasons. Part I: Caesar Cipher Implement the Caesar Cipher you learned in the class. Your implementation should be restricted to the following specifications: 1- The character representation should be in ASCII representation. 2- Your implementation should have the following functions: /* this function takes a string of characters in a plaintext and an integer key and returns a string of characters in ciphertext after applying the cesaer cipher algorithm */ string Encrypt(string plaintxt, int key); /* this function takes a string of characters in a ciphertext and an integer key and returns a string of characters in plaintext after applying the cesaer cipher algorithm */ string Decrypt(string ciphertxt, int key); /* this function prints the hexadecimal value of a string */ void PrintHexVal(string str); 3- You should implement the circular implementation of cesaer cipher. For example 125 + 3 = 0. 4- You should have a testing part to show the correctness of your implementation. Part II: DES Usage: Write code that uses the DES algorithm. Your implementation should have three functions: GenerateKey, Encrypt, Decrypt, and PrintHexVal. 1- The GenerateKey function should generate the secret key to be used in the DES algorithm. 2- The Encrypt function will take a plaintext and the generated key as inputs and encrypts the plaintext using the DES algorithm and the key. This function returns the ciphertext. 3- The Decrypt function will take a ciphertext and the generated key as inputs and decrypts the ciphertext using the DES algorithm and the key. This function returns the plaintext. 4- The PrintHexVal takes a string as input and prints its hexadecimal representation of it. You should have a testing part to show the correctness of your implementation