Skip to content
BY-NC-ND 3.0 license Open Access Published by De Gruyter November 16, 2017

On the leakage-resilient key exchange

  • Janaka Alawatugoda EMAIL logo

Abstract

Typically, secure channels are constructed from an authenticated key exchange (AKE) protocol, which authenticates the communicating parties based on long-term public keys and establishes secret session keys. In this paper we address the partial leakage of long-term secret keys of key exchange protocol participants due to various side-channel attacks. Security models for two-party authenticated key exchange protocols have been developed over time to provide security even when the adversary learns certain secret values. This paper combines and extends the advances of security modelling for AKE protocols addressing more granular partial leakage of long-term secrets of protocol participants. Further, we fix some flaws in security proofs of previous leakage-resilient key exchange protocols.

MSC 2010: 94A60; 14G50; 11T71

1 Introduction

With the development of side-channel attacks, a necessity arises to develop cryptosystems in a leakage-resilient manner. Being one of the important cryptographic primitives, key exchange protocols were considered to be constructed in a leakage-resilient manner. Even though most of the current key exchange security models like Bellare–Rogaway (BR) model [9], Canetti–Krawczyk (CK) model [13], extended Canetti–Krawczyk (eCK) model [31] address different adversarial capabilities, they do not address the partial leakage of long-term secret parameters due to the side-channel attacks. Those do not suffice for analyzing the security of existing key exchange protocols in a leaky environment. In order to address leakage resilience of key exchange protocols, it is necessary to construct key exchange security models which allow the adversary to obtain partial leakage of secret parameters of protocol participants. The ultimate goal is to come up with a security model which addresses strong leakage features, with no additional restrictions than existing strong security models such as eCK. Then construct leakage-resilient key exchange protocols, which are proven secure in the new security model. This way it is possible to construct strong key exchange protocols, which are resilient to side-channel attacks.

Our contribution.

This paper combines and extends results from few of the previous papers on leakage-resilient key exchange [37, 4, 6, 7], and fix some flaws in security proofs. We will discuss in detail about (1) various leakage models which could possibly be incorporated with security models/games to address side-channel attacks, (2) practical interpretation of various leakage security models for key exchange, (3) leakage-resilient protocol constructions and fix some flows in their security proofs, and (4) compare and contrast previous security models and key exchange protocols.

1.1 Side-channel attacks and countermeasures

The revolutionary idea of side-channel attacks was first introduced by Kocher [29] by presenting timing attacks on Diffie–Hellman, RSA, DSS and other implementations. Although the cryptographic schemes are designed in such a way that they are hard to break computationally, leaking information from the implemented system may give sufficient power to the adversary to break the system by recovering the secret parameters such as secret keys. There are various kinds of side channels available such as timing information [29, 11], electromagnetic radiation [23], leaking information about power consumption [34]. Since it is very difficult to fully stop the information leakage from cryptosystems, side-channel attacks become a huge threat for the security of cryptosystems.

Side-channel attacks can be mounted locally (local attacks) or remotely (remote attacks) from the targeted system. Local attacks need some kind of physical access to the target system or proximity. For instance, side-channel attacks such as power analysis attacks, EM-emission based attacks, cold boot attacks need physical access to the targeted system or proximity to capture the leakage. Alternatively, remote attacks can be mounted from a long distance. For instance, the side-channel attacks such as timing attacks can be mounted from remotely, as the adversary can measure response time or ciphertext lengths from a distance system.

For considering the countermeasures of side-channel attacks, there are mainly two approaches. One is a hardware based approach where the focus is to design hardware that minimizes the leakage of secret information. Bernstein has proposed ideas to design CPUs which provides protection against timing attacks on cache memory, as well as many ideas to mask leaking timing information by software based AES implementations [11]. Besides this there are other software based countermeasures which are mostly focusing on masking the leaking information. Alawatugoda, Jayasinghe and Ragel [5] have presented three methods for masking leaking timing information: injecting some randomness to the leaking cache-timing information, dedicating cache portions to fetch data from different memory portions and pre-fetching from the memory before the algorithm accesses the required memory portions and hence inject random timing information and change the cache access pattern respectively. Obviously, those types of countermeasures protect systems only against some specific attacks that are known at the moment. Those countermeasures are known as ad-hoc solutions.

Above we discussed a few known side-channel attacks and possible countermeasures against them. There may be many unknown side-channel attacks as well. Therefore, it is important to defend against both known and unknown side-channel attacks.

1.2 Leakage-resilient cryptography

As discussed above side-channels leak some amount of information about the secret parameters to the adversary. The basic idea of leakage-resilient cryptography is, even though some leaking information is visible to the adversary, the security of the cryptographic scheme remains. Trying to stop the leakage is nearly impossible because electronic devices have their physical limitations.

Even though a cryptographic scheme may be proven secure in a strong security model which does not address leakage attacks, it is not possible to say anything about the security of the cryptographic scheme in an environment where the adversary is capable of obtaining leakage information. In order to analyze the leakage resiliency of cryptographic schemes, we need to construct security models where the adversary is given capability of obtaining leakage information.

Different leakage models have been introduced to capture side-channel attacks. They provide leakage based information to the adversary under different constraints. In order to achieve leakage resilience in a particular leakage model, the scheme should be proven secure even when the adversary is capable of accessing leakage information in that particular leakage model.

Continuous leakage model.

In the pioneering work of Micali and Reyzin [35], a general framework was introduced to model the leakage that occurs when computation takes place on secret parameters. This framework relies on the assumption that “only computation leaks information”. Further, Micali and Reyzin mentioned that leakage only occurs from the secret memory portions which are actively involved in computations, and the amount of leakage per occurrence is less than the size of the corresponding secret memory portion, hence bounded by a leakage parameter λ. The adversary is allowed to obtain leakage from an arbitrarily large number of computations, hence the overall leakage amount is unbounded and it can be larger than the size of the secret key. This leakage model addresses side-channel attacks such as timing attacks, power analysis attacks and EM emission based attacks, which obtain leakage of secret values whenever computations take place on them. This model is suitable to analyze stateful leakage-resilient cryptographic schemes [20, 39], where at the end of each ith execution round a new secret key state ski+1 is computed using the current secret key state ski. This key state ski+1 is going to be used as the secret parameter of the next execution round i+1. Before the ith round an attacker chooses (adaptively) a leakage function fi and after the execution of the round, it receives fi(ski), under the constrain that |fi(ski)|λ.

Bounded leakage model.

Inspired by “cold boot” attacks, Akavia, Goldwasser and Vaikuntanathan constructed a general framework to model memory attacks [3]. The adversary can adaptively choose an efficiently computable arbitrary leakage function fi and send it to the leakage oracle. The leakage oracle gives fi(sk) to the adversary where sk is the secret key. The only restriction comes here is that |fi(sk)|λ, where λ is the leakage parameter, which is smaller than the size of sk. This model is suitable to analyze stateless leakage-resilient cryptographic schemes which are not using new secret states for each round.

After-the-fact leakage.

Leakage which happens after the challenge is given to the adversary is considered as after-the-fact leakage. In security experiments for public-key cryptosystems, the challenge to the adversary is, given a ciphertext, distinguish the corresponding plaintext. In key exchange security models, the challenge to the adversary is to identify the real session key of a chosen session from a random session key [9, 13, 31]. In leakage models for public-key cryptosystems, after-the-fact leakage is the leakage which happens after the challenge ciphertext is given whereas in leakage-resilient key exchange security models, after-the-fact leakage is the leakage which happens after the session key is established.

Earlier leakage models only consider the leakage which happens before the challenge is given (before-the-fact leakage). Hence the adversary is not allowed to obtain leakage after the challenge is given. Recent leakage models facilitate more granular leakage by allowing the adversary to issue leakage functions, and obtain leakage even after the challenge is given, either under the bounded or continuous leakage assumptions as explained above.

For leakage-resilient public-key encryption there are three properties which may be important differentiators for the different models. One is whether the model allows access to decryption of chosen ciphertexts before (CCA1) and after (CCA2) the challenge is known. The second is whether the leakage allowed to the adversary is continuous or bounded. The third is whether the leakage is allowed only before the challenge ciphertext is known or also after the fact.

In earlier models, such as that of Naor and Segev [38], it was expected that although the adversary is given access to the decryption oracle (CCA2), the adversary cannot be allowed to obtain leakage after the challenge ciphertext is given. This is because the adversary can encode the decryption algorithm and challenge ciphertext with the leakage function and by revealing a few bits of the decrypted value of the challenge ciphertext trivially win the challenge. Subsequently, Halevi and Lin [22] introduced after-the-fact leakage-resilient semantic security (CPLA2) on public-key cryptosystems, in the bounded leakage model. In their security experiment, the adversary is not allowed to access the decryption oracle. Dziembowski and Faust [19] defined an adaptively-chosen ciphertext after-the-fact leakage (CCLA2) in which the adversary is allowed to access the decryption oracle adaptively and obtain leakage information even after the challenge ciphertext is given. Furthermore, they allow continuous leakage, so the total leakage amount is unbounded.

2 Key exchange security models

In 1976, Diffie and Hellman introduced a key exchange primitive [16], which enables two parties to exchange a secret key (session key) by communicating over a public channel. Many key exchange protocols have been created based on the Diffie–Hellman key exchange primitive [32, 17, 24]. In these key exchange protocols, different types of keys may be used to compute session keys: long-term secret keys are the static secrets belong to the protocol participants which are often used to add authentication to the session key, ephemeral keys are the session specific secrets belong to protocol participants which are used to add freshness to the session key.

In order to analyze the security of key exchange protocols, a formal methodology is needed. Therefore, key exchange security models have been created. A security model is a formal security statement of certain security features. Generally, security models are designed to reflect real world adversarial capabilities, addressing the known attack scenarios. At the same time, it is natural to design security models with theoretical adversaries which have more capabilities than real world adversaries, because that way it is possible to address more powerful attacks which may exist in the future.

The Bellare–Rogaway models (BR93 [9], BR95 [10]), the Canetti–Krawczyk (CK) model [13], and the extended Canetti–Krawczyk (eCK) model [31] are a few of such security models, and protocol designers use them to analyze the security of key exchange protocols. Among the other models the eCK model is clearly defined to capture most of the demanding security features of key exchange protocols, and thus widely used as a strong security model to analyze the security of key exchange protocols. We choose the eCK model for detailed discussion, because the eCK model is used as the base of the leakage security models which are discussed in this paper.

2.1 Extended Canetti–Krawczyk model (eCK) [31]

Parties and long-term keys.

Let 𝒰={U1,,UNP} be a set of NP parties. Each party Ui, where i[1,NP], has a pair of long-term public and secret keys, (pkUi,skUi). Each party Ui owns at most NS number of protocol sessions.

Sessions.

Each party may run multiple instances of the protocol concurrently or sequentially; we use the term principal to refer a party involved in a protocol instance, and the term session to identify a protocol instance at a principal. The notation ΠU,Vs represents the sth session at the owner principal U, with intended partner principal V. The principal which sends the first protocol message of a session is the initiator of the session, and the principal which responds to the first protocol message is the responder of the session. A session ΠU,Vs enters an accepted state when it computes a session key. Note that a session may terminate without ever entering into the accepted state. The information of whether a session has terminated with or without acceptance is public.

Partnering.

Legitimate execution of a key exchange protocol between two principals U and V makes two partnering sessions owned by U and V respectively. Two sessions ΠU,Vs and ΠU,Vs are said to be partners if all of the following hold:

  1. Both ΠU,Vs and ΠU,Vs have computed session keys.

  2. Messages sent from ΠU,Vs and messages received by ΠU,Vs are identical.

  3. Messages sent from the session ΠU,Vs and messages received by ΠU,Vs are identical.

  4. U=V and V=U.

  5. Exactly one of U and V is the initiator and the other is the responder.

The protocol is correct if two partner sessions compute identical session keys.

Adversarial powers.

The adversary 𝒜 is a probabilistic polynomial time algorithm in the security parameter k that has the control over the whole network. Note that 𝒜 interacts with set of sessions which represent protocol instances, and 𝒜 can adaptively ask the following queries:

  1. Send(U,V,s,m) query: This query allows 𝒜 to run the protocol. It sends the message m to the session U,Vs as coming from the session V,Us; and U,Vs will return to 𝒜 the next message according to the protocol conversation so far or decision on whether to accept or reject the session. The adversary 𝒜 can also use this query to initiate a new protocol instance with blank m. This query captures capabilities of active adversary, who can initiate sessions and modify or delay protocol messages.

  2. SessionKeyReveal(U,V,s) query: If a session U,Vs has accepted and holds a session key, then 𝒜 gets the session key of U,Vs. A session can only accept a session key once. This query captures the known key attacks.

  3. EphemeralKeyReveal(U,V,s) query: This query gives all the ephemeral keys (per session randomness) of the session U,Vs to 𝒜.

  4. Corrupt(U) query: 𝒜 gets all the long-term secrets of the principal U. But this query does not reveal any session keys to 𝒜. This query captures the key compromise impersonation (KCI) attacks, unknown key share (UKS) attacks and forward secrecy.

  5. Test(U,s) query: Once a session U,Vs has accepted and holds a session key, 𝒜 can attempt to distinguish it from a random key. When 𝒜 asks this query, the session U,Vs first chooses a random bit b{0,1} and if b=1, the actual session key is returned to 𝒜, otherwise a random session key is chosen uniformly at random from the same session key distribution, and is returned to 𝒜. This query is only allowed to be asked once.

Freshness.

A session U,Vs is fresh if and only if all of the following hold:

  1. Session U,Vs and its partner (if it exists) V,Us have not been asked the SessionKeyReveal query.

  2. If the partner V,Us exists, none of the following combinations have been asked:

    1. Corrupt(U) and EphemeralKeyReveal(U,V,s).

    2. Corrupt(V) and EphemeralKeyReveal(V,U,s).

  3. If the partner V,Us does not exist, none of the following combinations have been asked:

    1. Corrupt(V).

    2. Corrupt(U) and EphemeralKeyReveal(U,V,s).

Security game.

Proceed as follows:

  1. Stage 0: The challenger generates the keys using the security parameter k.

  2. Stage 1:𝒜 is executed and may ask any of Send, SessionKeyReveal, EphemeralKeyReveal and Corrupt queries to any session at will.

  3. Stage 2: At some point 𝒜 chooses a fresh session and asks the Test query.

  4. Stage 3:𝒜 may continue asking Send, SessionKeyReveal, EphemeralKeyReveal and Corrupt queries. The only condition is that 𝒜 cannot violate the freshness of the test session.

  5. Stage 4: At some point 𝒜 outputs the bit b{0,1} which is its guess of the value b on the test session. 𝒜 wins if b=b.

Definition of security.

Let Succ𝒜 be the event that the adversary 𝒜 wins the eCK game.

Definition 2.1.

A protocol (π) is said to be secure in the eCK model if there is no PPT adversary 𝒜 who can win the eCK game with non-negligible advantage in the security parameter k. The advantage of an adversary 𝒜 is defined as AdvπeCK(𝒜)=|2Pr(Succ𝒜)-1|.

2.2 eCK-secure key exchange protocols

The initial effort of constructing the eCK-secure key exchange protocols is combining the long-term secret key and the ephemeral secret key using a random oracle function [8] to obtain a pseudo-ephemeral value. This trick was first introduced by LaMacchia, Lauter and Mityagin [31] in their protocol named NAXOS, and now it is widely known as the NAXOS trick. A “pseudo”-ephemeral key esk~ is computed as the random oracle function of the long-term key lsk and the actual ephemeral key esk: esk~H(esk,lsk). The value esk~ is never stored, and thus in the eCK model the adversary must learn both esk and lsk in order to be able to compute esk~. Note, however, that in the NAXOS protocol, the initiator must compute esk~=H(esk,lsk) twice: once when sending its Diffie–Hellman ephemeral public key gesk~, and once when computing the Diffie–Hellman shared secrets from the received values. This is to avoid storing a single value that, when compromised, can be used to compute the session key. There are some key exchange protocols created using the NAXOS trick [31, 40].

Recently, some researchers worked on constructing eCK-secure key exchange protocols without NAXOS trick [36, 41, 28, 7]. The motivation for such research can be explained as follows: The eCK model addresses the leakage of the ephemeral secret key. It is unnatural to assume that the ephemeral secret key is leaked, while the exponent of the ephemeral public key (e.g., the pseudo-ephemeral value in the NAXOS protocol) remains safe, without leaking. Therefore, it seems that there is an unnatural and indirect assumption of a leakage-free exponentiation computation or leakage-free random source, in the eCK-security proof of the NAXOS-style key exchange protocols. Therefore, eliminating the NAXOS trick and still preserving the eCK security would be more realistic.

Table 1 shows the key exchange protocol P1 (see [7]), which is a Diffie–Hellman-type, NAXOS-free and eCK-secure key exchange protocol. The reason to present this protocol is that, it is used as a building block for a leakage-resilient key exchange protocol which is presented in Section 4. Let k be the security parameter and group 𝔾 be generated using a group generation algorithm which takes k as an input, where 𝔾 is a group of prime order q with generator g. Here a and A are the long-term secret and public keys of Alice, while x and X are the ephemeral secret and public keys of Alice. After exchanging the public values both principals compute a Diffie–Hellman-type shared secret, and then compute the session key using a random oracle H.

Table 1

Concrete construction of Protocol P1.

Alice (initiator)Bob (responder)
a$q*, Agab$q*, Bgb
x$q*, XgxAlice,Xy$q*, Ygy
Bob,Y
Z1Ba, Z2BxZ1Ab, Z2Xb
Z3Ya, Z4YxZ3Ay, Z4Xy
KH(Z1,Z2,Z3,Z4,Alice,X,Bob,Y)KH(Z1,Z2,Z3,Z4,Alice,X,Bob,Y)
K is the session key

