# Security Analysis and Improvement of an Anonymous Authentication Scheme for Roaming Services

Authors: Youngsook Lee; Juryon Paik
Journal: The Scientific World Journal
 (2014)

---

## Abstract

An anonymous authentication scheme for roaming services in global mobility networks allows a mobile user visiting a foreign network to achieve mutual authentication and session key establishment with the foreign-network operator in an anonymous manner. In this work, we revisit He et al.’s anonymous authentication scheme for roaming services and present previously unpublished security weaknesses in the scheme: (1) it fails to provide user anonymity against any third party as well as the foreign agent, (2) it cannot protect the passwords of mobile users due to its vulnerability to an offline dictionary attack, and (3) it does not achieve session-key security against a man-in-the-middle attack. We also show how the security weaknesses of He et al.’s scheme can be addressed without degrading the efficiency of the scheme.


---

## Body

## 1. Introduction

As wireless network and communication technologies advance, there has been a dramatic increase in the use of lightweight computing devices, such as sensors, smart phones, and tablet PCs, being used in our daily lives. To enjoy the convenience of mobility, a roaming service should be seamlessly provided with respect to availability and security, by means of using a visited foreign network. In general, three parties—a mobile user, a foreign agent, and the home agent—participate in a roaming process. A seamless roaming service requires significant security challenges to be addressed among the participants. Basically, authentication and key establishment between the mobile user and the foreign agent should be achieved via assistance of the home agent to prevent illegal usages of the network and to protect their subsequent communications. Achieving anonymity of the mobile user is also important in a roaming service to protect the privacy of the user. Anonymity has recently been identified as a major security property for many applications, including location-based services, anonymous web browsing, and e-voting. These security challenges and their cryptographic solutions, commonly calledanonymous authentication schemes, constitute an active research area.The first anonymous authentication scheme for roaming services was proposed by Zhu and Ma [1] in 2004. This initial proposal has been followed by a number of authentication schemes offering various levels of security and efficiency. Some schemes [2–4] have been proven secure using a computer security approach while others (e.g., [5–7]) justify their security on purely heuristic grounds without providing no formal analysis of security. However, despite all the work conducted over the last decade, it still remains a challenging task to come up with an authentication scheme that meets all the desired goals for roaming services [8]. Most of the existing schemes fail to achieve important security properties such as user anonymity [2, 6], session-key security [9], perfect forward secrecy [10], two-factor security [11], resistance against impersonation attacks [12], and resistance against offline dictionary attacks [13]. For this domain, all published schemes are far from ideal as evidenced by a continual history of schemes being proposed and years later found to be flawed.Recently, Xie et al. [4] proposed a new authentication scheme for roaming services and claimed that their scheme not only provides efficiency and user friendliness but also is secure against various attacks. But He et al. [12] demonstrated that Xie et al.’s scheme is susceptible to impersonation attacks and therefore does not achieve mutual authentication between a mobile user and the foreign agent. In addition, He et al. proposed a new authentication scheme which improves Xie et al.’s scheme in terms of both security and efficiency. However, we found that He et al.’s improved scheme is not satisfactory enough but still suffers from major security weaknesses.(i)
He et al.’s scheme does not provide user anonymity not only against the foreign agent but also against any third party.
(ii)
He et al.’s scheme may not protect the passwords of mobile users against an offline dictionary attack.
(iii)
He et al.’s scheme is not secure against a man-in-the-middle attack and thus cannot guarantee the security of session keys.Besides reporting these weaknesses in He et al.’s scheme, we also propose an improved authentication scheme which achieves, among others, user anonymity, session-key security, and resistance against offline dictionary attacks. The performance of our scheme is similar to that of He et al.’s scheme but is superior to that of Xie et al.’s scheme (see Section4).Throughout the paper, we make the following assumptions on the capabilities of the probabilistic polynomial-time adversary in order to properly capture security requirements of two-factor authentication schemes using smart cards in global mobility networks.(i)
The adversary has the complete control of all message exchanges between the three parties: a mobile user, the foreign agent, and the home agent. That is, the adversary can eavesdrop, insert, modify, intercept, and delete messages exchanged among the parties at will [14–16].
(ii)
The adversary is able to (1) extract the sensitive information on the smart card of a mobile user possibly via a power analysis attack [17, 18] or (2) learn the password of the mobile user through shoulder surfing or by employing a malicious card reader. However, it is not allowed that the adversary compromises both the information on the smart card and the password of the mobile user; it is clear that there is no way to prevent the adversary from impersonating the mobile user if both factors are compromised.


## 2. A Review of He et al.’s Scheme

He et al.’s authentication scheme [12] consists of three phases: the registration phase, the login and key agreement phase, and the password update phase. The system parameters listed in Table 1 are assumed to have been established in advance before the scheme is used in practice. Let ∥ and ⊕ denote the string concatenation operation and the bitwise exclusive-OR (XOR) operation, respectively.Table 1
System parameters.
I
D
H
A
,
I
D
F
A
The identities ofH
A and F
A, respectively
p
,
q
Two large primes such thatp
=
r
q
+
1 for some r
∈
N
x
The master secret key ofH
A
k
H
F
A (cryptographically strong) key shared betweenH
A and F
A
(
E
,
D
)
A pair of symmetric encryption and decryption algorithms
H
(
·
)
A cryptographic hash function


