代写COMPX518-24A Assignment 2代做Prolog
- 首页 >> WebCOMPX518-24A
Assignment 2
Total Marks: 20
Due: 19th May, 5 PM, 2024
Part 1: Cryptanalysis (6 marks)
In this part you will cryptanalyse a substitution cipher. Download the ciphertext file from Moodle. There are three ciphertext files. If your student id number ends in:
. 0, 1 or 2, Use ciphertext1
. 3, 4 or 5, Use ciphertext2
. 6, 7, 8 or 9,Use ciphertext3
Each of the ciphertext has been obtained by using the same substitution cipher with different plaintext and keys. Pick one ciphertext according to your student id. Your task is to decipher the ciphertext and recover the plaintext. Remember that substitution ciphers are susceptible to frequency analysis attacks. You can use any cryptanalysis tool you find online but it is likely that you will need to write simple scripts/programs to perform certain actions.
Write a maximum 4-page report, with the following details:
. The decrypted plaintext (1 mark)
. The key/mapping (1 mark)
. Step by step explanation of how you deciphered the ciphertext. If you have used any third party tools, you will need to explain what the tools do and how they work. (4 mark)
You will see that the ciphertext is very long. This in fact works in your favour. Longer ciphertexts provide more information and are easier to break than shorter ciphertexts. The ciphertext does not preserve punctuation and whitespaces. The following reference will help you get started:
. http://practicalcryptography.com/ciphers/simple-substitution-cipher/
NOTE: If you are unable to completely decipher the plaintext, submit what you have been able to decipher and explain the steps taken.
Part 2: Encryption (14 marks)
In this part you will write a program that uses AES encryption for encrypting an image whose size is larger than the AES block size. The desired functionality of your program is that it takes a BMP file and encrypts the file contents using a fixed key (provided below). The encrypted output is then stored as the body of a JPG image file. For a given input file, your program will generate three output JPG files, using Electronic Codebook (ECB), Cipher-Block Channing (CBC) and Cipher Feedback (CFB) modes of operations. . The output files must be valid image files. The input image to be used is uploaded on moodle
Key (128bit) in Hexadecimal format to be used for the AES using ECB, CBC, and CFB modes
770A8A65DA156D24EE2A093277530142
This can be done in any programming language. You can use any AES library that works with your choice of language. You do not need to write a corresponding decryption program for the assignment.
Your submission will have the source code of your program and a maximum two-page report that should detail the following:
. 3 marks: Design of your program. Explain the design of your program and its various components using a diagram.
. 2 marks: ECB output JPG of the input image.
. 2 marks: CBC output JPG of the input image.
. 2 marks: CFB output JPG of the input image.
. 4 marks: Discuss the difference between ECB, CBC, and CFB modes of operation, and explain how they may have impacted your output results above.
. 1 marks: Source code. (Marked on the following parameters) Coding style.
Logical and easy to follow comments
Handling adequate exceptions
Handling incorrect input parameters
Assignment submission
The assignment submission will have two parts. A document that has the reports for parts 1 and 2 and a zipped file containing the code for part 2. Moodle will only accept two files, do not upload individual code files.
Extensions
No extensions will be given unless approved by the Department of Computer Science
(https://www.cs.waikato.ac.nz/student-resources/application-for-an-extension-of-deadline) You can submit late. However, late submissions will be deducted 1mark/ day.