ITN581 -
Cryptographic Fundamentals and Applications
Semester
1 2002 - Assignment 3 (12 marks)
Gavin Longmuir – n2804948
(answers in red)
Question 1
Consider the
following protocols. In each case the goal is key establishment of a new
session key KAB. The notation {M}K
denotes the message M encrypted with
the key K. It is assumed that the
encryption algorithm used preserves both confidentiality and integrity of M.
(i) (5 marks)
In this
protocol NA and NB are nonces chosen by A and B
respectively. KAS and KBS are key-encrypting keys
initially shared between S and A, and between S and B respectively.
1.
A ® B:
A,B,NA
2.
B ® S:
A,B,NA,NB
3.
S ® B:
{KAB}KAS,{NB,A,B,KAB}KBS
4.
B ® A:
{KAB}KAS,{NA,A,B}KAB
B includes A's
challenge in message 4, intended to give key confirmation and key freshness.
Show that this fails by describing an explicit attack on the protocol in which
an old key is replayed. Then consider, for both A and B, whether any of the
following properties is achieved, and explain your conclusions.
·
Far-end operative.
·
Implicit key authentication.
·
Key freshness.
·
Key confirmation.
ASSUMPTION: An attacker is able to obtain the value of the session key (KAB) used in any previous old run of the key transport protocol.
This protocol is vulnerable to a replay attack. Attacker E masquerades as B and it able to persuade A to use old key KAB. Note that messages 2 and 3 don’t exist in the replay attack by E.
1. A ® B: A,B,NA
4. E ® A: {K/AB}KAS,{NA,A,B}K/AB
For user A:
·
The far-end operative property is not achieved as
the final message in the protocol must come from user B, but we can not be sure
that B is present.
·
Implicit key authentication can not be assumed at
completion of the protocol run. A can not be sure which other party has the
key.
·
Key freshness is not achieved, the nonce generated
by user A is not utilised direct by A in the creation of the session key (it’s
passed on by B). A better solution would be for A to send it’s nonce directly
to S rather than B. Hence A has no assurance that the key is new for this
protocol run.
·
The key confirmation property is achieved as the
last message of the protocol from user B to A includes a component that is
encrypted with the session key. Hence user B is actually in possession of the
session key. Note this doesn’t exclude a possible future replay attack.
For
user B:
·
The far-ended operative property is not achieved
as the only message in the protocol from user A was for the initialisation of
the protocol itself. Hence user B doesn’t really know if user A is alive and
working.
·
Implicate key authentication is assumed at
completion of the protocol run. As all messages of protocol include both A’s
and B’s identifiers, via assurance from S’s key. Hence only user A and user B
(apart from server S) are in possession of the key.
·
Key freshness is achieved as B’s nonce is utilised
in all communications with S for the session key request component of the
protocol. Hence B has assurance that the session key is fresh.
·
The key confirmation property is not achieved as
the only message in the protocol from user A was for the initialisation of the
protocol itself. Hence B doesn’t really know if A is in possession of the
session key.
(ii) (2 marks)
This
protocol, published by Tatebeyashi, Matsuzaki and Newman in 1989, uses a public
key scheme. KS is the public key of the server which is assumed
known by all users. The random number generated by A is used as a symmetric
encryption key in message 4. The random number generated by B is used as the
session key: KAB = NB.
1.
A ® S:
A,B,{NA}KS
2.
S ® B:
A
3.
B ® S:
A,B,{NB}KS
4.
S ®
A: B,{NB}NA
Find two
explicit attacks on the protocol: one in which the attackers masquerades as A
and the other in which the attacker masquerades as B.
E masquerades as A:
1. E ® S: A,B,{NE}KS
2. S ® B: A
3. B ® S: A,B,{NB}KS
4. S ® E: B,{NB}NE
Hence
E is given the session key generated NB by S
E masquerades as B:
1. A ® S: A,B,{NA}KS
2. S ® B: A
3. B ® S: A,B,{NE}KS
4. S ® A: B,{NE}NA
Hence
E provides the session key NE to A via S
(iii) (2 marks)
The
following key agreement protocol was recently published by Park and suggested
for use in a mobile communications environment. Entities A and B initially both
have private keys xa and xb, public keys ya = g-xa mod p and yb = g-xb
mod p, respectively. They select random values modulo p, ra and rb,
respectively, where p is a large prime.
1.
A ® B:
gra + xa mod p
2.
B ® A:
{B,A}KAB, rb + xb
3.
A ® B:
{A,B}KAB
The new
session key KAB = gra * rb is calculated by B as KAB
= (gra + xa *ya)rb mod p and by A as KAB = (grb
+ xb *yb)ra mod p
Show that any
entity can find a value of gra + xa mod p, with a known ra value.
Hence show that any user can masquerade as A and obtain the session key agreed
with B.
Public knowledge:
ya = g-xa mod p
yb = g-xb
mod p
g,
p
Known value:
ra
Protocol knowledge:
KAB = gra
* rb
KAB = (gra
+ xa . ya)rb
gra * rb = (gra + xa . ya)rb
gra = (gra + xa . ya)
gra /
ya = gra + xa
Hence we able to calculate gra + xa mod p, with a known ra value
E masquerading as user A sends first
message of protocol to user B. User B’s replies with concatenated identity
information encrypted with new session key, along with the value
rb + xb. While E doesn’t have the private key value xa, the user has enough
information to calculate the session key KAB = (grb + xb .
yb)ra mod p and correctly send the final message in the protocol.
1. A ® B: gra + xa mod p
2. B ® A: {B,A}KAB, rb + xb
3. A ® B: {A,B}KAB
The Kangaroo Bank has one president and seven managers
denoted Mi for i=1,...,7.
The president deposits a large sum of money in a bank vault using an
integer K modulo p as the key to lock the vault where p denotes the prime
p=10009. Suppose that the president
gives shares in the key to each manager by selecting the polynomial f(x) =
K+bx+cx2 and giving to manager Mi the share f(i) which is
evaluated modulo p.
(i) Given
that f(3)=7146, f(4)=8824, f(7)=9474, derive K. (2
marks)
let
K
+ 3b + 9c = 7146 mod 10009
K
+ 4b + 16c = 8824 mod 10009
K
+ 7b + 49c = 9474 mod 10009
é 1 1 1 ù-1 é 7146 ù é K ù
│ 1 4 16 │
││ 8824 │ = b
ë 1 7 49 û ë 9474 û ë c û
é 7737 ù
│ 899
ë 2971 û
Thus K = 7737
(ii) Explain
why knowledge of only f(3) and f(4) reveals no
information
about K. (1
marks)
Shamir’s Shared Secret Scheme utilises a polynomial of degree t-1. The polynomial function used by Kangaroo Bank is of degree 2, thus 3 shares are required to solve for K without any guessing.