### 2.1. Registration Phase

For a mobile userM
U, this phase is performed only once when M
U registers itself with the home agent H
A.(1)
M
U chooses its identity I
D
M
U and password p
w
M
U freely and sends the identity I
D
M
U to H
A via a secure channel.
(2)
H
A computes S
I
D
M
U
=
E
x
(
I
D
M
U
∥
I
D
H
A
) and D
I
D
M
U
=
H
(
I
D
M
U
)
x
mod
⁡
p and issues M
U a smart card loaded with {
S
I
D
M
U, D
I
D
M
U, I
D
H
A, p, q, (
E
,
D
), H
}.
(3)
M
U replaces S
I
D
M
U and D
I
D
M
U, which are contained in the smart card, with T
I
D
M
U
=
S
I
D
M
U
⊕
H
(
0
∥
p
w
M
U
) and E
I
D
M
U
=
D
I
D
M
U
⊕
H
(
1
∥
p
w
M
U
), respectively.


### 2.2. Login and Key Agreement Phase

This phase is carried out wheneverM
U visits a foreign network and wants to gain access to the network. During the phase, mutual authentication and session-key establishment are conducted between M
U and F
A with the help of H
A. Algorithm 1 depicts how the phase works, and its description follows.Algorithm 1:Login and key agreement phase of He et al.’s scheme [12].
M
U               F
A               H
A
inputsI
D
M
U and p
w
M
U
retrieves the timestampT
1
a
∈
R
Z
q
*
,
A
=
H
(
I
D
M
U
)
a
K
M
H
=
(
E
I
D
M
U
⊕
H
(
1
∥
p
w
M
U
)
)
a
=
H
(
I
D
M
U
)
a
x
k
M
H
=
H
(
K
M
H
∥
T
1
)
S
I
D
M
U
=
T
I
D
M
U
⊕
H
(
0
∥
p
w
M
U
)
C
M
H
=
E
k
M
H
(
S
I
D
M
U
∥
I
D
M
U
∥
I
D
F
A
)
→
M
1
=
〈
I
D
H
A
,
T
1
,
A
,
C
M
H
〉
checks the freshness ofT
1
retrieves the timestampT
2
C
F
H
=
E
k
H
F
(
I
D
F
A
∥
T
2
∥
M
1
)
→
M
2
=
〈
I
D
F
A
,
T
2
,
C
F
H
〉
checks the freshness ofT
2
DoesD
k
H
F
(
C
F
H
) yield I
D
F
A and T
2?
K
M
H
=
A
x
,
k
M
H
=
H
(
K
M
H
∥
T
1
)
Does D
k
M
H
(
C
M
H
) yield I
D
F
A?
DoesD
x
(
S
I
D
M
U
) yield I
D
M
U?
retrieves the timestampT
3
σ
=
H
(
M
1
∥
T
3
∥
K
M
H
∥
I
D
M
U
∥
I
D
F
A
∥
I
D
H
A
)
C
H
F
=
E
k
H
F
(
I
D
M
U
∥
I
D
F
A
∥
T
3
∥
σ
)
←
M
3
=
〈
I
D
F
A
,
T
3
,
C
H
F
〉
I
D
M
U
∥
I
D
F
A
∥
T
3
∥
σ
=
D
k
H
F
(
C
H
F
)
checks the freshness ofT
3
b
∈
Z
q
*
,
B
=
H
(
I
D
M
U
)
b
K
F
M
=
A
b
,
k
F
M
=
H
(
K
F
M
)
C
F
M
=
E
k
F
M
(
I
D
M
U
∥
I
D
F
A
∥
T
3
∥
σ
∥
B
)
s
k
=
H
(
K
F
M
+
1
)
←
M
4
=
〈
I
D
F
A
,
T
3
,
B
,
C
F
M
〉
checks the freshness ofT
3
K
F
M
=
B
a
,
k
F
M
=
H
(
K
F
M
)
DoesD
k
F
M
(
C
F
M
) yield I
D
M
U, I
D
F
A and T
3?
σ
=
?
H
(
M
1
∥
T
3
∥
K
M
H
∥
I
D
M
U
∥
I
D
F
A
∥
I
D
H
A
)
s
k
=
H
(
K
F
M
+
1
)Step 1.
M
U inserts its smart card into the card reader and inputs its identity I
D
M
U and password p
w
M
U. Next, M
U retrieves the current timestamp T
1, chooses a random number a
∈
Z
q
*, and computes
(1)
A
=
H
(
I
D
M
U
)
a
mod
⁡
p
,
K
M
H
=
(
E
I
D
M
U
⊕
H
(
1
∥
p
w
M
U
)
)
a
mod
⁡
p
=
H
(
I
D
M
U
)
a
x
mod
⁡
p
,
k
M
H
=
H
(
K
M
H
∥
T
1
)
,
S
I
D
M
U
=
T
I
D
M
U
⊕
H
(
0
∥
p
w
M
U
)
=
E
x
(
I
D
M
U
∥
I
D
H
A
)
,
C
M
H
=
E
k
M
H
(
S
I
D
M
U
∥
I
D
M
U
∥
I
D
F
A
)
.
Then, M
U sends the message M
1
=
〈
I
D
H
A
,
T
1
,
A
,
C
M
H
〉 to the foreign agent F
A.Step 2.
Upon receivingM
1, F
A checks the freshness of the timestamp T
1. If it is not fresh, F
A aborts the session. Otherwise, F
A retrieves the current timestamp T
2, computes
(2)
C
F
H
=
E
k
H
F
(
I
D
F
A
∥
T
2
∥
M
1
)
and sends the message M
2
=
〈
I
D
F
A
,
T
2
,
C
F
H
〉 to H
A.Step 3.
H
A checks if the timestamp T
2 is fresh. If not, H
A aborts the session. Otherwise, H
A decrypts C
F
H with key k
H
F and verifies that the decryption yields the same I
D
F
A and T
2 as contained in M
2. H
A aborts if the verification fails. Otherwise, H
A computes K
M
H
=
A
x
mod
⁡
p and k
M
H
=
H
(
K
M
H
∥
T
1
), decrypts C
M
H with key k
M
H, and checks if this decryption produces the same I
D
F
A as in M
2. H
A aborts if the check fails. Otherwise, H
A decrypts S
I
D
M
U with key x and checks if this decryption gives the same I
D
M
U as produced through the decryption of C
M
H. If only the two IDs match, H
A retrieves the current timestamp T
3, computes
(3)
σ
=
H
(
M
1
∥
T
3
∥
K
M
H
∥
I
D
M
U
∥
I
D
F
A
∥
I
D
H
A
)
,
C
H
F
=
E
k
H
F
(
I
D
M
U
∥
I
D
F
A
∥
T
3
∥
σ
)
,
and sends the message M
3
=
〈
I
D
F
A
,
T
3
,
C
H
F
〉 to F
A.Step 4.
F
A decrypts C
H
F with key k
H
F and checks the freshness of the timestamp T
3. If only T
3 is fresh, F
A chooses a random number b
∈
Z
q
* and computes
(4)
B
=
H
(
I
D
M
U
)
b
mod
⁡
p
,
K
F
M
=
A
b
mod
⁡
p
=
H
(
I
D
M
U
)
a
b
mod
⁡
p
,
k
F
M
=
H
(
K
F
M
)
,
C
F
M
=
E
k
F
M
(
I
D
M
U
∥
I
D
F
A
∥
T
3
∥
σ
∥
B
)
.
(Note, here, that the timestamp T
3 (received from H
A) is used in generating the ciphertext C
F
M since M
U will need it to check the validity of σ.) Then, F
A sends the message M
4
=
〈
I
D
F
A
,
T
3
,
B
,
C
F
M
〉 to M
U and computes the session key s
k
=
H
(
K
F
M
+
1
).Step 5.
M
U first checks the freshness of the timestamp T
3 and aborts the session if not fresh. Otherwise, M
U computes K
F
M
=
B
a
mod
⁡
p and k
F
M
=
H
(
K
F
M
), decrypts C
F
M with key k
F
M, and verifies that the decryption correctly returns I
D
M
U, I
D
F
A, and T
3. If the verification succeeds, M
U checks if σ is equal to H
(
M
1
∥
T
3
∥
K
M
H
∥
I
D
M
U
∥
I
D
F
A
∥
I
D
H
A
) and if equal computes the session key s
k
=
H
(
K
F
M
+
1
).


