Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Faculty Of Computer Studies

Course Code: T318


Course Title: Applied Network Security

MTA ---SOLUTION

Semester – Academic Year: Spring 2019


Date: ----, 2019
Number of MTA Pages: (7) Time Allowed:
( 2 ) Hours
(including this cover sheet)

Instructions:

 This MTA has 3 parts worth 60 marks.


 Part 1 (6 marks): you should attempt all sub-parts of the question.
 Part 2 (24 marks): you should attempt only 4 out of 5 questions.
 Part 3 (30 marks): you should attempt all the questions of this part.
 You should spend proportional amount of time in solving each part.
 Use of calculator is allowed but it must not contain inside it anything
related to the course.
 You must use a separate answer booklet, to be provided to you
separately, to solve the MTA.
 You must not solve any part of the MTA on this paper and you must
provide all your answers on the separate answer booklet.

1
This study source was downloaded by 100000805372844 from CourseHero.com on 10-11-2022 07:50:32 GMT -05:00

https://www.coursehero.com/file/57106953/T318-Spring-2019-MTA-Soldocx/
Part 1: This part carries 6 marks of the total MTA marks. You should attempt all
questions. Select the most appropriate choice. 1 mark for each one.

1. ____B______ involves the passive capture of a data unit and its subsequent retransmission to
produce an unauthorized effect.
A) Disruption B) Replay

C) Service denial D) Masquerade

2. A loss of ___ B _______ is the unauthorized disclosure of information.


A) authenticity B) confidentiality

C) reliability D) integrity

3. A(n) _____A_____ is a potential for violation of security, which exists when there is a
circumstance, capability, action or event that could breach security and cause harm.

A) threat B) attack

C) risk D) attack vector

4. Data appended to, or a cryptographic transformation of, a data unit that allows a recipient of
the data unit to prove the source and integrity of the data unit and protect against forgery is
a(n) ____B_______.
A) security audit trail B) digital signature
C) encipherment D) authentication exchange

5. A _____A_____ attack involves trying every possible key until an intelligible translation of
the ciphertext is obtained.
A) brute-force B) Caesar attack

C) ciphertext only D) chosen plaintext

6. The AES encryption round has the structure: ____B______

A) ShiftRows, MixColumns, SubBytes, InvMixColumns

B) SubBytes, ShiftRows, MixColumns, AddRoundKey

C) MixColumns, ShiftRows, SubBytes, AddRoundKey

D) InvShiftRows, InvSubBytes, AddRoundKey, InvMixColumns

2
This study source was downloaded by 100000805372844 from CourseHero.com on 10-11-2022 07:50:32 GMT -05:00

https://www.coursehero.com/file/57106953/T318-Spring-2019-MTA-Soldocx/
Part 2: Classical Encryption Techniques (24 marks)

You should attempt only 4 out of 5 questions.

Exercise 1 [6 marks]
Answer the following questions:
a) Alice would like to send a message to Bob by using asymmetric cryptography. She wants
to ensure that only Bob can decrypt the message. What key should he use for the
decryption? (2 marks)

Private key of Bob

b) Christopher received a message from Richard that contains a digital signature. When
Christopher wants to verify the digital signature, what key should he use to decrypt it? (2
marks)

Public key of Richard

c) What are the differences between CCM and GCM operation mode? (2 marks)

CCM and GCM ensure data confidentiality in addition to data integrity and source
authentication. The difference is the step of data integrity and source authentication.
CCM uses CMAC , while GCM uses GMAC.

Exercise 2 [6 marks]
We are using the affine cipher: 5x + 7 mod 26 to encrypt a plaintext “DOIT”. Find the ciphertext. (Don’t
forget: Letter ‘A’ = 0, ‘B’ = 1, …, ‘Z’ = 25)

Plaintext: WZVY

Exercise 3 [6 marks]

Decrypt “XURJ” using the Hill cipher with the key: [3211] .

3
This study source was downloaded by 100000805372844 from CourseHero.com on 10-11-2022 07:50:32 GMT -05:00

https://www.coursehero.com/file/57106953/T318-Spring-2019-MTA-Soldocx/
Plaintext: DOIT
Exercise 4: [6 marks]
We are using the Vigenere cipher with the key “SECRET”. Note that the Vigenere Tableau is attached to
the exam.

a) Encrypt the plaintext word “DOITASAP”


b) Decrypt the ciphertext word “ ZINCS”

Encrypt the plaintext word “DOITASAP”


Ciphertext: vskkelst

Decrypt the ciphertext word “ ZINCS” Plaintext: hello

Exercise 5: [6 marks]
Encrypt the message “SEARCHHIM” using the Playfair cipher with the key “NEWTON”.

Ciphertext: PODMBIIKQU

Part 3: Modern Encryption Techniques (30 marks)


Exercise 6: [10 marks]
Assume that you have the following input:
o Substitution table S-box= [3 1 6 7 0 4 5 2]

o Permutation table P-box= [6 3 5 4 8 7 2 1]

o Round key RK= [7 1 5 3 6 2 4 0]

o The plaintext T is = [7 7 7 7 7 7 7 7]

Now, writing out the following steps:

a) Mix (XOR) the message T with the listed round key (RK) (1 marks)

4
This study source was downloaded by 100000805372844 from CourseHero.com on 10-11-2022 07:50:32 GMT -05:00

https://www.coursehero.com/file/57106953/T318-Spring-2019-MTA-Soldocx/
T XOR RK=[ 0 6 2 4 1 5 3 7]

b) Then, permute the mixed message by using the listed permutation table (P-box).
Permutation operation works with index that start from 1. (2 marks)

[5 2 1 4 7 3 6 0]
c) Then, substitute the permuted message by using the listed substitution table. Note that
the substitution operation works with value that starts from 0. (2 marks)

