Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Faculty of Computer Studies

Course Code: T318


Course Title: Applied Network Security

Mid-term

Summer Semester

Date: TBA

:Number of Exam Pages


)( :Time Allowed 2h
including this cover sheet((

Instructions:

 Total Marks: 60
 Total Number of Questions:
o Part 1: 6
o Part 2: 5
o Part 3: 4
 Marks Distribution:
o Part 1: 6 marks
o Part 2: 20 marks
o Part 3: 34 marks
 Write your answer in the answer booklets. Answers given on the exam paper will
not be marked.
 The use of electronic devices that could have a memory is NOT permitted
 Be sure you write your name and ID on the External Answer booklet.

T318 - MTA Page 1 of 6 Summer 2021


Part 1: Multiple choices: For each question select the best answer (place the answer
on the external answer booklet) – Each question carries a WEIGHT OF 1 mark.
Total: 6 Marks
1. The opponent is most willing to recover______:
A. The Encryption key
B. The plaintext
C. The ciphertext
D. The Identity of the sender and/ or receiver
ANSWER: A

2. Cryptography systems can be divided into


A. Substitution and Transposition
B. Symmetric and Asymmetric
C. Block cipher and stream cipher
D. All are correct
ANSWER: D

3. The most difficult Attack scenario is


A. Ciphertext only
B. Known Plaintext
C. Chosen plaintext
D. chosen ciphertext
ANSWER: A

4. We can use Compression techniques to make the encryption more secure and difficult
to attack
A. True
B. False
ANSWER: A

5. Steganography is different from Encryption. Anyway, We use encryption in


Steganography process
A. True
B. False
ANSWER: A

6. Rotor Machines is an example of a multi stage Encryption


A. True
B. False
ANSWER: A

Part 2: Short questions: Answer the following questions – Each question carry a
WEIGHT OF 4 marks. Total: 20 Marks

T318 - MTA Page 2 of 6 Summer 2021


1. Distinguish between cryptography and steganography. (4 Marks)
a. Cryptography, a word with origin in Greek, means “secret writing.” We used
the term to refer to the science and art of transforming messages to make
them secure and immune to attacks.(2 Marks).
b. Steganography, a word with origin in Greek, means "covered writing."
Steganography refers to concealing the message itself by covering it with
something else(2 Marks).

2. Define the type of security attack in each of the following cases (4 Marks)
a. A student gives a check for $10 to buy a used book. Later she finds that
the check was cashed for $100.
a. This is modification (attack to the integrity of data). The value of the check is
changed (from $10 to $100)
b. A student sends hundreds of e-mails per day to another student using a
phony return e-mail address.
b. This is denial of service (attack to availability). Sending so many e-mails
may
crash the server and the service may be interrupted.
3. Distinguish between a monoalphabetic and a polyalphabetic cipher. (4 Marks)
Substitution ciphers can be divided into two broad categories: mono alphabetic
ciphers and polyalphabetic ciphers.
a. In monoalphabetic substitution, the relationship between a character in the
plaintext and the characters in the ciphertext is one-to-one.
b. In polyalphabetic substitution, the relationship between a character in the
plaintext and the characters in the ciphertext is one-to-many.
4. Distinguish between a substitution cipher and a transposition cipher(4 Marks)
a. In Substitution Cipher Technique plain text characters are replaced with
other characters, numbers and symbols as well as in substitution Cipher
Technique, character’s identity is changed while its position remains
unchanged. .(3 Marks)
b. Transposition Cipher Technique rearranges the position of the plain text’s
characters. In transposition Cipher Technique, The position of the character
is changed but character’s identity is not changed.
5. Distinguish between diffusion and confusion
a. Diffusion complicates the statistics of the ciphertext, and makes it difficult to
discover the key of the encryption process.
b. Confusion makes the use of the key so complex, that even when an attacker
knows the statistics, it is still difficult to deduce the key.

Part 3: Answer all of the following questions Total: 34 Marks

1. Using the Euclidean algorithm, find the greatest common divisor of the following
pairs of integers. (4 Marks)
a. 88 and 220
44
b. 300 and 42
6
c. 24 and 320
8
d. 401 and 700

T318 - MTA Page 3 of 6 Summer 2021


1
2. Solve the following problems based on DES algorithm(10 Marks)
a. Show the results of the following hexadecimal data
0110 1023 4110 1023
after passing it through the initial permutation box. PLEASE your answer
must be in hexadecimal.(5 Marks)
Answer
(1066 0099 0088 0088) 16
b. Show the results of the following hexadecimal data
AAAA BBBB CCCC DDDD
after passing it through the final permutation box. PLEASE your answer
must be in hexadecimal.(5 Marks)
(0F55AAFF0F55AAFF) 16

3. Solve the following problems based on streaming cipher(10 Marks)


a. A Transposition Cipher (but not a Rail-fence Cipher) was used to
produce the following ciphertext:(UO!HZESSSQTYTIOIIA)
The key used was: 5 2 6 3 4 1
What was the plaintext used (it is in English)? (5 Marks)
Answer: THIS QUIZ IS TOO EASY!

b. Given the ciphertext and key below, find the plaintext if the Playfair cipher
was used. x is the special character used for padding and i and j are
treated as the same character
C = eiioqoyldc
K = security
what is the plaintext? (5 Marks)
Answer
With K = security the Playfair matrix is:

Considering the ciphertext C, find the pairs of input plaintext:

T318 - MTA Page 4 of 6 Summer 2021


4. Consider a block cipher, ABC, which is defined by Table 1. The table gives the
ciphertext C (columns 2 to 9) produced when encrypting the plaintext P (column 1)
with one of the eight keys. (10 Marks)

a. Assuming CBC was used with ABC, decrypt the ciphertext 11110110 using
the key 001 and initialization vector 1110. Explain your calculations in
details. (5 Marks)
Answer. C1 = 1111. Decrypt with key 001 gives 1001. XOR with IV gives
0111. So P1 is 0111. C2 = 0110. Decrypt with key 001 gives 1010. XOR
with C1 gives 0101. So P2 is 0101.
The plaintext is 01110101.

b. Consider the cipher ABC being used in Counter Mode to act as a


pseudorandom number generator. If the initial value of the counter is 0000
and the seed is 101, then what are the first 12 pseudorandom bits? (5
Marks)
Answer. In Counter mode, the counter value is encrypted with the cipher,
where the seed is the key. The pseudorandom bits are the output ciphertext.
Then the counter is incremented and encrypted with the same seed to
produce more bits, and so on.
Seed = 101
Counter = 0000
Randombits = 0111
Counter = 0001
Randombits = 1000
Counter = 0010
Randombits = 1111
So the 12 pseudorandom bits are: 0111 1000 1111.

T318 - MTA Page 5 of 6 Summer 2021


Reference page

Figure 1:inital and final permutation

Figure 2:Cipher Block Chaining (CBC) mode encryption

Figure 3:Counter Mode (CTR)mode encryption

T318 - MTA Page 6 of 6 Summer 2021

You might also like