In order to compute the session key, Protocol P1 combines four components (Z1Ba, Z3Ya, Z4Yx, Z2Bx) using the random oracle function H. These four components cannot be recovered by the attacker without both the ephemeral and long-term secret keys of at least one protocol principal.

2.3 eCK-type leakage security models: Moriyama–Okamoto model

Earlier key exchange security models, such as the Bellare–Rogaway [9], Canetti–Krawczyk [13], and extended Canetti–Krawczyk (eCK) [31] models, aim to capture security against an adversary who can fully compromise some, but not all secret keys. For example, in the eCK model, a session key should be secure even if the adversary has compromised either the long-term or ephemeral key at the client, and either the long-term or ephemeral key at the server, but not all of the values at one party. This is not a very granular form of leakage, and thus is not fully suitable for modelling side-channel attacks.

Moriyama and Okamoto have presented a suitable security model to capture leakage, and a proven secure protocol in that model [37]. The security model introduced by Moriyama and Okamoto is based on the eCK model. The Moriyama–Okamoto model allows the adversary to obtain leakage of a long-term secret key sk, of a protocol principal U, by issuing adaptively-chosen arbitrary leakage functions fi and specifying the identity of the protocol principal U. Hence, in addition to the adversarial powers in the eCK model, the Moriyama–Okamoto model provides:

  1. StaticKeyLeakage(f,U) query: From this query the adversary obtains fi(sk), where sk denotes the long-term secret key of the principal U.

Further, it is important to study the constraints in the Moriyama–Okamoto model. We can identify the following two main limitations in the Moriyama–Okamoto model:

  1. The adversary is allowed to obtain leakage from long-term secrets of protocol participants; this leakage amount is bounded by some parameter λ (in terms of bits).

  2. The model does not allow the adversary to obtain leakage after the test session is activated.

Since the Moriyama–Okamoto model is restricted to the bounded leakage, it can only address the side-channel attacks such as cold boot attacks (to some extent), which happen due to the leakage of bounded amount of information from the secret memory. The Moriyama–Okamoto model allows the adversary to reveal either the long-term secret key or the ephemeral secret key of the target session (same as in the eCK model). Additionally, the Moriyama–Okamoto model allows bounded amount of leakage of the long-term secret key with the ephemeral secret key reveal from the target session. Thus the Moriyama–Okamoto model addresses the cold boot attacks to some extent by addressing following situations: the attacker reveals either of the following:

  1. the long-term secret key,

  2. the ephemeral secret key,

  3. the ephemeral secret key and part of the long-term secret key of the target session.

Differently, side-channel attacks which happen due to the continuous leakage of secret keys, such as timing attacks or power analysis attacks, cannot be modelled using the Moriyama–Okamoto model, because the Moriyama–Okamoto model does not address continuous leakage of the long-term secret keys, which happens whenever computations use the long-term secret keys. Further, restricting the leakage to occur only before the target session is activated is not a natural restriction. Therefore, although the Moriyama–Okamoto model addresses side-channel attacks for some extent, there is some gap between the Moriyama–Okamoto model and real world side-channel attacks.

Those two limitations are considered when defining the freshness of a session in the Moriyama–Okamoto model.

Moriyama–Okamoto freshness.

A session U,Vs is λ-leakage fresh if the following conditions hold:

  1. U,Vs is a fresh session in the sense of the eCK model.

  2. Before the adversary activates the session U,Vs, the total amount of leakage that the adversary obtains from each partner principal of the session U,Vs: U and V, is bounded by the leakage parameter λ.

  3. After the session U,Vs is activated, no leakage is allowed from the partner principals of the session U,Vs.

Apart from the freshness condition, partnering and the security game are the same as in the eCK model.

3 Continuous after-the-fact leakage in restricted-eCK model

3.1 Continuous after-the-fact leakage (CAFL) model

In the CAFL model [4], the adversary is allowed to adaptively obtain partial leakage on the long-term secret keys even after the test session is activated, as well as reveal session keys, long-term keys, and ephemeral keys.

Modelling leakage.

This key exchange security model considers continuous leakage of the long-term secret keys of protocol principals, because long-term secret keys are not one-time secrets, but they last for multiple protocol sessions. Leakage of long-term secret key from one session affects the security of another session which uses the same long-term secret key. By considering side-channel attacks which can be mounted against key exchange protocols, the most realistic way to obtain the leakage information of long-term secret keys is from the protocol computations which use long-term secret keys. Hence, following the premise “only computation leaks information” [35], the leakage is modelled to occur where computation takes place using secret keys. By issuing a 𝚂𝚎𝚗𝚍 query, the adversary will get a protocol message which is computed according to the normal protocol computations. Therefore, the instance of a 𝚂𝚎𝚗𝚍 query would be the appropriate instance to address the leakage which occurs due to a computation which uses a long-term secret key. Thus, sending an adversary-chosen leakage function, f, with the 𝚂𝚎𝚗𝚍 query would reflect the premise “only computation leaks information”. The leakage function f is an efficiently computable, adaptive leakage function.

Further, the amount of leakage of a secret key is bounded by a leakage parameter λ, per computation. The adversary is allowed to obtain leakage from many computations continuously. Hence, the overall leakage amount is unbounded.

Adversarial powers.

The adversary (a probabilistic algorithm) controls all interaction and communication between parties. In particular, the adversary initiates sessions at parties and delivers protocol messages; it can create, change, delete, or reorder messages. The adversary can also compromise certain short-term and long-term secrets. Notably, whenever the party performs an operation using its long-term key, the adversary obtains some leakage information about the long-term key. The following query allows the adversary 𝒜 to run the protocol, modelling normal communication:

  1. 𝚂𝚎𝚗𝚍(U,V,s,m,f) query: The session ΠU,Vs, computes the next protocol message according to the protocol specification on receipt of m, and sends it to the adversary 𝒜, along with the leakage f(skU) as described in Section 3.1. The adversary 𝒜 can also use this query to activate a new protocol instance as an initiator with blank m.

The following queries allow the adversary 𝒜 to compromise certain session specific ephemeral secrets and long-term secrets from the protocol principals:

  1. 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s) query: 𝒜 is given the session key of the session ΠU,Vs if the session ΠU,Vs is in the accepted state.

  2. 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s) query: 𝒜 is given the ephemeral keys of the session ΠU,Vs.

  3. 𝙲𝚘𝚛𝚛𝚞𝚙𝚝(U) query: 𝒜 is given the long-term secrets of the principal U. This query does not reveal any session keys or ephemeral keys to 𝒜.

Remark 3.1 (Corrupt query vs leakage queries).

By issuing a 𝙲𝚘𝚛𝚛𝚞𝚙𝚝 query, the adversary gets the party’s entire long-term secret key. Separately, by issuing leakage queries (using leakage function f embedded with the 𝚂𝚎𝚗𝚍 query) the adversary gets λ-bounded amount of leakage information about the long-term secret key. It may seem paradoxical to consider 𝙲𝚘𝚛𝚛𝚞𝚙𝚝 and leakage queries at the same time. But there are good reasons to consider both.

  1. A non-leakage version of CAFL model (𝚂𝚎𝚗𝚍 query without f) addresses KCI attacks, because the adversary is allowed to corrupt the owner of the test session before the activation of the test session. In the CAFL model, we allow the adversary to obtain leakage from the partner of the test session, in addition to allowing the adversary to corrupt the owner of the test session.

  2. A non-leakage version of CAFL model (𝚂𝚎𝚗𝚍 query without f) addresses partial weak forward secrecy, because the adversary is allowed to corrupt either of the protocol principals, but not both, after the test session is activated. In the CAFL model, we allow the adversary to obtain leakage from the uncorrupted principal, in addition to allowing the adversary to corrupt one of the protocol principals.

Hence, the CAFL model allows the adversary to obtain more information than a non-leakage version of the CAFL model.

Defining security.

In this part we give formal definitions for partner sessions, freshness of a session and security in the CAFL model.

Definition 3.2 (Partner sessions in CAFL model).

As in the eCK model, two sessions ΠU,Vs and ΠU,Vs are said to be partners if all of the following hold:

  1. ΠU,Vs and ΠU,Vs have computed session keys.

  2. Sent messages from ΠU,Vs (= received messages) to ΠU,Vs.

  3. Sent messages from the session ΠU,Vs (= received messages) to ΠU,Vs.

  4. U=V and V=U.

  5. If U is the initiator, then V is the responder, or vice versa.

A protocol is correct if two partner sessions compute identical session keys in the presence of a passive adversary (an adversary that can only listen to the communications, but cannot directly tamper with them).

We now define what it means for a session to be λ-CAFL-fresh in the CAFL model.

Definition 3.3 (λ-CAFL-freshness).

Let λ be the leakage bound per occurrence. A session ΠU,Vs is said to be λ-CAFL-fresh if and only if:

  1. Session ΠU,Vs or its partner ΠV,Us (if it exists) has not been asked a 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕.

  2. If the partner ΠV,Us exists, none of the following combinations have been asked:

    1. 𝙲𝚘𝚛𝚛𝚞𝚙𝚝(U) and 𝙲𝚘𝚛𝚛𝚞𝚙𝚝(V).

    2. 𝙲𝚘𝚛𝚛𝚞𝚙𝚝(U) and 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s).

    3. 𝙲𝚘𝚛𝚛𝚞𝚙𝚝(V) and 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(V,U,s).

    4. 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s) and 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(V,U,s).

  3. If the partner ΠV,Us does not exist, none of the following combinations have been asked:

    1. 𝙲𝚘𝚛𝚛𝚞𝚙𝚝(V).

    2. 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s).

  4. For each 𝚂𝚎𝚗𝚍(U,,,,f) query, the output of f is at most λ bits.

  5. For each 𝚂𝚎𝚗𝚍(V,,,,f) query, the output of f is at most λ bits.

Limitations of λ-CAFL-freshness.

When the adversary asks 𝙲𝚘𝚛𝚛𝚞𝚙𝚝 and 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 queries, there are two 𝙲𝚘𝚛𝚛𝚞𝚙𝚝--𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 query combinations which trivially expose the session key of a session, in a scenario that a partner to that particular session exists:

  1. 𝙲𝚘𝚛𝚛𝚞𝚙𝚝(U) and 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s).

  2. 𝙲𝚘𝚛𝚛𝚞𝚙𝚝(V) and 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(V,U,s).

As in the other models we have compared with [31, 37] CAFL does not allow above combinations in the freshness condition, as they trivially expose the session key of sessions ΠU,Vs and ΠV,Us. Differently, in the other models we have compared with, there are four 𝙲𝚘𝚛𝚛𝚞𝚙𝚝--𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 query combinations which do not trivially expose the session key a session, in a scenario that a partner to that particular session exists:

  1. 𝙲𝚘𝚛𝚛𝚞𝚙𝚝(U) and 𝙲𝚘𝚛𝚛𝚞𝚙𝚝(V).

  2. 𝙲𝚘𝚛𝚛𝚞𝚙𝚝(U) and 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(V,U,s).

  3. 𝙲𝚘𝚛𝚛𝚞𝚙𝚝(V) and 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s).

  4. 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(V,U,s) and 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s).

All the models we consider [31, 37] allow above combinations in the freshness condition, whereas the CAFL model does not allow the query combinations (1) and (4) in the freshness condition.

When the adversary asks 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 and 𝙲𝚘𝚛𝚛𝚞𝚙𝚝 queries, there are two query combinations which trivially expose the session key of a session, in a scenario that a partner to that particular session does not exist:

  1. 𝙲𝚘𝚛𝚛𝚞𝚙𝚝(V).

  2. 𝙲𝚘𝚛𝚛𝚞𝚙𝚝(U) and 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s).

As in the other models we have compared with [31, 37] the CAFL does not allow above combinations in the freshness condition, as they trivially expose the session key of sessions ΠU,Vs and ΠV,Us. By weakening that condition, the CAFL model does not allow following two query combinations in the freshness condition when a partner to the test session does not exist:

  1. 𝙲𝚘𝚛𝚛𝚞𝚙𝚝(V).

  2. 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s) (instead of the queries 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s) and 𝙲𝚘𝚛𝚛𝚞𝚙𝚝(U) as in other models).

Thus, the freshness of a non-leakage variant of the CAFL model (without conditions (4) and (5)) is weaker than the eCK-freshness definition, because of the restriction enforced in conditions (2) (a) and (2) (d). Differently, the λ-CAFL-freshness allows partial leakage of the long-term secret key of a protocol principal, even when the partner principal is corrupted or 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 query is asked to the partner session. In some sense that is stronger than the eCK-freshness definition, because according to the eCK-freshness, once 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 query have been asked to a session, revealing the long-term secret key of the partner is not allowed. Hence, although the freshness of a non-leakage variant of the CAFL model is weaker than the eCK-freshness in some sense, λ-CAFL-freshness achieved an improvement over eCK-freshness by means of partial leakage of long-term secrets.

We explain why the additional restrictions are introduced (restriction enforced in conditions (2) (a) and (2) (d)) to the freshness condition of the CAFL model, more than in the freshness condition of the eCK model as follows: Their aim was to construct a simple leakage-resilient two-pass key exchange protocol, using a leakage-resilient public-key encryption scheme, in which each of the principals randomly chooses its ephemeral secret key, encrypts it with the public key of the intended partner principal, and sends the encrypted message to the intended partner principal. Defining eCK-style freshness makes it impossible to prove the security of the simple two-pass key exchange protocol, because corrupting both principals to the target session or revealing the ephemeral key from both sessions to the target session will trivially expose the session key. Therefore, additional restrictions are enforced to the λ-CAFL-freshness condition, but allow the partial leakage of long-term secret keys, as the aim is to model the side-channel attacks.

Security of a key exchange protocol in the CAFL model is defined using the a security game (similar to the security game in the eCK model), which is played by a probabilistic polynomial time adversary 𝒜 against the protocol challenger. Succ𝒜 is the event that 𝒜 wins the security game. The security is defined as follows:

Definition 3.4 (λ-CAFL-security).

A protocol π is said to be λ-CAFL-secure if there is no probabilistic polynomial time algorithm 𝒜 that can win the security game with non-negligible advantage. The advantage of an adversary 𝒜 is defined as Advπλ-CAFL(𝒜)=|2Pr(Succ𝒜)-1|.

Practical interpretation of security of CAFL model.

We review the relationship between the CAFL model and real world attack scenarios.

  1. Active adversarial capabilities:𝚂𝚎𝚗𝚍 queries address the powers of an active adversary who can control the message flow over the network. In the previous security models, this property is addressed by introducing the send query.

  2. Side-channel attacks: Leakage functions are embedded with the 𝚂𝚎𝚗𝚍 query. Thus, assuming that the leakage happens when computations take place in principals, a wide variety of side-channel attacks, such as timing attacks, EM emission based attacks, power analysis attacks, which are based on continuous leakage of long-term secrets, are addressed. This property is not addressed in the earlier security models such as the BR models, the CK model, the eCK model and the Moriyama–Okamoto model.

  3. Cold boot attacks: The CAFL model allows the adversary to reveal either the long-term secret key (𝙲𝚘𝚛𝚛𝚞𝚙𝚝 query) or the ephemeral secret key (𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 query) of the target session (same as in the eCK model and the Moriyama–Okamoto model). Thus these queries address the cold boot attacks to some extent, where the cold boot attacks reveal either (i) the long-term secret key or (ii) the ephemeral secret key of the target session. Note that the Moriyama–Okamoto model addresses the cold boot attacks by additionally covering the situation, where the attacker reveals (iii) the ephemeral secret key and part of the long-term secret key of the target session. Thus, the Moriyama–Okamoto model is more suitable to model cold boot attacks.

  4. Malware attacks:𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 queries cover the malware attacks which steal stored ephemeral keys, given that the long-term keys may be securely stored separately from the ephemeral keys in places such as smart cards or hardware security modules. Separately, 𝙲𝚘𝚛𝚛𝚞𝚙𝚝 queries address malware attacks which steal the long-term secret keys of protocol principals. In the previous security models, this property is addressed by introducing the ephemeral-key reveal, session-state reveal and corrupt queries.

  5. Weak random number generators: Due to weak random number generators, the adversary may correctly determine the produced random number. 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 query addresses situations where the adversary can get the ephemeral secrets. In the previous security models, this property is addressed by introducing the ephemeral-key reveal query or the session-state reveal query.

  6. Known key attacks:𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 query covers the attacks which can be mounted by knowing past session keys. In the previous security models, this property is addressed by introducing the session key reveal query.

  7. Key compromise impersonation attacks: λ-CAFL-freshness allows the adversary to corrupt the owner of the test session before the activation of the test session. Hence, the CAFL model security protects against the key compromise impersonation attacks. In the eCK model and the Moriyama–Okamoto model, this property is addressed by introducing the long-term key reveal query to the owner of the target session, before the session is completed. Earlier models such as the BR models and the CK model do not allow the adversary to reveal the long-term secret key of the owner of the target session before it is expired, and hence do not address this property.

  8. Partial weak forward secrecy: λ-CAFL-freshness allows the adversary to corrupt either of the protocol principals, after the test session is activated. Hence, the CAFL model addresses partial weak forward secrecy. The eCK model and the Moriyama–Okamoto model allow the adversary to reveal the long-term secret keys of both protocol principals of the target session after the target session is activated, as long as the adversary is passive. Hence they address weak forward secrecy. The CK model allows the adversary to reveal the long-term secret keys of both protocol principals of the target session, after the session is expired but regardless of whether the adversary is passive or active. Therefore, the CK model address perfect forward secrecy.