### 2.3. Password Update Phase

One of the general guidelines to get better password security is to ensure that passwords are changed at regular intervals. He et al.’s scheme allows mobile users to freely update their passwords.(1)
M
U inserts his smart card into a card reader and enters both the current password p
w
M
U and the new password p
w
M
U
′.
(2)
The smart card computesT
I
D
M
U
′
=
T
I
D
M
U
⊕
H
(
0
∥
p
w
M
U
)
⊕
H
(
0
∥
p
w
M
U
′
) and E
I
D
M
U
′
=
E
I
D
M
U
⊕
H
(
1
∥
p
w
M
U
)
⊕
H
(
1
∥
p
w
M
U
′
) and replaces T
I
D
M
U and E
I
D
M
U with T
I
D
M
U
′ and E
I
D
M
U
′, respectively.


## 2.1. Registration Phase

For a mobile userM
U, this phase is performed only once when M
U registers itself with the home agent H
A.(1)
M
U chooses its identity I
D
M
U and password p
w
M
U freely and sends the identity I
D
M
U to H
A via a secure channel.
(2)
H
A computes S
I
D
M
U
=
E
x
(
I
D
M
U
∥
I
D
H
A
) and D
I
D
M
U
=
H
(
I
D
M
U
)
x
mod
⁡
p and issues M
U a smart card loaded with {
S
I
D
M
U, D
I
D
M
U, I
D
H
A, p, q, (
E
,
D
), H
}.
(3)
M
U replaces S
I
D
M
U and D
I
D
M
U, which are contained in the smart card, with T
I
D
M
U
=
S
I
D
M
U
⊕
H
(
0
∥
p
w
M
U
) and E
I
D
M
U
=
D
I
D
M
U
⊕
H
(
1
∥
p
w
M
U
), respectively.


## 2.2. Login and Key Agreement Phase

