Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Security coursework 2 Dr Alexei Vernitski.

Similar presentations


Presentation on theme: "Computer Security coursework 2 Dr Alexei Vernitski."— Presentation transcript:

1 Computer Security coursework 2 Dr Alexei Vernitski

2 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

3 A cipher The following list of numbers is a text encrypted with Caesar’s cipher and RSA: 3, 58, 172, 52, 50, 140, 172, 58, 98, 172, 173, 58, 109, 172, 109, 58, 172, 52, 50, 140, 172, 109, 100, 184, 109, 172, 199, 183, 172, 109, 100, 50, 172, 90, 33, 50, 183, 109, 199, 58, 173 Break the cipher and read the message

4 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 added a certain fixed number to each code, thus performing a version of Caesar’s cipher. I shall not tell you what this number was, but here is a hint: the first character of the sentence is a ‘T’. Then I encrypted each code individually using the RSA public key e=5, n=203

5 Your task Organise a brute force attack to find the private key of the RSA cipher and then calculate the shift value of Caesar’s cipher to find the correct decryption

6 What to submit? Submit one Python file with your code conducting the brute force attack. Within this file, write a comment stating what the correct decryption is.

7 What does your code need to do exactly? 1.Organise a loop through all possible private keys of the RSA cipher; for each key, do the following 2.Decrypt each number in the list with this private RSA key 3.Use your knowledge of the first letter to subtract a correct value from the decrypted codes, thus decrypting Caesar’s cipher (do not organise a brute force attack against Caesar’s cipher) 4.Convert the decrypted ASCII codes to a string and print it on the screen. That is, print exactly one decryption per each possible private key

8 How shall I mark your code? I shall run your code and see if it produces all possible decryptions of RSA, including the correct ones. 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.

9 Programming I attempted the coursework and wrote my solution in Python – My complete code contains less than 15 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 operations in Python, how to work with ASCII codes in Python etc.

10 The correct decryption to submit Together with your code, in the same file submit a comment clearly stating the following: 1.what the correct decryption is, and 2.what value of a private key one can use to produce it.

11 Labs Before the submission date of each piece of coursework, we shall have a lab on Monday 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

12 No collaboration This is an individual assignment I shall look for signs of collaboration and plagiarism


Download ppt "Computer Security coursework 2 Dr Alexei Vernitski."

Similar presentations


Ads by Google