3.2 Constructing CAFL-secure key exchange protocols

Table 2 shows the generic construction of protocol π1, which is CAFL-secure. The protocol π1 is a key agreement protocol, in which each of the principals randomly chooses its ephemeral secret key, encrypts it with the public key of the intended partner principal, and sends the encrypted message to the intended partner principal. After exchanging the ephemeral secrets both principals compute the session key with ephemeral secrets, identities of the two principals and the protocol message sequence, using a pseudo-random function. Updating the secret keys of protocol principals is an essential ingredient in achieving CAFL security. For this generic protocol construction, the underlying public-key encryption scheme is chosen to be a continuous leakage-resilient public-key encryption scheme, which updates the secret key after each decryption operation. This public-key encryption scheme is used to achieve the continuous leakage resiliency of the key exchange protocol.

Table 2

Generic CAFL-secure protocol construction: Protocol π1.

A (initiator)B (responder)
Initial setup
skA,pkAKG(1k)skB,pkBKG(1k)
Protocol execution
rA{0,1}krB{0,1}k
CAEnc(pkB,rA)A,CA(skB,rA)Dec(skB,CA)
skBskB
(skA,rB)Dec(skA,CB)B,CBCBEnc(pkA,rB)
skAskA
KPRF(rA,ACABCB)KPRF(rA,ACABCB)
PRF(rB,ACABCB)PRF(rB,ACABCB)
K is the session key

The generic CAFL-secure protocol construction that is initially presented in [4] is vulnerable against active adversary. In the following we explain the reason: In that protocol construction, the inputs to the key derivation function KDF contain the two ephemeral values, rA and rB, and the identities of the initiator and the responder, A and B, respectively: KDF(rArB,,k,AB). Assume that the target session is in A. If the adversary corrupts A, decrypts the protocol message from CB, then re-encrypt the corresponding plaintext again using pkA, that makes a different plaintext CB, due to probabilistic encryption. Then if the adversary sends CB to A, instead of CB, and executes the rest of the protocol, it results that A’s session and B’s session are not matching, because the message CB computed by B is different from the message CB received by A, but compute the same session key. Thus, the adversary can issue 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 query to the session at B and thus trivially learn the session key of the target session. Cremers [15] showed that such attacks can be avoided by using the session identifier in the key derivation step together with other shared secrets. In this paper we re-design the protocol accordingly to ensure that mismatching sessions do not compute same session keys. Thus, the session key is derived using a pseudo-random function (two calls to the PRF) as KPRF(rA,ACABCB)PRF(rB,ACABCB) such that it contains the session identifier ACABCB as an input to the pseudo-random function.

Here we use a multiple-call pseudo-random function PRF, instead of a key derivation function KDF, to ensure that the adversary chosen rA or rB, can be used in the session key derivation, when the presence of an active adversary. Since the input σ=rArB to the KDF should be uniformly random in the security definition of the KDF, using adversary chosen rA or rB in the σ of KDF input is not allowed.

Protocol construction.

In Table 2, we show the construction of protocol π1 with the fixture to the mentioned problem. Here KG, Enc and Dec are the key generation, encryption and decryption algorithms of the underlying adaptively chosen ciphertext after-the-fact leakage (CCLA2) secure public-key cryptosystem PKE (Section C.3.2), and PRF is a pseudo-random function (Section C.2.2) which generates the session key of length k.

Security proof of Protocol π1 in the CAFL model.

Theorem 3.5.

The protocol π1 is λ-CAFL-secure, whenever the underlying public-key cryptosystem PKE is CCLA2-secure and PRF is a pseudo-random function.

Let U={U1,,UNP} be a set of NP parties. Each party Ui owns at most Ns number of protocol sessions. Let A be any PPT adversary against the key exchange protocol π1. Then the advantage of A against the CAFL-security of Protocol π1, Advπ1λ-CAFL, is

Advπ1λ-CAFL(𝒜)NP2Ns2(AdvPKECCLA2(𝒟)+AdvPRF()),

where B,D are efficient algorithms constructed using the adversary A, against the underlying pseudo-random function, PRF, and the public-key cryptosystem, PKE, respectively.

The detailed proof of this theorem is in Appendix A.

Leakage tolerance of the CAFL-secure protocol π1.

In the created protocol, a principal simply encrypts a randomly-chosen ephemeral key using a CCLA2-secure public key encryption scheme, and sends it to the partner principal. Therefore, the leakage tolerance is exactly same as the leakage tolerance of the underlying CCLA2-secure public key encryption scheme.

Dziembowski and Faust [19] constructed a CCLA2-secure public-key cryptosystem, where the secret key sk=(x1,x2)(q*)2 is split into two parts sk, rsk such that sk$(q*)n at random and rsk(q*)n×2 holding skrsk=sk, where n is the statistical security parameter. They proved their public-key cryptosystem is CCLA2-secure for λ=0.15nlogq-1. So if we consider n=20 and log(q-1) to be 1024, we can allow λ=3072 bits of leakage, from each split per occurrence. Considering only the most expensive computations, the computation cost of Enc and Dec is five exponentiations for each.

4 After-the-fact leakage in eCK model

4.1 Bounded/continuous after-the-fact leakage eCK model

The continuous after-the-fact leakage key exchange security model (CAFL) mentioned in Section 3 enforces more restrictions to the freshness definition, more than in the eCK model [31] or Moriyama–Okamoto model [37]: it does not allow to reveal the ephemeral keys of both principals as to corrupt both protocol principals of the target session, etc. So there is a necessity to accommodate a reasonable security model which addresses more granular leakage and at the same time does not enforce more restrictions than currently existing key exchange security models.

In this section, we present a generic leakage-security model for key exchange protocols [6], which can be instantiated as a bounded leakage variant as well as a continuous leakage variant.

This after-the-fact leakage eCK (()AFL-eCK) model can be instantiated in two different ways which leads to two security models. Namely, bounded after-the-fact leakage eCK (BAFL-eCK) model and continuous after-the-fact leakage eCK (CAFL-eCK) model. The BAFL-eCK model allows the adversary to obtain a bounded amount of leakage of the long-term secret keys of the protocol principals, as well as reveal session keys, long-term secret keys and ephemeral keys. Differently, the CAFL-eCK model allows the adversary to continuously obtain arbitrarily large amount of leakage of the long-term secret keys of the protocol principals, enforcing the restriction that the amount of leakage per observation is bounded.

In both instantiations of the ()AFL-eCK model the partnering definition and the adversarial powers are same. The freshness conditions differ according to the leakage allowed. So it is possible to define the partnering and adversarial powers in the ()AFL-eCK model and define the freshness separately in each BAFL-eCK and CAFL-eCK models.

Modelling leakage.

A tuple of n~ adaptively chosen efficiently computable leakage functions

𝐟=(f1j,f2j,,fn~j)

are introduced; the size n~ of the tuple is protocol-specific, and j indicates the jth leakage occurrence. A key exchange protocol may use more than one cryptographic primitive and each primitive uses a distinct secret key or secret state (in signature schemes). Hence, it is needed to address the leakage of secret keys or secret states from each of those primitives. Also, some cryptographic primitives which have been used to construct a key exchange protocol may be stateful cryptographic primitives. The execution of a stateful cryptographic primitive is split into a number of sequential stages and each of these stages uses one part of the secret key. The tuple of leakage functions 𝐟=(f1j,f2j,,fn~j) leaks information from the secret key of each of the underlying primitives or each split of the secret keys at occurrence j. There exists a leakage parameter 𝝀=(λ1,,λn~), where each λi bounds the leakage for the corresponding primitive as key split.

Adversarial powers.

The adversary 𝒜 is a probabilistic polynomial time (PPT) algorithm that controls the whole network. Note that 𝒜 interacts with a set of sessions which represent protocol instances. The following query allows the adversary 𝒜 to run the protocol:

  1. 𝚂𝚎𝚗𝚍(U,V,s,m,𝐟) query: The session ΠU,Vs, computes the next protocol message according to the protocol specification and sends it to the adversary 𝒜, along with the leakage 𝐟(skU). The adversary 𝒜 can also use this query to activate a new protocol instance as an initiator with blank m.

The following set of queries allow the adversary 𝒜 to compromise certain session specific ephemeral secrets and long-term secrets from the protocol principals:

  1. 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s) query: 𝒜 is given the session key of the session ΠU,Vs.

  2. 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s) query: 𝒜 is given the ephemeral keys (per-session randomness) of ΠU,Vs.

  3. 𝙲𝚘𝚛𝚛𝚞𝚙𝚝(U) query: 𝒜 is given the long-term secrets of the principal U. This query does not reveal any session keys or ephemeral keys to 𝒜.

Once the session ΠU,Vs has accepted a session key, the adversary 𝒜 attempt to distinguish it from a random session key by asking the following query. The 𝚃𝚎𝚜𝚝 query is used to formalize the notion of the semantic security of a key exchange protocol:

  1. 𝚃𝚎𝚜𝚝(U,s) query: When 𝒜 asks the Test query, the challenger first chooses a random bit b${0,1} and if b=1, then the actual session key is returned to 𝒜, otherwise a random string chosen from the same session key space is returned to 𝒜. This query is only allowed to be asked once across all sessions.

Remark 4.1 (Corrupt query vs leakage queries).

By issuing a 𝙲𝚘𝚛𝚛𝚞𝚙𝚝 query, the adversary gets the party’s entire long-term secret key. Separately, by issuing leakage queries (using a tuple leakage function 𝐟 embedded with the 𝚂𝚎𝚗𝚍 query) the adversary gets respectively 𝝀-bounded leakage information about the long-term secret key(s). It may seem paradoxical to consider 𝙲𝚘𝚛𝚛𝚞𝚙𝚝 and leakage queries at the same time. But there is a good reason to consider both.

The eCK model addresses KCI attacks, because the adversary is allowed to corrupt the owner of the test session before the activation of the test session. In the ()AFL-eCK model, we allow the adversary to obtain leakage from the partner of the test session, in addition to allowing the adversary to corrupt the owner of the test session.

Hence, the ()AFL-eCK model allows the adversary to obtain more information than the eCK model. Moreover, none of the existing security models such as BR, CK, CKHMQV, eCK allow a 𝚂𝚎𝚗𝚍 query with a tuple leakage function 𝐟. Hence, we can see that ()AFL-eCK allows the adversary to obtain leakage information which none of the existing security models allow.

Bounded after-the-fact leakage-eCK model.

In the BAFL-eCK model the total amount of leakage of each secret key of the underlying cryptographic primitives or each split of the secret key of the underlying stateful cryptographic primitives are bounded by leakage parameters. The leakage parameters are primitive-specific.

If the total leakage bound of the ith cryptographic primitive (or the total leakage bound of the ith state of the stateful cryptographic primitive) is λi and the leakage function fij outputs leakage bits of the secret key of the ith cryptographic primitive (or leakage bits of the ith split of the secret key), then for leakage resilience of ith cryptographic primitive (or the stateful cryptographic primitive), we need that j|fij(si)|λi.

Definition 4.2 (λ-BAFL-eCK-freshness).

Let 𝝀=(λ1,,λn~) be a vector of n~ elements (same size as 𝐟 in the 𝚂𝚎𝚗𝚍 query). A session ΠU,Vs is said to be 𝝀-BAFL-eCK-fresh if and only if all of the following conditions hold:

  1. Session ΠU,Vs or its partner ΠV,Us (if it exists) has not been asked a 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕.

  2. If the partner ΠV,Us exists, none of the following combinations have been asked:

    1. 𝙲𝚘𝚛𝚛𝚞𝚙𝚝(U) and 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s).

    2. 𝙲𝚘𝚛𝚛𝚞𝚙𝚝(V) and 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(V,U,s).

  3. If the partner ΠV,Us does not exist, none of the following combinations have been asked:

    1. 𝙲𝚘𝚛𝚛𝚞𝚙𝚝(V).

    2. 𝙲𝚘𝚛𝚛𝚞𝚙𝚝(U) and 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s).

  4. For all 𝚂𝚎𝚗𝚍(U,,,,𝐟) queries, j|fij(skUi)|λi.

  5. For all 𝚂𝚎𝚗𝚍(V,,,,𝐟) queries, j|fij(skVi)|λi.

Continuous after-the-fact leakage-eCK model.

In the CAFL-eCK model, continuous leakage of each secret key of the underlying cryptographic primitives or each split of the secret key of the underlying stateful cryptographic primitives is allowed. The only restriction is that the amount of leakage per occurrence is bounded by leakage parameters. The leakage parameters are primitive-specific.

If the leakage bound of the ith cryptographic primitive is λi per leakage occurrence and the leakage function fij outputs leakage bits of the secret key of the ith cryptographic primitive, then for leakage resilience of the ith cryptographic primitive we need that |fij(ski)|λi, per leakage occurrence. If the leakage bound of the ith state of the stateful cryptographic primitive is λi per leakage occurrence and the leakage function fij outputs leakage bits of the ith split of the secret key, then for leakage resilience of the stateful cryptographic primitive we need that |fij(ski)|λi, per leakage occurrence.

Definition 4.3 (λ-CAFL-eCK-freshness).

Let 𝝀=(λ1,,λn~) be a vector of n~ elements (same size as 𝐟 in the 𝚂𝚎𝚗𝚍 query). A session ΠU,Vs is said to be 𝝀-CAFL-eCK-fresh if and only if conditions (1)–(3) of Definition 4.2 and all of the following hold:

  1. For each 𝚂𝚎𝚗𝚍(U,,,,𝐟) query, the size of the output of |fij(skUi)|λi.

  2. For each 𝚂𝚎𝚗𝚍(V,,,,𝐟) query, the size of the output of |fij(skVi)|λi.

Defining security.

In this part we give formal definitions for partner sessions and security in the ()AFL-eCK model.

Definition 4.4 (Partner sessions in ()AFL-eCK model).

Two sessions ΠU,Vs and ΠU,Vs are said to be partners if all of the following hold:

  1. Both ΠU,Vs and ΠU,Vs have computed session keys.

  2. Messages sent from ΠU,Vs and messages received by ΠU,Vs are identical.

  3. Messages sent from the session ΠU,Vs and messages received by ΠU,Vs are identical.

  4. U=V and V=U.

  5. Exactly one of U and V is the initiator and the other is the responder.

The protocol is said to be correct if two partner sessions compute and accept identical session keys.

Security of a key exchange protocol in the 𝝀-BAFL-eCK model is defined using the a security game (similar to the security game in the eCK model). If we consider 𝝀-BAFL-eCK-freshness, the security game is BAFL-eCK, otherwise if we consider 𝝀-CAFL-eCK-freshness, it is CAFL-eCK security game.

Let Succ𝒜 be the event that the adversary 𝒜 wins the security game. The security is defined as follows:

Definition 4.5 (λ-()AFL-eCK-security).

A protocol π is said to be 𝝀-()AFL-eCK-secure if there is no PPT algorithm 𝒜 that can win the 𝝀-()AFL-eCK security game with non-negligible advantage. The advantage of an adversary 𝒜 is defined as Advπ𝝀-()AFL-eCK(𝒜)=|2Pr(Succ𝒜)-1|.

Practical interpretation of security of AFL-eCK model.

The ()AFL-eCK model addresses the real world attack scenarios which were discussed in Section 3.1, with the following differences.

  1. Cold boot attacks: The ()AFL-eCK model allows the adversary to reveal either the long-term secret key (𝙲𝚘𝚛𝚛𝚞𝚙𝚝 query) or the ephemeral secret key (𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 query) of the target session. The bounded leakage instantiation of the ()AFL-eCK model, the BAFL-eCK model, allows bounded amount of leakage of the long-term secret key with the ephemeral key reveal. Thus these queries address the cold boot attacks to some extent, where the cold boot attacks reveal either (i) the long-term secret key, (ii) the ephemeral secret key, or (iii) the ephemeral secret key and part of the long-term secret key of a protocol principal, which is same as in the Moriyama–Okamoto model. The improvement of the BAFL-eCK model is that it allows the adversary to obtain the partial leakage of long-term secret key even after the test session is established, which is not allowed in the Moriyama–Okamoto model.

  2. Weak forward secrecy:()AFL-eCK-freshness allows the adversary to corrupt both of the protocol principals of the target session, after the test session is activated, as long as the adversary is passive. Hence, the ()AFL-eCK model addresses weak forward secrecy, as for the eCK model and the Moriyama–Okamoto model.

  3. eCK security: The ()AFL-eCK model is a leakage-resilient version of the eCK model [31], hence the ()AFL-eCK model captures all possible attacks from ephemeral and long-term key compromises. More precisely, in sessions where the adversary does not modify the communication between parties (passive sessions), the adversary is allowed to reveal both ephemeral secrets, both long-term secrets, or one of each from two different parties, whereas in sessions where the adversary may forge the communication of one of the parties (active sessions), the adversary is allowed to reveal the long-term or ephemeral key of the other party.

The main reason to introduce a generic-style security model, the ()AFL-eCK model, and then present two instantiations (BAFL-eCK model and CAFL-eCK model) is to offer more flexibility to construct leakage-resilient key exchange protocols. The ()AFL-eCK model gives a reasonable security framework for key exchange protocols capturing a wide range of practical attacks including side-channel attacks. The only difference between the two instantiations is the leakage allowance (bounded or continuous). If we need to implement a key exchange protocol which is resilient to cold boot attacks, we use the BAFL-eCK model as the security framework, whereas if we need to implement a key exchange protocol which is secure against continuous-leakage side-channel attacks such as timing, power analysis and EM radiation, we use the CAFL-eCK model as the security framework.

