Exercise 1: Systems and Network Security (NETW-1002) / Spring 2022 Dr. Minar El-Aasser
Exercise 1: Systems and Network Security (NETW-1002) / Spring 2022 Dr. Minar El-Aasser
Exercise 1
Question 1
An encryption system was designed to use a 32-bit key. A software developer wanted to implement the
system and make the key entry easier for users, so he made the user enter the key by keyboard as 4 ASCII
characters. Knowing that an ASCII character occupies 8 bits and that there are 127 ASCII characters, of which
there are 33 non-printing characters (do not show on screen or keyboard). How does this implementation
choice affect the security of the system, why? Explain in numbers.
Question 2
The cryptographic system in Figure 1 is a block cipher whose input is 3-bit blocks and whose key
length is 5 bits. Input bits b1b2b3 along with the first and last bits of the key, k1 and k5 respectively
enter into a substitution block S that operates according to the table given below. The output from the
substitution block is then XOR’ed with bits k2k3k4 of the key to produce the cipher text. You were asked
to evaluate the system, and right away you discover errors. Correct the errors and draw a block diagram
for decryption.
1
Systems and Network Security (NETW-1002) / Spring 2022
Dr. Minar El-Aasser
Question 3
An encryption system is defined as:
• A set M of plain-text messages.
• A set C of cipher texts.
• A set K of messages, where for each k ∈ K, there exists an encryption function ek : M → C.
i. Justify why, for all k ∈ K, ek should be bijective.
/ k2 ?
ii. Can we have a situation where, for a message m, ek1 (m) = ek2 (m), and k1 =
iii. Suppose M is the number of plain text messages, and C is the number of cipher texts. What is the number
of injective functions from M to C?
iv. What is the maximum number of keys?
Question 4
A permutation cipher accepts, as input, a block of 4 bits.
i. Give an example of a permutation table.
ii. Prove that, for any choice of permutation table, we can always find a plain text message m such that
ek(m) = m
Question 5
A substitution table accepts, as input, a block of 4 bits.
i. Give an example of a substitution table.
ii. Now assume that, using the substitution table, we perform repeated encryption of plain text messages for n
times. Repeated encrytpion means the successive application of encryption over a message m. For
instance, repeated encryption for three times means that we compute ek(ek(ek(m))). Prove that, for any
choice of substitution table, there exists a number n, such that after repeatedly encrypting a message
m for n times we will obtain m again, i.e., ek(ek(. . . ek(ek(m)) . . .)) = m. What are the minimum and
maximum values for n?
Question 6
The affine cipher is defined as c = am + b mod 26, where m is the plain text and c is the corresponding
cipher text. Both m and c are letters of the English alphabet. Letters are represented by numbers where
A = 0, B = 1, . . . Z = 25. What conditions should be imposed on the values of a and b such that the encryption
represents a bijective function. Note here that the Key K is the pair (a, b).
2
Systems and Network Security (NETW-1002) / Spring 2022
Dr. Minar El-Aasser
Question 7
Assume an encryption system that accepts, as input, blocks of 8 bits. The encryption is done by
XOR’ing the bits with an 8-bit key. Prove that
i. (m1 ⊕ m2) = ek(m1) ⊕ ek(m2)
ii. There does not exist a message m, such that ek(m) = m, except when k is all 0’s.