Trudy

IS-433 Information Security
Midterm Examination
First Semester 1433/34
October 13, 2012
Instructions:
1. It is a closed book/notes/laptop examination.
2. You are NOT allowed to use smart phones, even NOT as calculators.
3. You can use calculators in this exam.
4. Please make sure there are 7 pages in this exam booklet including the cover page.
5. Try to answer the questions in the space provided. If required use the other side of
the page.
6. Please be precise in your answers. Long but irrelevant answers will not be much
helpful.
7. This is 90 minutes and 60 marks exam.
Your Registration #:
Your Section:
Question #
1
2
3
4
5
6
7
8
Total
/ (5)
/ (2)
/ (5)
/ (8)
/ (7)
/ (3)
/ (20)
/ (10)
/ (60)
Score
Question 1.
Mention whether the statement given is true or false.
{1 x 5 Marks}
a. Cryptology is the art and science of making and breaking “secret codes”.
[T/F]
b. Kerckhoff’s principle states that a cipher “must not required to be secret”.
[T/F]
c. Confidentiality deals with preventing unauthorized reading of information.
[T/F]
Page 1 of 7
Your Registration # :
IS-433 Information Security
d. The AES algorithm is not a Fiestel cipher.
[T/F]
e. Integrity deals with unauthorized writing of information.
[T/F]
Question 2.
Consider the following permutation table:
If the input passed to this table is “01101110 01100101 01110100 01110111 01101111” then what is
the output?
[2 Marks]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
0 1 1 0 1 1 1 0 0 1 1 0 0 1 0 1 0 1 1 1
21 22 23 24 25 26 27 28 29 30 31 32
0 1 0 0 0 1 1 1 0 1 1 1
You have to rearrange the stream of bits according to the permutation table so the first output bit will
be the 16th bit of input, the second output bit the 7th bit of the input, and …so on. Last eight bits will
simply be dropped.
Question 3.
Consider the following DES S-Box:
This S-box is implemented 8 times in parallel so that 48 bit input can be processed at a time. If the
input passed to these 8 S-boxes is “01101110 01100101 01110100 01110111 01101111 01110100”,
then what will be the output. The figure given above uses hexadecimal digits.
You can answer in
HEX form if you want.
[5 Marks]
s-box
1
2
3
4
5
6
6-bit input
011011
100110
010101
110100
011101
110110
Row value
1-(01)
2-(10)
1-(01)
2-(10)
1-(01)
2-(10)
Column value
13-(1101)
3-(0011)
10-(1010)
10-(1010)
14-(1110)
11-(1011)
Page 2 of 7
Your Registration # :
Output (Hex)
5
8
C
9
3
7
Output (bits)
0101
1000
1100
1001
0011
0111
IS-433 Information Security
7
8
Question 4.
111101
110100
3-(11)
2-(10)
14-(1110)
10-(1010)
6
9
0110
1001
Consider the following AES S-box used in the ByteSub operation:
For a certain input block of length 64 bits, the output (in HEX)of the ByteSub operation using this Sbox is following:
0f
47
0c
af
15
d9
b7
7f
71
e8
ad
67
c9
59
d6
98
What could be the possible input block? Answer in hexadecimal format.
[8 Marks]
In this question you have to simple find the numbers given in the table, and by joining the row
number and column number of that cell, you will get your answer. For example, 0f our first element is
present in row number f and column number b. Hence, the input of this element was “fb”. (0.5 marks
for each correct element)
fb
16
81
1b
2f
e5
20
6b
2c
c8
18
0a
Page 3 of 7
Your Registration # :
12
15
4a
e2
IS-433 Information Security
Question 5.
Consider the RSA cryptosystem. If we take P=13 andQ=19 then:
a. What could be the possible value of e?
[1 Mark]
This implies (P-1)(Q-1) = 12 x 18 = 216
Any number which is relatively prime to 216 could be picked as e for example, 5, 7, 11, 13 etc. 0.25
marks for just calculating (P-1)(Q-1)
b. Calculate a suitable d for the e you have selected above.
[4 Marks]
d is the inverse of e in modulo 216. This means the remainder of the product of d and e when divided
with 216 is 1. If we use the Euler’s theorem then:
eΦ(216) ≡ 1 mod 216
[In case of wrong answer, 1.5 marks for writing this equation]
This implies that
d ≡ e-1 ≡ eΦ(216)-1
Now we know that
216 = 23 x 33
This implies that
Φ(216) = (23 – 22) x (33 – 32) = 4 x 18 = 72
[In case of wrong answer, 1.5 marks for finding
this]
Hence d ≡ e71 mod 216
If we take e = 5 then d = 173
If we take e = 7 then d = 31
c. If our message M is 4 then what would be the cipher text using the values of e and d
calculated above.
[2 Marks]
e
5
C = M mod 247 = 4 mod 247 = 1024 mod 247 ≡ 36
[1 Mark for writing the formula correctly]
Page 4 of 7
Your Registration # :
IS-433 Information Security
Question 6.
Decrypt the cipher text “12” for N = 143 and d = 37.
[3 Marks]
M = Cd mod N = 1237 mod 143 = (122)18 12 mod 143
Since 122 = 144 ≡ 1 mod 143, hence
(122)18 12 mod 143 ≡ (1)18 12 mod 143 ≡ 1 12 mod 143 ≡ 12
Question 7. Consider the knapsack cryptosystem. Suppose the public key consists of
(18, 30, 72, 44) and N = 47.
a. Find the private key, assuming m = 6.
The private key SIK=m-1 GK mod N
SIK1=18/6 mod 47 =3
SIK2= 30/6 mod 47=5
SIK3= 72/6 mod 47=12
SIK4= 44/6 mod 47=23
SIK= {3, 5, 12, 23}
Note
Any error in the mod gives -3
Page 5 of 7
Your Registration # :
[10 Marks]
IS-433 Information Security
b. Encrypt the message M = 1110 using the public key.
[5 Marks]
C=1110= 18*1 + 30*1 +72*1 + 44*0= 120
c. Decrypt the cipher text obtained in part b using the private key.
M= C/M mod N= 120/6 mod 47= 20
Using SIK
20=12+5+3=1110
Page 6 of 7
Your Registration # :
[5 Marks]
IS-433 Information Security
Question 8. The man-in-the-middle attack on Diffie-Hellman is illustrated in
Figure4.2. Suppose that Trudy wants to establish a single Diffie-Hellman value, gabt
mod p, that she, Alice, and Bob all share. Does the attack illustrated below succeed?
Justify your answer.
[10 Marks]
Alice
Bob
a
g mod p
gb mod p
gat mod p
gbt mod p
Trudy
To get gabt mod p, Trudy needs to have ga, gb, in addition to a, b and t so that gabt can be computed
using ga , then raised to the power b and then to the power t.
Since he has only ga and gb , the best he can get is g(a+b)t , which is not the required.
Page 7 of 7
Your Registration # :