This phase is carried out wheneverM
U visits a foreign network and wants to gain access to the network. During the phase, mutual authentication and session-key establishment are conducted between M
U and F
A with the help of H
A. Algorithm 1 depicts how the phase works, and its description follows.Algorithm 1:Login and key agreement phase of He et al.’s scheme [12].
M
U               F
A               H
A
inputsI
D
M
U and p
w
M
U
retrieves the timestampT
1
a
∈
R
Z
q
*
,
A
=
H
(
I
D
M
U
)
a
K
M
H
=
(
E
I
D
M
U
⊕
H
(
1
∥
p
w
M
U
)
)
a
=
H
(
I
D
M
U
)
a
x
k
M
H
=
H
(
K
M
H
∥
T
1
)
S
I
D
M
U
=
T
I
D
M
U
⊕
H
(
0
∥
p
w
M
U
)
C
M
H
=
E
k
M
H
(
S
I
D
M
U
∥
I
D
M
U
∥
I
D
F
A
)
→
M
1
=
〈
I
D
H
A
,
T
1
,
A
,
C
M
H
〉
checks the freshness ofT
1
retrieves the timestampT
2
C
F
H
=
E
k
H
F
(
I
D
F
A
∥
T
2
∥
M
1
)
→
M
2
=
〈
I
D
F
A
,
T
2
,
C
F
H
〉
checks the freshness ofT
2
DoesD
k
H
F
(
C
F
H
) yield I
D
F
A and T
2?
K
M
H
=
A
x
,
k
M
H
=
H
(
K
M
H
∥
T
1
)
Does D
k
M
H
(
C
M
H
) yield I
D
F
A?
DoesD
x
(
S
I
D
M
U
) yield I
D
M
U?
retrieves the timestampT
3
σ
=
H
(
M
1
∥
T
3
∥
K
M
H
∥
I
D
M
U
∥
I
D
F
A
∥
I
D
H
A
)
C
H
F
=
E
k
H
F
(
I
D
M
U
∥
I
D
F
A
∥
T
3
∥
σ
)
←
M
3
=
〈
I
D
F
A
,
T
3
,
C
H
F
〉
I
D
M
U
∥
I
D
F
A
∥
T
3
∥
σ
=
D
k
H
F
(
C
H
F
)
checks the freshness ofT
3
b
∈
Z
q
*
,
B
=
H
(
I
D
M
U
)
b
K
F
M
=
A
b
,
k
F
M
=
H
(
K
F
M
)
C
F
M
=
E
k
F
M
(
I
D
M
U
∥
I
D
F
A
∥
T
3
∥
σ
∥
B
)
s
k
=
H
(
K
F
M
+
1
)
←
M
4
=
〈
I
D
F
A
,
T
3
,
B
,
C
F
M
〉
checks the freshness ofT
3
K
F
M
=
B
a
,
k
F
M
=
H
(
K
F
M
)
DoesD
k
F
M
(
C
F
M
) yield I
D
M
U, I
D
F
A and T
3?
σ
=
?
H
(
M
1
∥
T
3
∥
K
M
H
∥
I
D
M
U
∥
I
D
F
A
∥
I
D
H
A
)
s
k
=
H
(
K
F
M
+
1
)Step 1.
M
U inserts its smart card into the card reader and inputs its identity I
D
M
U and password p
w
M
U. Next, M
U retrieves the current timestamp T
1, chooses a random number a
∈
Z
q
*, and computes
(1)
A
=
H
(
I
D
M
U
)
a
mod
⁡
p
,
K
M
H
=
(
E
I
D
M
U
⊕
H
(
1
∥
p
w
M
U
)
)
a
mod
⁡
p
=
H
(
I
D
M
U
)
a
x
mod
⁡
p
,
k
M
H
=
H
(
K
M
H
∥
T
1
)
,
S
I
D
M
U
=
T
I
D
M
U
⊕
H
(
0
∥
p
w
M
U
)
=
E
x
(
I
D
M
U
∥
I
D
H
A
)
,
C
M
H
=
E
k
M
H
(
S
I
D
M
U
∥
I
D
M
U
∥
I
D
F
A
)
.
Then, M
U sends the message M
1
=
〈
I
D
H
A
,
T
1
,
A
,
C
M
H
〉 to the foreign agent F
A.Step 2.
Upon receivingM
1, F
A checks the freshness of the timestamp T
1. If it is not fresh, F
A aborts the session. Otherwise, F
A retrieves the current timestamp T
2, computes
(2)
C
F
H
=
E
k
H
F
(
I
D
F
A
∥
T
2
∥
M
1
)
and sends the message M
2
=
〈
I
D
F
A
,
T
2
,
C
F
H
〉 to H
A.Step 3.
H
A checks if the timestamp T
2 is fresh. If not, H
A aborts the session. Otherwise, H
A decrypts C
F
H with key k
H
F and verifies that the decryption yields the same I
D
F
A and T
2 as contained in M
2. H
A aborts if the verification fails. Otherwise, H
A computes K
M
H
=
A
x
mod
⁡
p and k
M
H
=
H
(
K
M
H
∥
T
1
), decrypts C
M
H with key k
M
H, and checks if this decryption produces the same I
D
F
A as in M
2. H
A aborts if the check fails. Otherwise, H
A decrypts S
I
D
M
U with key x and checks if this decryption gives the same I
D
M
U as produced through the decryption of C
M
H. If only the two IDs match, H
A retrieves the current timestamp T
3, computes
(3)
σ
=
H
(
M
1
∥
T
3
∥
K
M
H
∥
I
D
M
U
∥
I
D
F
A
∥
I
D
H
A
)
,
C
H
F
=
E
k
H
F
(
I
D
M
U
∥
I
D
F
A
∥
T
3
∥
σ
)
,
and sends the message M
3
=
〈
I
D
F
A
,
T
3
,
C
H
F
〉 to F
A.Step 4.
F
A decrypts C
H
F with key k
H
F and checks the freshness of the timestamp T
3. If only T
3 is fresh, F
A chooses a random number b
∈
Z
q
* and computes
(4)
B
=
H
(
I
D
M
U
)
b
mod
⁡
p
,
K
F
M
=
A
b
mod
⁡
p
=
H
(
I
D
M
U
)
a
b
mod
⁡
p
,
k
F
M
=
H
(
K
F
M
)
,
C
F
M
=
E
k
F
M
(
I
D
M
U
∥
I
D
F
A
∥
T
3
∥
σ
∥
B
)
.
(Note, here, that the timestamp T
3 (received from H
A) is used in generating the ciphertext C
F
M since M
U will need it to check the validity of σ.) Then, F
A sends the message M
4
=
〈
I
D
F
A
,
T
3
,
B
,
C
F
M
〉 to M
U and computes the session key s
k
=
H
(
K
F
M
+
1
).Step 5.
M
U first checks the freshness of the timestamp T
3 and aborts the session if not fresh. Otherwise, M
U computes K
F
M
=
B
a
mod
⁡
p and k
F
M
=
H
(
K
F
M
), decrypts C
F
M with key k
F
M, and verifies that the decryption correctly returns I
D
M
U, I
D
F
A, and T
3. If the verification succeeds, M
U checks if σ is equal to H
(
M
1
∥
T
3
∥
K
M
H
∥
I
D
M
U
∥
I
D
F
A
∥
I
D
H
A
) and if equal computes the session key s
k
=
H
(
K
F
M
+
1
).


