Homework Week 2 Coursera
Homework Week 2 Coursera
Homework Week 2 Coursera
You submitted this homework on Sun 21 Jul 2013 3:52 PM PDT (UTC -0700). You
got a score of 15.00 out of 15.00.
Question 1
Consider the toy key exchange protocol using an online trusted 3rd party (TTP) discussed in
Lecture 9.1. Suppose Alice, Bob, and Carol are three users of this system (among many others)
and each have a secret key with the TTP denoted ka , kb , kc respectively. They wish to generate
a group session key kABC that will be known to Alice, Bob, and Carol but unknown to an
eavesdropper. How would you modify the protocol in the lecture to accomodate a group key
exchange of this type? (note that all these protocols are insecure against active attacks)
Alice contacts the TTP. TTP generates a random kABC and sends to
Alice
Alice contacts the TTP. TTP generates a random kAB and a random
kAC . It sends to Alice
Bob contacts the TTP. TTP generates random kABC and sends to Bob 1.00 The protocol
works
E ( kb , kABC ), ticket 1 ← E (ka , kABC ), ticket 2 ← E ( kc , kABC ) . because it
Bob sends ticket1 to Alice and ticket 2 to Carol. lets Alice,
Bob, and
Carol obtain
kABC but
an
eaesdropper
only sees
encryptions
https://class.coursera.org/crypto-007/quiz/feedback?submission_id=222046 1/9
7/29/13 Homework Feedback | Cryptography I
encryptions
of kABC
under keys
he does not
have.
Bob contacts the TTP. TTP generates a random kAB and a random
kBC . It sends to Bob
E ( ka , kAB ), ticket 1 ← E (ka , kAB ), ticket 2 ← E ( kc , kBC ) .
Bob sends ticket1 to Alice and ticket 2 to Carol.
Total 1.00 /
1.00
Question 2
Let G be a finite cyclic group (e.g. G = Z ∗p ) with generator g . Suppose the Diffie-Hellman
function DH g (g
x
,g
y
) = g
xy
is difficult to compute in G . Which of the following functions is
As usual, identify the f below for which the contra-positive holds: if f(⋅, ⋅) is easy to compute
then so is DH g (⋅, ⋅). If you can show that then it will follow that if DH g is hard to compute in G
then so must be f .
−−−
f( g
x
,g
y
) = √ g xy 0.25 an algorithm for calculating f(g x , g y ) = ±g xy/2
can easily be converted into an algorithm for
calculating DH(⋅, ⋅). Therefore, if f were easy to
compute then so would DH , contrading the
assumption.
f( g
x
,g
y
) =g
x+y
0.25 It is easy to compute f as f(g x , g y ) =g
x
⋅ g
y
.
f( g
x
,g
y
) =g
2xy
0.25 an algorithm for calculating f(⋅, ⋅) can easily be
converted into an algorithm for calculating
DH(⋅, ⋅) . Therefore, if f were easy to compute
then so would DH , contrading the assumption.
https://class.coursera.org/crypto-007/quiz/feedback?submission_id=222046 2/9
7/29/13 Homework Feedback | Cryptography I
Total 1.00 /
1.00
Question 3
Suppose we modify the Diffie-Hellman protocol so that Alice operates as usual, namely chooses
secret = g
b/a
. Alice computes the
secret as B a
and Bob computes A 1/b .
secret = g
a/b
. Alice computes the 1.00 This is correct since it is not
secret as B a and Bob computes A 1/b . difficult to see that both will obtain
a/b
g
secret = g
ab
. Alice computes the
secret as B a
and Bob computes A b .
Total 1.00 /
1.00
Question 4
Consider the toy key exchange protocol using public key encryption described in Lecture 9.4.
Suppose that when sending his reply c ← E (pk, x) to Alice, Bob appends a MAC t := S(x, c)
to the ciphertext so that what is sent to Alice is the pair (c, t) . Alice verifies the tag t and rejects
the message from Bob if the tag does not verify. Will this additional step prevent the man in the
https://class.coursera.org/crypto-007/quiz/feedback?submission_id=222046 3/9
7/29/13 Homework Feedback | Cryptography I
it depends on what
public key encryption
system is used.
yes
it depends on what
MAC system is used.
Total 1.00 /
1.00
Question 5
The numbers 7 and 23 are relatively prime and therefore there must exist integers a and b such
that 7a + 23b = 1 . Find such a pair of integers (a, b) with the smallest possible a > 0 . Given
You entered:
10, -3, 10
Question 6
https://class.coursera.org/crypto-007/quiz/feedback?submission_id=222046 4/9
7/29/13 Homework Feedback | Cryptography I
You entered:
8 1.00
Question 7
How many elements are there in Z
∗
35
?
You entered:
24
24 1.00
Question 8
How much is 2 10001 mod 11 ? (please do not use a calculator for this)
Hint: use Fermat's theorem.
You entered:
2 1.00
https://class.coursera.org/crypto-007/quiz/feedback?submission_id=222046 5/9
7/29/13 Homework Feedback | Cryptography I
Question 9
While we are at it, how much is 2 245 mod 35 ?
You entered:
32
32 1.00
Question 10
What is the order of 2 in Z
∗
35
?
You entered:
12
12 1.00
Question 11
Which of the following numbers is a generator of Z ∗13 ?
https://class.coursera.org/crypto-007/quiz/feedback?submission_id=222046 6/9
7/29/13 Homework Feedback | Cryptography I
Total 1.00 /
1.00
Question 12
Solve the equation x
2
+ 4x + 1 = 0 in Z 23 . Use the method described in lecture 9.3 using the
quadratic formula.
You entered:
5, 14
5, 14 1.00
Question 13
What is the 11th root of 2 in Z 19 ? (i.e. what is 2 1/11 in Z 19 )
Hint: observe that 11 −1 = 5 in Z 18 .
https://class.coursera.org/crypto-007/quiz/feedback?submission_id=222046 7/9
7/29/13 Homework Feedback | Cryptography I
You entered:
13
13 1.00
Question 14
What is the discete log of 5 base 2 in Z 13 ? (i.e. what is Dlog 2 (5) )
Recall that the powers of 2 in Z 13 are 22 3 = {1, 2, 4, 8, 3, 6, 12, 11, 9, 5, 10, 7}
You entered:
9 1.00
Question 15
If p is a prime, how many generators are there in Z
∗
p
?
√p
https://class.coursera.org/crypto-007/quiz/feedback?submission_id=222046 8/9
7/29/13 Homework Feedback | Cryptography I
φ(p)
(p − 1)/2
Total 1.00 /
1.00
https://class.coursera.org/crypto-007/quiz/feedback?submission_id=222046 9/9