Docsity

5 Practice Problems on Computer System Security - Homework 1 | COMP 527, Assignments of Computer Science

Toggle sidebar
bg1
COMP 527 Fall 2000
HW #1 Assigned 9/14/200
Due 9/21/2000
1. What is the difference between a message authentication code (MAC) and a digital signa-
ture? Where would you use a MAC? What about a signature?
2. Assume that you have a strong one-way function Ek(x)where xcan be up to 1024 bits. You
decide to encrypt English plaintext by breaking it apart into English words. So, ’this is a dumb
idea’ would be encrypted as Ek(’this’),Ek(’is’),Ek(’a’),Ek(’dumb’),Ek(’idea’). You can assume
that an attacker does not have the key, k, and that the binary representation of an English word is
always less than 1024 bits.
a. Does this scheme provide message security? If not, give at least two different attacks on the
scheme.
b. Does it provide integrity for messages? Again, be sure to explain your answer.
3. Recall that DES is a (conjectured) one-way function that maps 64-bit plaintexts to 64-bit
ciphertexts under a 56-bit key. Symbolically, c=DESK(m).
Let ¯xbe the bitwise complement of x. DES has the additional property that if c=DESK(m)
then ¯c=DES ¯
K(¯m)Can you use this fact to mount a choosen-plaintext attack on DES that is better
than brute force? In other words, if you are allowed to choose a few m’s for which you will receive
c=DESK(m), can you discover Kwith less than 256 DES encryptions?
4. Consider the following MAC built out of a one-way function, EK(x). To MAC a message
M=m1◦m2◦...◦mn, let h0=Kand compute:
hi=Emi(hi−1)⊕hi−1for i=1,2,...,n.
The value of the MAC, MACK(M), is defined to be MACK(M) = hn. Given a message Mand
MACK(M), show that you can construct a message M06=Malong with MACK(M0)without know-
ing the key, K.
5. The RSA function is defined to be f(m) = memod N. Suppose you know that c1is f(m)
and c2is f(m+1)for some unknown m. Show how you can recover mfrom e=3, c1, and c2. To
get started,
c1=m3
c2= (m+1)3=m3+3m2+3m+1=c1+3m2+3m+1.
Taking square roots in Z∗
Nis hard, so that’s out. You can however, add, subtract, multiply, expo-
nentiate, and divide (take inverses). Try to write out an equation in c1and c2that equals musing
only these basic operations.
1

Partial preview of the text

Download 5 Practice Problems on Computer System Security - Homework 1 | COMP 527 and more Assignments Computer Science in PDF only on Docsity!

COMP 527 Fall 2000 HW #

Assigned 9/14/ Due 9/21/

1. What is the difference between a message authentication code (MAC) and a digital signa- ture? Where would you use a MAC? What about a signature? 2. Assume that you have a strong one-way function Ek ( x ) where x can be up to 1024 bits. You decide to encrypt English plaintext by breaking it apart into English words. So, ’this is a dumb idea’ would be encrypted as Ek (’this’), Ek (’is’), Ek (’a’), Ek (’dumb’), Ek (’idea’). You can assume that an attacker does not have the key, k , and that the binary representation of an English word is always less than 1024 bits. a. Does this scheme provide message security? If not, give at least two different attacks on the scheme. b. Does it provide integrity for messages? Again, be sure to explain your answer. 3. Recall that DES is a (conjectured) one-way function that maps 64-bit plaintexts to 64-bit ciphertexts under a 56-bit key. Symbolically, c = DESK ( m ). Let ¯ x be the bitwise complement of x. DES has the additional property that if c = DESK ( m ) then ¯ c = DES (^) K ¯ ( m ¯) Can you use this fact to mount a choosen-plaintext attack on DES that is better than brute force? In other words, if you are allowed to choose a few m ’s for which you will receive c = DESK ( m ), can you discover K with less than 2^56 DES encryptions? 4. Consider the following MAC built out of a one-way function, EK ( x ). To MAC a message M = m 1 ◦ m 2 ◦... ◦ mn , let h 0 = K and compute:

hi = Emi ( hi − 1 ) ⊕ hi − 1 for i = 1 , 2 ,... , n.

The value of the MAC, MACK ( M ), is defined to be MACK ( M ) = hn. Given a message M and MACK ( M ), show that you can construct a message M ′^6 = M along with MACK ( M ′) without know- ing the key, K.

5. The RSA function is defined to be f ( m ) = me^ mod N. Suppose you know that c 1 is f ( m ) and c 2 is f ( m + 1 ) for some unknown m. Show how you can recover m from e = 3, c 1 , and c 2. To get started,

c 1 = m^3 c 2 = ( m + 1 )^3 = m^3 + 3 m^2 + 3 m + 1 = c 1 + 3 m^2 + 3 m + 1.

Taking square roots in Z∗ N is hard , so that’s out. You can however, add, subtract, multiply, expo- nentiate, and divide (take inverses). Try to write out an equation in c 1 and c 2 that equals m using only these basic operations.