4.2 Constructing ()AFL-eCK-secure key exchange protocol

The motivation of LaMacchia, Lauter and Mityagin [31] in designing the eCK model was that an adversary should have to compromise both the long-term and ephemeral secret keys of a party in order to recover the session key. In their NAXOS protocol, the main way this is accomplished is using what is now called the NAXOS trick.

Leakage-resilient NAXOS trick [6].

Moving to the leakage-resilient setting requires rethinking the NAXOS trick. In the model “only computation leaks information”, we must consider leakage at any place the long-term secret key is used. Thus, some kind of leakage-resilient NAXOS trick is needed. As noted above, the initiator must not store the pseudo-ephemeral value, esk~, and instead must apply the NAXOS trick twice for each session. The hash function H is replaced with a new leakage-resilient NAXOS trick to compute the pseudo-ephemeral value. The requirement is, given the long-term secret key and a particular ephemeral key, the NAXOS trick should always compute the same pseudo-ephemeral value such that without knowing both the long-term and ephemeral keys the adversary is unable to compute the pseudo-ephemeral value. Moreover, the NAXOS trick computation should be resilient to the leakage of the long-term secret key, which happens even after the test session is activated.

A leakage-resilient NAXOS trick is achieved by using the decryption function of a CPLA2-secure public-key cryptosystem [22]. Since decryption is deterministic, given the long-term secret key and a randomly chosen ciphertext, it will output the corresponding plaintext. So one can randomly choose an ephemeral key and use it as the ciphertext to the decryption function, and obtain the corresponding plaintext (output of the decryption function) as the pseudo-ephemeral value. Without knowing both the long-term and ephemeral keys, it is infeasible to compute the pseudo-ephemeral value. Thus, a leakage-resilient NAXOS trick can be achieved and the pseudo-ephemeral value can be computed. Further, bounded or continuous leakage-resilient key exchange protocol can be constructed, if the underlying public-key cryptosystem is bounded or continuous leakage-resilient.

Pair generation indistinguishability [6].

Using a decryption algorithm of a CPLA2-secure public-key cryptosystem does not work for our requirement unless the public-key cryptosystem has a special property: any randomly chosen ciphertext should be decrypted without rejection. A randomly chosen ciphertext can be rejected with a significant probability if NIZK proofs have been used for CPLA2-secure public-key cryptosystems. In NIZK proofs, the party which creates a ciphertext should provide a proof of knowledge of the plaintext, and the party which decrypts the ciphertext first verifies the proof, then only if the proof is correct it decrypts the ciphertext, otherwise rejects. Use of a CPLA2-secure public-key cryptosystem without the special property would allow the adversary to break the protocol with a significant probability whenever a randomly chosen ciphertext is rejected. The special property is defined as pair generation indistinguishability.

Definition 4.6 (Pair generation indistinguishability).

Let PKE=(KeyGen,Enc,Dec) be a public-key cryptosystem. For (p,s)$KeyGen(1k), let D1(p,s) and D2(p,s) be two distributions such that

D1(p,s)={(m,c):m$M,c$Enc(p,m)}andD2(p,s)={(m,c):c$C,mDec(s,c)},

where M is the message space and C is the ciphertext space. For ϵ0, the public-key cryptosystem PKE is ϵ-pair-generation-indistinguishable (ϵ-PG-IND) if for all (p,s)$KeyGen(1k), SD(D1(p,s),D2(p,s))ϵ.

Recall that the statistical distance, SD, between two distributions X and Y over a domain U is defined as

SD(X,Y)=12uU|Pr[X=u]-Pr[Y=u]|.

The notion of pair generation indistinguishability shares some resemblance with the pseudo-random decapsulation notion introduced by Abdalla, Catalano and Fiore [2], where the notion was needed for the construction of verifiable random functions from identity-based key encapsulation schemes. They presented a methodology to construct verifiable random functions (VRFs) from a class of identity based key encapsulation mechanisms (IB-KEM) that is called VRF suitable. An IB-KEM is VRF suitable if it provides a unique decryption (i.e. given a ciphertext C produced with respect to an identity ID, all the secret keys corresponding to identity ID, decrypt to the same value, even if ID=ID) and it satisfies an additional property called pseudo-random decapsulation. Pseudo-random decapsulation means that if one decrypts a ciphertext C, produced with respect to an identity ID, using the decryption key corresponding to any other identity ID the resulting value looks random to a polynomially bounded observer. Both the pair generation indistinguishability and the pseudo-random decapsulation notions are similar, except that the pseudo-random decapsulation is in the identity-based setting whereas the pair generation indistinguishability is in the public key setting.

We show a 0-PG-IND public-key cryptosystem available in the literature. Naor and Segev [38] described the framework of a hash proof system [14] as a key-encapsulation mechanism using the notion of Kiltz, Pietrzak, Stam and Yung [27]. Let K be the symmetric key space, let C be the valid ciphertext space and let M be the message space. Both K and C are of the same size and elements of M are μ-bit strings. The leakage-resilient public-key cryptosystem of Naor and Segev encrypts an arbitrary message m$M as (Ψ,c,seed), where c$C with the corresponding witness ω (of the fact that c is indeed a valid ciphertext from C), seed${0,1}t is a random seed and Ψ=Ext(Pub(p,c,ω),seed)m. Here Ext:K×{0,1}t{0,1}μ is a public average-case strong extractor function [18], p is the public key and Pub is the deterministic public evaluation function of the underlying key-encapsulation mechanism. Pub receives as input a public key p, a valid ciphertext cC and the corresponding witness ω, and outputs an encapsulated key in K. Whenever a random (Ψ,c,seed) is sampled, the decryption, mΨExt(Priv(s,c),seed) corresponds to a random mM. Priv is a private evaluation algorithm of the underlying key-encapsulation mechanism, receives as input the secret key s (of the public key p) and a valid ciphertext c, and outputs an encapsulated key in K. Thus, the leakage-resilient public-key cryptosystem of Naor and Segev is 0-PG-IND. The generic CPLA2-secure public-key cryptosystem of Halevi and Lin [22] can be instantiated using the leakage-resilient public-key cryptosystem of Naor and Segev. Hence, instantiation of the generic CPLA2-secure public-key cryptosystem of Halevi and Lin is also 0-PG-IND.

Authenticating protocol messages.

After computing the pseudo-ephemeral value by the NAXOS trick, a principal computes a Diffie–Hellman exponentiation and sends it to the other protocol principal. If that value is sent alone, the protocol is not secure because there is no authentication for the protocol messages, and hence an attacker can simply replace the original protocol message with its own value. In order to prevent this, it is necessary to provide authenticity to the protocol messages. There are unforgeable against chosen message leakage (UFCMLA) secure signature schemes available in the literature [26, 21, 33, 12], which can be used to sign the protocol messages and provide authenticity. Further, the key exchange protocol is bounded or continuous leakage-resilient if the underlying signature scheme is bounded or continuous leakage-resilient.

Weakening the ()AFL-eCK model.

The 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 query of the ()AFL-eCK model allows the adversary to learn the randomness used in the session, including the randomness used in signing. Full leakage of the randomness is not allowed in leakage-resilient signature schemes. We notice that Alawatugoda, Stebila and Boyd [6] missed this fact. In order to use available leakage-resilient signature schemes in the protocol instantiation, we will assume that the 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 query will not reveal the randomness used to compute the signature. Therefore, in this generic protocol construction, the security model we consider is slightly weaker than the actual ()AFL-eCK model, as it does not reveal the randomness used for signing with the 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 query. We name the weaker model as w()AFL-eCK model.

We found that the generic protocol construction of [6] is vulnerable against active adversary. In the following we explain the reason: In that protocol construction, the inputs to the key derivation function contain the Diffie–Hellman shared secret, and the identities of the initiator and the responder, A and B, respectively: KDF(grA~rB~,,k,AB). Assume that the target session is in B. If the adversary corrupts B and gets the signing key of B, re-sign the protocol message XB computing the new signature σB, that makes a different signature from σB, due to probabilistic signing algorithm. Then if the adversary sends B,A,XB,σB to B, instead of B,A,XB,σB, and executes the rest of the protocol, it results that A’s session and B’s session are not matching, because the message B,A,XB,σB computed by B is different from the message B,A,XB,σB received by A, but compute the same session key. Thus, the adversary can issue 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 query to the session at A and thus trivially learn the session key of the target session. Cremers [15] showed that such attacks can be avoided by using the session identifier in the key derivation step together with other shared secrets. Thus, in this paper we re-design the protocol accordingly to ensure that mismatching sessions do not compute same session keys. Thus, the session key is derived using a pseudo-random function as KPRF(ms,AXAσABXBσB) such that it contains the session identifier AXAσABXBσB as an input to the pseudo-random function. The shared secret ms is derived as msKDF(XBrA~,,k,). The σ input to the KDF is the Diffie–Hellman shared secret value XBrA~, and it is a uniformly random element of the group, and therefore we can use KDF in the simulation without any problem.

Protocol construction.

In Table 3, we show the construction of protocol π with the fixture to the mentioned problem. Here KeyGen, Enc and Dec are the key generation, encryption and decryption algorithms of the underlying CPLA2-secure (Section C.3.3), ϵ-PG-IND-public-key cryptosystem PKE with ciphertext space C^. Moreover, we choose the message space M of the underlying public-key encryption scheme PKE to be equal to q*. Furthermore, KG, Sign and Vfy are the key generation, signature generation and signature verification algorithms of the underlying leakage-resilient signature scheme SIG (Section C.3.4). The protocol π is a Diffie–Hellman-type [16] key agreement protocol, where 𝔾 is a group of prime order q with generator g. After exchanging the public values both principals compute a Diffie–Hellman-type shared secret value, KDF is a secure key derivation function (Section C.2.1) which generates a shared secret key (ms) using the Diffie–Hellman-type shared secret key, and PRF is a pseudo-random function (Section C.2.2) that is used to compute the session key using that shared key, ms, and the protocol message sequence. The computations which leak information are underlined.

Remark 4.7.

In Table 3, let C^ be the ciphertext space: in a setting like in [38], the random r values are not just chosen from C, but from C^={0,1}μ×C×{0,1}t, which gives random r$C^ in the form (Ψ,c,seed).

Table 3

Generic w()AFL-eCK-secure protocol construction: Protocol π.

A (initiator)B (responder)
Initial setup
skA,vkA$KG(1k)skB,vkB$KG(1k)
sA,pA$KeyGen(1k)sB,pB$KeyGen(1k)
Protocol execution
rA$C^IfVfy(vkA,XA,σA)=“true” {
rA~Dec¯(sA,rA)rB$C^
XAgrA~rB~Dec¯(sB,rB)
σA$Sign¯(skA,(A,B,XA))A,B,XA,σAXBgrB~
B,A,XB,σBσB$Sign¯(skB,(B,A,XB))
1-1 IfVfy(vkB,(B,A,XB),σB)=“true” {
rA~Dec¯(sA,rA)
msKDF(XBrA~,,k,)msKDF(XArB~,,k,)
KPRF(ms,AXAσABXBσB)KPRF(ms,AXAσABXBσB)
}}
K is the session key

Security proof of Protocol π in the w()AFL-eCK model.

We prove the security of the generic protocol π in the w()AFL-eCK model. If the underlying primitives are secure in the bounded or continuous leakage model, the protocol π is BAFL-eCK-secure or CAFL-eCK-secure, respectively (with the restriction that 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 query does not reveal the randomness used in the signature computation).

Theorem 4.8.

The protocol π is Advπ𝛌-w()AFL-eCK-secure whenever the underlying public-key cryptosystem PKE is CPLA2-secure and ϵ-PG-IND, the key derivation function KDF is secure with respect to a uniformly random source key material, the signature scheme SIG is UFCMLA-secure, PRF is a pseudo-random function, the DDH and the ODH [1] assumptions hold.

Let U={U1,,UNP} be a set of NP parties. Each party Ui owns at most Ns number of protocol sessions. Let A be any PPT adversary against Protocol π. Then the advantage of A against 𝛌-w()AFL-eCK-security of protocol π, Advπ𝛌-w()AFL-eCK, is

Advπ𝝀-w()AFL-eCK(𝒜)max[NP2Ns2[(Advq,gDDH(𝒞)+AdvKDF()+AdvPRF(𝒥))+1q],
NP2Ns2[(Advq,gDDH(𝒞)+AdvKDF()+AdvPRF(𝒥)+2AdvPKECPLA2(𝒟)+2ϵ)+1q],
NP2Ns2[(Advq,gODH()+AdvPRF(𝒥)+2AdvPKECPLA2(𝒟)+2ϵ)+1q],NPAdvSIGUFCMLA()],

where B,C,D,E,J,R are efficient algorithms constructed using the adversary A, against the underlying key derivation function, KDF, DDH problem, public-key cryptosystem, PKE, the signature scheme, SIG, pseudo-random function, PRF, and Oracle Diffie–Hellman problem respectively. The PKE is ϵ-PG-IND.

The detailed proof of this theorem is in Appendix B.

Leakage tolerance of the w()AFL-eCK-secure protocol π: wBAFL-eCK-secure instantiation.

In the presented protocol, a principal uses a decryption function of a CPLA2-secure ϵ-PG-IND-public-key cryptosystem to compute the NAXOS value in a leakage-resilient manner and sets the Diffie–Hellman exponent as the decrypted message. Then the principal uses a UFCMLA-secure signature scheme to authenticate the message. Therefore, the leakage tolerance from the secret key used to compute the NAXOS value is exactly the same as the leakage tolerance of the underlying CPLA2-secure public key encryption scheme, and the leakage tolerance from the secret key used to compute the signature is exactly same as the leakage tolerance of the underlying UFCMLA-secure signature scheme.

Halevi and Lin [22] constructed a generic CPLA2-secure public-key cryptosystem which is secure against bounded leakage and also satisfies pair generation indistinguishability. It can be instantiated with the DDH-based leakage-resilient public-key encryption scheme of Naor and Segev [38] with decryption cost of four exponentiations, and for a key length k the leakage is bounded by (1-o(1))k. Katz and Vaikuntanathan [26] constructed a UFCMLA-secure signature scheme in the bounded leakage model, where a signature can be generated with cost of two exponentiations, and verified with cost of four exponentiations (with a simple NIZK proof). The signature scheme of Katz and Vaikuntanathan contains signing and verification operations based on NIZK protocols. For a key length k, the signature scheme tolerates leakage of (1-kt)k, for any constant t<1. Hence, this protocol can be instantiated with the above mentioned leakage-resilient signature scheme and the public-key encryption scheme, and achieve leakage tolerance according to the leakage parameters specified in the above mentioned cryptographic constructions.

4.3 Concrete CAFL-eCK-secure key exchange protocol [7]

In Section 4.2 we presented a generic construction for a protocol which is proven secure in the w()AFL-eCK security model. However, when it comes to a concrete construction, the presented generic protocol can only be instantiated in a way that is secure in the bounded version of the security model and the model we considered is slightly weaker than the desired ()AFL-eCK model. Up to now there are no suitable cryptographic primitives which can be used to instantiate the generic protocol in the continuous leakage variant of the security model, as well as in the desired ()AFL-eCK model. Now we present a concrete protocol construction [7] which is proven secure in the continuous leakage instantiation of the ()AFL-eCK model, namely the CAFL-eCK model. Moreover, this construction does not require a weaker variant of the model for the security proof.

Observe that moving to the leakage-resilient setting of the eCK-style secure key exchange requires rethinking the NAXOS trick. We have presented a generic construction of a weak after-the-fact leakage eCK (w()AFL-eCK)-secure key exchange protocol in Section 4.2, which uses a leakage-resilient NAXOS trick. The leakage-resilient NAXOS trick is obtained using a decryption function of an after-the-fact leakage-resilient public key encryption scheme. A concrete construction of a wBAFL-eCK-secure protocol is possible since there exists a bounded after-the-fact leakage-resilient public key encryption scheme which can be used to obtain the required leakage-resilient NAXOS trick, but it is not currently possible to construct a CAFL-eCK-secure protocol since there is currently no continuous after-the-fact leakage-resilient public-key encryption scheme available. Therefore, an attempt to construct a CAFL-eCK-secure key exchange protocol using the leakage-resilient NAXOS approach is not possible at this stage.

In Section 2.2 we presented a eCK-secure protocol construction [7], which does not use the NAXOS trick, namely Protocol P1. The protocol P1 is based on Diffie–Hellman key exchange, which requires exponentiation computations. Moving to the leakage-resilient setting requires rethinking the exponentiation computation in a leakage-resilient manner. Since there exist leakage-resilient encoding schemes and leakage-resilient refreshing protocols for them (Definitions C.5 and C.9), the aim is to compute the required exponentiations in a leakage-resilient manner using the available leakage-resilient storage and refreshing schemes.

Leakage-resilient construction of Protocol P2.

Protocol P1 is an eCK-secure key exchange protocol. The eCK model considers an environment where partial information leakage does not take place. By following the concept that only computation leaks information, it is assumed that the leakage of long-term secret keys happens when computations are performed using them. Then, instead of the non-leakageeCK model which is used for the security proof of Protocol P1, the CAFL-eCK model is used, which additionally allows the adversary to obtain continuous leakage of long-term secret keys.

The idea is to perform the computations which use long-term secret keys (exponentiation operations) in such a way that the resulting leakage from the long-term secrets should not leak sufficient information to reveal them to the adversary. To overcome that challenge, a leakage-resilient storage scheme and a leakage-resilient refreshing protocol are used, and the architecture of Protocol P1 is modified in such a way that the secret keys s are encoded into two portions sL,sR, exponentiations are computed using two portions sL,sR instead of directly using s, and the two portions sL,sR are being refreshed continuously.

