Assignment 1: Part 1: Security Basics and Principles
Assignment 1: Part 1: Security Basics and Principles
Assignment 1
2. (5 pts) Briefly describe the traffic padding mechanism (you can find it discussed in X.800).
Which security service could make use of this mechanism? Would using this mechanism alone
be sufficient to provide the service you mentioned?
3. (10 pts) Prove the following (a × b) mod n = ((a mod n) × (b mod n)) mod n, where a, b are
integers and n is a positive integer.
4. (10 pts) Use the extended Euclidean algorithm to find the multiplicative inverse of 11 modulo
27. Hint: As discussed in lecture, map the problem of computing a−1 mod n to solving the
equation ax + ny = 1.
Part 3: Cryptography
1. (10 pts) Suppose a message space contains three possible messages {“kmoq”, “aceg”, “rtuv”},
where Pr[M = “kmoq”] = 0.6, Pr[M = “aceg”] = 0.2 and Pr[M = “rtuv”] = 0.2. Assume a
shift cipher was used, and an eavesdropper obtained a ciphertext “zbdf”. Show how this can
benefit the eavesdropper in detail, and argue why the shift cipher is not perfectly secure.
2. (10 pts) In the one-time pad version we discussed, for n-bit messages selected from {0, 1}n , the
key was selected uniformly from {0, 1}n , i.e., it could take the value of any n-bit string with
equal probability. Alice decided to modify the scheme in a way such that the key is only selected
from {0, 1}n - 0n , i.e., remove the all-zero string 00000 . . . 0 from the key space, as xoring a zero
string with the message will result into the message itself. Will the modified one-time pad still
be perfectly secure? Justify your answer.
3. (40 pts) In class, we discussed that one-time pad keys should never be reused. The following
six ciphertexts are the encryption of six English sentences using a one-time pad under the same
key. Your task in this question is to figure out the complete plaintext. All sentences have the
same length, and only use English letters and space. Neither punctuation nor special characters
were used. Each byte of the ciphertext is written in hexadecimal format. Using the approach
discussed in class, find the plaintext corresponding to each ciphertext.
1
Alexandria University CC 551: Computer and Network Security
Faculty of Engineering Assigned: Thursday, February 20, 2020
Computer and Communication Engineering (SSP) Due: Thursday, February 27, 2020 (9:00 p.m.)
(a) AEDE0273C4C0DA3477F919018A05DA71A2530F5A0020E4E0ACA80FF2DE
(b) A8C80426C2DEC16D31F90D1497129475A45447561D74EEF1B8BF0FFCDC
(c) A9D30426D3C7CB202EB8050E9717C734A5484A13126CE0FDABA212FBDF
(d) B49B166FDAC58E2A25F90A159914D134B84E0F551677A7FFB6A512FBC1
(e) B49B126ED7C5C26D20EA07149D40C771B2555D565373E8F4ADBC07E1D7
(f) B3DE1763C489DC2822EB0B40970ED134A54942565370E6F6F9A003EAC1
To solve this question, you could use a mix of automation and guessing. Your answer should
include a description of your approach and a link to your code. You can post all of your code to
a secret gist on Github and provide the link of the gist in your answer.
You can use any programming language of your choice.
Submission
• Please use this Google form to submit your answers. Your answers should be submitted as a
PDF file. The file name should strictly be “asg1 id.pdf”. The “id” substring should be replaced
by your student number. Please include your name and details in the document as well. The
PDF file size should not exceed 1 MB. If you type your answers electronically, most likely you
will not exceed the limit.
Policies
• No late submission is allowed. If you have a documented excuse, please contact the instructor.
• Academic integrity: You must solve this assignment individually. Any act of cheating will be
severely penalized. If you face any difficulties, please contact the instructor. Do not post public
questions on Piazza that discusses your answer approach or code in public.