a3 sol.pdf - UNIVERSITY OF WATERLOO Cheriton School of Computer Science CS 458\/658 Computer Security and Privacy Spring 2018 Hassan Khan ASSIGNMENT 3

a3 sol.pdf - UNIVERSITY OF WATERLOO Cheriton School of...

This preview shows page 1 - 3 out of 13 pages.

UNIVERSITY OF WATERLOO Cheriton School of Computer Science CS 458/658 Computer Security and Privacy Spring 2018 Hassan Khan ASSIGNMENT 3 Assignment due date: 26 July 2018 3:00 pm Total Marks: 50 Written Response Questions TA: Jason Cao [email protected] (Office hours: Tuesdays 12:00 –1:00 pm in DC 3333) Programming Questions TA: Bailey Kacsmar [email protected] (Office hours: Friday 1:30 pm–2:30 pm in DC 3333) Please use Piazza for all communication. Ask a private question if necessary. The TAs’ office hours are also posted to Piazza for reference. You are expected to follow the expected Aca- demic Integrity requirements for Assignments; you can find them here: . ca/library/get-assignment-and-research-help/academic-integrity/academic-integrity- tutorial . Strict penalties will be enforced on students for any Academic Integrity violations. 1
Image of page 1
Written Response Questions [23 marks] Note: Please ensure that written questions are answered using complete and grammatically correct sentences. You will be marked on the presentation and clarity of your answers as well as on the correctness of your answers. 1. [9 marks] Cryptosystems (a) [5 marks] One-Time Pad (OTP) OTP is defined as follows: C = P K , where ciphertext C , plaintext P and key K are bit strings of the same length, and is bitwise XOR. OTP is not secure if the key is reused. i. [1 mark] Suppose two plaintext strings of the same length, P 1 and P 2 , are padded with the same key K to produce ciphertexts C 1 and C 2 . Describe how you can obtain P 1 P 2 , given C 1 and C 2 (but not P 1 , P 2 , or K ). Prove the correctness of your solution. P 1 P 2 = C 1 C 2 Proof: C 1 C 2 = ( P 1 K ) ( K P 2 ) = P 1 ( K K ) P 2 = P 1 0 P 2 = P 1 P 2 ii. [2 marks] Now suppose P 1 and P 2 are English ASCII texts, where every eight bits represent either a letter or whitespace. Describe how you can obtain P 1 and P 2 , given P 1 P 2 . Crib-dragging: use very frequent English words (1 mark), such as “the”, “is”, “and”, put them on/drag them through every possible position in the string P 1 P 2 , and calculate the corresponding XOR of the chosen word and the substring of P 1 P 2 at the position (1 mark). If one of P 1 and P 2 indeed has the word at a position, then the result calculated at this position should be part(s) of some other English word(s), which is exactly the plaintext sub- string of the other message at the location. Otherwise, the result is highly likely to be unprintable/unreadable. As you progress, you can also make guesses based on the partial words/sentences you already have, and try out your guesses using similar approach. Solutions that are computationally close to brute force: 1 mark. No description other than “crib-dragging”: 1 mark. iii. [2 marks] Given C 1 and C 2 , and after recovering the plaintexts using the two previous steps, can you determine the key K , and why?
Image of page 2
Image of page 3

You've reached the end of your free preview.

Want to read all 13 pages?

  • Winter '13
  • DavidJao

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors