J-PAKE: Authenticated Key Exchange Without PKI: Feng Hao and Peter Ryan
J-PAKE: Authenticated Key Exchange Without PKI: Feng Hao and Peter Ryan
PKI
1
Thales E-Security, Cambridge, UK
2
Faculty Of Science, University of Luxembourg
field, there have been several PAKE protocols available. The EKE and
SPEKE schemes are perhaps the two most notable examples. Both tech-
Proof (ZKP). So far, almost all of the past solutions have avoided using
integrate the ZKP into the protocol design and meanwhile achieve good
ment
1 Introduction
Since passwords are weak secrets, they must be protected during trans-
is fully encrypted.
achieve two goals. First, it allows zero-knowledge proof of the password. One
can prove the knowledge of the password without revealing it to the other party.
The first milestone in PAKE research came in 1992 when Bellovin and Merrit
introduced the Encrypted Key Exchange (EKE) protocol [10]. Despite some
reported weaknesses [16, 20, 23, 25], the EKE protocol first demonstrated that
the PAKE problem was at least solvable. Since then, a number of protocols have
been proposed. Many of them are simply variants of EKE, instantiating the
“symmetric cipher” in various ways [7].
The few techniques that claim to resist known attacks have almost all been
patented. Most notably, EKE was patented by Lucent Technologies [12], SPEKE
by Phoenix Technologies [18] and SRP by Stanford University [28]. The patent
2 Past work
that a PAKE protocol shall fulfill (also see [10, 11, 16, 28]).
the password.
2. Forward secrecy – It produces session keys that remain secure even when
exchange). In either case, the communication must not reveal any data – say a
hash of the password – that allows an attacker to learn the password through
also implies that if an attacker knows the password but only passively observes
the key exchange, he cannot learn the session key.
Finally, the protocol must resist on-line dictionary attacks. If the attacker is
directly engaging in the key exchange, there is no way to prevent such an attacker
trying a random guess of the password. However, a secure PAKE scheme should
mitigate the effect of the on-line attack to the minimum – in the best case,
the attacker can only guess exactly one password per impersonation attempt.
attacker should not be able to impersonate users to a server after he has stolen
the password verification files stored on that server, but has not performed dic-
tionary attacks to recover the passwords [7, 17, 28]. Protocols designed with this
additional requirement are known as the augmented PAKE, as opposed to the
mised server is significantly realistic. After all, the server had been compromised
and the stored password files had been stolen. Second, none of the augmented
schemes can provide any real assurance once the server is indeed compromised.
If the password verification files are stolen, off-line exhaustive search attacks are
inevitable. All passwords will need to be revoked and updated anyway.
Another argument in favor of the augmented PAKE is that the server does not
store a plaintext password so it is more secure than the balanced PAKE [28]. This
is a misunderstanding. The EKE and SPEKE protocols are two examples of the
balanced PAKE. Though the original EKE and SPEKE papers only mention the
use the plaintext password as the shared secret between the client and server [10,
16], it is trivial to use a hash of the password (possibly with some salt) as the
shared secret if needed. So, the augmented PAKE has no advantage in this
aspect.
schemes truly satisfy [7, 17, 28], an augmented PAKE protocol is significantly
more complex and more computationally expensive. The extra complexity opens
more opportunities to the attacker, as many of the attacks are applicable on the
augmented PAKE [7].
In this section, we review the two perhaps most well-known balanced PAKE
protocols: EKE [10] and SPEKE [16]. Both techniques are patented and have
There are many other PAKE protocols in the past literature [7]. Due to
the space constraint, we can only briefly highlight some of them. Goldreich and
Lindell first provided a formal analysis of PAKE, and they also presented a
PAKE protocol that satisfies the formal definitions [33]. However, the Goldreich-
require a “trusted third party” to define the public parameters: more specifically,
the security of the protocol relies on the “independence” of two group genera-
tors selected honestly by a trusted third party [1, 34, 35] 3 . Thus, as with any
“trusted third party”, the party becomes the one who can break the protocol
security [3]. (Recall that the very goal of PAKE is to establish key exchange
between two parties without depending on any external trusted party.) Another
well-known provably secure PAKE is a variant of the EKE protocol with for-
mal security proofs due to Bellare, Pointcheval and Rogaway [5] (though the
proofs are disputed in [7, 32], as we will explain later). In general, all the above
protocols [1, 5, 33–35, 39] are significantly more complex and less efficient than
the EKE and SPEKE protocols. In this paper, we will focus on comparing our
First, let us look at the EKE. Bellovin and Merrit introduced two EKE
constructs: based on RSA (which was later shown insecure [23]) and Diffie-
Hellman (DH). Here, we only describe the latter, which modifies a basic DH
protocol by symmetrically encrypting the exchanged items. Let α be a primitive
root modulo p. In the protocol, Alice sends to Bob [αxa ]s , where xa is taken
3
The Jiang-Gong paper proposes to use a trusted third party or a threshold scheme
to define the public parameters [35], while the KOY paper suggests to use a trusted
third party or a source of randomness [34]. However, neither paper provides concrete
descriptions of the “threshold scheme” and “source of randomness”. The Gennaro-
Lindell paper suggests to choose a large organization as the trusted party for all its
employees [39]. However, such a setup also severely limits the general deployment of
PAKE among the public.
randomly from [1, p−1] and [. . .]s denotes a symmetric cipher using the password
s as the key. Similarly, Bob sends to Alice [αxb ]s , where xb ∈R [1, p − 1]. Finally,
Alice and Bob compute a common key K = αxa ·xb . More details can be found
in [10].
dom. But, for a 1024-bit number modulo p, not every bit is random. Hence, a
passive attacker can rule out candidate passwords by applying them to decipher
[αxa ]s , and then checking whether the results fall within [p, 21024 − 1].
possible [20]. This might alleviate the issue, but does not resolve it.
The above reported weakness in EKE suggests that formal security proofs
are unlikely without introducing new assumptions. Bellare, Pointcheval and Rog-
away introduced a formal model based on an “ideal cipher” [5]. They applied this
model to formally prove that EKE is “provably secure”. However, this result is
disputed in [7,32]. The so-called “ideal cipher” was not concretely defined in [5];
it was only later clarified by Boyd et al. in [7]: the assumed cipher works like a
random function in encryption, but must map fixed-size strings to elements of
G in decryption (also see [32]). Clearly, no such ciphers are readily available yet.
Several proposed instantiations of such an “ideal cipher” were easily broken [32].
Another limitation with the EKE protocol is that it does not securely ac-
commodate short exponents. The protocol definition requires αxa and αxb be
uniformly distributed over the whole group Z∗p [10]. Therefore, the secret keys
xa and xb must be randomly chosen from [1, p − 1], and consequently, an EKE
must use 1024-bit exponents if the modulus p is chosen 1024-bit. An EKE cannot
operate in groups with distinct features, such as a subgroup with prime order
q is also a prime. Alice sends to Bob (s2 )xa where s is the shared password and
xa ∈R [1, q − 1]; similarly, Bob sends to Alice (s2 )xb where xb ∈R [1, q − 1].
Finally, Alice and Bob compute K = s2·xa ·xb . The squaring operation on s is to
an active attacker may exploit that equivalence to test multiple passwords in one
go. This problem is particularly serious if a password is a Personal Identification
squaring, but that does not resolve the problem. Hashed passwords are still
confined to a pre-defined small range. There is no guarantee that an attacker is
ponents. For a 1024-bit modulus p, the key space is within [1, q − 1], where q is
1023-bit. In [16], Jablon suggested to use 160-bit short exponents in a SPEKE,
by choosing xa and xb within a dramatically smaller range [1, 2160 − 1]. But, this
would give a passive attacker side information that the 1023 − 160 = 863 most
significant bits in a full-length key are all ‘0’s. The security is not reassuring, as
To sum up, an EKE has the drawback of leaking partial information about
the password to a passive attacker. As for a SPEKE, it has the problem that an
active attacker may test multiple passwords in one protocol execution. Further-
3 J-PAKE Protocol
In this section, we present a new balanced PAKE protocol called Password Au-
message, change it at will, and then relay the modified message to the intended
recipient.
It is perhaps surprising that we are still able to establish a private and au-
thenticated channel in such a hostile environment solely based on a shared pass-
word – in other words, bootstrapping a high-entropy cryptographic key from a
x2 ∈R [1, q − 1]. Similarly, Bob selects x3 ∈R [0, q − 1] and x4 ∈R [1, q − 1]. Note
Round 1 Alice sends out g x1 , g x2 and knowledge proofs for x1 and x2 . Simi-
depends on the other. When this round finishes, Alice and Bob verify the received
knowledge proofs, and also check g x2 , g x4 6= 1.
Round 2 Alice sends out A = g (x1 +x3 +x4 )·x2 ·s and a knowledge proof for x2 · s.
Similarly, Bob sends out B = g (x1 +x2 +x3 )·x4 ·s and a knowledge proof for x4 · s.
When this round finishes, Alice computes K = (B/g x2 ·x4 ·s )x2 = g (x1 +x3 )·x2 ·x4 ·s ,
and Bob computes K = (A/g x2 ·x4 ·s )x4 = g (x1 +x3 )·x2 ·x4 ·s . With the same keying
material K, a session key can be derived κ = H(K), where H is a hash function.
The two-round J-PAKE protocol can serve as a drop-in replacement for face-
to-face key exchange. It is like Alice and Bob meet in person and secretly agree
a common key. So far, the authentication is implicit: Alice believes only Bob can
derive the same key and vice versa. In some applications, Alice and Bob may
want to perform an explicit key confirmation just to make sure the other party
actually holds the same key.
4
Depending on the application, s could also be a hash of the shared password together
with some salt.
There are several ways to achieve explicit key confirmation. In general, it is
desirable to use a different key from the session key for key confirmation5 , say use
κ0 = H(K, 1). We summarize a few methods, which are generically applicable
to all key exchange schemes. A simple method is to use a hash function similar
to the proposal in SPEKE: Alice sends H(H(κ0 )) to Bob and Bob replies with
H(κ0 ). Another straightforward way is to use κ0 to encrypt a known value (or
functions as suggested in [36]. Given that the underlying functions are secure,
these methods do not differ significantly in security.
In the protocol, senders need to produce valid knowledge proofs. The neces-
sity of the knowledge proofs is motivated by Anderson-Needham’s sixth principle
in designing secure protocols [2]: “Do not assume that a message you receive has
a particular form (such as g r for known r) unless you can check this.” For-
revealing it [29].
and reveals nothing except the one bit information: “whether the signer knows
the discrete logarithm”. Let H be a secure hash function6 . To prove the knowl-
edge of the exponent for X = g x , one sends {SignerID, V = g v , r = v−xh} where
SignerID is the unique user identifier, v ∈R Zq and h = H(g, V, X, SignerID).
The receiver verifies that X lies in the prime-order subgroup G and that g v equals
g r X h . Adding the unique SignerID into the hash function is to prevent Alice re-
playing Bob’s signature back to Bob and vice versa. Note that for Schnorr’s sig-
5
Using a different key has a (subtle) theoretical advantage that the session key will
remain indistinguishable from random even after the key confirmation. However, this
does not make much difference in practical security and is not adopted in [10, 16].
6
Schnorr’s signature is provably secure in the random oracle model, which requires a
secure hash function.
nature, it takes one exponentiation to generate it and two to verify it (computing
4 Security analysis
In this section, we show the protocol fulfills all the security requirements listed
in Section 2.1.
First, we discuss the protocol’s resistance against the off-line dictionary attack.
Without loss of generality, assume Alice is honest. Her ciphertext A contains
Proof. The value x1 is uniformly distributed over Zq and unknown to Bob. The
knowledge proofs required in the protocol show that Bob knows x3 and x4 . By
definition xa is computed from x3 and x4 (known to Bob) plus a random number
In the second round of the protocol, Alice sends A = gax2 ·s to Bob, where
order, any non-identity element is a generator [29]. So Alice can explicitly check
ga 6= 1 to ensure it is a generator. In fact, Lemma 1 shows that x1 + x3 + x4 is
the Bob’s case. For the same reason, it is implicitly guaranteed by probability
that x1 + x3 6= 0, hence K = g (x1 +x3 )·x2 ·x4 ·s 6= 1 holds with an exceedingly
overwhelming probability.
Under the Decision Diffie-Hellman (DDH) assumption, provided that g x1 +x3 +x4
is a generator, Bob cannot distinguish Alice’s ciphertext A = g (x1 +x3 +x4 )·x2 ·s
the group. u
t
tocol symmetry, the above results can be easily adapted from Alice’s perspective
attacker does not necessarily imply resistance against a passive attacker (in the
former case, the two passwords are different, while in the latter, they are the
Under the DDH assumption, given that g x1 +x3 +x4 and g x1 +x2 +x3 are generators,
the ciphertexts A = g (x1 +x3 +x4 )·x2 ·s and B = g (x1 +x2 +x3 )·x4 ·s do not leak any in-
formation for password verification.
Proof. Suppose Alice is talking to authentic Bob who knows the password. We
need to show a passive attacker cannot learn any password information by corre-
lating the two users’ ciphertexts. Theorem 2 states that Bob cannot distinguish
A from a random value in G. This implies that even Bob cannot computationally
correlate A to B (which he can compute). Of course, a passive attacker cannot
correlate A to B. Therefore, to a passive attacker, A and B are two random and
independent values in G; they do not leak any useful information for password
verification. u
t
the ZKPs in the protocol require Alice and Bob know the values of x1 and
(SCDH) assumption8 , given that K 6= 1, the past session keys derived from the
protocol remain incomputable even when the secret s is later disclosed.
Proof. After knowing s, the passive attacker wants to compute κ = H(K) given
inputs: {g x1 , g x2 , g x3 , g x4 , g (x1 +x3 +x4 )·x2 , g (x1 +x2 +x3 )·x4 }.
8
The SCDH assumption is provably equivalent to the Computational Diffie-Hellman
(CDH) assumption – solving SCDH implies solving CDH, and vice versa [4]
Assume the attacker is able to compute K = g (x1 +x3 )·x2 ·x4 from those inputs.
lem as follows. For g x where x ∈R [1, q − 1], we query the oracle by supplying
{g −x+a , g −x+b , g x , g b·(−x+a) , g a·(−x+b) }, where a, b are arbitrary values chosen
3
−(a+b)·x2 +ab·x
from Zq , and obtain f (g x ) = g (−x+a)·(−x+b)·x = g x . In this way, we
3 2 3
+(3−a−b)·x2 +(3−2a−2b+ab)·x+1−a−b+ab
can also obtain f (g x+1 ) = g (x+1) −(a+b)·(x+1) +ab·(x+1)
= gx .
2 ¡ ¢1/3
Now we are able to compute g x = f (g x+1 ) · f (g x )−1 · g (−3+2a+2b)·x−1+a+b−ab .
This, however, contradicts the SCDH assumption [4], which states that one can-
2
not compute g x from g, g x where x ∈R [1, q − 1]. u
t
case, the password will inevitably be disclosed (say by exhaustive search). This
is an inherent threat and applies to all the existing PAKE protocols [1, 5, 7, 10,
16, 17, 28, 33–35].
J-PAKE protocol, the raw session key K = g (x1 +x3 )·x2 ·x4 ·s is determined by the
the face of active attacks. The following theorem shows that the obtained session
key K is random too – in other words, the session keys are all independent.
Therefore, compromising a session (hence learning all session-specific secrets)
assumption, given that K 6= 1, the past session key derived from the protocol is
indistinguishable from a random non-identity element in G.
Finally, we study an active attacker, who directly engages in the protocol exe-
cution. Without loss of generality, we assume Alice is honest, and Bob is com-
choose freely.
sumption, an active attacker cannot compute the session key if he chose a value
s0 6= s.
x3 , x4 , s, s0 }, it returns K 0 . Note that the oracle does not need to know x2 , and it
0
is still able to compute A = g (x1 +x3 +x4 )·x2 ·s and B0 = g (x1 +x2 +x3 )·x4 ·s internally.
Thus, the oracle can be used to solve the Square Computational Diffie-Hellman
2 0 0 −1
(s0 −s)−1
problem by computing g x2 = (K 0 /(g x1 ·x2 ·x4 ·s · g x2 ·x3 ·x4 ·s ))x4 . Here9 ,
x4 6= 0 and s0 − s 6= 0. This, however, contradicts the SCDH assumption [4],
2
which states that one cannot compute g x2 from g, g x2 where x2 ∈R [1, q − 1].
So, even with x1 and s revealed, the attacker is still unable to compute K 0 (and
The above theorem shows that what an on-line attacker can learn from the
protocol is only minimal. Because of the knowledge proofs, the attacker is left
with the only freedom to choose an arbitrary s0 . If s0 6= s, he is unable to
derive the same session key as Alice. During the later key confirmation process,
the attacker will learn one-bit information: whether s0 and s are equal. This
is the best that any PAKE protocol can possibly achieve, because by nature
In this section, we compare our protocol with two other balanced PAKE schemes:
EKE and SPEKE. These two techniques have several variants, which follow very
similar constructs [7]. However, it is beyond the scope of this paper to evaluate
them all. Also, we will not compare with augmented schemes (e.g., A-EKE,
B-SPEKE, SRP, AMP and OPAKE [27]) due to different design goals.
The EKE and SPEKE are among the simplest and most efficient PAKE
schemes. Both protocols can be executed in one round, while J-PAKE requires
two rounds. On the computational aspect, both protocol require each user to
perform only two exponentiations, compared with 14 exponentiations in J-PAKE
ponents (see Section 2.2). Since the cost of exponentiation is linear with the
bit-length of the exponent [29], for a typical 1024-bit p and 160-bit q setting,
one exponentiation in an EKE or SPEKE is equivalent in cost to 6-7 exponen-
tiations in a J-PAKE. Hence, the overall computational costs for EKE, SPEKE
There are several ways to improve the J-PAKE performance. First, the pro-
tocol enumerates 14 exponentiations for each user, but actually many of the
operations are merely repetitions. To explain this, let the bit length of the expo-
However, the same square operations need not be repeated for other items with
the same base g (i.e., g x2 etc). This provides plenty room for efficiency opti-
mization in a practical implementation. In contrast, the same optimization is
not applicable to the EKE and SPEKE. Second, it would be more efficient, par-
Item Description No of Exp
1 Compute {g x1 , g x2 } and KPs for {x1 , x2 } 4
2 Verify KPs for {x3 , x4 } 4
3 Compute A and KP for {x2 · s} 2
4 Verify KP for {x4 · s} 2
5 Compute κ 2
Total 14
6 Design considerations
One notable feature of the J-PAKE design is the use of the Zero Knowledge
However, the use of ZKP does not necessarily mean the protocol must be in-
efficient. This largely depends on how to effectively integrate this primitive into
the overall design. In our construction, we introduced a novel juggling technique:
arranging the random public keys in such a structured way that the random-
ization factors vanish when both sides supplied the same password. (A similar
use of this juggling technique can be traced back to [15] and [8]). As we have
shown, this leads to computational efficiency that is comparable to the EKE and
SPEKE protocols. To our best knowledge, this design is significantly different
from all past PAKE protocols. In the area of PAKE research – which has been
troubled by many patent arguments surrounding existing schemes [13] – a new
construct may be helpful.
With the same juggling idea, the current construction of the J-PAKE pro-
tocol seems close to the optimum. Note in the protocol, we used four x terms –
x1 , x2 , x3 , x4 . As if one cannot juggle with only two balls, we find it difficult to
juggle with two x terms. This is not an issue in the multi-party setting where
there are at least three participants (each participant generates one “ball”) [15].
For the two-party case, our solution was to let each user create two ephemeral
public keys, and thus preserve the protocol symmetry. It seems unlikely that one
could improve the protocol efficiency by using a total of only 3 (or even 2) x
7 Conclusion
sulates a compromised session from affecting other sessions; and strictly limits
an active attacker to guess only one password per protocol execution. As com-
website).
Acknowledgments
We thank Ross Anderson and Piotr Zieliński for very helpful comments and
discussions.
References
1998.
Springer-Verlag, 2003.
9. J. Camenisch and M. Stadler, “Proof systems for general statements about discrete
based protocol secure against dictionary attacks and password file compromise,”
2006.
16. D. Jablon, “Strong password-only authenticated key exchange,” ACM Computer
ings of the WETICE’97 Enterprise Security Workshop, pp. 248–255, June 1997.
18. D. Jablon, “Cryptographic methods for remote authentication,” U.S. Patent
word chaining and dictionary attacks,” Proceedings of the Sixth Annual USENIX
standard assumptions,” IEICE Transactions, Vol. E85-A, No. 10, pp. 2229–2237,
2002.
22. Paul C. Van Oorschot, M.J. Wiener, “On Diffie-Hellman key agreement with short
1996.
23. S. Patel, “Number theoretic attacks on secure password schemes,” Proceedings of
vate key,” Proceedings of the Network and Distributed System Security, February
1999.
25. p. MacKenzie, “The PAK suite: protocols for password-authenticated key ex-
http://grouper.ieee.org/groups/1363/
28. T. Wu, “The Secure Remote Password protocol,” Proceedings of the Internet So-
ciety Network and Distributed System Security Symposium, pp. 97–111, March
1998.
29. D. Stinson, Cryptography: theory and practice, Third Edition, Chapman &
Hall/CRC, 2006.
30. C.P. Schnorr, “Efficient signature generation by smart cards,” Journal of Cryptol-
protocol,” IEEE Communications Letters, Vol. 8, No. 1, pp. 63-65, January 2004.
32. Z. Zhao, Z. Dong, Y. Wang, “Security analysis of a password-based authentication
protocol proposed to IEEE 1363,” Theoretical Computer Science, Vol. 352, No. 1,
475-494, 2001.
35. S.Q. Jiang, G. Gong, “Password based key exchange with mutual authentication,”
37. A.J. Menezes, P.C. van Oorschot and S.A. Vanstone, Handbook of applied cryptog-
38. O. Goldreich, S. Micali and A. Wigderson, “How to play any mental game or