Starting from:

$30

CMPSC 443 Homework 2

Homework 2:       Your Name ______________________________


1.    (6) Consider a Diffie-Hellman scheme with a common prime p=11 and a primitive root g=2.
a)    If user A has a private key of 3, what is A’s public key?
b)    If user B has a private key of 5, what is its public key? 
c)    What is their shared secret key K?







2.    (10 pts) Perform both encryption and decryption using the RSA algorithm for the following:    (1)  p=3, q=13, e=5, and M=3.  (2) p=5, q=11, e=3, M=7;     (you may guess d, you may use the repeated squaring based power reduction technique we introduced in the class)









3.    (5 pts) In a public-key system using RSA, you intercept the ciphertext C=10 sent to a user whose public key is e=5, n=35.  What is the plaintext M?







4.    (6pts) Let h1 and h2 be two hash functions. Show that if either h1 or h2 is collision resistant, then the hash function h(x) = h1(x) ||h2(x), is collision resistant.










5.    (9 pts) Given that we have 46 students in our classroom, compute (1) what is the probability p1 that there is at least another people who have the same birthday as yours (2) what is the probability p2 that there are at least two people who have the same birthday? (3) based on the previous result, please explain why for SHA-1, its actual security strength is only about 80 bits. 












6.    (8 pts) In this problem we will compare the security services that are provided by digital signatures (DS) and message authentication codes (MAC).  We assume that Oscar is able to observe all messages sent from Alice to Bob and vice versa.  Oscar has no knowledge of any keys but the public one in case of DS.  State whether and how (i) DS and (ii) MAC protect against each attack.  The value auth(x) is computed with a DS or a MAC algorithm, respectively.
a)    (Message integrity) Alice sends a message x = “Transfer $1000 to Mark” in the clear and also sends auth(x) to Bob.  Oscar intercepts the message and replaces “Mark” with “Oscar”.  Will Bob detect this?
b)    (Replay) Alice sends a message x = “Transfer $1000 to Oscar” in the clear and also sends auth(x) to Bob.  Oscar observes the message and signature and sends them 100 times to Bob.  Will Bob detect this?
c)    (Sender Authentication with cheating third party) Oscar claims that he sent some message x with a valid auth(x) to Bob but Alice claims the same.  Can Bob clear the question in either case?
d)    (Authentication with Bob cheating) Bob claims that he received a message x with a valid signature auth(x) from Alice (e.g. “Transfer $1000 from Alice to Bob.”) but Alice claims she has never sent it.  Can Alice clear this question in either case?











7.    (6 pts) What is a PKI? What are the three trust models for PKI (explain their meanings and example in some details)?  







Additional problems from the textbooks:   4.2, 4.6,  4.12, 4.13, 5.4,  5.17,  5.21, 5.30






More products