## 2.3. Password Update Phase

One of the general guidelines to get better password security is to ensure that passwords are changed at regular intervals. He et al.’s scheme allows mobile users to freely update their passwords.(1)
M
U inserts his smart card into a card reader and enters both the current password p
w
M
U and the new password p
w
M
U
′.
(2)
The smart card computesT
I
D
M
U
′
=
T
I
D
M
U
⊕
H
(
0
∥
p
w
M
U
)
⊕
H
(
0
∥
p
w
M
U
′
) and E
I
D
M
U
′
=
E
I
D
M
U
⊕
H
(
1
∥
p
w
M
U
)
⊕
H
(
1
∥
p
w
M
U
′
) and replaces T
I
D
M
U and E
I
D
M
U with T
I
D
M
U
′ and E
I
D
M
U
′, respectively.


## 3. Weaknesses in He et al.’s Scheme

In this section, we point out four weaknesses in He et al.’s scheme, starting with the most obvious one.Weakness  1. He et al.’s scheme does not provide user anonymity against the foreign agent F
A.This weakness is straightforward to see as the identity ofM
U, I
D
M
U, is given to F
A via the ciphertext C
H
F (see Step 4 of the login and key agreement phase of the scheme).Weakness  2. He et al.’s scheme may not protect the password of M
U, p
w
M
U, against an offline dictionary attack.Weakness 2 is due to the fact thatE
I
D
M
U is computed using the bitwise XOR operation when the multiplicative subgroup of Z
p
* is not closed under the XOR operation. This design flaw allows an adversary to find out the password p
w
M
U by mounting an offline dictionary attack if the subgroup is much smaller than Z
p
*. We observe, for He et al.’s scheme, that (
1
)
p and q are defined as two primes such that p
=
r
q
+
1 for some r
∈
N and (
2
) the random exponents a and b are chosen from Z
q
*. Based on these observations, it is reasonable to speculate that He et al.’s scheme was designed to work in a multiplicative subgroup of Z
p
* that has a prime order q, though not explicitly mentioned by the authors. For simplicity, let us denote the prime-order subgroup by G. Since K
M
H and D
I
D
M
U are computed as K
M
H
=
(
D
I
D
M
U
)
a
mod
⁡
p and D
I
D
M
U
=
H
(
I
D
M
U
)
x
mod
⁡
p, it ought to be the case that D
I
D
M
U
∈
G, which in turn implies that H is a hash function mapping arbitrary strings into elements of G. Now, assume that an adversary A has gained temporary access to the smart card of M
U and then obtained the value of E
I
D
M
U stored there (possibly by employing a power analysis attack [17]). Then, note that E
I
D
M
U can be used as a password verifier in an offline dictionary attack because E
I
D
M
U is computed as E
I
D
M
U
=
D
I
D
M
U
⊕
H
(
1
∥
p
w
M
U
) when G is not closed under the bitwise XOR operation. Let P
W be the set of all possible passwords. The adversary A can mount an offline dictionary attack as follows.Step 1.
A makes a guess p
w
M
U
′
∈
P
W on the password p
w
M
U and computes
(5)
D
I
D
M
U
′
=
E
I
D
M
U
⊕
H
(
1
∥
p
w
M
U
′
)
.Step 2.
A then checks whether D
I
D
M
U
′ is an element of G or not. If D
I
D
M
U
′
∉
G, A deletes p
w
M
U
′ from the dictionary P
W (i.e., P
W
=
P
W
∖
{
p
w
M
U
′
}). Note that D
I
D
M
U
′
∉
G implies p
w
M
U
′
≠
p
w
M
U.Step 3.
A repeats Steps 1 and 2 until the correct password is found (i.e., until |
P
W
|
=
1).Ifp is a safe prime (i.e., p
=
2
q
+
1), then this attack would fail, cutting only the size of P
W about in half. However, if p is much greater than q (e.g., log
⁡
2
p
⋍
512 and log
⁡
2
q
⋍
256), the dictionary attack will succeed in determining the correct password with an overwhelming probability. Similar dictionary attacks have been also mounted against key exchange protocols; see, for example, [19]. Weakness 2 can be easily addressed by replacing the bitwise XOR operation with the multiplication operation.Next, we identify two other major weaknesses in He et al.’s scheme.Weakness  3. He et al.’s scheme may not guarantee user anonymity even against a third party who is not a legitimate protocol participant.Weakness  4. He et al.’s scheme could wrongly lead M
U and F
A to establish a session key with a malicious party who is not even registered with H
A.We demonstrate Weaknesses  3 and 4 by mounting a type of man-in-the-middle attack against the scheme. The attack scenario is outlined in Figure1 and is detailed as follows.Figure 1
A man-in-the-middle attack on He et al.’s scheme.Step 1.
As a preliminary step, the adversaryA chooses a random number a
′
∈
Z
q
* and computes A
′
=
H
(
I
D
)
a
′
mod
⁡
p, where I
D denotes an arbitrary identity.Step 2.
WhenM
U sends the first message M
1
=
〈
I
D
H
A
,
T
1
,
A
,
C
M
H
〉 to F
A, A eavesdrops on this message to obtain A and C
M
H. Immediately after the eavesdropping, A retrieves the current timestamp T
1
′ and sends a fake message M
1
′
=
〈
I
D
H
A
,
T
1
′
,
A
′
,
C
M
H
〉 to F
A as if it is another roaming request from a mobile user.Step 3.
Since bothT
1 and T
1
′ are fresh, F
A will compute C
F
H
=
E
k
H
F
(
I
D
F
A
∥
T
2
∥
M
1
) and C
F
H
′
=
E
k
H
F
(
I
D
F
A
∥
T
2
′
∥
M
1
′
) and send two messages M
2
=
〈
I
D
F
A
,
T
2
,
C
F
H
〉 and M
2
′
=
〈
I
D
F
A
,
T
2
′
,
C
F
H
′
〉 to H
A. Let Π
F
A and Π
F
A
′ be the instances of F
A who sends the messages M
2 and M
2
′, respectively.Step 4.
A intercepts the message M
2
′ while letting M
2 reach its destination, H
A. Since M
2 is a valid message, H
A will compute
(6)
σ
=
H
(
M
1
∥
T
3
∥
K
M
H
∥
I
D
M
U
∥
I
D
F
A
∥
I
D
H
A
)
,
C
H
F
=
E
k
H
F
(
I
D
M
U
∥
I
D
F
A
∥
T
3
∥
σ
)
,
and send the message M
3
=
〈
I
D
F
A
,
T
3
,
C
H
F
〉 to F
A.Step 5.
A redirects the message M
3 so that it is delivered to Π
F
A
′ instead of Π
F
A. As a result, Π
F
A will not receive any response message and thus will abort after a certain amount of time.Step 6.
After decryptingC
H
F and since T
3 is fresh, Π
F
A
′ will proceed as per the protocol specification. That is, Π
F
A
′ will choose a random number b
′
∈
Z
q
*, compute
(7)
B
′
=
H
(
I
D
M
U
)
b
′
mod
⁡
p
,
K
F
M
′
=
A
′
b
′
mod
⁡
p
=
H
(
I
D
)
a
′
b
′
mod
⁡
p
,
k
F
M
′
=
H
(
K
F
M
′
)
,
C
F
M
′
=
E
k
F
M
′
(
I
D
M
U
∥
I
D
F
A
∥
T
3
∥
σ
∥
B
′
)
,
send the message M
4
′
=
〈
I
D
F
A
,
T
3
,
B
′
,
C
F
M
′
〉 to M
U, and then compute its session key as
(8)
s
k
F
A
=
H
(
K
F
M
′
+
1
)
.Step 7.
A intercepts the message M
4
′, computes K
F
M
′
=
B
′
a
′
mod
⁡
p and k
F
M
′
=
H
(
K
F
M
′
), and decrypts C
F
M
′ with key k
F
M
′ to obtain I
D
M
U, I
D
F
A, and σ. Then, A chooses a random number b
′′
∈
Z
q
*, computes
(9)
B
′′
=
H
(
I
D
M
U
)
b
′′
mod
⁡
p
,
K
F
M
′′
=
A
b
′′
mod
⁡
p
=
H
(
I
D
M
U
)
a
b
′′
mod
⁡
p
,
k
F
M
′′
=
H
(
K
F
M
′′
)
,
C
F
M
′′
=
E
k
F
M
′′
(
I
D
M
U
∥
I
D
F
A
∥
T
3
∥
σ
∥
B
′′
)
,
and sends the message M
4
′′
=
〈
I
D
F
A
,
T
3
,
B
′′
,
C
F
M
′′
〉 to M
U as if it is from F
A.Step 8.
Upon receivingM
4
′′, M
U will proceed to compute its session key
(10)
s
k
M
U
=
H
(
K
F
M
′′
+
1
)
,
where K
F
M
′′ is computed as K
F
M
′′
=
B
′′
a
mod
⁡
p, because (1) T
3 is fresh, (2) decryption of C
F
M
′′ with key k
F
M
′′ correctly yields I
D
M
U, I
D
F
A, and T
3, and (3) σ is equal to H
(
M
1
∥
T
3
∥
K
M
H
∥
I
D
M
U
∥
I
D
F
A
∥
I
D
H
A
).Step 9.
A computes the two session keys, s
k
F
A and s
k
M
U, in the straightforward way.Through the attack, user anonymity is completely compromised as the identity ofM
U, I
D
M
U, is disclosed to the adversary A in Step 7. From the viewpoint of session-key secrecy, the effect of our attack is the same as that of a man-in-the-middle attack. At the end of the attack, M
U and F
A believe that they have established a secure session with each other sharing a secret key, while in fact they have shared their keys with the adversary A. As a result, A can not only access and relay any confidential messages between M
U and F
A but also send arbitrary messages for its own benefit impersonating one of them to the other. Man-in-the-middle attacks similar to the attack above have been also presented against various key exchange protocols; see, for example, [20, 21].