Obtaining leakage resiliency by encoding secrets.

In this setting a secret s is encoded using an Encode function of a leakage-resilient storage scheme Λ=(Encode,Decode). Therefore, the secret s is encoded as (sL,sR)Encode(s). The leakage-resilient storage scheme randomly chooses sL and then computes sR such that sLsR=s. A tuple leakage parameter 𝝀=(λ1,λ2) is defined as follows: 𝝀-limited adversary 𝒜 sends a leakage function 𝐟=(f1j,f2j) and obtains at most λ1,λ2 amount of leakage from each of the two encodings of the secret s, respectively: f1j(sL) and f2j(sR).

As mentioned in Definition C.9, the leakage-resilient storage scheme can continuously refresh the encodings of the secret. Therefore, after executing the refreshing protocol it outputs new random-looking encodings of the same secret. So for the 𝝀-limited adversary again the situation is as before. Thus, refreshing the encodings will help to obtain leakage resilience over a number of protocol executions.

The computation of exponentiations is also split into two parts. Let 𝔾 be a group of prime order q with generator g. Let s$q* be a long-term secret key and let E=ge be a received ephemeral value. Then the value Z needs to be computed as ZEs. In the leakage-resilient setting, in the initial setup the secret key is encoded as sL,sREncodeq*n,1(s). So the vector sL=(sL1,,sLn) and the vector sR=(sR1,,sRn) are such that

s=sL1sR1++sLnsRn.

Then the computation of Es can be performed as two component-wise computations as follows: compute the intermediate vector

TEsL=(EsL1,,EsLn)

and then compute the element

ZTsR=EsL1sR1EsL2sR2EsL1sR1=EsL1sR1++sLnsRn=Es.

Protocol construction.

Using the above ideas, by encoding the secret using a leakage-resilient storage scheme, and refreshing the encoded secret using a refreshing protocol, it is possible to hide the secret from a 𝝀-limited adversary. Further, it is possible to successfully compute the exponentiation using the encoded secrets. A CAFL-eCK-secure key exchange protocol is constructed, using an eCK-secure key exchange protocol as an underlying primitive.

Let Λq*n,1=(Encodeq*n,1,Decodeq*n,1) be the leakage-resilient storage scheme which is used to encode secret keys and let Refreshq*n,1 be the (,𝝀,ϵ)-secure leakage-resilient refreshing protocol of Λq*n,1.

As we can see, the obvious way of key generation (initial setup) in a protocol principal of this protocol is as follows: First pick a$q* as the long-term secret key, then encode the secret key as (aL0,aR0)Encodeq*n,1(a), then compute the long-term public key A=ga using the two encodings (aL0,aR0), and finally erase a from the memory. The potential threat to that key generation mechanism is that even though the long-term secret key a is erased from the memory, it might not be properly erased and can be leaked to the adversary during the key generation. In order to avoid such a vulnerability, two values aL0$(q*)n, aR0$(q*)n×1 are picked at random and use them as the encodings of the long-term secret key a of a protocol principal. As explained earlier, aL0,aR0 are used to compute the corresponding long-term public key A in two steps as agaL0 and AaaR0. Thus, it is possible to avoid exposing the un-encoded secret key a at any point of time in the key generation and hence avoid leaking directly from a at the key generation step. Further, the random vector aL0 is multiplied with the random vector aR0 such that a=aL0aR0, which will give a random integer a in the group q*. Therefore, this approach is same as picking a$q* at first and then encode, but in the reverse order. During the protocol execution both aL0,aR0 are continuously refreshed and refreshed encodings aLj,aRj are used to exponentiation computations.

Table 4

Concrete construction of Protocol P2.

Alice (initiator)Bob (responder)
Initial setup
aL0$(q*)n,aR0$(q*)n×1bL0$(q*)n,bR0$(q*)n×1
agaL0,A(a)aR0bgbLj,B(b)bR0
Protocol execution
x$q*,XgxAlice,Xy$q*,Ygy
Bob,Y
T1BaLj,Z1T1aRjT3AbLj,Z1T3bRj
Z2BxT4XbLj,Z2T4bRj
T2YaLj,Z3T2aRjZ3Ay
Z4YxZ4Xy
(aLj+1,aRj+1)Refreshq*n,1(aLj,aRj)(bLj+1,bRj+1)Refreshq*n,1(bLj,bRj)
KH(Z1,Z2,Z3,Z4,Alice,X,Bob,Y)KH(Z1,Z2,Z3,Z4,Alice,X,Bob,Y)
K is the session key

Table 4 shows Protocol P2 of [7]. Leakage of a long-term secret key does not happen directly from the long-term secret key itself, but from the two encodings of the long-term secret key (the leakage function 𝐟=(f1j,f2j) directs to the each individual encoding). During the exponentiation computations and the refreshing operation collectively at most 𝝀=(λ1,λ2) leakage is allowed to the adversary from each of the two portions independently. Then the two portions of the encoded long-term secret key are refreshed and in the next protocol session another 𝝀-bounded leakage is allowed. Thus, continuous leakage is allowed.

Security proof of Protocol P2 in the CAFL-eCK model.

Theorem 4.9 ([7]).

If the underlying refreshing protocol RefreshZq*n,1 is the (,𝛌,ϵ)-secure leakage-resilient refreshing protocol of the leakage-resilient storage scheme ΛZq*n,1 and the underlying key exchange protocol P1 is the eCK-secure key exchange protocol, then Protocol P2 is 𝛌-CAFL-eCK-secure.

Let A be any PPT adversary against the key exchange protocol P2. Then the advantage of A against the CAFL-eCK-security of Protocol P2, AdvP2𝛌-CAFL-eCK, is

AdvP2𝝀-CAFL-eCK(𝒜)NP(AdvP1eCK(𝒜)+ϵ).

Leakage tolerance of Protocol P2.

The order of the group 𝔾 is q. Let m=1 in the leakage-resilient storage scheme Λq*n,1. According to Lemma C.8, if m<n20, then the leakage parameter for the leakage-resilient storage scheme is 𝝀Λ=(0.3nlogq,0.3nlogq). Let n=21; then we have 𝝀Λ=(6.3logq,6.3logq) bits. According to Theorem C.11, if m3n and n16, the refreshing protocol Refreshq*n,1 of the leakage-resilient storage scheme Λq*n,1 is tolerant to (continuous) leakage up to 𝝀Refresh=𝝀Λ2=(3.15logq,3.15logq) bits, per occurrence.

When a secret key s (of size logq bits) of Protocol P2 is encoded into two parts, the left part sL will be nlogq=21logq bits and the right part sR will be n1logq=21logq bits. For a tuple leakage function 𝐟=(f1j,f2j) (each leakage function f() for each of the two parts sL and sR), there exists a tuple leakage bound 𝝀=(λ,λ) for each leakage function f() such that λ=3.15logq bits, per occurrence, which is 3.15logq21logq×100%=15% of the size of a part. The overall leakage amount is unbounded since continuous leakage is allowed.

5 Comparison of key exchange security models and protocols

In this paper, we have presented two security models for key exchange protocols, addressing more granular partial leakage of long-term secret keys, namely the continuous after-the-fact leakage model (CAFL) and the after-the-fact leakage eCK model (()AFL-eCK) (and the w()AFL-eCK) model). Further, we presented generic protocol constructions for each of the CAFL and w()AFL-eCK) models and a concrete protocol construction for the continuous leakage variant of the ()AFL-eCK model, the CAFL-eCK model.

5.1 Comparison of security models

Table 5 summarizes the adversarial powers of the two instantiations of the ()AFL-eCK model and the CAFL model, in comparison with the adversarial powers of the eCK model [31] and the Moriyama–Okamoto (MO) model [37]. There are four 𝙲𝚘𝚛𝚛𝚞𝚙𝚝𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 query combinations which do not trivially expose the session key. In the column “Combinations” of Table 5, we mention how many of them are allowed in the corresponding security model. We discussed query combinations in detail in Section 3.1. The * indicates that the w()AFL-eCK model does not allow the 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 query to reveal the randomness used in the underlying signature scheme. The eCK model is a non-leakage security model and Moriyama and Okamoto have constructed a leakage security model based on eCK model. The Moriyama–Okamoto model allows bounded leakage, only before the target session is established. The CAFL model allows continuous leakage even after the target session is established, while enforcing additional restrictions to the eCK-style freshness condition. Therefore, the strength of the CAFL model is not directly comparable with eCK or Moriyama–Okamoto models, but the CAFL model clearly allows more granular partial leakage. The ()AFL-eCK releases the additional restrictions to the freshness condition which had been introduced in the CAFL model. Thus, the two instantiations of the ()AFL-eCK model, namely the BAFL-eCK and CAFL-eCK models, are stronger than the eCK, the Moriyama–Okamoto and the CAFL models.

Table 5

Key exchange security models with reveal queries and leakage allowed.

Security modelCombinationsLeakage modelAfter-the-fact
eCK[31]4/4NoNo
MO[37]4/4BoundedNo
CAFL (Section 3)2/4ContinuousYes
()AFL-eCK (Section 4)4/4Bounded/ContinuousYes
w()AFL-eCK (Section 4)4*/4Bounded/ContinuousYes

5.2 Comparison of key exchange protocols

Table 6 compares Protocol π1 of Section 3, Protocol π of Section 4 and Protocol P2 of Section 4, with the NAXOS protocol [31] and the Moriyama–Okamoto protocol [37].

Table 6

Comparison of key exchange protocols.

ProtocolSecurity modelAssumptionsConstruction
NAXOS [31]eCKGDH, ROConcrete
MO [37]MODDH, HPS, PRF, (λ,ϵ)-ExtConcrete
π1 of Section 3CAFLCCLA2-secure PKE, PRF,Generic
π of Section 4w()AFL-eCKDDH, ODH, ϵ-PG-IND and CPLA2-secure PKE, secure KDF, PRFGeneric
P2 of Section 4CAFL-eCKGDH, ROConcrete

The NAXOS protocol is the first concrete protocol which is proven secure in the eCK model. Being an eCK-secure protocol, NAXOS does not provide any security guarantee for side-channel attacks. The Moriyama–Okamoto protocol is the first concrete protocol which is proven secure in a leakage security model, namely the Moriyama–Okamoto model. The Moriyama–Okamoto protocol is resistant to a bounded amount of leakage of long-term secret keys only before the target session is activated. We presented a generic CAFL-secure protocol, which can be instantiated using any suitable leakage-resilient public-key encryption scheme, in a way that it is secure against continuous leakage of long-term secret keys even after the target session is activated. Then we presented a generic w()AFL-eCK-secure protocol in a way that it is possible to instantiate a wBAFL-eCK or wCAFL-eCK-secure key exchange protocol using any suitable leakage-resilient public-key encryption scheme and a leakage-resilient signature scheme. Since there are currently no suitable leakage-resilient public-key encryption schemes to instantiate the continuous leakage-resilient variant of the generic protocol, we presented a concrete CAFL-eCK-secure protocol, namely Protocol P2, using leakage-resilient storage schemes. Protocol P2 is proven secure in the strongest leakage-security model for key exchange, guaranteeing the eCK-style security as well as tolerance against continuous leakage of long-term secret keys even after the target session is activated.

The generic CAFL-secure protocol of Section 3 can be instantiated with the CCLA2-secure public-key encryption scheme of Dziembowski and Faust [19], whereas the generic w()AFL-eCK-secure protocol of Section 4 can be instantiated as a wBAFL-eCK-secure protocol using the CPLA2-secure pair generation indistinguishable public-key encryption scheme of Halevi and Lin [22] and the UFCMLA-secure signature scheme of Katz and Vaikuntanathan [26]. Table 7 compares these protocol instantiations and Protocol P2 with the NAXOS protocol [31] and the Moriyama–Okamoto (MO) protocol [37], in terms of computation cost and the security model.

Table 7

Security and efficiency comparison of key exchange protocols.

ProtocolInitiator costResponder costSecurity model
NAXOS [31]4 Exp4 ExpeCK
MO [37]8 Exp8 ExpMO
π1 of Section 3 instantiation10 Exp10 ExpCAFL
π of Section 4 instantiation12 Exp12 ExpwBAFL-eCK
P2 protocol of Section 46 Exp6 ExpCAFL-eCK

Dedicated to my Father, the most innovative person I have met, my Mother, the first teacher in my life, and my Wife, the beautiful caretaker of me



Communicated by Rainer Steinwandt


Funding statement: The author was supported by the postdoctoral fellowship grant NRC 16-020 of the National Research Council (NRC), Sri Lanka.

A Proof of Theorem 3.5

Proof.  Assume that the adversary 𝒜 can win the challenge against Protocol π1 challenger with advantage Advπ1λ-CAFL(𝒜). We split the proof into two cases: partner to the test session exists and partner to the test session does not exist.

Case 1: Partner to the test session exists

In this case we consider three subcases as follows:

  1. Adversary corrupts the owner of the test session, but does not corrupt the peer.

  2. Adversary corrupts the peer of the test session, but does not corrupt the owner.

  3. Adversary corrupts neither the owner nor the partner of the test session

Case 1.1: Adversary corrupts the owner of the test session, but does not corrupt the peer

In this case we consider the situation that 𝒜 corrupts the owner of the test session but not the partner.

Game 1.

This game is the original game. When the 𝚃𝚎𝚜𝚝 query is asked, the Game 1 challenger chooses a random bit b${0,1}. If b=1, the real session key is given to 𝒜, otherwise a random value chosen from the same session key space is given.

Game 2.

Same as Game 1 with the following exception: Before 𝒜 begins, two distinct random principals U*,V*{U1,,UNP} are chosen and two random numbers s*,t*{1,,Ns} are chosen, where NP is the number of protocol principals and Ns is the number of sessions on a principal. The session ΠU*,V*s* is chosen as the target session and the session ΠV*,U*t* is chosen as the partner to the target session. If the test session is not the session ΠU*,V*s* or the partner to the session is not ΠV*,U*t*, the Game 2 challenger aborts the game.

Game 3.

Same as Game 2 with the following exception: The Game 3 challenger chooses a random value r${0,1}k.

  1. If the test session is on the initiator, the challenger computes the session key in the test session

    KPRF(r,U*CU*V*CV*)PRF(rV*,U*CU*V*CV*).
  2. If the test session is on the responder, the challenger computes the session key in the test session

    KPRF(rV*,V*CV*U*CU*)PRF(r,V*CV*U*CU*).

The session key is computed in the same way in the partner to the test session.

Game 4.

Same as Game 3 with the following exception: In the 𝚃𝚎𝚜𝚝 query, in the target session, the Game 4 challenger randomly chooses K${0,1}k and sends it to the adversary 𝒜 as the answer to the 𝚃𝚎𝚜𝚝 query. In sessions at V* which has the same incoming message to V* as in the target session, the session key is randomly chosen as K${0,1}k.

Differences between games.

In this part the adversary’s advantage of distinguishing each game from the previous game is investigated. Here AdvGame x(𝒜) denotes the advantage of the adversary 𝒜 of winning Game x. Game 1 is the original game. Hence,

AdvGame 1(𝒜)=Advπ1,Case 1.1λ-CAFL(𝒜).
Game 1 and Game 2.

The probability of Game 2 to be halted due to incorrect choice of the test session is 1-1NP2Ns2. Unless the incorrect choice happens, Game 2 is identical to Game 1. Hence,

AdvGame 2(𝒜)=1NP2Ns2AdvGame 1(𝒜).
Game 2 and Game 3.

We introduce an algorithm 𝒟 which is constructed using the adversary 𝒜. If 𝒜 can distinguish the difference between Game 2 and Game 3, then 𝒟 can be used against the CCLA2 challenger of the underlying public-key cryptosystem, PKE. The algorithm 𝒟 uses the public key of the CCLA2 challenger as the public key of the protocol principal V* and generates public/secret key pairs for all other protocol principals; 𝒟 runs a copy of 𝒜 and interacts with 𝒜 such that 𝒜 is interacting with either Game 2 or Game 3. Further, 𝒟 picks two random strings r0,r1{0,1}k and passes them to the CCLA2 challenger. From the CCLA2 challenger, 𝒟 receives a challenge ciphertext C such that CEnc(pkV*,r), where r=r0 or r=r1. The following describes the algorithm’s procedure of answering queries:

  1. 𝚂𝚎𝚗𝚍(U,V,s,m,f) query:

    1. U=U*,V=V*,s=s*:

      1. If U* is the initiator, 𝒟 sends the ciphertext C to 𝒜 as the first message of the test session. Upon receiving the second protocol message computes the session key

        KPRF(r1,U*CU*V*CV*)PRF(rV*,U*CU*V*CV*).
      2. If U* is the responder, upon receiving the first protocol message sends C to 𝒜, and computes the session key

        KPRF(r1,V*CV*U*CU*)PRF(rV*,V*CV*U*CU*).

    2. U=U*,V=V*,ss*: Executes the protocol normally.

    3. U=U*,VV*: Executes the protocol normally.

    4. U=V*:

      1. If this is the initiator and it is the first message, then executes the protocol normally.

      2. If this is the initiator and the second protocol message, or the responder:

        1. If C has come as the incoming message, uses r1 as the decryption of the incoming message. To obtain the corresponding leakage, 𝒟 first encrypts r1 using pkV*, gets that ciphertext and access the leakage oracle of CCLA2 challenger with the ciphertext of r1.

        2. Else uses the decryption oracle to decrypt incoming messages.

    5. U,VU* or V*: Executes the protocol normally.

      For all other leakage queries f(skV*), 𝒟 obtains the leakage accessing the leakage oracle of the CCLA2 challenger, whereas for all the other leakage queries, 𝒟 can compute the leakage by its own, because 𝒟 knows all other secret keys.

  2. 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s) query: 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 query is not allowed to the target session or the partner of the target session. Then 𝒟 can compute all the session keys by executing the protocol:

    1. For sessions involving the principal V*, and the incoming message to V* is the same message which has come to V* in the target session, uses r1 as the decryption.

    2. For other sessions involving the principal V*, 𝒟 can decrypt the incoming messages to V* by using the decryption oracle.

    3. Otherwise, 𝒟 can decrypt all the other incoming messages to protocol principals by its own.

    Then compute the session key using the PRF.

  3. 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s) query: For all 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 queries allowed in the freshness condition, 𝒟 can answer correctly, because 𝒟 has the ephemeral keys.

  4. 𝙲𝚘𝚛𝚛𝚞𝚙𝚝(U) query: Except for V*, the algorithm 𝒟 can answer all other 𝙲𝚘𝚛𝚛𝚞𝚙𝚝 queries. In this case we consider the situation in which the adversary is not allowed to corrupt the partner principal of the target session, so in fact, 𝒟 can answer all legitimate 𝙲𝚘𝚛𝚛𝚞𝚙𝚝 queries.

  5. 𝚃𝚎𝚜𝚝(U,V,s) query: Answers with the K which is computed at the 𝚂𝚎𝚗𝚍 query when U=U*, V=V*, s=s*.