[4 6 1 0 2 7 5 3]
d) Calculate the inverse round key? Explain how you obtain it? (2 marks)

RK = [7 1 5 3 6 2 4 0] since (a xor a=0)

e) Calculate the inverse permutation table? (P-1[P[i]]=i) (2 marks)

Inv_Pbox = [8 7 2 4 3 1 6 5]
f) Calculate the inverse substitution table? (S-1[S[i]] =i) (1 marks)

Inv_Sbox =[ 4 1 7 0 5 6 2 3]

Exercise 7: [10 marks]


Assume that you have the following input:
Permutation table P-box1= [7 8 1 4 3 2 6 5]

 Permutation table P-box2= [2 7 5 6 4 3 8 1]

 Substitution table S-box1= [5 2 0 6 1 4 3 7]

 Substitution table S-box2= [3 7 4 0 2 5 1 6]

 The plaintext T is = [7 7 7 7 0 0 0 0]

5
This study source was downloaded by 100000805372844 from CourseHero.com on 10-11-2022 07:50:32 GMT -05:00

https://www.coursehero.com/file/57106953/T318-Spring-2019-MTA-Soldocx/
Now, writing out the following steps:

a) Permute the message T by using the first permuted table P-box1 to obtain the first
permutation ciphertext C1. Then, permute the message T by using the second
permutation table P-box2 to obtain the second permuted ciphertext C2. After this,
calculate the difference percentage at the bit level between CP1 and CP2. And what is
your conclusion? (2 marks)
 C1 =[ 0 0 7 7 7 7 0 0]
 C2 =[ 7 0 0 0 7 7 0 7]
 Difference = 50%  AE is reached

b) Substitute the message T by using the first substitution table S-box1 to obtain the first
substituted ciphertext CS1. Then, substitute the message T by using the second
substitution table S-box2 to obtain the second substitution ciphertext CS2. After this,
calculate the difference percentage at the bit level between CS1 and CS2. And what is
your conclusion? (3 marks)

 CS1 =[ 7 7 7 7 5 5 5 5]
 CS2 =[ 6 6 6 6 3 3 3 3]
 Difference =50% AE is reached
c) Calculate the difference at the element level between S-box1 and S-box2? And what
is your conclusion? (3 marks)

 Difference = 8 elements (all elements are different between the both


substitution tables) (50%)
d) Calculate the difference at the element level between P-box1 and P-box2? And what
is your conclusion? (2 marks)

 Difference = 8 elements (all elements are different between the both


permutation tables) (50%)

Exercise 8: [10 marks]


Assume that you have the following input:
 The plaintext T0 is = [0 0 0 1 1 0 0 0]

6
This study source was downloaded by 100000805372844 from CourseHero.com on 10-11-2022 07:50:32 GMT -05:00

https://www.coursehero.com/file/57106953/T318-Spring-2019-MTA-Soldocx/
 The plaintext T1 is = [0 0 0 0 1 0 0 0]

Function F:

 F(T0) with a key K is = [1 0 1 1 1 1 0 0]

 F(T0) with a key K’ is = [1 0 1 0 1 0 0 0]

 F(T1) with a key K is = [0 1 0 0 1 0 1 0]

 F(T1) with a key K’ is = [1 0 1 0 1 0 1 0]

Function G:

 G(T0) with a key K is = [1 1 1 0 1 0 1 1]

 G(T0) with a key K’ is = [0 1 1 1 1 1 1 0]

 G(T1) with a key K is = [1 0 0 1 0 1 0 0]

 G(T1) with a key K’ is = [0 0 1 1 0 0 1 1]

Now, which function F or G is more suitable to be considered as a secure Keyed compression


function.

For the function F: (7.5 marks)

Independence Plaintext-Sensitivity Key-Sensitivity Plaintext and key


Dif(T0, F_T0_K)=3 Diff(F_T0_K, F_T1_K) = Diff (F_T0_K, sensitivity
DifT0, F_T0_KK)=3 6 F_T0_KK) = 2 Diff (F_T0_K,
Dif (T1, F_T1_K )=2 Diff(F_T0_KK, Diff (F_T1_K, F_T1_KK) =3
Diff(T1, F_T1_KK)=3 F_T1_KK) =1 F_T1_KK) = 3 Diff (F_T1_K,
F_T0_KK) =4

According to these results, function F cannot be considered as a secure Keyed compression function
(plaintext and key sensitivity are not ensured).

For the function G: (7.5 marks)

7
This study source was downloaded by 100000805372844 from CourseHero.com on 10-11-2022 07:50:32 GMT -05:00

https://www.coursehero.com/file/57106953/T318-Spring-2019-MTA-Soldocx/
Independence Plaintext-Sensitivity Key-Sensitivity Plaintext and key
Dif(T0, G_T0_K)= 6 Diff(G_T0_K, G_T1_K) = 7 Diff (G_T0_K, G_T0_KK) = 4 sensitivity
DifT0, G_T0_KK)= 4 Diff(G_T0_KK, G_T1_KK) Diff (G_T1_K, G_T1_KK) =5 Diff (G_T0_K, G_T1_KK)
Dif (T1, G_T1_K )= 4 =4 =4
Diff(T1, G_T1_KK)= 3 Diff (G_T1_K, G_T0_KK)
=5

Function G ensures plaintext and key sensitivity in addition to the independence, and collision
resistant.

8
This study source was downloaded by 100000805372844 from CourseHero.com on 10-11-2022 07:50:32 GMT -05:00

https://www.coursehero.com/file/57106953/T318-Spring-2019-MTA-Soldocx/
Powered by TCPDF (www.tcpdf.org)

You might also like