final10Solution - ODU Computer Science

advertisement
CS 772- Network and Systems Security
Fall 2010
Final Exam
Time 2 & 1/2 hours
Open Book & Notes
Name:
Login:
Question 1: 35 points
1.
2.
3.
4.
Choose single-digit distinct primes p and q
Compute n = p.q & Ø(n) = (p-1)(q-1).
Choose a number e that is relatively prime to Ø(n).
Find a number d that is the exponentiative inverse of e
i.e., e.d = 1 mod Ø(n).
5. Choose a single-digit number m < n and use the public key
<e,n> & the private key <d,n> to
 encrypt/decrypt m
 sign/verify m
Solution:
p=2, q=7, n = 14, phi(n) = 6
e= 5. d = 5 since:
Z*6 = {1,5}
1
5
1 5
1 5
5 1
95 mod 14 = 11
115 mod 14 = 9
Question 2: 10 points
Consider Diffie-Hellman with p=7 and g=2. Assume Alice picket 2 as her random number while
Bob picked 5 as his random number. What is the value of the shared secret between Alice and
Bob following the Diffie-Hellman message exchange?
Solution:
TA = 22 mod 7 = 4
X = 42 mod 7 = 2
TB= 25 mod 7 = 4
Y = 42 mod 7 =2
Question 3: 10 points
The following is Alice’s public key graphs G1 and G2
Find Alice’s private key (the mapping between G1 and G2).
G1:
1
1
2
3
4
5
1
1
2
1
3
1
1
4
5
1
1
1
1
1
1
1
C
D
G2:
A
A
B
C
D
E
B
1
1
1
1
1
1
1
Solution:
Alice Private Key
G1
1
2
3
4
5
1
G2
A
B
E
C
D
E
1
1
1
1
Question 4: 10 points
Show the multiplication table of Z8*
Solution
Z*8 = {1,3,5,7}
1357
11357
3 3 1 75
55713
77531
5
Question 5: 35 points
Part I:
Under what conditions the following protocol can be used for mutual authentacion?
{=====================================
Alice
Bob
I'm Alice, f(K, AliceTimestamp)
>
<
f(K, BobTimestamp)
======================================}
Solution:
If BobTimestamp is not equal to AliceTimestamp
6
Part II:
The following are mutual authentication using public keys.
Modify these two protocols to using timestamps instead of random numbers.
Protocol 11:
{=================================
Alice
Bob
I'm Alice , Ra
<
[Rb]Alice
>
[Ra]Bob , Rb
>
=================================}
 Protocol 12:
{===============================
Alice
Bob
I'm Alice, {Ra}Bob
<
Rb
>
Ra, {Rb}Alice
>
===============================}
7
Solution:
 Protocol 11:
{=================================
Alice
Bob
I'm Alice , [Ta]Alice
<
---------
>
[Ta]Bob
=================================}
Save 1 message
 Protocol 12:
{===============================
Alice
Bob
I'm Alice, {Ta}Bob
>
<
-Ta, {Tb}Alice
Tb
>
===============================}
No saving
8
Download