Professional Documents
Culture Documents
Maasai Mara University University Examination 2016/2017 Third Year Second Semister Examination Bachelor of Science (Computer Science)
Maasai Mara University University Examination 2016/2017 Third Year Second Semister Examination Bachelor of Science (Computer Science)
INSTRUCTIONS:
Attempt all Questions in section A and any other TWO questions from section B
SECTION A (30Marks): Answer all questions from this section
QUESTION 1
(a) Distinguish between the following terms (3 Marks)
(i) block cipher and stream cipher
(ii) Deciphering and enciphering
(iii) Explain three ways an attacker can use cause a denial of service attack to a computer
network .
(b) You know that the ciphertext "XOIJRYVBN" was encrypted with the Vigenere cipher.
Furthermore, you have determined that the encryption password is "RAIN." What is the
corresponding plaintext? (3 Marks)
QUESTION 2
a) Find x (5 Marks)
i). 3x ≡ 1 (mod 10)
ii). 7x ≡ 5 (mod 9)
iii).x2 ≡ 3 (mod 6)
iv). x2 ≡ 10 (mod 13)
v). x2 ≡ 5 (mod 8)
b) What are the five principal provided by PGP (5 Marks)
c) Calculate 1377 (mod 19) (4 Marks)
d) Give three properties that a digital signature should have (6 marks)
2
QUESTION 3
a) State and explain six types of computer viruses (3 Marks)
b) Assume that passwords are selected from four-character combinations of 26
alphabetic characters. Assume that an adversary is able to attempt passwords at a
rate of one per second. (4 Marks)
i). Assuming no feedback to the adversary until each attempt had been
completed, what is the expected time to discover the correct password?
ii). Assuming feedback to the adversary flagging an error as each incorrect
character is entered, what is the expected time to discover the correct
password?
c) Users A and B use the Diffie-Hellman key exchange technique with a common prime q =
71 and primitive root β =7 (6 Marks)
i). If user A has primitive key XA = 5, what is A’s pubic key YA?
ii). If user B has private key XB = 12, what is B’s pubic key YB ?
iii).What is the shared secret key?
d) Explain three ways an attacker can use cause a denial of service attack to a computer
network (3 Marks)
e) Explain the four phases of a computer virus (4 Marks)
QUESTION 4
(a) We encrypt with double Vigenere using for the first encryption the key k_1 = (1,3,5,7) and
for the second encryption the key k_2 = (2,4). Show that this is equivalent to simple
Vigenere encryption, and find the key for the single Vigenere encryption that is
equivalent with double Vigenere encryption with the above keys k_1 and k_2. (8 Marks)
(b) The plaintext `friday’ is encrypted using the Hill cipher with m=2 to give the ciphertext
`PQCFKU’. Find the key K. (It is acceptable to write the key K as a product of two matrices
without performing the multiplication or taking the inverse.) (6 Marks)
(c) Suppose that you are informed that the plaintext `abccab’ has been encrypted with the
Vigenere cipher and the corresponding ciphertext is `bbccab’. What is the key length?
(6 Marks)