=========================preview======================
(COMP364)[2008](f)quiz~kychowaa^_41261.pdf
Back to COMP364 Login to download
======================================================
COMP364 Computer Security, 2008 Fall Semester
Quiz 1, Sample Solutions
Problem 1: Does 2 have the multiplicative inverse modulo 12? Justify your answer brie.y.
16 marks Solution: No. This is because gcd(2,12) =2 .1.
=
Problem 2: Let f be a permutation of Zd, where d is a positive integer. It is a 5-tuple (M,C,K,Ek ,Dk ), where
.
M = C = set of all .nite strings of English letters.

.
K isthe setof allpossiblepairs(d,f).

.
k =(d,f)K is the secret key; and

.
Amessageisdividedintoblocks oflength d. For each messageblock m = m0 md.1 ,


Ek (m)= mf (0) mf (d.1)
. For each ciphertext block c = c0 cd.1 ,
Dk (c)= cf .1 (0) cf .1 (d.1)
An English message M of 120d letters is encrypted into a ciphertext C using the transposition cipher above. Suppose that the English letter a appeared 36 times in M. What is the number of times a appeared in the ciphertext C?
16 marks Solution: 36. Problem 3: Inordertouseatwo-key cipherasapublic-key cipher securely,thetwo-key
cipher must satisfy two conditions. What are the two conditions?
16 marks
Solution:
1.
It is computationally infeasible to derive the decryption key from the encryption key.

2.
It is computationally infeasible to derive the message from the ciphertext.


Problem 4: Explain brie.y why the prime p in the RSA system must be kept secret.
16 marks
Solution: Because in RSA system, {e,n}is public knowledge, {d}is secret key. If p is known to an attacker, then the attacker can compute q = n/p,(n)=(p.1)(q.1), and .nd out the secret key d = e.1 mod (n).
1
Problem 5: What are the three purposes of having the certi.cate hierarchy in a PKI? (Recall that in the certi.cate hierarchy, we have the Root CA, intermediate CAs, Local CAs, and users which are arranged using a tree structure).
16 marks Solution: The main purpose are the following:
.
It solves the scalability problem.

.
It makes the administration easier.

.
It allows the establishment of CA trust through the chain in the hierarchy.


Problem 06: Suppose that RSA and a hash function f are used for digital signature. The standard approach is the following: to compute a hash value f(m)of the message m with a hash function f, and then
1.
The signer computes a hash value f(m)of the message m.

2.
Thesignerthenuseshis/herprivatekeykd tocomputehisdigitalsignatureDkd (f(m)).

3.
The signer .nally sends m||Dkd (f(m))to the receiver.


In this protocol, digital signature is used for nonrepudiation purpose. Can the digi-tal signature be used for data integrity checking purpose? Justify your answer brie.y.
20 marks
Solution: Yes. If someone modi.ed the data during transmission, the signature veri.-cation will fail. So it can be used for data integrity checking.
2