If r1 is the decryption of C in the target session, the simulation constructed by 𝒟 is identical to Game 2 whereas if r0 is the decryption of C, the simulation constructed by 𝒟 is identical to Game 3. If 𝒜 can distinguish the difference between Game 2 and Game 3, then 𝒟 can distinguish whether CEnc(pkV*,r0) or CEnc(pkV*,r1).

The algorithm 𝒟 plays the CCLA2 game against the public-key cryptosystem PKE according to Definition C.12 since 𝒟 does not ask the decryption of the challenge ciphertext C. Hence,

|AdvGame 2(𝒜)-AdvGame 3(𝒜)|AdvPKECCLA2(𝒟).
Game 3 and Game 4.

If 𝒜 can distinguish the difference between Game 3 and Game 4, then 𝒜 can be used as a subroutine of an algorithm , which is used to distinguish whether the session key value K is computed using the real PRF with a hidden key, or using a random function. The adversary 𝒜 is given a K such that it is computed using the PRF or randomly chosen from the session key space. The following describes the algorithm’s procedure of answering queries:

  1. 𝚂𝚎𝚗𝚍(U,V,s,m,f) query:

    1. U=U*,V=V*,s=s*:

      1. If U* is the initiator, upon receiving the second protocol message computes the session key

        KOraclePRF(U*CU*V*CV*)PRF(rV*,U*CU*V*CV*).
      2. If U* is the responder, upon receiving the first protocol message computes the session key

        KOraclePRF(U*CU*V*CV*)PRF(rV*,U*CU*V*CV*).

    2. U=U*,V=V*,ss*: Executes the protocol normally.

    3. U=U*,VV*: Executes the protocol normally.

    4. U=V*:

      1. If this is the initiator and it is the first message, then executes the protocol normally.

      2. If this is the initiator and the second protocol message, or the responder:

        1. If the same message that came to V* in the test session has come as the incoming message, computes the session key using the OraclePRF.

        2. Otherwise, executes the protocol normally.

    5. U,VU* or V*: Executes the protocol normally.

      For all leakage queries, can compute the leakage by its own, because knows all the secret keys.

  2. 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s) query: 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 query is not allowed to the target session or its partner. Then can compute all the session keys by executing the protocol.

    1. For sessions involving the principal V*, and the incoming message to V* is the same message which has come to V* in the target session, uses OraclePRF to compute the session key.

    2. For all other sessions, computes the session key by using the PRF.

  3. 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s) query: can answer all 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 queries, which are allowed by the freshness condition, because has the ephemeral keys.

  4. 𝙲𝚘𝚛𝚛𝚞𝚙𝚝(U) query: Except for V*, the algorithm can answer all other 𝙲𝚘𝚛𝚛𝚞𝚙𝚝 queries. In this case we consider the situation in which the adversary is not allowed to corrupt the partner principal of the target session, so in fact, can answer all legitimate 𝙲𝚘𝚛𝚛𝚞𝚙𝚝 queries.

  5. 𝚃𝚎𝚜𝚝(U,V,s) query: Answers with the K which is computed at the 𝚂𝚎𝚗𝚍 query when U=U*, V=V*, s=s*.

If the oracle is using the real PRF with a hidden key, the simulation is identical to Game 3, whereas if the oracle is using a random function, the simulation constructed is identical to Game 4. If 𝒜 can distinguish the difference between Game 3 and Game 4, then 𝒜 can be used as a subroutine of an algorithm , which is used to distinguish whether the PRF challenger is real or random. Hence,

|AdvGame 3(𝒜)-AdvGame 4(𝒜)|AdvPRF().
Semantic security of the session key in Game 4.

Since the session key K of ΠU*,V*s* is chosen randomly and independently from all other values, 𝒜 does not have any advantage in Game 4. Hence,

AdvGame 4(𝒜)=0.

Combining the results above, we find

Advπ1,Case 1.1λ-CAFL(𝒜)NP2Ns2(AdvPKECCLA2(𝒟)+AdvPRF()).

Case 1.2: Adversary corrupts the peer of the test session, but does not corrupt the owner

In this case we consider the situation that 𝒜 corrupts the partner of the test session but not the owner. The proof structure and games are similar to the previous case. The differences in this case is that the algorithm 𝒟 uses the public key of the CCLA2 challenger as the public key of the protocol principal U* (difference between Game 2 and Game 3), and OraclePRF is used when the incoming message to U* in the test session is used as the incoming message to U* in any other sessions (Game 3 and Game 4 analysis). We find

Advπ1,Case 1.2λ-CAFL(𝒜)NP2Ns2(AdvPKECCLA2(𝒟)+AdvPRF()).

Case 1.3: Adversary corrupts neither the owner nor the partner of the test session

In this case we consider the situation that 𝒜 corrupts neither the owner nor the partner of the test session. So 𝒟 can set the public key of the CCLA2 challenger as the public key of either U* or V*. The proof structure and games are similar to the previous case. We consider two subcases under this case as follows:

  1. (a) Adversary does not ask 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(V*,U*,t*): Simulation and analysis of this case is similar to Case 1.2, because here 𝒟 can set the public key of the CCLA2 challenger as the public key of the protocol principal U* and proceed with the simulation as in Case 1.2 (only difference is that here the adversary does not corrupt the partner principal of the test session, as in Case 1.2, but rest of the simulation is same as in Case 1.2). Thus,

    Advπ1,Case 1.3 (a)λ-CAFL(𝒜)NP2Ns2(AdvPKECCLA2(𝒟)+AdvPRF()).
  2. (b) Adversary does not ask 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U*,V*,s*): Simulation and analysis of this case is similar to Case 1.1, because here 𝒟 can set the public key of the CCLA2 challenger as the public key of the protocol principal V* and proceed with the simulation as in Case 1.1 (only difference is that here the adversary does not corrupt the owner of the test session, as in Case 1.1, but rest of the simulation is same as in Case 1.1). Thus,

    Advπ1,Case 1.3 (b)λ-CAFL(𝒜)NP2Ns2(AdvPKECCLA2(𝒟)+AdvPRF()).

Case 2: Partner to the test session does not exist

Game 1.

This game is the original game. When the 𝚃𝚎𝚜𝚝 query is asked, the Game 1 challenger chooses a random bit b{0,1}. If b=1, the real session key is given to 𝒜, otherwise a random value chosen from the same session key space is given.

Game 2.

Same as Game 1 with the following exception: Before 𝒜 begins, two distinct random principals U*,V*{U1,,UNP} are chosen and a random number s*{1,,Ns} is chosen, where NP is the number of protocol principals and Ns is the number of sessions on a principal. The session ΠU*,V*s* is chosen as the target session. If the test session is not the session ΠU*,V*s*, the Game 2 challenger aborts the game.

Game 3.

Same as Game 2 with the following exception: the Game 3 challenger chooses a random value r${0,1}k.

  1. If the test session is on the initiator, the challenger computes the session key in the test session

    KPRF(r,U*CU*V*CV*)PRF(rV*,U*CU*V*CV*).
  2. If the test session is on the responder, the challenger computes the session key in the test session

    KPRF(rV*,V*CV*U*CU*)PRF(r,V*CV*U*CU*).

The session key is computed in the same way in the partner to the test session.

Game 4.

Same as Game 3 with the following exception: In the 𝚃𝚎𝚜𝚝 query, in the target session the Game 4 challenger randomly chooses K${0,1}k and sends it to the adversary 𝒜 as the answer to the 𝚃𝚎𝚜𝚝 query. In sessions at V* which has a same incoming message to V* as in the target session, the session key is randomly chosen as K${0,1}k.

Differences between games.

Game 1 is the original game. Hence,

AdvGame 1(𝒜)=Advπ1,Case 2λ-CAFL(𝒜).

Game 1 and Game 2.

The probability of Game 2 to be halted due to incorrect choice of the test session is 1-1NP2Ns. Unless the incorrect choice happens, Game 2 is identical to Game 1. Hence,

AdvGame 2(𝒜)=1NP2NsAdvGame 1(𝒜).

Game 2 and Game 3.

We introduce an algorithm 𝒟 which is constructed using the adversary 𝒜. If 𝒜 can distinguish the difference between Game 2 and Game 3, then 𝒟 can be used against the CCLA2 challenger of underlying public-key cryptosystem, PKE. The algorithm 𝒟 uses the public key of the CCLA2 challenger as the public key of the protocol principal V* and generates public/secret key pairs for all other protocol principals; 𝒟 runs a copy of 𝒜 and interacts with 𝒜 such that it is interacting with either Game 2 or Game 3. Further, 𝒟 picks two random strings r0,r1{0,1}k and passes them to the CCLA2 challenger. From the CCLA2 challenger, 𝒟 receives a challenge ciphertext C such that CEnc(pkV*,r), where r=r0 or r=r1. The following describes the procedure of answering queries:

  1. 𝚂𝚎𝚗𝚍(U,V,s,m,f) query:

    1. U=U*, V=V* and s=s*:

      1. If U* is the initiator, 𝒟 sends the ciphertext C to 𝒜 as the first message of the test session. Upon receiving the second protocol message computes the session key

        KPRF(r1,U*CU*V*CV*)PRF(rV*,U*CU*V*CV*).
      2. If U* is the responder, upon receiving the first protocol message sends C to 𝒜, and computes the session key

        KPRF(r1,V*CV*U*CU*)PRF(rV*,V*CV*U*CU*).

    2. U=U*,V=V*,ss*: Executes protocol normally.

    3. U=U*,VV*: Executes the protocol normally.

    4. U=V*:

      1. If this is the initiator and it is the first message, then executes the protocol normally.

      2. If this is the initiator and the second protocol message, or the responder:

        1. If C has come as the incoming message, uses r1 as the decryption of the incoming message. To obtain the corresponding leakage, 𝒟 first encrypts r1 using pkV*, gets that ciphertext and access the leakage oracle of CCLA2 challenger with the ciphertext of r1.

        2. Else uses the decryption oracle to decrypt incoming messages.

    5. U,VU* or V*: Executes the protocol normally.

      For all other leakage queries f(skV*), 𝒟 obtains the leakage accessing the leakage oracle, whereas for all other leakage 𝒟 can compute the leakage by its own because 𝒟 knows all other secret keys.

  2. 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s) query: 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 query is not allowed to the target session or its partner:

    1. For sessions involving the principal V*, and the incoming message to V* is the same message which has come to V* in the target session, uses r1 as the decryption.

    2. For other sessions involving the principal V*, 𝒟 can decrypt the incoming messages to V* by using the decryption oracle.

    3. Otherwise, 𝒟 can decrypt all the other incoming messages to protocol principals by its own.

    Then compute the session key using the PRF.

  3. 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s) query: For all 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 queries allowed in the freshness condition, 𝒟 can answer correctly, because 𝒟 has the ephemeral keys.

  4. 𝙲𝚘𝚛𝚛𝚞𝚙𝚝(U) query: Except for V*, the algorithm 𝒟 can answer all other 𝙲𝚘𝚛𝚛𝚞𝚙𝚝 queries. In this case we consider the situation in which the adversary is not allowed to corrupt the partner principal of the target session, so in fact, 𝒟 can answer all 𝙲𝚘𝚛𝚛𝚞𝚙𝚝 queries.

  5. 𝚃𝚎𝚜𝚝(U,V,s) query: To compute the answer to the 𝚃𝚎𝚜𝚝(U*,V*,s*) query, the algorithm 𝒟 uses r1 as the decryption of the ciphertext C and computes the session key using the r1 value as the ephemeral key of the principal U*.

If r1 is the decryption of C coming to, V* in the test session, the simulation constructed by 𝒟 is identical to Game 2 whereas if r0 is the decryption of C, the simulation constructed by 𝒟 is identical to Game 3. If 𝒜 can distinguish the difference between Game 2 and Game 3, then 𝒟 can distinguish whether CEnc(pkV*,r0) or CEnc(pkV*,r1).

The algorithm 𝒟 plays the CCLA2 game against the public-key cryptosystem PKE according to Definition C.12 since 𝒟 does not ask the decryption of the challenge ciphertext C. Hence,

|AdvGame 2(𝒜)-AdvGame 3(𝒜)|AdvPKECCLA2(𝒟).

Game 3 and Game 4.

If 𝒜 can distinguish the difference between Game 3 and Game 4, then 𝒜 can be used as a subroutine of an algorithm , which is used to distinguish whether the session key value K is computed K is computed using the real PRF with a hidden key, or using a random function. The adversary 𝒜 is given a K such that it is computed using the PRF or randomly chosen from the session key space. The following describes the algorithm’s procedure of answering queries:

  1. 𝚂𝚎𝚗𝚍(U,V,s,m,f) query:

    1. U=U*, V=V* and s=s*:

      1. If U* is the initiator, upon receiving the second protocol message computes the session key KOraclePRF(U*CU*V*CV*)PRF(rV*,U*CU*V*CV*).

      2. If U* is the responder, upon receiving the first protocol message computes the session key KOraclePRF(U*CU*V*CV*)PRF(rV*,U*CU*V*CV*).

    2. U=U*,V=V*,ss*: Executes protocol normally.

    3. U=U*,VV*: Executes the protocol normally.

    4. U=V*:

      1. If this is the initiator and it is the first message, then executes the protocol normally.

      2. If this is the initiator and the second protocol message, or the responder:

        1. If the same message that came to V* in the test session has come as the incoming message, computes the session key using the OraclePRF.

        2. Otherwise, executes the protocol normally.

    5. U,VU* or V*: Executes the protocol normally.

    For all leakage queries, can compute the leakage by its own, because knows all the secret keys.

  2. 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s) query: 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 query is not allowed to the target session or its partner.

    1. For sessions involving the principal V*, and the incoming message to V* is the same message which has come to V* in the target session, uses OraclePRF to compute the session key.

    2. For all other sessions, computes the session key by using the PRF.

  3. 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s) query: can answer all 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 queries which are allowed in the freshness condition, because has the ephemeral keys.

  4. 𝙲𝚘𝚛𝚛𝚞𝚙𝚝(U) query: Except for V*, the algorithm can answer all other 𝙲𝚘𝚛𝚛𝚞𝚙𝚝 queries. In this case we consider the situation in which the adversary is not allowed to corrupt the partner principal of the target session, so in fact, can answer all 𝙲𝚘𝚛𝚛𝚞𝚙𝚝 queries.

  5. 𝚃𝚎𝚜𝚝(U,V,s) query: Answers with the K computed in 𝚂𝚎𝚗𝚍 query when U=U*, V=V* and s=s*.

If the oracle is using the real PRF with a hidden key, the simulation is identical to Game 3, whereas if the oracle is using a random function, the simulation constructed is identical to Game 4. If 𝒜 can distinguish the difference between Game 3 and Game 4, then 𝒜 can be used as a subroutine of an algorithm , which is used to distinguish whether the PRF challenger is real or random. Hence,

|AdvGame 3(𝒜)-AdvGame 4(𝒜)|AdvPRF().

Semantic security of the session key in Game 4.

Since the session key K of ΠU*,V*s* is chosen randomly and independently from all other values, 𝒜 does not have any advantage in Game 4. Hence,

AdvGame 4(𝒜)=0.

Combining the results above, we find

Advπ1,Case 2λ-CAFL(𝒜)NP2Ns(AdvPKECCLA2(𝒟)+AdvPRF()).

Combine Case 1 and Case 2

According to the analysis we can see the adversary 𝒜’s advantage of winning against Protocol π1 challenger is

\qedAdvπ1λ-CAFL(𝒜)NP2Ns2(AdvPKECCLA2(𝒟)+AdvPRF()).

B Proof of Theorem 4.9

Proof.  The proof is split into two main cases: when the partner to the test session exists, and when it does not.

Case 1: A partner session to the test session exists

In this case, the adversary is allowed to corrupt both principals or reveal ephemeral keys from both sessions. We assume that the adversary 𝒜 can win the 𝝀-w()AFL-eCK challenge against Protocol π with advantage Advπ𝝀-w()AFL-eCK(𝒜). We split this case into four subcases as follows:

  1. Adversary corrupts both the owner and partner principals to the test session.

  2. Adversary corrupts neither owner or nor partner principal to the test session.

  3. Adversary corrupts the owner to the test session, but does not corrupt the partner to the test session.

  4. Adversary corrupts the partner to the test session, but does not corrupt the owner to the test session.