## 4. Our Improved Scheme

We now show how to address all the weaknesses identified in He et al.’s scheme without degrading the efficiency of the scheme. LetG be a cyclic group of prime order q. A standard way of generating G is to choose two large primes p
,
q such that p
=
r
q
+
1 for some small r
∈
N (e.g., r
=
2) and let G be the subgroup of order q in Z
p
*. Hereafter, we will omit “mod p” from expressions for notational simplicity. Assume that the master secret key of H
A, x, is an element of Z
q
* (i.e., x
∈
Z
q
*) and the secret key shared between F
A and H
A, k
H
F, has length of l bits. Then we define four cryptographic hash functions:(i)
F
:
{
0,1
}
*
→
{
0,1
}
l,
(ii)
G
:
{
0,1
}
*
→
G,
(iii)
H
:
{
0,1
}
*
→
{
0,1
}
κ, where κ represents the bit-length of session keys,
(iv)
I
:
{
0,1
}
*
→
{
0,1
}
ɛ, where ɛ represents the bit-length of S
I
D
M
U (for the definition of S
I
D
M
U, see the description of He et al.’s scheme given in Section 2).We begin by presenting how to address Weaknesses  3 and 4 (described in the previous section). The vulnerability of He et al.’s scheme to the man-in-the-middle attack is because there is no way for an instance ofF
A to check whether the received ciphertext C
H
F was sent in response to its own request or another instance’s request. This design flaw allows the adversary to exploit H
A’s response sent for one session as the response for another session. To prevent the attack, we suggest to modify the computation of the ciphertext C
H
F from C
H
F
=
E
k
H
F
(
I
D
M
U
∥
I
D
F
A
∥
T
3
∥
σ
) to
(11)
C
H
F
=
E
k
H
F
(
I
D
M
U
∥
I
D
F
A
∥
T
2
∥
T
3
∥
σ
)
.
The timestamp T
2 is now included as part of the plaintext to be encrypted to C
H
F. The inclusion of T
2 tightly links F
A’s request and H
A’s response and thus effectively prevents the man-in-the-middle attack.However, with the above modification alone, He et al.’s scheme cannot fully achieve user anonymity in the sense that the identity ofM
U is still disclosed to F
A. Therefore, we suggest to further modify the computation of C
H
F as follows:
(12)
C
H
F
=
E
k
H
F
(
G
(
I
D
M
U
)
∥
I
D
F
A
∥
T
2
∥
T
3
∥
σ
)
.
The ciphertext C
H
F is now generated using G
(
I
D
M
U
) instead of I
D
M
U. This modification certainly prevents F
A from immediately learning I
D
M
U via decryption of C
H
F.We next present a possible way of eliminating the vulnerability of He et al.’s scheme to offline dictionary attacks. Recall that this vulnerability is due to the fact thatE
I
D
M
U is computed using the bitwise XOR operation when the multiplicative subgroup of Z
p
* is not closed under the XOR operation. Given the flaw in the design, the solution is clear; use the multiplication operation instead of the XOR operation when computing E
I
D
M
U. Hence, we change the computation of E
I
D
M
U from E
I
D
M
U
=
D
I
D
M
U
⊕
H
(
1
∥
p
w
M
U
) to
(13)
E
I
D
M
U
=
D
I
D
M
U
·
G
(
1
∥
p
w
M
U
)
-
1
.
Accordingly, the computation of K
M
H should be also changed to
(14)
K
M
H
=
(
E
I
D
M
U
·
G
(
1
∥
p
w
M
U
)
)
a
=
G
(
I
D
M
U
)
a
x
.Finally, we suggest the following additional changes to resolve some notational ambiguities and to correct the misuse of the hash functionH:
(15)
S
I
D
M
U
=
E
F
(
x
)
(
I
D
M
U
∥
I
D
H
A
)
,
D
I
D
M
U
=
G
(
I
D
M
U
)
x
,
T
I
D
M
U
=
S
I
D
M
U
⊕
I
(
0
∥
p
w
M
U
)
A
=
G
(
I
D
M
U
)
a
,
k
M
H
=
F
(
K
M
H
∥
T
1
)
,
S
I
D
M
U
=
T
I
D
M
U
⊕
I
(
0
∥
p
w
M
U
)
,
B
=
G
(
I
D
M
U
)
b
,
k
F
M
=
F
(
K
F
M
)
.As a result of the above modifications, the password update phase is modified as follows.(1)
M
U inserts his smart card into a card reader and enters the identity I
D
M
U, the current password p
w
M
U, and the new password p
w
M
U
′.
(2)
The smart card computesT
I
D
M
U
′
=
T
I
D
M
U
⊕
I
(
0
∥
p
w
M
U
)
⊕
I
(
0
∥
p
w
M
U
′
) and E
I
D
M
U
′
=
E
I
D
M
U
·
G
(
1
∥
p
w
M
U
)
·
G
(
1
∥
p
w
M
U
′
)
-
1 and replaces T
I
D
M
U and E
I
D
M
U with T
I
D
M
U
′ and E
I
D
M
U
′, respectively.Combining the above modifications together yields an improved authentication scheme described in Algorithm2. Our scheme improves He et al.’s scheme in various aspects: (1) it enjoys the anonymity of the mobile user M
U against any parties other than the home agent H
A, including the foreign agent F
A; (2) it withstands offline dictionary attacks even when the information in the smart card is disclosed; (3) it protects the security of session keys against man-in-the-middle attacks. Clearly, the performance of our scheme is similar to that of He et al.’s scheme. Hence, we can say that our improvement enhances the security of He et al.’s scheme while maintaining the efficiency of the scheme.Algorithm 2:The login and key agreement phase of our improved scheme.
M
U               F
A               H
A
inputsI
D
M
U and p
w
M
U
retrieves the timestampT
1
a
∈
R
Z
q
*
,
A
=
G
(
I
D
M
U
)
a
K
M
H
=
(
E
I
D
M
U
·
G
(
1
∥
p
w
M
U
)
)
a
=
G
(
I
D
M
U
)
a
x
k
M
H
=
F
(
K
M
H
∥
T
1
)
S
I
D
M
U
=
T
I
D
M
U
⊕
I
(
0
∥
p
w
M
U
)
C
M
H
=
E
k
M
H
(
S
I
D
M
U
∥
I
D
M
U
∥
I
D
F
A
)
→
M
1
=
〈
I
D
H
A
,
T
1
,
A
,
C
M
H
〉
checks the freshness ofT
1
retrieves the timestampT
2
C
F
H
=
E
k
H
F
(
I
D
F
A
∥
T
2
∥
M
1
)
→
M
2
=
〈
I
D
F
A
,
T
2
,
C
F
H
〉
checks the freshness ofT
2
DoesD
k
H
F
(
C
F
H
) yield I
D
F
A and T
2?
K
M
H
=
A
x
,
k
M
H
=
F
(
K
M
H
∥
T
1
)
Does D
k
M
H
(
C
M
H
) yield I
D
F
A?
DoesD
x
(
S
I
D
M
U
) yield I
D
M
U?
retrieves the timestampT
3
σ
=
H
(
M
1
∥
T
3
∥
K
M
H
∥
I
D
M
U
∥
I
D
F
A
∥
I
D
H
A
)
C
H
F
=
E
k
H
F
(
G
(
I
D
M
U
)
∥
I
D
F
A
∥
T
2
∥
T
3
∥
σ
)
←
M
3
=
〈
I
D
F
A
,
T
3
,
C
H
F
〉
checks the freshness ofT
3
DoesD
k
M
H
(
C
H
F
) yield T
2 & T
3?
b
∈
Z
q
*
,
B
=
G
(
I
D
M
U
)
b
K
F
M
=
A
b
,
k
F
M
=
F
(
K
F
M
)
C
F
M
=
E
k
F
M
(
I
D
M
U
∥
I
D
F
A
∥
T
3
∥
σ
∥
B
)
s
k
=
H
(
K
F
M
+
1
)
←
M
4
=
〈
I
D
F
A
,
T
3
,
B
,
C
F
M
〉
checks the freshness ofT
3
K
F
M
=
B
a
,
k
F
M
=
F
(
K
F
M
)
DoesD
k
F
M
(
C
F
M
) yield I
D
M
U, I
D
F
A and T
3?
σ
=
?
H
(
M
1
∥
T
3
∥
K
M
H
∥
I
D
M
U
∥
I
D
F
A
∥
I
D
H
A
)
s
k
=
H
(
K
F
M
+
1
)


## 5. Concluding Remarks

This work demonstrated that He et al.’s authentication scheme for roaming services fails to achieve major security properties—user anonymity, password security, and session-key security—in the presence of a malicious adversary. We have shown that failure to achieving user anonymity and session-key security is due to the vulnerability to a man-in-the-middle attack while failure to achieving password security is due to the vulnerability to an offline dictionary attack. Note that the latter vulnerability implies that He et al.’s scheme does not achieve two-factor security. We hope that similar security flaws as identified in this work can be prevented in the future design of anonymous authentication schemes.This work also showed how the security of He et al.’s authentication scheme can be improved without efficiency degradation. Our improved scheme not only protects user anonymity against any third parties other than the home agent but also is secure against offline dictionary attacks as well as man-in-the-middle attacks. We leave it as a future work to design an anonymous authentication scheme for roaming services that achieves provable security in a well-defined communication model while providing the same (or even better) level of efficiency as the schemes studied in this paper.



---

*Source: 687879-2014-09-11.xml*