130 likes | 297 Views
Computer Security coursework 2. Dr Alexei Vernitski. Aims of the coursework. Learn more about: arithmetic and modular arithmetic public-key ciphers, including RSA brute-force attacks against ciphers security of ciphers codes, including ASCII cryptography in general
E N D
Computer Securitycoursework 2 Dr Alexei Vernitski
Aims of the coursework • Learn more about: • arithmetic and modular arithmetic • public-key ciphers, including RSA • brute-force attacks against ciphers • security of ciphers • codes, including ASCII • cryptography in general • All this is useful not only for understanding computer security, but for any career in information technology
A cipher • The following list of numbers is a text encrypted with RSA:70, 89, 153, 58, 184, 181, 200, 151, 156, 153, 199, 151, 156, 66, 19, 151, 104, 153, 100, 156, 14, 181, 58, 104, 156, 181, 184, 184, 19, 200, 156, 52, 200, 19, 153, 58, 156, 49, 89, 153, 99, 19, 173, 156, 58, 181, 156, 104, 153, 90, 19, 156, 58, 19, 153, 156, 153, 199, 151, 156, 99, 153, 53, 19 • Break the cipher and read the message
How was the cipher produced? • I took a short meaningful English sentence • For each character in the sentence, I found its ASCII code • Then I encrypted each code individually using the RSA public key e=5, n=203
Your main task • Organise the brute force attack to find the private key and the correct decryption
What to submit? • Submit a ZIP file containing two files: • Your code conducting the brute force attack • A file with a very short report (several lines), as described below
What does your code need to do exactly? • Organise a loop through all possible private keys; for each key, do the following • Decrypt each number in the list with this key • Convert the decrypted ASCII codes to a string and print it on the screen
How shall I mark your code? • I shall run your code and see if it produces all possible decryptions. If it does, you get 100%. • If it does not, I shall look at the code and allocate some partial marks according to the list on the previous slide.
Programming • I attempted the coursework and wrote my solution in Python • My complete code contains 7 lines • It took me approximately 10 minutes to write it • You may need up to 1 hour to complete the assignment if you need to learn arithmetic operationsin Python, how to work with ASCII codes in Python etc.
The report to submit • Together with your code, submit a separate file with a very short report (several lines). In this report, include two parts: • State clearly what the correct decryption is, and what value of a private key one can use to produce it. • Answer the question on the next slide; your answer should be reasonably complete, and not just two words.
Question to answer • Suppose two students, Peter and James, write this assignment. Peter writes it in Python, and James writes it in Java. Which feature of the integer type in Python enables Peter to write his code especially quickly and easily, compared with James?
Labs • Before the submission date of each piece of coursework, we shall have a lab on Thursday • The purpose of the lab is: • to help you to write your code, in case you have any difficulties • to give you an opportunity to demonstrate your code to me
No collaboration • This is an individual assignment • I shall look for signs of collaboration and plagiarism