Case 1.1: Adversary corrupts both the owner and partner principals to the test session

Game 1.

This game is the original game. When the 𝚃𝚎𝚜𝚝 query is asked, the Game 1 challenger chooses a random bit b${0,1}. If b=1, the real session key is given to 𝒜, otherwise a random value chosen from the same session key space is given. This is the original game. Hence,

AdvGame 1(𝒜)=Advπ,Case 1.1𝝀-w()AFL-eCK(𝒜).
Game 2.

Abort the simulation if there exists two sessions outputting the same ephemeral public keys (same X=gx values). Since the ephemeral keys are coming from q*, the total number of ephemeral keys are q. The total number of sessions in the simulation is NP2Ns2, because NP is the number of protocol principals and each protocol principal owns Ns number of sessions. Hence,

|AdvGame 1(𝒜)-AdvGame 2(𝒜)|NP2Ns2q.
Game 3.

Before 𝒜 begins, two distinct random principals U*,V*${U1,,UNP} are chosen and two random numbers s*,t*${1,,Ns} are chosen, where NP is the number of protocol principals and Ns is the number of sessions on a principal. The session ΠU*,V*s* is chosen as the target session and the session ΠV*,U*t* is chosen as the partner to the target session. If the test session is not the session ΠU*,V*s* or partner to the session is not ΠV*,U*t*, the Game 3 challenger aborts the game. Unless the incorrect choice happens, Game 3 is identical to Game 2. Hence,

AdvGame 3(𝒜)=1NP2Ns2AdvGame 2(𝒜).
Game 4.

The Game 4 challenger randomly chooses z$q* and computes the session key of the target session and its partner session, using the KDF and the PRF as msKDF(gz,,k,) and

KPRF(ms,U*XU*σU*V*XV*σV*)

when U* is the initiator or

KPRF(ms,V*XV*σV*U*XU*σU*)

when U* is the responder.

We construct an algorithm 𝒞 against the DDH challenge, using the adversary 𝒜. The DDH challenger sends values (X=gx,Y=gy,Z=gz) such that either z=xy or z$q*, as the inputs to the algorithm 𝒞. It uses the value X as the ephemeral public key of U* and Y as the ephemeral public key of V* in the test session, and computes the session key using Z as the input to the KDF in the session key derivation process.

If 𝒞’s input is a Diffie–Hellman triple, the simulation constructed by 𝒞 is identical to Game 3, otherwise it is identical to Game 4. If 𝒜 can distinguish whether gz=gxy or not, then 𝒞 can answer the DDH challenge. Note that 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U*,V*,s*) or 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(V*,U*,t*) is prohibited since the adversary corrupts both the owner and the partner to the test session. The algorithm 𝒞 can answer all the adversarial queries allowed in this case, because it has all the long-term and ephemeral secret keys of the allowed queries. Hence,

|AdvGame 3(𝒜)-AdvGame 4(𝒜)|Advq,gDDH(𝒞).
Game 5.

The Game 5 challenger randomly chooses ms${0,1}k and computes the session key of the target session and its partner session, using the PRF as

KPRF(ms,U*XU*σU*V*XV*σV*)

when U* is the initiator or

KPRF(ms,V*XV*σV*U*XU*σU*)

when U* is the responder.

We construct an algorithm against a KDF challenger, using the adversary 𝒜. The KDF challenger sends a ms value which is either generated using the KDF or randomly chosen. It uses the received ms value to compute the session key of the target session using the PRF.

If ms is computed using the KDF, the simulation constructed by is identical to Game 4, otherwise it is identical to Game 5. If 𝒜 can distinguish the difference between Game 4 and Game 5, then 𝒜 can be used as a subroutine of an algorithm , which is used to distinguish whether the ms value is computed using KDF or randomly chosen. The algorithm can answer all the adversarial queries allowed in this case, because it has all the long-term and ephemeral secret keys of the allowed queries. Hence,

|AdvGame 4(𝒜)-AdvGame 5(𝒜)|AdvKDF().
Game 6.

The Game 6 challenger randomly chooses K${0,1}k as session key of the target session and its partner session.

We construct an algorithm 𝒥 against an OraclePRF, using the adversary 𝒜. The OraclePRF sends a K value which is either generated using the PRF with a hidden key, or a random function. 𝒥 uses the received K as the session key of the target session.

If K is generated using the PRF with a hidden key, the simulation constructed by 𝒥 is identical to Game 5, otherwise it is identical to Game 6. If 𝒜 can distinguish the difference between Game 5 and Game 6, then 𝒜 can be used as a subroutine of an algorithm 𝒥, which is used to distinguish whether the OraclePRF is real or a random function. The algorithm 𝒥 can answer all the adversarial queries allowed in this case, because it has all the long-term and ephemeral secret keys of the allowed queries. Hence,

|AdvGame 5(𝒜)-AdvGame 6(𝒜)|AdvPRF(𝒥).
Semantic security of the session key in Game 6.

Since the session key K of ΠU*,V*s* is chosen randomly and independently from all other values, 𝒜 does not have any advantage in Game 6. Hence,

AdvGame 6(𝒜)=0.

We find

Advπ,Case 1.1𝝀-w()AFL-eCK(𝒜)NP2Ns2[(Advq,gDDH(𝒞)+AdvKDF()+AdvPRF(𝒥))+1q].

Case 1.2: Adversary corrupts neither owner or nor partner principal to the test session

Game 1.

This game is the original game. When the 𝚃𝚎𝚜𝚝 query is asked, the Game 1 challenger chooses a random bit b${0,1}. If b=1, the real session key is given to 𝒜, otherwise a random value chosen from the same session key space is given. This is the original game. Hence,

AdvGame 1(𝒜)=Advπ,Case 1.2𝝀-w()AFL-eCK(𝒜).
Game 2.

Abort the simulation if there exists two sessions outputting the same ephemeral public keys (same X=gx values). Since the ephemeral keys are coming from q*, the total number of ephemeral keys are q. The total number of sessions in the simulation is NP2Ns2, because NP is the number of protocol principals and each protocol principal owns Ns number of sessions. Hence,

|AdvGame 1(𝒜)-AdvGame 2(𝒜)|NP2Ns2q.
Game 3.

Before 𝒜 begins, two distinct random principals U*,V*${U1,,UNP} are chosen and two random numbers s*,t*${1,,Ns} are chosen, where NP is the number of protocol principals and Ns is the number of sessions on a principal. The session ΠU*,V*s* is chosen as the target session and the session ΠV*,U*t* is chosen as the partner to the target session. If the test session is not the session ΠU*,V*s* or partner to the session is not ΠV*,U*t*, the Game 3 challenger aborts the game. Unless the incorrect choice happens, Game 3 is identical to Game 2. Hence,

AdvGame 3(𝒜)=1NP2Ns2AdvGame 2(𝒜).
Game 4.

The Game 4 challenger randomly chooses a pseudo-ephemeral value rU*~$q*, and computes the ephemeral key rU*$Enc(pU*,rU*~), in the target session.

We introduce an algorithm which is constructed using the adversary 𝒜, against the ϵ-pair-generation indistinguishability challenger (ϵ-PG). It receives a pair (rU*,rU*~) such that rU*~=Dec(sU*,rU*) and uses rU* as the ephemeral key of U* and rU*~ as the pseudo-ephemeral key of U* in the target session.

If a random ephemeral key rU*$q* is chosen first and the pseudo-ephemeral value rU*~Dec(sU*,rU*) is computed, then the simulation constructed by is identical to Game 3. Otherwise if a random pseudo-ephemeral value rU*~$q* is chosen first and the ephemeral key rU*$Enc(pU*,rU*~) is computed, then the simulation constructed by is identical to Game 4. If 𝒜 can distinguish the difference between Game 3 and Game 4, then can distinguish whether a message/ciphertext pair (m,c) belongs to the distribution D1 or D2 (ϵ-pair-generation indistinguishability challenge). The algorithm can answer all the adversarial queries allowed in this case, because it has all the long-term and ephemeral secret keys of the allowed queries. Hence,

|AdvGame 3(𝒜)-AdvGame 4(𝒜)|ϵ.
Game 5.

The Game 5 challenger randomly chooses a pseudo-ephemeral value rU*~$q*, and uses it as the pseudo-ephemeral value of U* in the target session.

We introduce an algorithm 𝒟 which is constructed using the adversary 𝒜, against the CPLA2 challenger. The algorithm 𝒟 uses the public-key of the CPLA2 challenger as the public key of the protocol principal U* and generates public/secret key pairs for all other protocol principals; 𝒟 generates signing/verification key pairs for every protocol principal. The algorithm 𝒟 picks two random strings r0,r1${0,1}k and passes them to the CPLA2 challenger. From the CPLA2 challenger, 𝒟 receives a challenge ciphertext C1 such that C1$Enc(pU*,rθ), where rθ=r0 or rθ=r1. The following describes the procedure of answering queries:

  1. 𝚂𝚎𝚗𝚍(U,V,s,m,𝐟) query: When U=U*, V=V* and s=s*, then 𝒟 takes r1 as rU*~, computes grU*~ and computes its signature using the signing key skU*. Then 𝒟 creates the protocol message and sends it to 𝒜 with the leakage 𝐟(sU*), where the leakage 𝐟(sU*) is obtained by accessing the leakage oracle of the CPLA2 challenger.

    For all other 𝚂𝚎𝚗𝚍 queries, 𝒟 can execute the protocol normally, because 𝒟 has all the public keys and can compute protocol messages accordingly. Except U*, 𝒟 can compute the leakage by its own; for U*, 𝒟 accesses the leakage oracle to obtain the leakage.

  2. 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s) query: The algorithm 𝒟 will abort if the query 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U*,V*,s*) or 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(V*,U*,t*) is asked. Then 𝒟 can easily compute the answers using the corresponding pseudo-ephemeral keys for other 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 queries.

  3. 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s) query: For the 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U*,V*,s*) query, 𝒟 uses C1 as the answer. For all other 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 queries 𝒟 will answer with the corresponding ephemeral-key which is computed by encrypting a pseudo-ephemeral value with the secret key of the corresponding principal.

  4. 𝙲𝚘𝚛𝚛𝚞𝚙𝚝(U) query: Except for U* and V*, the algorithm 𝒟 can answer all other 𝙲𝚘𝚛𝚛𝚞𝚙𝚝 queries. In this case we consider the situation in which the adversary corrupts neither owner or nor partner principal to the test session, so these exceptions will not occur.

  5. 𝚃𝚎𝚜𝚝(U,s) query: The algorithm 𝒟 will abort the game if the adversary issues a 𝚃𝚎𝚜𝚝 query other than 𝚃𝚎𝚜𝚝(U*,s*). To compute the answer to the 𝚃𝚎𝚜𝚝(U*,s*) query, the algorithm 𝒟 computes:

    1. If U* is the initiator, computes

      msKDF(XV*rU*~,,k,),KPRF(ms,U*XU*σU*V*XV*σV*),

      where rU*~=r1.

    2. If U* is the responder, computes

      msKDF(XV*rU*~,,k,),KPRF(ms,V*XV*σV*U*XU*σU*).

    Then using K answers the 𝚃𝚎𝚜𝚝 query.

If θ=1, then r1 is the decryption of C1 and the simulation constructed by 𝒟 is identical to Game 4 whereas if θ=0, then r0 is the decryption of C1 and the simulation constructed by 𝒟 is identical to Game 5. If 𝒜 can distinguish the difference between Game 4 and Game 5, then 𝒟 can be used against a CPLA2 challenger. Hence,

|AdvGame 4(𝒜)-AdvGame 5(𝒜)|AdvPKECPLA2(𝒟).
Game 6.

The Game 6 challenger randomly chooses a pseudo-ephemeral value rV*~$q*, and computes the ephemeral key rV*$Enc(pV*,rV*~) in the partner to the target session.

We introduce an algorithm which is constructed using the adversary 𝒜, against the ϵ-pair-generation indistinguishability challenger (ϵ-PG). The algorithm receives a pair (rV*,rV*~) such that rV*~=Dec(sV*,rV*) and uses rV* as the ephemeral key of V* and rV*~ as the pseudo-ephemeral key of V*.

If a random ephemeral key rV*$q* is chosen first and the pseudo-ephemeral value rV*~Dec(sV*,rV*) is computed, then the simulation constructed by is identical to Game 5. Otherwise if a random pseudo-ephemeral value rV*~$q* is chosen first and the ephemeral key rV*$Enc(pV*,rV*~) is computed, then the simulation constructed by is identical to Game 6. If 𝒜 can distinguish the difference between Game 5 and Game 6, then can distinguish whether a message/ciphertext pair (m,c) belongs to the distribution D1 or D2 (ϵ-pair-generation indistinguishability challenge). The algorithm can answer all the adversarial queries allowed in this case, because it has all the long-term and ephemeral secret keys of the allowed queries. Hence,

|AdvGame 5(𝒜)-AdvGame 6(𝒜)|ϵ.
Game 7.

The Game 7 challenger randomly chooses a pseudo-ephemeral value rV*~$q*, and uses it as the pseudo-ephemeral value of V* in the partner to the target session.

We introduce an algorithm 𝒟 which is constructed using the adversary 𝒜, against the CPLA2 challenger. The algorithm 𝒟 uses the public-key of the CPLA2 challenger as the public key of the protocol principal V* and generates public/secret key pairs for all other protocol principals. It generates signing/verification key pairs for every protocol principal. The algorithm 𝒟 picks two random strings r0,r1${0,1}k and passes them to the CPLA2 challenger. From the CPLA2 challenger, 𝒟 receives a challenge ciphertext C2 such that C2$Enc(pV*,rθ), where rθ=r0 or rθ=r1. The following describes the procedure of answering queries:

  1. 𝚂𝚎𝚗𝚍(U,V,s,m,𝐟) query: When U=V*, V=U* and s=t*, then 𝒟 takes r1 as rV*~, computes grV*~ and computes its signature using the signing key skV*. Then 𝒟 creates the protocol message and sends it to 𝒜 with the leakage 𝐟(sV*), where the leakage 𝐟(sV*) is obtained by accessing the leakage oracle of the CPLA2 challenger.

    For all other 𝚂𝚎𝚗𝚍 queries, 𝒟 can execute the protocol normally, because 𝒟 has all the public keys and can compute protocol messages accordingly. Except V*, 𝒟 can compute the leakage by its own; for V*, 𝒟 accesses the leakage oracle to obtain the leakage.

  2. 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s) query: The algorithm 𝒟 will abort if the query 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U*,V*,s*) or 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(V*,U*,t*) is asked. It can easily compute the answers using the corresponding pseudo-ephemeral keys for other 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 queries.

  3. 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s) query: For the 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(V*,U*,t*) query, 𝒟 uses C2 as the answer. For all other 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 queries 𝒟 will answer with the corresponding ephemeral-key which is computed by encrypting a pseudo-ephemeral value with the secret key of the corresponding principal.

  4. 𝙲𝚘𝚛𝚛𝚞𝚙𝚝(U) query: Except for U* and V*, the algorithm 𝒟 can answer all other 𝙲𝚘𝚛𝚛𝚞𝚙𝚝 queries. In this case we consider the situation in which the adversary corrupts neither owner or nor partner principal to the test session, so these exceptions will not occur.

  5. 𝚃𝚎𝚜𝚝(U,s) query: The algorithm 𝒟 will abort the game if the adversary issues a 𝚃𝚎𝚜𝚝 query other than 𝚃𝚎𝚜𝚝(U*,s*). To compute the answer to the 𝚃𝚎𝚜𝚝(U*,s*) query, the algorithm 𝒟 computes:

    1. If U* is the initiator, computes

      msKDF(XU*rV*~,,k,),KPRF(ms,U*XU*σU*V*XV*σV*).
    2. If U* is the responder,

      msKDF(XU*rV*~,,k,),KPRF(ms,V*XV*σV*U*XU*σU*).

    Then using K answers the 𝚃𝚎𝚜𝚝 query.

If θ=1, then r1 is the decryption of C2 and the simulation constructed by 𝒟 is identical to Game 6 whereas if θ=0, then r0 is the decryption of C2 and the simulation constructed by 𝒟 is identical to Game 7. If 𝒜 can distinguish the difference between Game 6 and Game 7, then 𝒟 can be used against a CPLA2 challenger. Hence,

|AdvGame 6(𝒜)-AdvGame 7(𝒜)|AdvPKECPLA2(𝒟).
Game 8.

The Game 8 challenger randomly chooses z$q* and computes the session key of the target session and its partner session, using the KDF and the PRF as msKDF(gz,,k,) and

KPRF(ms,U*XU*σU*V*XV*σV*)

when U* is the initiator or

KPRF(ms,V*XV*σV*U*XU*σU*)

when U* is the responder.

We construct an algorithm 𝒞 against the DDH challenge, using the adversary 𝒜. The DDH challenger sends values (X=gx,Y=gy,Z=gz) such that either z=xy or z$q*, as the inputs to the algorithm 𝒞. The algorithm 𝒞 uses the value X as the ephemeral public key of U* and Y as the ephemeral public key of V* in the test session, and computes the session key using Z as the input to the KDF in the session key derivation process.

If 𝒞’s input is a Diffie–Hellman triple, the simulation constructed by 𝒞 is identical to Game 7, otherwise it is identical to Game 8. If 𝒜 can distinguish whether gz=gxy or not, then 𝒞 can answer the DDH challenge. The algorithm 𝒞 can answer all the adversarial queries allowed in this case, because it has all the long-term and ephemeral secret keys of the allowed queries. In this case 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 query is not allowed to the target session and its partner. Hence,

