Next Article in Journal
From Conformal Invariance towards Dynamical Symmetries of the Collisionless Boltzmann Equation
Previous Article in Journal
Design of IP Camera Access Control Protocol by Utilizing Hierarchical Group Key
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Prevention of Exponential Equivalence in Simple Password Exponential Key Exchange (SPEKE)

1
Department of Computer Engineering, Sungkyunkwan University, 2066 Seoburo, Suwon, Gyeonggido 440-746, Koera
2
Financial Telecommunications & Clearings Research Center, Korea Financial Telecommunications & Clearings Institute, 9, 213 beongil, Jeongjail-ro, Seongnam, Gyeonggido 463-811, Korea
*
Author to whom correspondence should be addressed.
Symmetry 2015, 7(3), 1587-1594; https://doi.org/10.3390/sym7031587
Submission received: 16 June 2015 / Revised: 4 August 2015 / Accepted: 28 August 2015 / Published: 2 September 2015

Abstract

:
Simple Password Exponential Key Exchange (SPEKE) and Dragonfly are simple password-based authenticated key exchange protocols that use a value derived from a shared password as a generator for modular exponentiation, as opposed to Diffie–Hellman key exchange, which uses a fixed value. However, it has been shown that in SPEKE, an active attacker, can examine multiple passwords in a single attempt because the passwords have an exponential correlation. We show that Dragonfly can also suffer from the same problem, and we propose a simple countermeasure to prevent the exponential equivalence in SPEKE.

1. Introduction

Password-Authenticated Key Exchange (PAKE) is an authenticated key exchange protocol between two or more parties that share only a human-memorable password without depending on any third party and communicating only via an insecure network. Because the password dictionary is sufficiently small, PAKE protocols are designed with the assumption that an attacker can enumerate all the possible passwords off-line within a reasonable time. The intention of PAKE protocols is to prevent off-line guessing attack. They are considered to be safe when an exhaustive search is the only available means of attack.
Simple Password Exponential Key Exchange (SPEKE), proposed by Jablon [1], and Dragonfly, proposed by Harkins [2], are well-known PAKE protocols. These protocols are similar to Diffie–Hellman key exchange except that they use a value derived from a shared password as a generator for exponentiation, instead of a fixed value. Such a characteristic makes these protocols seem simpler yet more efficient than other PAKE protocols. However, in 2004, Zhang showed that an active attacker can try multiple passwords in a single attempt by exploiting the exponential equivalence of the passwords in SPEKE [3]. Furthermore, in 2005, Tang and Mitchell identified other security vulnerabilities such as unknown key-share attack and generic attack as well as the exponential equivalence problem [4]. Subsequently, in 2014, Hao and Shahandashti showed that SPEKE can suffer from impersonation attack and key-malleability attack [5] and Clark and Hao showed that Dragonfly can suffer from a small subgroup attack [6].
The above-mentioned vulnerabilities except the exponential equivalence problem can be addressed in SPEKE by modifying the key confirmation process [4,5] and in Dragonfly by checking that the received element is a member of the supergroup [6]. A possible solution to the exponential equivalence problem is hashing passwords, as in the case of the revised version of SPEKE, which makes it difficult for an attacker to guess the password [7]. However, this approach does not overcome the essential problem, because the exponential equivalence of passwords persists even after the passwords are hashed. Hao and Ryan claimed that there is no guarantee that an attacker is unable to formulate exponential relationships among hashed passwords; no existing hash function is designed for that purpose [8].
In this paper, we show that Dragonfly can also suffer from the exponential equivalence problem, and we propose a simple solution that can prevent password-guessing attacks based on the exponential equivalence of passwords in the SPEKE protocol.

2. Review of SPEKE and Dragonfly

2.1. The SPEKE Protocol

Let p be a safe prime, p = 2 q + 1 , where q is also a prime. SPEKE is defined over a subgroup of Z p * of prime order q. Assume that two parties, Alice and Bob, share a common password π and want to exchange a password-authenticated key. SPEKE defines a function f to map the password π to a generator, i.e., f ( π ) = π 2 mod p in the original SPEKE [1] or f ( π ) = ( h ( π ) ) 2 mod p in the revised version of SPEKE [7], where h is a cryptographic hash function (e.g., SHA-256). Let g denote the generator corresponding to π, i.e., g = f ( π ) . The squaring of π or h ( π ) ensures that the generator g does not fall into the small subgroup of order two, which contains { 1 , p 1 } .
SPEKE is exactly the same as Diffie–Hellman key exchange except that it uses a value derived from π as a generator for exponentiation. The details of fully constrained SPEKE are as follows:
  • Alice → Bob: Send A = g a mod p , where a is randomly selected in Z q * .
  • Alice ← Bob: Send B = g b mod p , where b is randomly selected in Z q * .
  • Alice & Bob: Compute K = B a mod p and K = A b mod p , respectively.
Now, Alice and Bob share the secret K = g a b mod p .
Alice and Bob confirm that they are sharing the same secret K. For this purpose, Alice and Bob exchange validation values V A , V B , and validate them. A hash function is used to generate the values. The details are as follows:
4.
Alice ← Bob: Send V B = h ( h ( h ( K ) ) ) .
5.
Alice: Verify V B .
6.
Alice → Bob: Send V A = h ( h ( K ) ) .
7.
Bob: Verify V A .

2.2. The Dragonfly Protocol

Although Dragonfly, based on discrete logarithm cryptography, can be implemented either on a finite field or on an elliptic curve, in this paper we deal with the protocol operated on a finite field.
Let p be a large prime of the form p = r q + 1 , where r and q relatively prime. Dragonfly is defined over a finite cyclic group Q, which is a subgroup of Z p * of prime order q. Assume that two parties, Alice and Bob, share a common password π and want to exchange a password-authenticated key. Dragonfly defines two functions f and h 1 to map the identities of the two participants and the shared password π to a generator, i.e., f ( Alice , Bob , π ) = ( h 1 ( Alice , Bob , π ) ) r mod p . The functions can be briefly represented as f : { 0 , 1 } * Q and h 1 : { 0 , 1 } * Z p * , respectively. (For more details, see [2].) Let g denote the generator, i.e., g = f ( Alice , Bob , π ) .
The Dragonfly protocol works as follows:
  • Alice→Bob: Send A = g a 1 mod p and a = ( a 1 + a 2 ) mod q , where a 1 and a 2 are randomly selected in Z q * .
    Alice←Bob: Send B = g b 1 mod p and b = ( b 1 + b 2 ) mod q , where b 1 and b 2 are randomly selected in Z q * .
  • Alice & Bob: Compute K = ( g b · B ) a 2 mod p and K = ( g a · A ) b 2 mod p , respectively.
Now, Alice and Bob share the secret K = g a 2 b 2 mod p .
3.
Alice → Bob: Send V A = h ( K | | A | | a | | B | | b ) .
Alice ← Bob: Send V B = h ( K | | B | | b | | A | | a ) .
4.
Alice & Bob: Verify V A and V B , respectively.

3. Exponential Equivalence in SPEKE and Dragonfly

3.1. Exponential Equivalence in SPEKE

In this subsection, we review the problem identified by Zhang, i.e., a single on-line attempt can scan through all the exponentially equivalent passwords [3]. First, if p is a large safe prime, then for arbitrary given b, it is extremely difficult to find an integer x that satisfies the following equation:
b = a x mod p .
However, if mod p is not present, this equation can be converted into a simple equation that yields log a b . As such, we can say that two elements, b 1 = a x 1 and b 2 = a x 2 , where a , b 1 , b 2 Z p * , are exponentially equivalent, and the set of exponentially equivalent elements is identified as the exponential equivalence class. For example, among the numbers less than 100, the exponential equivalence classes are as follows:
{ 2 1 , 2 2 , 2 3 , 2 4 , 2 5 , 2 6 } , { 3 1 , 3 2 , 3 3 , 3 4 } , { 5 1 , 5 2 } , { 7 1 , 7 2 } .
Now, let us consider how every element can be examined at once in the SPEKE protocol. Assume that the outputs of the mapping function f for j passwords from π 1 to π j are exponentially equivalent with a base m. The actual class in SPEKE is
{ f ( π 1 ) = m e 1 , f ( π 2 ) = m e 2 , , f ( π j ) = m e j } ,
where the exponent e i for each i { 1 , 2 , . . . , j } , is an integer greater than or equal to 1. An active attacker, Eve, masquerading as Alice, generates a random a and sends A to Bob when A = m a mod p is calculated. Bob generates a random b and sends B and V B to Eve when B = ( f ( π ) ) b mod p, K = ( A ) b mod p, and V B = h ( h ( h ( K ) ) ) are calculated. On receiving B and V B from Bob, Eve terminates the protocol and for each i, 1 i j , computes
K i = B a / e i mod ( p 1 ) mod p V i = h ( h ( h ( K i ) ) ) .
If V i is the same as V B received from Bob, then the guessed password π i is the same as π, which means that it is correctly guessed:
K i = B a / e i mod p = ( ( f ( π ) ) b ) a / e i mod p = ( m e i · b ) a / e i mod p = m a b mod p = ( A ) b mod p = K .
To prevent an exponential equivalence attack in SPEKE, Tang and Mitchell suggested that the function f be modified as f ( π ) = h ( π | | I D A | | I D B | | i ) mod p , where i ( i 0 ) is the smallest integer that makes g a generator of a multiplicative subgroup of order q in Z p * . However, there is no difference between the function proposed by Tang and Mitchell and the function f ( π ) = ( h ( π ) ) 2 mod p in the revised version of SPEKE [7] from the viewpoint of preventing an exponential equivalence attack.
Furthermore, exponential equivalence among hash outputs has no effect on the security of hash-based protocols other than SPEKE or Dragonfly, which use a generator derived from hashing a shared password.

3.2. Exponential Equivalence in Dragonfly

In this subsection, we show the exponential equivalence problem in the Dragonfly protocol. A single on-line attempt can scan through all the exponentially equivalent passwords.
Assume that the outputs of the mapping function f for j passwords from π 1 to π j are exponentially equivalent with a base m. The actual class in Dragonfly is
{ f ( Alice , Bob , π 1 ) = m e 1 , f ( Alice , Bob , π 2 ) = m e 2 , , f ( Alice , Bob , π j ) = m e j } ,
where the exponent e i for each i { 1 , 2 , . . . , j } , is an integer greater than or equal to 1. An active attacker, Eve, masquerading as Alice, generates two random a 1 and a 2 , and sends A and a to Bob when A = m a 1 mod p and a = ( a 1 + a 2 ) mod q are calculated. Bob also generates two random b 1 and b 2 , and sends B and b to Eve when B = ( f ( Alice , Bob , π ) ) b 1 mod p and b = ( b 1 + b 2 ) mod q are calculated. On receiving A and a from Eve, Bob computes K = ( ( f ( Alice , Bob , π ) ) a · A ) b 2 mod p and send V B = h ( K | | B | | b | | A | | a ) to Eve.
On receiving B and V B from Bob, Eve terminates the protocol and for each i, 1 i j , computes
K i = ( m b · B 1 / e i mod q ) ( e i · a a 1 ) mod q mod p V i = h ( K i | | B | | b | | A | | a ) .
If V i is the same as V B received from Bob, then the guessed password π i is the same as π, which means that it is correctly guessed:
K i = ( m b · B 1 / e i ) ( e i · a a 1 ) mod p = ( m b · ( ( m e i ) b 1 ) 1 / e i ) ( e i · a a 1 ) mod p = ( m b 2 ) ( e i · a a 1 ) mod p = ( m ( e i · a a 1 ) ) b 2 mod p = ( ( m e i ) a · A ) b 2 mod p = K .

4. Prevention of Exponential Equivalence in SPEKE

In this section, we present a simple solution for preventing an attacker from guessing multiple passwords in a single on-line attempt based on exponential equivalence of the passwords in the SPEKE protocol.
Our approach is based on the property that there is no exponentially equivalent element when twice the minimum element is greater than the maximum element within a given set. Similarly, this approach can be applied to SPEKE by modifying the password-mapping function f by prefixing fixed bits to the output of the hash function h.
Theorem 1.
Let h : { 0 , 1 } * { 0 , 1 } be a function that maps an input of arbitrary length to an output of fixed length ℓ. Let p be a safe prime, p = 2 q + 1 where q is also a prime. There is no exponentially equivalent element among all the outputs of f ( x ) over a subgroup of Z p * of prime order q satisfying
f ( x ) = ( h ( x ) + k · 2 ) 2 ,
where k is any integer satisfying 3 k p 2 1 and k q 1 2 .
Proof.
From the given condition 0 h ( x ) < 2 , we can derive the following equations.
k · 2 h ( x ) + k · 2 ( k + 1 ) · 2 1 < ( k + 1 ) · 2 .
k 2 · 2 2 ( h ( x ) + k · 2 ) 2 < ( k + 1 ) 2 · 2 2 .
k 2 · 2 2 f ( x ) < ( k + 1 ) 2 · 2 2 .
For a base c, two successive elements of an exponential equivalence class should be c i and c i + 1 . To ensure that no exponentially equivalent element can be found, the maximum value of f ( x ) must be less than c times the minimum value for all c.
c · k 2 · 2 2 ( k + 1 ) 2 · 2 2
If we divide both sides by 2 2 , we get
c · k 2 ( k + 1 ) 2 .
Since c 2 , if c = 2 is satisfied, it is satisfied for all c:
2 k 2 > ( k + 1 ) 2 .
k 3
The modular square is symmetric with respect to half of modulus p. Therefore, to prevent output duplication, the domain of definition of the modular square, or the range of h ( x ) + k · 2 , must be included in
t q + 1 h ( x ) + k · 2 ( t + 1 ) q , for t = 0 or 1 .
Because (2) and (4) are the codomain and range of h ( x ) + k · 2 , respectively, the following equation is established:
t q + 1 k · 2 and ( k + 1 ) · 2 1 ( t + 1 ) q , for t = 0 or 1 .
1 k q + 1 2 1 or q + 1 2 k p 2 1 .
From (3) and (5), when (1) is satisfied, no exponentially equivalent element is found in f ( x ) .  ☐
For the 112-bit security level, the sizes of p, q and 2 should be greater than or equal to 2048, 2047 and 224 bits, respectively [9].

5. Discussion

Our solution for preventing exponential equivalence cannot be applied directly over a subgroup in which modulus p is not a safe prime, such as in Dragonfly. To make a generator of a subgroup, exponentiation with exponent r, i.e., f ( x ) = ( h ( x ) + k · 2 ) r , is needed. Because r is very large, e.g., an 896-bit integer corresponding to a 1024-bit modulus, subsequently most of outputs of f ( x ) will exceed p. We reserve this problem for future research.

6. Conclusions

In this paper, we showed that an active attacker can try multiple passwords in a single attempt by exploiting the exponential equivalence of the passwords in Dragonfly as well as in SPEKE. Furthermore, we proposed and proved a simple solution for preventing this problem in the SPEKE protocol. Our solution can be easily applied to variants of the Diffie-Hellman protocol (e.g., the B-SPEKE protocol) that use a safe prime modulus and do not use a fixed generator.

Acknowledgments

This research was supported by the Basic Science Research Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Science, ICT, and Future Planning (2014R1A1A2002775).

Author Contributions

Hanwook Lee conceived the idea and wrote this manuscript. Dongho Won contributed to the direction and content and also revised the manuscript.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Jablon, D. Strong password-only authenticated key exchange. Comput. Commun. Rev. ACM SIGCOMM 1996, 26, 5–26. [Google Scholar]
  2. Harkins, D. Simultaneous authentication of equals: A secure, password-based key exchange for mesh networks. In Proceedings of the Second International Conference on Sensor Technologies and Applications, Cap Esterel, France, 25–31 August 2008; pp. 839–844.
  3. Zhang, M. Analysis of the SPEKE password-authenticated key exchange protocol. IEEE Commun. Lett. 2004, 8, 63–65. [Google Scholar]
  4. Tang, Q.; Mitchell, C.J. On the Security of Some Password-Based Key Agreement Schemes. In Computational Intelligence and Security; Springer Berlin Heidelber: Berlin, Germany, 2005; pp. 149–154. [Google Scholar]
  5. Hao, F.; Shahandashti, S.F. The SPEKE Protocol Revisited. In Security Standardisation Research; Springer International Publishing: Cham, Switzerland, 2014; pp. 26–38. [Google Scholar]
  6. Clarke, D.; Hao, F. Cryptanalysis of the Dragonfly key exchange protocol. IET Inf. Secur. 2010, 8, 283–289. [Google Scholar]
  7. Jablon, D. Extended password key exchange protocols immune to dictionary attack. In Proceedings of the Sixth IEEE Workshops on Enabling Technologies: Infrastructure for Collaborative Enterprises, Cambridge, MA, USA, 18–20 June 1997; pp. 248–255.
  8. Hao, F.; Ryan, P. J-PAKE: Authenticated key exchange without PKI. In Transactions on computational science XI; Springer Berlin Heidelberg: Berlin, Germany, 2010; pp. 192–206. [Google Scholar]
  9. Barker, E.; Roginsky, A. NIST Special Publication 800-131A Transitions: Recommendation for Transitioning the Use of Cryptographic Algorithms and Key Lengths. Available online: http://csrc.nist.gov/publications/nistpubs/800-131A/sp800-131A.pdf (accessed on 1 September 2015).

Share and Cite

MDPI and ACS Style

Lee, H.; Won, D. Prevention of Exponential Equivalence in Simple Password Exponential Key Exchange (SPEKE). Symmetry 2015, 7, 1587-1594. https://doi.org/10.3390/sym7031587

AMA Style

Lee H, Won D. Prevention of Exponential Equivalence in Simple Password Exponential Key Exchange (SPEKE). Symmetry. 2015; 7(3):1587-1594. https://doi.org/10.3390/sym7031587

Chicago/Turabian Style

Lee, Hanwook, and Dongho Won. 2015. "Prevention of Exponential Equivalence in Simple Password Exponential Key Exchange (SPEKE)" Symmetry 7, no. 3: 1587-1594. https://doi.org/10.3390/sym7031587

APA Style

Lee, H., & Won, D. (2015). Prevention of Exponential Equivalence in Simple Password Exponential Key Exchange (SPEKE). Symmetry, 7(3), 1587-1594. https://doi.org/10.3390/sym7031587

Article Metrics

Back to TopTop