|AdvGame 7(𝒜)-AdvGame 8(𝒜)|Advq,gDDH(𝒞).
Game 9.

The Game 9 challenger randomly chooses ms${0,1}k and computes the session key of the target session and its partner session, using the PRF as

KPRF(ms,U*XU*σU*V*XV*σV*)

when U* is the initiator or

KPRF(ms,V*XV*σV*U*XU*σU*)

when U* is the responder.

We construct an algorithm against a KDF challenger, using the adversary 𝒜. The KDF challenger sends a ms value which is either generated using the KDF or randomly chosen. Then uses the received ms value to compute the session key of the target session using the PRF.

If ms is computed using the KDF, the simulation constructed by is identical to Game 8, otherwise it is identical to Game 9. If 𝒜 can distinguish the difference between Game 8 and Game 9, then 𝒜 can be used as a subroutine of an algorithm , which is used to distinguish whether the ms value is computed using KDF or randomly chosen. The algorithm can answer all the adversarial queries allowed in this case, because it has all the long-term and ephemeral secret keys of the allowed queries. Hence,

|AdvGame 8(𝒜)-AdvGame 9(𝒜)|AdvKDF().
Game 10.

The Game 10 challenger randomly chooses K${0,1}k as session key of the target session and its partner session.

We construct an algorithm 𝒥 against an OraclePRF, using the adversary 𝒜. The OraclePRF sends a K value which is either generated using the PRF with a hidden key, or a random function. 𝒥 uses the received K as the session key of the target session.

If K is generated using the PRF with a hidden key, the simulation constructed by 𝒥 is identical to Game 9, otherwise it is identical to Game 10. If 𝒜 can distinguish the difference between Game 9 and Game 10, then 𝒜 can be used as a subroutine of an algorithm 𝒥, which is used to distinguish whether the OraclePRF is real or a random function. The algorithm 𝒥 can answer all the adversarial queries allowed in this case, because it has all the long-term and ephemeral secret keys of the allowed queries. Hence,

|AdvGame 9(𝒜)-AdvGame 10(𝒜)|AdvPRF(𝒥).
Semantic security of the session key in Game 10.

Since the session key K of ΠU*,V*s* is chosen randomly and independently from all other values, 𝒜 does not have any advantage in Game 10. Hence,

AdvGame 10(𝒜)=0.

We find

Advπ,Case 1.2𝝀-w()AFL-eCK(𝒜)NP2Ns2[(Advq,gDDH(𝒞)+AdvKDF()+AdvPRF(𝒥)+2AdvPKECPLA2(𝒟)+2ϵ)+1q].

Case 1.3: Adversary corrupts the partner, but not the owner to the test session

Game 1.

This game is the original game. When the 𝚃𝚎𝚜𝚝 query is asked, the Game 1 challenger chooses a random bit b${0,1}. If b=1, the real session key is given to 𝒜, otherwise a random value chosen from the same session key space is given. This is the original game. Hence,

AdvGame 1(𝒜)=Advπ,Case 1.3𝝀-w()AFL-eCK(𝒜).
Game 2.

Abort the simulation if there exists two sessions outputting the same ephemeral public keys (same X=gx values). Since the ephemeral keys are coming from q*, the total number of ephemeral keys are q. The total number of sessions in the simulation is NP2Ns2, because NP is the number of protocol principals and each protocol principal owns Ns number of sessions. Hence,

|AdvGame 1(𝒜)-AdvGame 2(𝒜)|NP2Ns2q.
Game 3.

Before 𝒜 begins, two distinct random principals U*,V*${U1,,UNP} are chosen and two random numbers s*,t*${1,,Ns} are chosen, where NP is the number of protocol principals and Ns is the number of sessions on a principal. The session ΠU*,V*s* is chosen as the target session and the session ΠV*,U*t* is chosen as the partner to the target session. If the test session is not the session ΠU*,V*s* or partner to the session is not ΠV*,U*t*, the Game 3 challenger aborts the game. Unless the incorrect choice happens, Game 3 is identical to Game 2. Hence,

AdvGame 3(𝒜)=1NP2Ns2AdvGame 2(𝒜).
Game 4.

The Game 4 challenger randomly chooses a pseudo-ephemeral value rU*~$q*, and computes the ephemeral key rU*$Enc(pU*,rU*~) in the target session.

We introduce an algorithm which is constructed using the adversary 𝒜, against the ϵ-pair-generation indistinguishability challenger (ϵ-PG). The algorithm receives a pair (rU*,rU*~) such that rU*~=Dec(sU*,rU*) and uses rU* as the ephemeral key of U* and rU*~ as the pseudo-ephemeral key of U* in the target session.

If a random ephemeral key rU*$q* is chosen first and the pseudo-ephemeral value rU*~Dec(sU*,rU*) is computed, then the simulation constructed by is identical to Game 3. Otherwise if a random pseudo-ephemeral value rU*~$q* is chosen first and the ephemeral key rU*$Enc(pU*,rU*~) is computed, then the simulation constructed by is identical to Game 4. If 𝒜 can distinguish the difference between Game 3 and Game 4, then can distinguish whether a message/ciphertext pair (m,c) belongs to the distribution D1 or D2 (ϵ-pair-generation indistinguishability challenge). can answer all the adversarial queries allowed in this case, because it has all the long-term and ephemeral secret keys of the allowed queries. Hence,

|AdvGame 3(𝒜)-AdvGame 4(𝒜)|ϵ.
Game 5.

The Game 5 challenger randomly chooses a pseudo-ephemeral value rU*~$q*, and uses it as the pseudo-ephemeral value of U* in the target session.

We introduce an algorithm 𝒟 which is constructed using the adversary 𝒜, against the CPLA2 challenger. The algorithm 𝒟 uses the public-key of the CPLA2 challenger as the public key of the protocol principal U* and generates public/secret key pairs for all other protocol principals. It generates signing/verification key pairs for every protocol principal. The algorithm 𝒟 picks two random strings r0,r1${0,1}k and passes them to the CPLA2 challenger. From the CPLA2 challenger, 𝒟 receives a challenge ciphertext C1 such that C1$Enc(pU*,rθ), where rθ=r0 or rθ=r1. The following describes the procedure of answering queries:

  1. 𝚂𝚎𝚗𝚍(U,V,s,m,𝐟) query: When U=U*, V=V* and s=s*, then 𝒟 takes r1 as rU*~, computes grU*~ and computes its signature using the signing key skU*. Then 𝒟 creates the protocol message and sends it to 𝒜 with the leakage 𝐟(sU*), where the leakage 𝐟(sU*) is obtained by accessing the leakage oracle of the CPLA2 challenger.

    For all other 𝚂𝚎𝚗𝚍 queries, 𝒟 can execute the protocol normally, because 𝒟 has all the public keys and can compute protocol messages accordingly. Except U*, 𝒟 can compute the leakage by its own; for U*, 𝒟 accesses the leakage oracle to obtain the leakage.

  2. 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s) query: The algorithm 𝒟 will abort if the query 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U*,V*,s*) or 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(V*,U*,t*) is asked. Then 𝒟 can easily compute the answers using the corresponding pseudo-ephemeral keys for other 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 queries.

  3. 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s) query: For the 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U*,V*,s*) query, 𝒟 uses C1 as the answer. For all other 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 queries 𝒟 will answer with the corresponding ephemeral-key which is computed by encrypting a pseudo-ephemeral value with the secret key of the corresponding principal.

  4. 𝙲𝚘𝚛𝚛𝚞𝚙𝚝(U) query: Except for U*, the algorithm 𝒟 can answer all other 𝙲𝚘𝚛𝚛𝚞𝚙𝚝 queries. In this case we consider the situation in which the adversary does not corrupt the partner to the test session, so these exceptions will not occur.

  5. 𝚃𝚎𝚜𝚝(U,s) query: The algorithm 𝒟 will abort the game if the adversary issues a 𝚃𝚎𝚜𝚝 query other than 𝚃𝚎𝚜𝚝(U*,s*). To compute the answer to the 𝚃𝚎𝚜𝚝(U*,s*) query, the algorithm 𝒟 computes:

    1. If U* is the initiator, computes

      msKDF(XV*rU*~,,k,),KPRF(ms,U*XU*σU*V*XV*σV*).
    2. If U* is the responder, computes

      msKDF(XV*rU*~,,k,),KPRF(ms,V*XV*σV*U*XU*σU*).

    Then using K answers the 𝚃𝚎𝚜𝚝 query.

If θ=1, then r1 is the decryption of C1 and the simulation constructed by 𝒟 is identical to Game 4 whereas if θ=0, then r0 is the decryption of C1 and the simulation constructed by 𝒟 is identical to Game 5. If 𝒜 can distinguish the difference between Game 4 and Game 5, then 𝒟 can be used against a CPLA2 challenger. Hence,

|AdvGame 4(𝒜)-AdvGame 5(𝒜)|AdvPKECPLA2(𝒟).
Game 6.

The Game 6 challenger randomly chooses z$q* and computes the session key of the target session and its partner session, using the KDF and the PRF as msKDF(gz,,k,) and

KPRF(ms,U*XU*σU*V*XV*σV*)

when U* is the initiator or

KPRF(ms,V*XV*σV*U*XU*σU*)

when U* is the responder.

We construct an algorithm 𝒞 against the DDH challenge, using the adversary 𝒜. The DDH challenger sends values (X=gx,Y=gy,Z=gz) such that either z=xy or z$q*, as the inputs to the algorithm 𝒞. The algorithm 𝒞 uses the value X as the ephemeral public key of U* and Y as the ephemeral public key of V* in the test session, and computes the session key using Z as the input to the KDF in the session key derivation process.

If 𝒞’s input is a Diffie–Hellman triple, the simulation constructed by 𝒞 is identical to Game 5, otherwise it is identical to Game 6. If 𝒜 can distinguish whether gz=gxy or not, then 𝒞 can answer the DDH challenge. The algorithm 𝒞 can answer all the adversarial queries allowed in this case, because it has all the long-term and ephemeral secret keys of the allowed queries. Hence,

|AdvGame 5(𝒜)-AdvGame 6(𝒜)|Advq,gDDH(𝒞).
Game 7.

The Game 7 challenger randomly chooses ms${0,1}k and computes the session key of the target session and its partner session, using the PRF as

KPRF(ms,U*XU*σU*V*XV*σV*)

when U* is the initiator or

KPRF(ms,V*XV*σV*U*XU*σU*)

when U* is the responder.

We construct an algorithm against a KDF challenger, using the adversary 𝒜. The KDF challenger sends a ms value which is either generated using the KDF or randomly chosen. It uses the received ms value to compute the session key of the target session using the PRF.

If ms is computed using the KDF, the simulation constructed by is identical to Game 6, otherwise it is identical to Game 7. If 𝒜 can distinguish the difference between Game 6 and Game 7, then 𝒜 can be used as a subroutine of an algorithm , which is used to distinguish whether the ms value is computed using KDF or randomly chosen. The algorithm can answer all the adversarial queries allowed in this case, because it has all the long-term and ephemeral secret keys of the allowed queries. Hence,

|AdvGame 6(𝒜)-AdvGame 7(𝒜)|AdvKDF().
Game 8.

The Game 8 challenger randomly chooses K${0,1}k as session key of the target session and its partner session.

We construct an algorithm 𝒥 against an OraclePRF, using the adversary 𝒜. The OraclePRF sends a K value which is either generated using the PRF with a hidden key, or a random function. The algorithm 𝒥 uses the received K as the session key of the target session.

If K is generated using the PRF with a hidden key, the simulation constructed by 𝒥 is identical to Game 7, otherwise it is identical to Game 8. If 𝒜 can distinguish the difference between Game 7 and Game 8, then 𝒜 can be used as a subroutine of an algorithm 𝒥, which is used to distinguish whether the OraclePRF is real or a random function. 𝒥 can answer all the adversarial queries allowed in this case, because it has all the long-term and ephemeral secret keys of the allowed queries. Hence,

|AdvGame 7(𝒜)-AdvGame 8(𝒜)|AdvPRF(𝒥).
Semantic security of the session key in Game 8.

Since the session key K of ΠU*,V*s* is chosen randomly and independently from all other values, 𝒜 does not have any advantage in Game 8. Hence,

AdvGame 8(𝒜)=0.

We find

Advπ,Case 1.3𝝀-w()AFL-eCK(𝒜)NP2Ns2[(Advq,gDDH(𝒞)+AdvKDF()+AdvPRF(𝒥)+AdvPKECPLA2(𝒟)+ϵ)+1q].

Case 1.4: Adversary corrupts the owner, but not the partner to the test session

Game 1.

This game is the original game. When the 𝚃𝚎𝚜𝚝 query is asked, the Game 1 challenger chooses a random bit b${0,1}. If b=1, the real session key is given to 𝒜, otherwise a random value chosen from the same session key space is given. This is the original game. Hence,

AdvGame 1(𝒜)=Advπ,Case 1.4𝝀-w()AFL-eCK(𝒜).
Game 2.

Abort the simulation if there exists two sessions outputting the same ephemeral public keys (same X=gx values). Since the ephemeral keys are coming from q*, the total number of ephemeral keys are q. The total number of sessions in the simulation is NP2Ns2, because NP is the number of protocol principals and each protocol principal owns Ns number of sessions. Hence,

|AdvGame 1(𝒜)-AdvGame 2(𝒜)|NP2Ns2q.
Game 3.

Before 𝒜 begins, two distinct random principals U*,V*${U1,,UNP} are chosen and two random numbers s*,t*${1,,Ns} are chosen, where NP is the number of protocol principals and Ns is the number of sessions on a principal. The session ΠU*,V*s* is chosen as the target session and the session ΠV*,U*t* is chosen as the partner to the target session. If the test session is not the session ΠU*,V*s* or partner to the session is not ΠV*,U*t*, the Game 3 challenger aborts the game. Unless the incorrect choice happens, Game 3 is identical to Game 2. Hence,

AdvGame 3(𝒜)=1NP2Ns2AdvGame 2(𝒜).
Game 4.

The Game 4 challenger randomly chooses a pseudo-ephemeral value rV*~$q*, and computes the ephemeral key rV*$Enc(pV*,rV*~), in the partner to the target session.

We introduce an algorithm which is constructed using the adversary 𝒜, against the ϵ-pair-generation indistinguishability challenger (ϵ-PG). The algorithm receives a pair (rV*,rV*~) such that rV*~=Dec(sV*,rV*) and uses rV* as the ephemeral key of V* and rV*~ as the pseudo-ephemeral key of V* in the partner to the target session.

If a random ephemeral key rV*$q* is chosen first and the pseudo-ephemeral value rV*~Dec(sV*,rV*) is computed, then the simulation constructed by is identical to Game 3. Otherwise if a random pseudo-ephemeral value rV*~$q* is chosen first and the ephemeral key rV*$Enc(pV*,rV*~) is computed, then the simulation constructed by is identical to Game 4. If 𝒜 can distinguish the difference between Game 3 and Game 4, then can distinguish whether a message/ciphertext pair (m,c) belongs to the distribution D1 or D2 (ϵ-pair-generation indistinguishability challenge). can answer all the adversarial queries allowed in this case, because it has all the long-term and ephemeral secret keys of the allowed queries. Hence,

|AdvGame 3(𝒜)-AdvGame 4(𝒜)|ϵ.
Game 5.

The Game 5 challenger randomly chooses a pseudo-ephemeral value rV*~$q*, and uses it as the pseudo-ephemeral value of V* in the partner to the target session.

We introduce an algorithm 𝒟 which is constructed using the adversary 𝒜, against the CPLA2 challenger. The algorithm 𝒟 uses the public-key of the CPLA2 challenger as the public key of the protocol principal V* and generates public/secret key pairs for all other protocol principals. It generates signing/verification key pairs for every protocol principal. The algorithm 𝒟 picks two random strings r0,r1${0,1}k and passes them to the CPLA2 challenger. From the CPLA2 challenger, 𝒟 receives a challenge ciphertext C2 such that C2$Enc(pV*,rθ), where rθ=r0 or rθ=r1. The following describes the procedure of answering queries:

  1. 𝚂𝚎𝚗𝚍(U,V,s,m,𝐟) query: When U=V*, V=U* and s=t*, then 𝒟 takes r1 as rV*~, computes grV*~ and computes its signature using the signing key skV*. Then 𝒟 creates the protocol message and sends it to 𝒜 with the leakage 𝐟(sV*), where the leakage 𝐟(sV*) is obtained by accessing the leakage oracle of the CPLA2 challenger.

    For all other 𝚂𝚎𝚗𝚍 queries, 𝒟 can execute the protocol normally, because 𝒟 has all the public keys and can compute protocol messages accordingly. Except V*, 𝒟 can compute the leakage by its own; for V*, 𝒟 accesses the leakage oracle to obtain the leakage.

  2. 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s) query: The algorithm 𝒟 will abort if the query 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U*,V*,s*) or 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(V*,U*,t*) is asked. Then 𝒟 can easily compute the answers using the corresponding pseudo-ephemeral keys for other 𝚂𝚎𝚜𝚜𝚒𝚘𝚗𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 queries.

  3. 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(U,V,s) query: For the 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕(V*,U*,t*) query, 𝒟 uses C2 as the answer. For all other 𝙴𝚙𝚑𝚎𝚖𝚎𝚛𝚊𝚕𝙺𝚎𝚢𝚁𝚎𝚟𝚎𝚊𝚕 queries 𝒟 will answer with the corresponding ephemeral-key which is computed by encrypting a pseudo-ephemeral value with the secret key of the corresponding princip