Public-Key Cryptosystems Resilient to Key Leakage - Moni Naor & Gil Segev

44
Public-Key Cryptosystems Resilient to Key Leakage Moni Naor Gil Segev Abstract Most of the work in the analysis of cryptographic schemes is concentrated in abstract ad- versarial models that do not capture side-channel attacks. Such attacks exploit various forms of unintended information leakage, which is inherent to almost all physical implementations. Inspired by recent side-channel attacks, especially the “cold boot attacks” of Halderman et al. (USENIX Security ’08), Akavia, Goldwasser and Vaikuntanathan (TCC ’09) formalized a realistic framework for modeling the security of encryption schemes against a wide class of side- channel attacks in which adversarially chosen functions of the secret key are leaked. In the setting of public-key encryption, Akavia et al. showed that Regev’s lattice-based scheme (STOC ’05) is resilient to any leakage of L/polylog(L) bits, where L is the length of the secret key. In this paper we revisit the above-mentioned framework and our main results are as follows: We present a generic construction of a public-key encryption scheme that is resilient to key leakage from any hash proof system. The construction does not rely on additional computational assumptions, and the resulting scheme is as efficient as the underlying hash proof system. Existing constructions of hash proof systems imply that our construc- tion can be based on a variety of number-theoretic assumptions, including the decisional Diffie-Hellman assumption (and its progressively weaker d-Linear variants), the quadratic residuosity assumption, and Paillier’s composite residuosity assumption. We construct a new hash proof system based on the decisional Diffie-Hellman assumption (and its d-Linear variants), and show that the resulting scheme is resilient to any leakage of L(1 o(1)) bits. In addition, we prove that the recent scheme of Boneh et al. (CRYPTO ’08), constructed to be a “circular-secure” encryption scheme, fits our generic approach and is also resilient to any leakage of L(1 o(1)) bits. We extend the framework of key leakage to the setting of chosen-ciphertext attacks. On the theoretical side, we prove that the Naor-Yung paradigm is applicable in this setting as well, and obtain as a corollary encryption schemes that are CCA2-secure with any leakage of L(1 o(1)) bits. On the practical side, we prove that variants of the Cramer- Shoup cryptosystem (along the lines of our generic construction) are CCA1-secure with any leakage of L/4 bits, and CCA2-secure with any leakage of L/6 bits. A preliminary version of this work appeared in Advances in Cryptology – CRYPTO ’09, pages 18–35, 2009. Incumbent of the Judith Kleeman Professorial Chair, Department of Computer Science and Applied Mathematics, Weizmann Institute of Science, Rehovot 76100, Israel. Email: [email protected]. Research supported in part by a grant from the Israel Science Foundation. Microsoft Research, Mountain View, CA 94043, USA. Email: [email protected]. This work was com- pleted while the author was a Ph.D. student at the Weizmann Institute of Science, and supported by the Adams Fellowship Program of the Israel Academy of Sciences and Humanities.

description

Resiliência de sistemas de chave pública.

Transcript of Public-Key Cryptosystems Resilient to Key Leakage - Moni Naor & Gil Segev

  • Public-Key Cryptosystems Resilient to Key Leakage

    Moni Naor Gil Segevy

    Abstract

    Most of the work in the analysis of cryptographic schemes is concentrated in abstract ad-versarial models that do not capture side-channel attacks. Such attacks exploit various formsof unintended information leakage, which is inherent to almost all physical implementations.Inspired by recent side-channel attacks, especially the \cold boot attacks" of Halderman etal. (USENIX Security '08), Akavia, Goldwasser and Vaikuntanathan (TCC '09) formalized arealistic framework for modeling the security of encryption schemes against a wide class of side-channel attacks in which adversarially chosen functions of the secret key are leaked. In thesetting of public-key encryption, Akavia et al. showed that Regev's lattice-based scheme (STOC'05) is resilient to any leakage of L=polylog(L) bits, where L is the length of the secret key.

    In this paper we revisit the above-mentioned framework and our main results are as follows:

    We present a generic construction of a public-key encryption scheme that is resilient tokey leakage from any hash proof system. The construction does not rely on additionalcomputational assumptions, and the resulting scheme is as ecient as the underlyinghash proof system. Existing constructions of hash proof systems imply that our construc-tion can be based on a variety of number-theoretic assumptions, including the decisionalDie-Hellman assumption (and its progressively weaker d-Linear variants), the quadraticresiduosity assumption, and Paillier's composite residuosity assumption.

    We construct a new hash proof system based on the decisional Die-Hellman assumption(and its d-Linear variants), and show that the resulting scheme is resilient to any leakageof L(1o(1)) bits. In addition, we prove that the recent scheme of Boneh et al. (CRYPTO'08), constructed to be a \circular-secure" encryption scheme, ts our generic approachand is also resilient to any leakage of L(1 o(1)) bits.

    We extend the framework of key leakage to the setting of chosen-ciphertext attacks. Onthe theoretical side, we prove that the Naor-Yung paradigm is applicable in this settingas well, and obtain as a corollary encryption schemes that are CCA2-secure with anyleakage of L(1 o(1)) bits. On the practical side, we prove that variants of the Cramer-Shoup cryptosystem (along the lines of our generic construction) are CCA1-secure withany leakage of L=4 bits, and CCA2-secure with any leakage of L=6 bits.

    A preliminary version of this work appeared in Advances in Cryptology { CRYPTO '09, pages 18{35, 2009.Incumbent of the Judith Kleeman Professorial Chair, Department of Computer Science and Applied Mathematics,

    Weizmann Institute of Science, Rehovot 76100, Israel. Email: [email protected]. Research supported inpart by a grant from the Israel Science Foundation.

    yMicrosoft Research, Mountain View, CA 94043, USA. Email: [email protected]. This work was com-pleted while the author was a Ph.D. student at the Weizmann Institute of Science, and supported by the AdamsFellowship Program of the Israel Academy of Sciences and Humanities.

  • Contents

    1 Introduction 21.1 Overview of Our Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2 Related and Subsequent Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.3 Paper Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

    2 Preliminaries, Assumptions, and Tools 72.1 Computational Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.2 Randomness Extraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.3 Hash Proof Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

    3 Modeling Key-Leakage Attacks 113.1 Chosen-Plaintext Key-Leakage Attacks . . . . . . . . . . . . . . . . . . . . . . . . . . 113.2 Chosen-Ciphertext Key-Leakage Attacks . . . . . . . . . . . . . . . . . . . . . . . . . 123.3 Weak Key-Leakage Attacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

    4 A Generic Construction from Hash Proof Systems 134.1 The Construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144.2 Example: A DDH-Based Instantiation . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    5 Improved Resilience Based on DDH and d-Linear 165.1 Proposal 1: A New Hash Proof System . . . . . . . . . . . . . . . . . . . . . . . . . . 165.2 Proposal 2: The BHHO Scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

    6 Protecting Against Chosen-Ciphertext Key-Leakage Attacks 196.1 A Generic Construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196.2 An Ecient CCA1-Secure Scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246.3 An Ecient CCA2-Secure Scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

    7 Protecting Against Generalized Forms of Key-Leakage Attacks 317.1 Noisy Leakage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317.2 Leakage of Intermediate Values from the Key-Generation Process . . . . . . . . . . . 327.3 Keys Generated using Weak Random Sources . . . . . . . . . . . . . . . . . . . . . . 337.4 Leakage of Intermediate Values from the Decryption Process . . . . . . . . . . . . . 34

    8 Protecting Against Weak Key-Leakage Attacks 34

    9 Concluding Remarks and Open Problems 36

    References 37

    A The Matrix d-Linear Assumption 42

    1

  • 1 Introduction

    Proving the security of a cryptographic scheme consists of two main ingredients: (1) an adversarialmodel specifying the adversarial access to the system and the adversary's computational capabilities,and (2) a notion of security specifying what it means to \break" the security of the scheme.Whereas notions of security have signicantly evolved over the years (following the seminal workof Goldwasser and Micali [31]), the vast majority of cryptographic schemes are still analyzed inthe \standard" adversarial model. This is an abstract model in which the parties are viewed asinteractive Turing machines, each party has its own secret memory, private source of random bits,and so on. In this model the adversarial access is well dened, and although the model seemsrather limited, it nevertheless captures many realistic attacks. In real life, however, almost anyphysical implementation leaks additional information. Any such information that is not capturedby the standard model is referred to as a side channel; typical examples include electromagneticmeasurements, detection of internal faults, timing information, and many more. Over the yearsside-channel attacks exposed crucial vulnerabilities of schemes that are considered secure in thestandard model (see, for example, [6, 9, 49, 50]).

    Countermeasures for protecting against side-channel attacks follow two complementing ap-proaches. The rst approach is to make the physical world similar to the standard model bypreventing unintended leakage of information (e.g., building \tamper-proof" devices, minimizingelectromagnetic noise, and more). This approach is typically rather inecient and expensive, andis even impossible in some cases. The second approach is to design systems that are robust to mod-ications of the standard model. This approach mainly includes protecting against side-channelattacks by modeling them, as much as possible, using abstract notions of computation.

    Physically observable cryptography. In their pioneering work, Micali and Reyzin [55] putforward a comprehensive framework for modeling security against side-channel attacks. Theirframework captures any such attack in which leakage of information occurs as a result of computa-tion. The framework relies on the basic assumption that only computation leaks information, thatis, there is no leakage of information in the absence of computation. This assumption has led to theconstruction of various cryptographic primitives that are resilient to such \computational" leakage(see, for example, [26, 34, 55, 58, 59]).

    Key-leakage attacks. Recently, Halderman et al. [36] presented a suite of attacks that violatethe basic assumption underlying the framework of Micali and Reyzin. Halderman et al. showedthat, contrary to popular assumptions, a computer's memory is not erased when it loses power.They demonstrated that ordinary DRAMs typically lose their contents gradually over a periodof seconds, and that residual data can be recovered using simple, non-destructive techniques thatrequire only momentary physical access to the machine. Halderman et al. presented attacks thatexploit DRAM remanence eects for recovering cryptographic keys that are held in memory. Specif-ically, their \cold boot" attacks showed that a signicant fraction of the bits of a cryptographickey can be recovered if the key is ever stored in memory. Halderman et al. managed to completelycompromise the security of several popular disk encryption systems (including BitLocker, True-Crypt, and FileVault), and to reconstruct DES, AES, and RSA keys (see also the improvementsand further analysis of Heninger and Shacham [38]).

    Inspired by the cold boot attacks, Akavia, Goldwasser and Vaikuntanathan [2] formalized ageneral framework for modeling \memory attacks" in which adversarially chosen functions of thesecret key are leaked in an adaptive fashion, with the only restriction that the total amount ofleakage is bounded. Akavia et al. showed that the lattice-based public-key encryption scheme

    2

  • of Regev [60] and the identity-based encryption of Gentry, Peikert, and Vaikuntanathan [29] areresilient to such leakage.

    Our contributions. In this work we revisit the framework of key-leakage attacks introduced byAkavia et al. in the setting of public-key encryption. We present a generic construction of a public-key encryption scheme that is resilient to key leakage, and show that the construction can be basedon a variety of number-theoretic assumptions. Moreover, we demonstrate that our approach leadsto encryption schemes that are both resilient to signicantly large amounts of leakage, and that areecient and can be used in practice (see, in particular, the instantiation in Section 4.2 that is basedon the decisional Die-Hellman assumption). In addition, we extend the framework of key-leakageattacks to the setting of chosen-ciphertext security. We present both a generic transformation fromchosen-plaintext security to chosen-ciphertext security in the context of key-leakage attacks, andecient schemes that are based on specic number-theoretic assumptions. Finally, we introduceseveral generalizations of this framework that capture wider and more realistic classes of side-channel attacks. In particular, these generalizations capture a setting in which the leakage is notnecessarily a deterministic function with bounded output length that is applied only to the secretkey.

    1.1 Overview of Our Results

    In what follows we present a more elaborated exposition of our results, but rst, we briey describethe framework introduced by Akavia et al. and their results. Informally, an encryption scheme isresilient to key-leakage attacks if it is semantically secure even when the adversary obtains partialinformation on the secret key of the scheme. This is modeled by providing the adversary withaccess to a leakage oracle: the adversary can query the oracle with any function f , and then receivef(sk), where sk is the secret key (we note that the leakage functions can be chosen dependingon the public key, which is known to the adversary). The adversary can query the leakage oracleadaptively, with only one restriction: the sum of output lengths of all the leakage functions hasto be bounded by a predetermined parameter (clearly, has to be less than the length of thesecret key)1. A formal denition is provided in Section 3. In the setting of public-key encryption,Akavia et al. showed that Regev's public-key encryption scheme [60] is resilient to any such leakageof length at most L=polylog(L) bits, where L is the length of the secret key (see improvements tothe allowed amount of leakage in the full version of their paper). We are now ready to describe ourresults.

    A generic construction. We present a generic construction of a public-key encryption schemethat is resilient to key leakage from any hash proof system, a very useful primitive introducedby Cramer and Shoup [15] for protecting against chosen-ciphertext attacks. The constructiondoes not rely on additional computational assumptions, and the resulting scheme is as ecient asthe underlying hash proof system. Existing constructions of hash proof systems (see, for example,[15, 48, 64]) imply that our construction can be based on a variety of number-theoretic assumptions,including the decisional Die-Hellman (DDH) assumption and its progressively weaker d-Linearvariants, the quadratic residuosity assumption, and Paillier's composite residuosity assumption.Informally, a natural approach for protecting against bounded key leakage is to add redundancy tothe secret key (i.e., any public key corresponds to many secret keys). This way any bounded-length

    1Akavia et al. refer to such attacks as adaptive memory attacks. They also dene the notion of non-adaptivememory attacks which we discuss later on.

    3

  • function of the secret key still keeps many possibilities for the actual secret key. In our genericconstruction we show that hash proof systems yield a convenient method for realizing this approach.

    We then emphasize a specic instantiation with a simple and ecient DDH-based hash proofsystem. The resulting encryption scheme is resilient to any leakage of L(1=2 o(1)) bits, where Lis the length of the secret key. Although one can instantiate our construction with any hash proofsystem, we nd this specic instantiation rather elegant (we refer the reader to Section 4.2).

    Improved key-leakage resilience. We propose two public-key encryption schemes that areresilient to any key leakage of L(1 o(1)) bits, where L is the length of the secret key. Ourproposals are based on the observation that our generic construction from hash proof systems canin fact be based on hash proof systems with a slightly weaker property. When viewing hash proofsystems as key-encapsulation mechanisms, this relaxed property enables us to achieve essentiallythe best possible ratio between the length of the secret key and the length of the encapsulatedsymmetric key. This ratio translates to the relative amount of key leakage to which the resultingencryption schemes are resilient2.

    For our rst proposal we construct a new hash proof system based on the decisional Die-Hellman assumption (and more generally, on any of the d-Linear assumptions). The resultingencryption scheme is then obtained by instantiating our generic construction with this hash proofsystem. For our second proposal, we show the recent \circular-secure" encryption scheme of Bonehet al. [10] ts into our generic approach using a dierent hash proof system3.

    Chosen-ciphertext security. We extend the framework of key leakage to the setting of chosen-ciphertext security. Technically, this is a natural extension by providing the adversary with accessto both a leakage oracle and a decryption oracle. On the theoretical side, we show that the Naor-Yung \double encryption" paradigm [24, 57] can be used as a general transformation from chosen-plaintext security to chosen-ciphertext security in the presence of key leakage. As an immediatecorollary of our above-mentioned results, we obtain a scheme that is CCA2-secure with any leakageof L(1 o(1)) bits, where L is the length of the secret key.

    The schemes resulting from the Naor-Yung paradigm are rather inecient due to the usageof generic non-interactive zero-knowledge proofs. To complement this situation, on the practicalside, we prove that variants of the Cramer-Shoup cryptosystem [16] (along the lines of our generictransformation from hash proof systems) are CCA1-secure with any leakage of L(1=4 o(1)) bits,and CCA2-secure with any leakage of L(1=6 o(1)) bits.

    A more general framework for modeling key leakage. We introduce several generalizationsof the key-leakage framework of Akavia et al. [2] that enable to capture wider and more realisticclasses of side-channel attacks. For example, the schemes that result from our generic constructionare secure even if the leakage functions chosen by the adversary are applied to the random bitsused by the key generation algorithm. This guarantee is crucial when intermediate values from

    2We do not argue that such a relaxation is in fact necessary for achieving the optimal ratio.3A public-key encryption scheme is \circular secure" if it is semantically secure even against an adversary that

    may obtain encryptions of the secret key of the scheme. More generally, this extends to considering k 1 pairs of keys(sk0; pk0); : : : ; (skk1; pkk1) with various circular encryption structures. These include, for example, an encryptioncycle where each pki is used for encrypting ski+1 mod k, or an encryption clique where each pki is used for encryptingall skj 's. Circular security is a particular form of the more general notion of \key-dependent security" [7] in which anadversary may obtain encryptions of messages that depend on the secret key of the scheme, where the dependencycan be chosen adversarially. The scheme of Boneh et al. in fact satises this more general notion with respect to theclass of all ane functions.

    4

  • the process of generating the keys may be leaked, since it is typically rather expensive or evenimpossible to make sure that all intermediate values are always erased4. In addition, we considerseveral other generalizations of the framework of Akavia et al. that are satised by our schemes.These include a scenario in which the adversary obtains a noisy version of all of the memory as inthe attack of Halderman et al. (i.e., the leakage may be as long as the whole memory and not ofbounded length), a scenario in which there is no explicit leakage function but the keys are generatedusing a weak random source, and a scenario in which partial results of the decryption process areleaked.

    \Weak" key-leakage security. Akavia et al. also considered the following weaker notion of keyleakage (which they refer to as \non-adaptive" leakage): a leakage function f with output length is chosen by the adversary ahead of time (without any knowledge of the public key), and thenthe adversary is given (pk; f(sk)). That is, in a \weak" key-leakage attack the leakage function fis chosen independently of pk. Akavia et al. proved that Regev's encryption scheme is resilient toany weak key leakage of L(1 o(1)) bits.

    Although this notion of key leakage seems rather limited, it still captures many realistic attacksin which the leakage does not depend on the parameters of the encryption scheme. Specically,this notion captures the cold boot attack of Halderman et al. [36], in which the leakage dependsonly on the properties of the hardware devices that are used for storing the secret key.

    For weak key-leakage attacks we present a generic construction that transforms any encryptionscheme to one that is resilient to any weak leakage of L(1 o(1)) bits, where L is the length of thesecret key. The resulting scheme is essentially as ecient as the original one, and does not rely onadditional computational assumptions. Our approach crucially relies on the fact that the leakageis independent of the public key. One may interpret our construction as evidence to the deciencyof this weaker notion of key-leakage attacks.

    1.2 Related and Subsequent Work

    Extensive work has been devoted for protecting against side-channel attacks, and for exploitingside-channels to compromise the security of cryptographic schemes. We focus here on the resultsthat are most relevant to our work. Already in 1985 Rivest and Shamir [61] introduced a modelfor leakage attacks in the context of factoring. They considered a scenario in which an adversaryis interested in factoring an n-bit modulus N = PQ, and is allowed to ask a certain number ofarbitrary \Yes/No" questions. Rivest and Shamir asked the following question: how many questionsare needed in order to factor N in polynomial time? Clearly, if the adversary is allowed to ask aboutn=2 questions, then the binary representation of P can be fully revealed. Rivest and Shamir showedan attack that requires only n=3 questions. Specically, in their attack the adversary requests thetop n=3 bits of P . This was later improved by Maurer [54] who showed that n questions aresucient, for any constant > 0.

    Exposure-resilient cryptography. Canetti et al. [14] introduced the notion of exposure-resilientcryptographic primitives, which remain secure even if an adversary is able to learn some individualbits of the secret key of the primitive. They introduced the notion of an exposure-resilient function:

    4We note that it is not clear that Regev's scheme is resilient to leakage of intermediate key-related values, or atleast, the proof of security of Akavia et al. does not seem to generalize to this setting. The main reason is that theirproof of security involves an indistinguishability argument over the public key, and an adversary that has access tothe randomness of the key generation algorithm (via leakage queries) can identify that the public key was not sampledfrom its specied distribution.

    5

  • a deterministic function whose output appears random even if almost all the bits of the input areknown (see also [22, 45]). Ishai et al. [41, 42] considered the seemingly more general problem ofprotecting privacy in secure computation of circuits, where the adversary can access a boundednumber of wires in the circuit. A similar problem was recently studied by Faust et at. [28], wherethe adversary can observe low-complexity or noisy functions of all of the wires.

    The \only computation leaks information" framework. Dziembowski and Pietrzak [26]and Pietrzak [59] introduced a general framework for leakage-resilient cryptography, following theassumption of Micali and Reyzin that only computation leaks information. Their main contri-butions are constructions of leakage-resilient stream-ciphers. Informally, their model considerscryptographic primitives that proceed in rounds, and update their internal state after each round.In each round, the adversary can obtain bounded leakage information only from the portions ofmemory that were accessed during that round. Additional work in this model include a leakage-resilient signature scheme by Faust et al. [27], and general leakage-resilient compilers that assumeleak-free hardware components by Juma and Vahlis [44] and by Goldwasser and Rothblum [32].We note that on one hand this framework only imposes a bound on the amount of informationthat is leaked in every round or invocation, but not on the overall amount of leakage. On the otherhand, however, it does not capture attacks where all memory contents may leak, even parts thatwere not accessed, as in the attack of Halderman et al. [36] and as considered in this paper.

    The auxiliary input model. Whereas in this paper we consider key leakage of bounded length(or, more generally, impose a min-entropy requirement on the secret key given the leakage), a moregeneral model is obtained by only assuming that the secret key cannot be eciently recoveredgiven the leakage. This approach was put forward by Dodis, Tauman Kalai, and Lovett [23] whostudied the security of symmetric-key encryption schemes in the presence of leakage of the formf(sk), where sk is the secret key and f is any exponentially-hard one-way function. On one handthey do not impose any restriction on the min-entropy of the secret key given the leakage, but onthe other hand, they require that the leakage is a function that is extremely hard to invert. Dodiset al. introduced a new computational assumption that is a generalization of learning parity withnoise, and constructed symmetric-key encryption schemes that are resilient to any key leakage thatis exponentially hard to invert.

    In a concurrent and independent work to ours, Tauman Kalai and Vaikuntanathan [66] consid-ered leakage of hard-to-invert functions in the setting of public-key encryption. Their main resultis that the circular-secure encryption scheme of Boneh et al. [10] is resilient not only to boundedkey leakage, but also to any leakage that is a sub-exponentially hard to invert (as a function of thesecret key). In addition, they proved that the Naor-Yung paradigm can be used to achieve chosen-ciphertext security in the setting of key leakage, and their construction and proof of security areessentially identical to ours. Their work was eventually published as [17] and included also variousother schemes that are secure in this sense without assuming sub-exponential hardness. Leakage ofhard-to-invert functions was also studied by Goldwasser et al. [33] who constructed a symmetric-keyencryption scheme which has the featured that it is parameterized only by the security parameterand not by the leakage parameter. That is, the amount of leakage does not have to be specied inadvance, and the security of the scheme degrades as the amount of leakage increases.

    Subsequent work on key-leakage attacks. The model considered in this paper has recentlyserved as a basis for various studies of leakage-resilient cryptographic primitives. Leakage-resilientsignature schemes were constructed by Katz and Vaikuntanathan [46], and by Alwen, Dodis and

    6

  • Wichs [4] who constructed also identication schemes and authenticated key-agreement protocols.In addition, Boyle, Segev, and Wichs [11] recently showed that it is possible to construct signatureschemes in this model that are resilient to leakage that can even depend on the entire secret stateof the signer, which includes both the signing key and the randomness used to for signing messages.

    Our approach of using hash-proof systems was generalized by Alwen et al. [3] who constructedvarious identity-based encryption schemes that are resilient to key leakage. The works of [4] and[3] also constructed cryptographic schemes in the bounded-retrieval model, where the eciency ofthe schemes do not degrade (as much as possible) in a way that is proportional to the amount ofleakage as in prior proposals.

    Additional eciency improvements and schemes that are based on specic number-theoreticassumptions were proposed by Dodis et al. [19] (see also the related survey [5]). Specically, in apreliminary version of this work we posed the open problem of constructing a practical CCA-securescheme that is resilient to any leakage of L(1 o(1)) bits. This problem was solved by Dodis etal. [19] who showed that our generic construction in the Naor-Yung paradigm can be made ratherecient. We note that another possible approach might be to examine recent renements of theCramer-Shoup cryptosystem [1, 48, 51]).

    Our approach was also used by Lyubashevsky, Palacio and Segev [53] who constructed a leakage-resilient public-key encryption scheme based on the hardness of the subset-sum problem [40], andby Brakerski and Goldwasser [12] who constructed a leakage-resilient public-key encryption schemebased on the hardness of the quadratic residuosity problem.

    1.3 Paper Organization

    The remainder of the paper is organized as follows. In Section 2 we present some basic notions,as well as several tools that are used in our constructions. In Section 3 we formally describe theframework of key-leakage attacks, and extend it to the setting of chosen-ciphertext attacks. InSection 4 we present our generic construction from hash proof systems, and provide a simple andecient instantiation. In Section 5 we present our two proposals that are resilient to any key leakageof L(1 o(1)) bits. In Section 6 we present encryption schemes that are secure against chosen-ciphertext key-leakage attacks. In Section 7 we discuss several generalizations of the framework ofkey leakage that are satised by our schemes. In Section 8 we present a generic construction forprotecting against weak key-leakage attacks. In Section 9 we present several concluding remarksand open problems. In Appendix A we introduce the matrix d-Linear assumption (a generalizationof the matrix DDH assumption introduced by Boneh et al. [10]) on which we base our new hashproof system in Section 5, and prove that it is implied by the d-Linear assumption.

    2 Preliminaries, Assumptions, and Tools

    In this section we present some basic notions, denitions, and tools that are used in our construc-tions. We formally state the decisional Die-Hellman and the d-Linear assumptions, and presentthe notions of an average-case strong extractor and hash proof systems.

    2.1 Computational Assumptions

    Let GroupGen be a probabilistic polynomial-time algorithm that takes as input a security parameter1n, and outputs a triplet (G; q; g) where G is a group of order q that is generated by g 2 G, and qis an n-bit prime number.

    7

  • The decisional Die-Hellman assumption. The decisional Die-Hellman (DDH) assump-tion is that the ensembles f(G; g1; g2; gr1; gr2)gn2N and f(G; g1; g2; gr11 ; gr22 )gn2N are computationallyindistinguishable, where (G; q; g) GroupGen(1n), and the elements g1; g2 2 G and r; r1; r2 2 Zqare chosen independently and uniformly at random.

    The d-Linear assumption. Boneh, Boyen, and Shacham [8] introduced the Linear assumption,intended to take the place of DDH in groups where DDH is easy (specically, in bilinear groups).They showed that the hardness of DDH implies that hardness of Linear, but at least in genericgroups (see, for example, [43, 65]), Linear remains hard even if DDH is easy. The DDH and Linearassumptions naturally generalize to the family of d-Linear assumptions [47, 64], where for everyd 1 the d-Linear assumption is that the ensembles

    G; g1; : : : ; gd; gd+1; gr11 ; : : : ; grdd ; g

    Pdi=1 ri

    d+1

    n2N

    G; g1; : : : ; gd; gd+1; gr11 ; : : : ; grdd ; g

    rd+1d+1

    n2N ;

    are computationally indistinguishable, where (G; q; g) GroupGen(1n), and the elements g1; : : : ;gd+1 2 G and r1; : : : ; rd+1 2 Zq are chosen independently and uniformly at random.

    Note that DDH is the 1-Linear assumption, and that Linear is the 2-Linear assumption. Theseassumptions are progressively weaker: the hardness of d-Linear implies the hardness of (d + 1)-Linear, but in generic groups (d+ 1)-Linear remains hard even if d-Linear is easy.

    2.2 Randomness Extraction

    The statistical distance between two random variablesX and Y over a nite domain is SD(X;Y ) =12

    P!2 jPr [X = !]Pr [Y = !] j. We say that two variables are -close if their statistical distance

    is at most . The min-entropy of a random variable X is H1 (X) = log(maxx Pr [X = x]).Dodis et al. [21] formalized the notion of average min-entropy that captures the remaining

    unpredictability of a random variable X conditioned on the value of a random variable Y , formallydened as follows: eH1 (XjY ) = log Ey Y h2H1(XjY=y)i :The average min-entropy corresponds exactly to the optimal probability of guessingX, given knowl-edge of Y . The following bound on average min-entropy was proved in [21]:

    Lemma 2.1 ([21]). If Y has 2r possible values and Z is any random variable, then eH1 (Xj(Y;Z)) H1 (XjZ) r.

    A main tool in our constructions in this paper is a strong randomness extractor. The followingdenition naturally generalizes the standard denition of a strong extractor to the setting of averagemin-entropy:

    Denition 2.2 ([21]). A function Ext : f0; 1gn f0; 1gt ! f0; 1gm is an average-case (k; )-strongextractor if for all pairs of random variables (X; I) such that X 2 f0; 1gn and eH1 (XjI) k itholds that

    SD ((Ext(X;S); S; I); (Um; S; I)) ;where S is uniform over f0; 1gt.

    Dodis et al. proved that any strong extractor is in fact an average-case strong extractor, for anappropriate setting of the parameters:

    8

  • Lemma 2.3 ([21]). For any > 0, if Ext is a (worst-case) (m log(1=); )-strong extractor, thenExt is also an average-case (m; + )-strong extractor.

    As a specic example, they proved the following generalized variant of the leftover hash lemma,stating that any family of pairwise independent hash functions is an average-case strong extractor:

    Lemma 2.4 ([21]). Let X;Y be random variables such that X 2 f0; 1gn and eH1 (XjY ) k. LetH be a family of pairwise independent hash functions from f0; 1gn to f0; 1gm. Then for h H, itholds that

    SD ((Y; h; h(X)); (Y; h; Um)) as long as m k 2 log(1=).

    2.3 Hash Proof Systems

    We present the framework of hash proof systems, introduced by Cramer and Shoup [15]. Forsimplicity we frame the description by viewing hash proof systems as key-encapsulation mechanisms(using the notation of Kiltz et al. [48]), and refer the reader to [15] for a more complete description.

    A key-encapsulation mechanism is a public-key encryption scheme that is used for encryptingrandom messages. Typically, these messages are used as encryption keys for a symmetric-keyencryption scheme, which in turn encrypts the actual plaintext. In this setting, hash proof systemsmay be viewed as key-encapsulation mechanisms in which ciphertexts can be generated in twomodes. Ciphertexts generated using the rst mode are referred to as valid ciphertexts, and areindeed encapsulations of symmetric keys. That is, given a public key and a valid ciphertext, theencapsulated key is well dened, and can be decapsulated using the secret key. In addition, thegeneration process of a valid ciphertext also produces a \witness" to the fact that the ciphertextis indeed valid. Ciphertexts generated using the second mode are referred to as invalid ciphertexts,and essentially contain no information on the encapsulated key. That is, given a public key and aninvalid ciphertext, the distribution of the encapsulated key (as it will be produced by the decryptionprocess) is almost uniform. This is achieved by introducing redundancy into the secret key: eachpublic key has many corresponding secret keys. The only computational requirement is that thetwo modes are computational indistinguishable: any ecient adversary that is given a public keycannot distinguish with a noticeable advantage between valid ciphertexts and invalid ciphertexts.We note that the secret and public keys are always generated using the same algorithm, and theindistinguishability requirement is only over the ciphertexts.

    Smooth projective hashing. Let SK, PK, and K be sets where we view SK as the set of secretkeys, PK as the set of public keys, and K as the set of encapsulated symmetric keys. Let C andV C be sets, where we view C as the set of all ciphertexts, V as the set of all valid ciphertexts (i.e.,those generated appropriately with a corresponding witness). We assume that there are ecientalgorithms for sampling sk 2 SK, C 2 V together with a witness w, and C 2 C n V.

    Let sk : C ! K be a hash function indexed with sk 2 SK that maps ciphertexts to symmetrickeys. The hash function () is projective if there exists a projection : SK ! PK such that(sk) 2 PK denes the action of sk over the subset V of valid ciphertexts. That is, for every validciphertext C 2 V, the value K = sk(C) is uniquely determined by pk = (sk) and C. In otherwords, even though there are many dierent secret keys sk corresponding to the same public keypk, the action of sk over the subset of valid ciphertexts in completely determined by the publickey pk. On the other hand, the action of sk over the subset of invalid ciphertexts should becompletely undetermined: A projective hash function is -almost 1-universal if for all C 2 C n V,

    SD ((pk;sk(C)) ; (pk;K)) (2.1)

    9

  • where sk 2 SK and K 2 K are sampled uniformly at random, and pk = (sk).

    Hash proof systems. A hash proof system HPS = (Param;Pub;Priv) consists of three algorithmsthat run in polynomial time. The randomized algorithm Param(1n) generates parameterized in-stances of the form (group;K; C;V;SK;PK;(); ), where group may contain public parameters.The deterministic public evaluation algorithm Pub is used to decapsulate valid ciphertexts C 2 Vgiven a \witness" w of the fact that C is indeed valid (specically, one can think of w as therandom coins used to sample C from the set V). The algorithm Pub receives as input a publickey pk = (sk), a valid ciphertext C 2 V, and a witness w of the fact that C 2 V, and outputsthe encapsulated key K = sk(C). The deterministic private evaluation algorithm Priv is used todecapsulate valid ciphertexts without knowing a witness w, but by using the secret key sk. That is,the algorithm Priv receives as input a secret key sk 2 SK and a valid ciphertext C 2 V, and outputsthe encapsulated key K = sk(C). We assume that and () are eciently computable. We saythat a hash proof system is 1-universal if for all possible outcomes of Param(1n) the underlyingprojective hash function is (n)-almost 1-universal for some negligible (n).

    Subset membership problem. As a computational problem we require that the subset mem-bership problem is hard in HPS, which means that for random valid ciphertext C0 2 V and randominvalid ciphertext C1 2 C nV, the two ciphertexts C0 and C1 are computationally indistinguishable.This is formally captured by dening the advantage function AdvSMHPS;A(n) of an adversary A as

    AdvSMHPS;A(n) =PrC0 V [A(C;V; C0) = 1] PrC1 CnV [A(C;V; C1) = 1] ;

    where C and V are generated using Param(1n).

    Example: A DDH-based hash proof system. Hash proof systems are known to exist basedon a variety of number-theoretic assumptions: the decisional Die-Hellman assumption and its pro-gressively weaker d-Linear variants, the quadratic residuosity assumption, and Paillier's compositeresiduosity assumption [15, 48, 64]. We conclude this section by presenting a simple example of ahash proof system (due to Cramer and Shoup [15]) that is based on the decisional Die-Hellmanassumption. This hash proof system is used in Section 4.2 to instantiate our generic constructionof a public-key encryption scheme that is resilient to key leakage.

    Let G be a group of prime order q. We dene a hash proof system HPS = (Param;Pub;Priv) asfollows. The algorithm Param(1n) generates instances (group;K; C;V;SK;PK;; ), where:

    group = (G; g1; g2), where g1; g2 2 G are uniformly chosen generators. C = G2, V = f(gr1; gr2) : r 2 Zqg, K = G. SK = Z2q , PK = G. For sk = (x1; x2) 2 SK we dene (sk) = gx11 gx22 2 PK. For C = (gr1; gr2) 2 V with witness r 2 Zq we dene Pub(pk; C; r) = pkr. For C = (c1; c2) 2 V we dene Priv(sk; C) = sk(C) = cx11 cx22 .This hash proof system can be easily shown to be 1-universal based on the DDH assumption

    (see, for example, [48] for a complete proof).

    10

  • 3 Modeling Key-Leakage Attacks

    In this section we dene the notion of a key-leakage attack, as introduced as Akavia et al. [2]. Inaddition, we present a natural extension of this notion to the setting of chosen-ciphertext attacks,and dene the notion of a weak key-leakage attack. In Section 7 we discuss several generalizationsof this framework.

    3.1 Chosen-Plaintext Key-Leakage Attacks

    Informally, an encryption scheme is resilient to key-leakage attacks if it is semantically secure evenwhen the adversary obtains partial information on the secret key of the scheme. This is modeledby providing the adversary with access to a leakage oracle: the adversary can submit any functionf and receive f(SK), where SK is the secret key. The adversary can query the leakage oracleadaptively, with only one restriction: the sum of output lengths of all the leakage functions has tobe bounded by a predetermined parameter .

    As pointed out by Akavia et al. [2], this is in fact equivalent to an attack in which the adversaryqueries the leakage oracle with a single leakage function that outputs at most bits (informally, theadversary can encode its adaptive behavior into a single leakage function). It is not clear, however,that the same equivalence holds also for chosen-ciphertext attacks. Therefore, for consistency, wechose to present this adaptive denition already for chosen-plaintext attacks.

    More formally, for a public-key encryption scheme (KeyGen;Enc;Dec) we denote by SKn andPKn the sets of secret keys and public keys that are produced by KeyGen(1n). That is, KeyGen(1n) :f0; 1g ! SKn PKn for every n 2 N. The leakage oracle, denoted Leakage(SK), takes as inputa function f : SKn ! f0; 1g and outputs f(SK). We say that an oracle machine A is a -key-leakage adversary if the sum of output lengths of all the functions that A submits to the leakageoracle is at most .

    Denition 3.1 (key-leakage attacks). A public-key encryption scheme = (KeyGen;Enc;Dec) issemantically secure against (n)-key-leakage attacks if for any probabilistic polynomial-time (n)-key-leakage adversary A = (A1;A2) it holds that

    AdvLeakage;A (n)def=Pr hExptLeakage;A (0) = 1i Pr hExptLeakage;A (1) = 1i

    is negligible in n, where ExptLeakage;A (b) is dened as follows:

    1. (SK;PK) KeyGen(1n).

    2. (M0;M1; state) ALeakage(SK)1 (PK) such that jM0j = jM1j.3. C Encpk(Mb).4. b0 A2(C; state)5. Output b0.

    Generalizations. In the side-channel attack of Halderman et al. [36] the adversary learns anoisy version of all of the memory. This is a more general scenario than the scenario captured byDenition 3.1: The leakage is not of bounded length, but it is guaranteed that the secret key is stillunpredictable given the leakage. This motivates a realistic generalization that allows the adversaryto learn any random variable W (representing the leakage information) for which the conditional

    11

  • mutual information (adapted to average min-entropy5) of the secret key and W given the publickey is at most . That is, the adversary can learn any random variable W for whicheI1 (SK;W jPK) def= eH1 (SKjPK) eH1 (SKjPK;W ) :We discuss this and several other generalizations in Section 7. These generalizations include leakageof intermediate values from the process of generating the keys, keys that are generated using a weakrandom source, and leakage of partial results of the decryption process.

    Challenge-dependent leakage. In the framework considered in this paper the adversary is notallowed to access the leakage oracle after the challenge phase. We note that this restriction is indeednecessary: the adversary can encode the decryption algorithm, the challenge ciphertext, and thetwo messages M0 and M1 into a function that outputs the bit b. It will be very interesting to ndan appropriate framework that allows a certain form of challenge-dependent leakage.

    3.2 Chosen-Ciphertext Key-Leakage Attacks

    Extending the Denition 3.1 to the setting of chosen-ciphertext security is rather natural. In thiscase the adversary is allowed to adaptively access a decryption oracle Dec(SK; ) that receives asinput a ciphertext and outputs a decryption using the secret key SK. We denote by Dec 6=C(SK; )a decryption oracle that decrypts any ciphertext other than C. We note that as discussed in Section3.1, unlike in the setting of chosen-plaintext key-leakage attacks, for chosen-ciphertext key-leakageattacks it is not clear that adaptive access to the leakage oracle is equivalent to a single leakage query,and therefore we present here the seemingly stronger denition that allows adaptivity. As in thestandard denition of chosen-ciphertext attacks we distinguish between a-priori chosen-ciphertextattacks (CCA1) and a-posteriori chosen-ciphertext attacks (CCA2).

    Denition 3.2 (a-priori chosen-ciphertext key-leakage attacks). A public-key encryption scheme = (KeyGen;Enc;Dec) is semantically secure against a-priori chosen-ciphertext (n)-key-leakageattacks if for any probabilistic polynomial-time (n)-key-leakage adversary A = (A1;A2) it holdsthat

    AdvLeakageCCA1;A (n)def=Pr hExptLeakageCCA1;A (0) = 1i Pr hExptLeakageCCA1;A (1) = 1i

    is negligible in n, where ExptLeakageCCA1;A (b) is dened as follows:

    1. (SK;PK) KeyGen(1n).2. (M0;M1; state) ALeakage(SK);Dec(SK;)1 (PK) such that jM0j = jM1j.3. C Encpk(Mb).4. b0 A2(C; state)5. Output b0.

    Denition 3.3 (a-posteriori chosen-ciphertext key-leakage attacks). A public-key encryption sche-me = (KeyGen;Enc;Dec) is semantically secure against a-posteriori chosen-ciphertext (n)-key-leakage attacks if for any probabilistic polynomial-time (n)-key-leakage adversary A = (A1;A2) itholds that

    AdvLeakageCCA2;A (n)def=Pr hExptLeakageCCA2;A (0) = 1i Pr hExptLeakageCCA2;A (1) = 1i

    5For Shannon entropy, the conditional mutual information ofX and Y given Z is dened as I(X;Y jZ) = H(XjZ)H(XjY;Z).

    12

  • is negligible in n, where ExptLeakageCCA2;A (b) is dened as follows:

    1. (SK;PK) KeyGen(1n).

    2. (M0;M1; state) ALeakage(SK);Dec(SK;)1 (PK) such that jM0j = jM1j.3. C Encpk(Mb).

    4. b0 ADec 6=C(SK;)2 (C; state)5. Output b0.

    3.3 Weak Key-Leakage Attacks

    Akavia et al. [2] also considered the following weaker notion of leakage (which they refer to as \non-adaptive" leakage): a leakage function f with output length is chosen by the adversary aheadof time (without any knowledge of the public key), and then the adversary is given (PK; f(SK)).That is, the leakage function f is chosen independently of the public key. Although this notionseems rather weak, it nevertheless captures realistic attacks in which the leakage depends only onhardware devices (as in [36]) and is independent of the parameters of the system, including thepublic key.

    Denition 3.4 (weak key-leakage attacks). A public-key encryption scheme = (KeyGen;Enc;Dec) is semantically secure against weak (n)-key-leakage attacks if for any probabilistic polynomial-time adversary A = (A1;A2), and for any ensemble F =

    fn : SKn ! f0; 1g(n)

    n2N of eciently

    computable functions, it holds that

    AdvWeakLeakage;A;F (n)def=Pr hExptWeakLeakage;A;F (0) = 1i Pr hExptWeakLeakage;A;F (1) = 1i

    is negligible in n, where ExptWeakLeakage;A;F (b) is dened as follows:

    1. (SK;PK) KeyGen(1n).2. (M0;M1; state) A1(PK; fn(SK)) such that jM0j = jM1j.3. C Encpk(Mb).4. b0 A2(C; state)5. Output b0.

    4 A Generic Construction from Hash Proof Systems

    In this section we present a generic construction of a public-key encryption scheme that is resilientto key-leakage attacks. We then present an instantiation of our generic construction with a simpleand ecient hash proof system based on the DDH assumption. The resulting encryption schemeis resilient to any leakage of L(1=2 o(1)) bits, where L is the length of the secret key. Althoughone can instantiate our generic construction with any hash proof system, we nd this specicinstantiation rather elegant.

    13

  • 4.1 The Construction

    Let HPS = (Param;Pub;Priv) be an 1-almost 1-universal hash proof system (see Section 2.3for an overview of hash proof systems), where Param(1n) generates parameterized instances of(group;K; C;V;SK;PK;(); ) which are used as the public parameters of the encryption scheme.Let = (n) be a bound on the amount of leakage, and let Ext : K f0; 1gt ! f0; 1gm be anaverage-case (log jKj; 2)-strong extractor (see Lemma 2.3 stating that any strong extractor is infact also an average-case strong extractor). We assume that 1 and 2 are negligible in the securityparameter. The following describes the encryption scheme = (KeyGen;Enc;Dec):

    Key generation: Choose a random sk 2 SK and let pk = (sk) 2 PK. Output the pair(sk; pk).

    Encryption: On input a message M 2 f0; 1gm, choose a random C 2 V together with acorresponding witness w, and a random seed s 2 f0; 1gt. Let = Ext (Pub(pk; C;w); s)M ,and output the ciphertext (C; s;).

    Decryption: On input a ciphertext (C; s;), output the message M = Ext (sk(C); s).The correctness of the scheme follows from the property that sk(C) = Pub(pk; C;w) for any

    C 2 V with witness w. Thus, a decryption of an encrypted plaintext is always the original plaintext.The security of the scheme (i.e., its resilience to key leakage) follows from the universality of theproof system (see Equation (2.1) in Section 2.3): for all C 2 C n V it holds that

    SD ((pk;sk(C)) ; (pk;K)) 1 ;

    where sk 2 SK and K 2 K are sampled uniformly at random, and pk = (sk). Therefore, evengiven pk and any leakage of bits, the distribution sk(C) is 1-close to a distribution with averagemin-entropy at least log jKj . The strong extractor is then applied to sk(C) using a fresh seed(chosen during the challenge phase and thus independent of the leakage), and guarantees that theplaintext is properly hidden. The following theorem establishes the security of the scheme:

    Theorem 4.1. Assuming that HPS is a 1-universal hash proof system, the encryption scheme issemantically secure against (n)-key-leakage attacks for any (n) log jKj !(log n) m, wheren is the security parameter and m is the length of plaintexts.

    Proof. Assume that HPS is an 1-almost 1-universal hash proof system, and recall that Ext ischosen to be an average-case (log jKj ; 2)-strong extractor. We show that for any ecient -key-leakage adversary A = (A1;A2) there exists an ecient adversary A0 for the subset membershipproblem of the hash proof system HPS such that

    AdvLeakage;A (n) 2AdvSMHPS;A0(n) + 1(n) + 2(n)

    :

    For S 2 fV; C n Vg and b 2 f0; 1g consider the following experiment denoted ExptLeakage;A (S; b):1. Generate (K; C;V;SK;PK;(); ) Param(1n), choose a random sk 2 SK and let pk =

    (sk) 2 PK.

    2. (M0;M1; state) ALeakage(sk;pk)1 (pk) such that jM0j = jM1j.3. Choose a random C S, a random seed s 2 f0; 1gt, and let = Ext (sk(C); s)Mb.

    14

  • 4. b0 A2((C; s;); state).5. Output b0.

    Using the notation of Denition 3.1 and the triangle inequality, for any adversary A it holds that

    AdvLeakage;A (n) =Pr hExptLeakage;A (0) = 1i Pr hExptLeakage;A (1) = 1i

    =Pr hExptLeakage;A (V; 0) = 1i Pr hExptLeakage;A (V; 1) = 1i (4.1)

    Pr hExptLeakage;A (V; 0) = 1i Pr hExptLeakage;A (C n V; 0) = 1i (4.2)+Pr hExptLeakage;A (C n V; 0) = 1i Pr hExptLeakage;A (C n V; 1) = 1i (4.3)

    +Pr hExptLeakage;A (C n V; 1) = 1i Pr hExptLeakage;A (V; 1) = 1i ; (4.4)

    where the equality in (4.1) follows from the property that sk(C) = Pub(pk; C;w) for any C 2 Vwith witness w. It is straightforward that there exists an adversary A0 for the subset membershipproblem of the hash proof system HPS such that the terms (4.2) and (4.4) are upper bounded byAdvSMHPS;A0(n). The following claim bounds the term (4.3) and concludes the proof of the theorem.

    Claim 4.2. For any probabilistic polynomial-time adversary A it holds thatPr hExptLeakage;A (C n V; 0) = 1i Pr hExptLeakage;A (C n V; 1) = 1i 2 (1(n) + 2(n)) :Proof. For each b 2 f0; 1g we claim that in experiment ExptLeakage;A (C n V; b) the value in thechallenge ciphertext is (1 + 2)-close to the uniform distribution over m bits from the adversary's

    point of view. Noting that the experiments ExptLeakage;A (C n V; 0) and ExptLeakage;A (C n V; 1) dier onlyon , this implies that the statistical distance between the distributions of the adversary's view inthese experiments is at most 2(1 + 2).

    The hash proof system guarantees that for C 2 C n V the value sk(C) is 1-close to uniformover the set K given pk and C. In our setting, however, the adversary learns additional bits ofinformation using the leakage oracle. However, Lemma 2.1 states that this can reduce the averagemin-entropy of sk(C) by at most . That is, sk(C) is 1-close to a distribution that has averagemin-entropy at least log jKj given the adversary's view. The application of the strong extractorwith a randomly chosen seed (that is independent of the adversary's view so far) guarantees thatExt(sk(C); s) is 2-close to the uniform distribution over m bits, and therefore is (1 + 2)-closeto uniform.

    4.2 Example: A DDH-Based Instantiation

    Let G be a group of prime order q, let = (n) be the leakage parameter, and let Ext : Gf0; 1gt !f0; 1gm be an average-case (log q ; )-strong extractor for some negligible = (n).

    Key generation: Choose x1; x2 2 Zq and g1; g2 2 G uniformly at random. Let h = gx11 gx22 ,and output the keys

    SK = (x1; x2) ; PK = (g1; g2; h) :

    15

  • Encryption: On input a message M , choose r 2 Zq and s 2 f0; 1gt uniformly at random,and output the ciphertext

    (gr1; gr2; s;Ext(h

    r; s)M) :

    Decryption: On input a ciphertext (u1; u2; s; e), output e Ext(ux11 ux22 ; s).The hash proof system underlying the above encryption scheme is the one described in Section

    2.3. This hash proof system is 1-universal based on the DDH assumption, and as an immediateconsequence we obtain the following corollary of Theorem 4.1:

    Corollary 4.3. Assuming the hardness of DDH, the above encryption scheme is semantically-secure against (L=2 !(log n) m)-key-leakage attacks, where n denotes the security parameter,L = L(n) denotes the length of the secret key and m = m(n) denotes the length of the plaintext.

    5 Improved Resilience Based on DDH and d-Linear

    In this section we propose two encryption schemes that are resilient to any key leakage of L(1o(1))bits, where L is the length of the secret key. These proposals are based on the observation thatour generic construction from hash proof systems can in fact be based on hash proof systems witha slightly weaker 1-universality property. Specically, the 1-universality property asks that for allC 2 C n V it holds that

    SD ((pk;sk(C)) ; (pk;K)) where sk 2 SK and K 2 K are sampled uniformly at random, and pk = (sk). It is ratherstraightforward that our generic construction only requires this property to hold with overwhelmingprobability over the choice of C 2 C n V.

    For our rst proposal we construct a new hash proof system that is based on the d-Linearassumption (for any d 1) and satises this weaker 1-universality property6. The hash proof systemis a generalization of the hash proof system underlying the simple encryption scheme describedin Section 4.2. The resulting encryption scheme is then obtained by instantiating our genericconstruction with this hash proof system.

    Our second proposal is a recent encryption scheme of Boneh et al. [10], that is secure under keycycles (and more generally, under encryptions of linear functions of the secret keys). This is therst and only known encryption scheme with this property. We refer to this scheme as the BHHOscheme, and show that it ts into our generic approach using an appropriate hash proof system(that satises the same weaker universality property). As a corollary we derive that the BHHOscheme is resilient to any leakage of L(1 o(1)) bits7.

    The main dierence between the two schemes proposed in this section is in their method ofextracting randomness from the secret key. In the rst proposal an invertible function is appliedto the secret key (thus preserving its min-entropy), and then a strong extractor is applied to theresulting value. In the second proposal, the entropy of the secret key is extracted directly using astrong extractor that is implicit in the construction.

    5.1 Proposal 1: A New Hash Proof System

    We begin by presenting the encryption scheme, and then turn to describe the underlying hash proofsystem and its properties.

    6Recall that the DDH is the 1-Linear assumption.7We note that not every circular-secure scheme is also resilient to key leakage.

    16

  • Notation. Let G a group of prime order q that is generated by g. For two vectors v =(g1; : : : ; gk) 2 Gk and u = (u1; : : : ; uk) 2 Zkq we dene v uT =

    Qki=1 g

    uii , and note the notation

    naturally extends to matrix-vector and matrix-matrix multiplications.

    The encryption scheme. Let k = k(n) d+ 1 be any polynomial, let = (n) be the leakageparameter, and let Ext : Gkd f0; 1gt ! f0; 1gm be an average-case ((k d) log q ; )-strongextractor for some negligible = (n).

    The following encryption scheme has a secret key of size essentially k log q bits (k group ele-ments), and is resilient to any leakage of (kd) log q!(log n)m bits, where m is the lengthof plaintexts. That is, the scheme is resilient to any leakage of essentially a (1 d=k)-fraction ofthe length of the secret key.

    Key generation: Choose x 2 Zkq and 2 Gdk uniformly at random. Let y = x 2 Gd,and output the keys

    SK = x; PK = (; y) :

    Encryption: On input a message M , choose R 2 Z(kd)dq and s 2 f0; 1gt uniformly atrandom, and output the ciphertext

    (R; s;Ext (Ry; s)M) :

    Decryption: On input a ciphertext (; s; e) output e Ext (x; s).The following theorem establishes the security of the scheme:

    Theorem 5.1. Assuming the hardness of d-Linear, for any polynomial k = k(n) d + 1 theabove encryption scheme is semantically-secure against a ((1 d=k)L !(log n)m)-key-leakageattack, where n denotes the security parameter, L = L(n) denotes the length of the secret key andm = m(n) denotes the length of the plaintext.

    The hash proof system. Let k = k(n) d+1 be any polynomial, and let Ext : Gkdf0; 1gt !f0; 1gm be an average-case ((k d) log q; )-strong extractor for some negligible = (n).

    We dene a hash proof system HPS = (Param;Pub;Priv) as follows. The algorithm Param(1n)generates instances (group;K; C;V;SK;PK;; ), where:

    group = (G;; s), where 2 Gdk and s 2 f0; 1gt are chosen uniformly at random.

    C = G(kd)k, V =nR : R 2 Z(kd)dq

    o, K = f0; 1gm.

    SK = Zkq , PK = Gd. For sk = x 2 SK we dene (sk) = x 2 PK.

    For C 2 V with witness R 2 Z(kd)dq we dene Pub(pk; C;R) = Ext(Ry; s). For C 2 V we dene Priv(sk; C) = sk(C) = Ext(Cx; s).Before analyzing the hash proof system, we note that in the above encryption scheme we did not

    include the strong extractor that is a part of the hash proof system. The reason is that the generictransformation in Section 4 utilizes a strong extractor (using a fresh seed for every ciphertext), andin this specic case there is no need to apply two extractors.

    17

  • We now analyze the hash proof system. It is straightforward that for every C 2 V with witnessR 2 Z(kd)dq it holds that

    sk(C) = Ext(Cx; s) = Ext(Rx; s) = Ext(Ry; s) = Pub(pk; C;R) :

    For the remainder of the analysis we introduce for following additional notation. We denote byRki(Zabq ) the set of all matrices in Zabq with rank i. For a matrix R = fri;jgi2[a];j2[b] 2 Zabq wedenote by gR the matrix fgi;jgi2[a];j2[b] = fgri;jgi2[a];j2[b] 2 Gab. We denote by Rki(Gab) the setof all matrices gR 2 Gab for R 2 Rki(Zabq ).

    In Appendix A we show that the d-Linear assumption implies the hardness of the subset mem-bership problem in HPS. Specically, we introduce the matrix d-Linear assumption stating that inGkk a random matrix of rank d is computationally indistinguishable from a random matrix of rankat least d + 1. We prove that the d-Linear assumption implies the matrix d-Linear assumption8.Note that in the hash proof system, the matrix has rank d with overwhelming probability, andin this case the matrix

    =

    C

    2 Gkk

    has rank d for every C 2 V, and has rank at least d+ 1 for every C 2 C n V.In the following claim we prove the universality of the proof system. As noted above, it suces

    in our setting to argue 1-universality with overwhelming probability over the choice of C 2 C n V.Claim 5.2. With overwhelming probability over the choice of C 2 C n V it holds that

    SD ((pk;sk(C)) ; (pk;K)) ;

    where sk 2 SK and K 2 K are sampled uniformly at random, and pk = (sk).

    Proof. With overwhelming probability the matrix 2 Gdk has rank d (alternatively, it is possibleto just sample from the set of rank d matrices to begin with). In this case, with overwhelmingprobability over the choice over of C 2 C n V the matrix

    =

    C

    2 Gkk

    is invertible. Therefore, the mapping x! Cx is injective given and x, and this implies that

    H1 (Cx j ;x) = H1 (x j ;x) (k d) log q :

    The strong extractor then guarantees that sk(C) = Ext(Cx; s) is -close to the uniform distributionover K given pk.

    5.2 Proposal 2: The BHHO Scheme

    We show that a simple setting of the parameters in the BHHO encryption scheme [10] results inan encryption scheme that is resilient any key leakage of L(1 o(1)) bits, where L is the length ofthe secret key. Let G a group of order q that is generated by g, and set ` = + 2 log q + 2 log(1=)for some negligible = (n).

    8We note that the case d = 1 was proved by Boneh et al. [10].

    18

  • Key generation: Choose s1; : : : ; s` 2 f0; 1g and g1; : : : ; g` 2 G uniformly at random. Leth =

    Q`i=1 g

    sii , and output the keys

    SK = (s1; : : : ; s`); PK = (g1; : : : ; g`; h) :

    Encryption: On input a message M 2 G, choose r 2 Zq uniformly at random, and outputthe ciphertext

    (gr1; : : : ; gr` ; h

    r M) :

    Decryption: On input a ciphertext (u1; : : : ; uk; e) output e Q`

    i=1 usii

    1.

    The encryption scheme can be viewed as based on a hash proof system with the following subsetmembership problem (whose hardness follows from DDH):

    C = gr11 ; : : : ; gr`` : r1; : : : ; r` 2 ZqV = f(gr1; : : : ; gr` ) : r 2 Zqg :

    Note that the min-entropy of the secret key is `, and therefore its average min-entropy given thepublic key and any bits of leakage is at least ` (log q + ) log q + 2 log(1=). Therefore,the leftover hash lemma guarantees that with overwhelming probability over the choice of C =(u1; : : : ; u`) 2 C n V it holds that sk(C) =

    Q`i=1 u

    sii is -close to the uniform distribution over G,

    even given h =Q`

    i=1 gsii and any leakage of length bits. The reader is referred to [10] for a more

    detailed discussion on applying the leftover hash lemma in this setting.

    Improved eciency. A rather straightforward improvement to the eciency of the above schemeis choosing the values s1; : : : ; s` as elements of Zq instead of binary values as in the original scheme.In turn, this allows to decrease the value of `: all we need is that even given the public key and any bits of leakage, the remaining average-min entropy in the secret key is at least log q + !(log n)(note that this suces for applying the leftover hash lemma). That is, we need to set ` such that

    H1 (sk) log q log q + !(log n), which implies that ` = 2 + +!(logn)log q suces.

    6 Protecting Against Chosen-Ciphertext Key-Leakage Attacks

    In this section we present public-key encryption schemes that are resilient to chosen-ciphertextkey-leakage attacks (see Denitions 3.2 and 3.3).

    6.1 A Generic Construction

    We prove that the Naor-Yung \double encryption" paradigm [24, 57] is applicable also in thesetting of key leakage attacks. That is, we show that any public-key encryption scheme that issemantically secure against chosen-plaintext key-leakage attacks can be transformed into a schemethat is semantically secure against a-posteriori chosen-ciphertext key-leakage attacks using non-interactive zero-knowledge proofs.

    The key property of the transformation is that the size of the secret key in the resulting CCA-secure scheme is exactly the same as in the underlying CPA-secure scheme. This enables us toprove that the resulting CCA-secure scheme is resilient to exactly the same amount of leakage asthe underlying CPA-secure scheme.

    Our construction in this section are based on the renements of Sahai [63] and Lindell [52] tothe encryption schemes of Naor and Yung [57] and Dolev, Dwork and Naor [24]. These renements

    19

  • enable us to achieve CCA2 security without increasing the size of the secret key. We refer thereader to [52, 63] for comprehensive overviews of the construction.

    The construction. Let = (KeyGen;Enc;Dec) be a public-key encryption scheme that is se-mantically secure against chosen-plaintext -key-leakage attacks, and let (P;V) be a one-timesimulation-sound adaptive NIZK proof system for the following NP-language9:

    L = f(c0; c1; pk0; pk1) j 9m; r0; r1 s.t. c0 = Encpk0(m; r0) and c1 = Encpk1(m; r1)g :The encryption scheme 0 = (KeyGen0;Enc0;Dec0) is dened as follows:

    Key generation: Sample (sk0; pk0); (sk1; pk1) KeyGen(1n) independently, and a referencestring for the NIZK proof system. Output SK = sk0 and PK = (pk0; pk1; ).

    Encryption: On input a messageM choose r0; r1 2 f0; 1g, and compute c0 = Encpk0(M ; r0)and c1 = Encpk1(M ; r1). Then, invoke the NIZK prover P to obtain a proof for the statement(c0; c1; pk0; pk1) 2 L with respect to the reference string . Output the ciphertext (c0; c1; ).

    Decryption: On input a ciphertext (c0; c1; ), invoke the NIZK verier V to verify that isan accepting proof with respect to the reference string . If V accepts then output Decsk0(c0),and otherwise output ?.

    Proof of security. In the remainder of the section we prove the security of the scheme 0 byadapting the ideas of Lindell [52] and Sahai [63] to key leakage attacks. Specically, we show thatany adversary that breaks the security of the scheme can be used to either break the simulationsoundness of the proof system (P;V) or to break the encryption scheme . The main point in oursetting, is that we can always simulate both the leakage oracle and the decryption oracle to suchan adversary:

    When attacking the proof system (P;V) we know the key sk0. We use this key to simulatethe leakage oracle, and use this key together with the verier of the proof system to simulatethe decryption oracle.

    When attacking the public key pk1 we again know the key sk0 as in the previous case. In fact,pk1 can even be sampled from a CPA-secure encryption scheme that is not resilient to keyleakage (both in the actual scheme and in the proof of security the adversary never obtainsleakage information from sk1).

    When attacking the public key pk0 we know the key sk1. We simulate the leakage oracleby forwarding all queries to the leakage oracle of sk0, and we simulate the decryption oracleusing sk1 and the verier of the proof system.

    We prove the following theorem:

    Theorem 6.1. Assume that is semantically secure against chosen-plaintext -key-leakage at-tacks, and that (P;V) is a one-time simulation-sound NIZK proof system. Then, 0 is semanticallysecure against a-posteriori chosen-ciphertext -key-leakage attacks.

    Proof. Given a probabilistic polynomial-time -key-leakage adversary A we begin by describing amental experiment in which A runs its attack. The dierence between the mental experiment anda real attack is that the challenge ciphertext received by A is not properly generated. Rather, theNIZK proof is generated by the NIZK simulator S = (S1; S2) and the two encryptions may not beto the same message.

    9We refer the reader to [52, 63] for the denition of a one-time simulation-sound adaptive NIZK proof system.

    20

  • Experiment ExptSA(b0; b1):

    1. Key generation:

    (; s) S1(1n) (a simulated reference string is used for the public key). (sk0; pk0); (sk1; pk1) KeyGen(1n). Set SK = sk0 and PK = (pk0; pk1; r).

    2. (M0;M1; state) ALeakage(SK);Dec0(SK;)

    1 (PK).

    3. Set up the challenge ciphertext c = (c0; c1; ):

    c0 Encpk0(Mb0). c1 Encpk1(Mb1). S2((c0; c1; pk0; pk1); ; s) (a simulated proof is used for the challenge).

    4. b0 ADec06=c(SK;)

    2 (c; state).

    Given the above experiment, the advantage of A in attacking the scheme 0 can be bounded asfollows:

    AdvLeakageCCA20;A (n) =Pr hExptLeakageCCA20;A (1) = 1i Pr hExptLeakageCCA20;A (0) = 1i

    Pr hExptLeakageCCA20;A (1) = 1i Pr ExptSA(1; 1) = 1 (6.1)+Pr ExptSA(1; 1) = 1 Pr ExptSA(0; 1) = 1 (6.2)

    +Pr ExptSA(0; 1) = 1 Pr ExptSA(0; 0) = 1 (6.3)

    +Pr ExptSA(0; 0) = 1 Pr hExptLeakageCCA20;A (0) = 1i : (6.4)

    The following claim shows that the terms (6.1) and (6.4) are negligible.

    Claim 6.2. For every probabilistic polynomial-time A and b 2 f0; 1g it holds thatPr hExptLeakageCCA20;A (b) = 1i Pr ExptSA(b; b) = 1 (n)for some negligible function (n).

    Proof. The correctness of the claim follows from the zero-knowledge property of the NIZK proofsystem (P;V). Given a probabilistic polynomial-time -key-leakage adversary A and a bit b 2 f0; 1gfor which

    Pr hExptLeakageCCA20;A (b) = 1i Pr ExptSA(b; b) = 1 (n), we construct a probabilisticpolynomial-time distinguisher A0 that distinguishes a simulated proof from a real proof with ad-vantage (n). Thus, the adaptive zero-knowledge property of (P;V) implies that (n) is negligible.

    The distinguisher A0 works as follows: it receives a reference string , samples two pairs ofkeys (sk0; pk0); (sk1; pk1) KeyGen(1n) and invokes A on the public-key PK = (pk0; pk1; ) whileemulating the decryption oracle and the leakage oracle for A using SK = sk0 (note that anyonecan verify the NIZK proofs for the decryption process). When A outputs two messages (M0;M1)for the challenge, A0 computes c0 = Encpk0(Mb) and c1 = Encpk1(Mb), and asks for a proof of the (correct) statement (c0; c1; pk0; pk1) 2 L. The distinguisher A0 then gives A the challengeciphertext (c0; c1; ) and outputs whatever A does. Notice that if A0 receives a real proof then itperfectly simulates ExptLeakageCCA20;A (b), and ifA0 receives a simulated proof then it perfectly simulatesExptSA(b; b). Thus, the advantage of A0 is exactly (n).

    21

  • Before proceeding, we prove a claim stating that in the experiment ExptSA(b0; b1), with over-whelming probability all ciphertext queries to the decryption oracle that contain accepting NIZKproofs, are of valid ciphertexts. Formally, we say that a ciphertext c = (c0; c1; ) is invalid with anaccepting NIZK proof if Dsk0(c0) 6= Dsk1(c1) and V ((c0; c1; pk0; pk1); ; ) = 1. The following claimshows that if any of A's ciphertext queries are of the above form, then A can be used to contradictthe one-time simulation-soundness of the NIZK proof system.

    Claim 6.3. For every probabilistic polynomial-time adversary A and b0; b1 2 f0; 1g, the probabilitythat in the experiment ExptSA(b0; b1) the adversary A queries the decryption oracle with an invalidciphertext that has an accepting NIZK proof is negligible.

    Proof. The correctness of the claim follows from the one-time simulation-soundness of the NIZKproof system (P;V). Given a probabilistic polynomial-time adversary A and b0; b1 2 f0; 1g forwhich with a non-negligible probability A queries the decryption oracle with an invalid ciphertextthat has an accepting NIZK proof, we construct a probabilistic polynomial-time A0 that contradictsthe one-time simulation-soundness of (P;V).

    A0 receives a simulator-generated reference string and runs the rest of experiment ExptSA(b0; b1)as in the proof of Claim 6.2 (the only dierence is that A0 computes c0 = Encpk0(Mb0) and c1 =Encpk1(Mb1)). If during the simulation A queries the decryption oracle with an invalid ciphertextthat has an accepting NIZK proof, then A0 outputs this ciphertext and halt (A0 can check thisbecause it knows both decryption keys and because it can verify the validity of the NIZK proofs).The simulation by A0 is perfect, and therefore if A outputs an invalid ciphertext with an acceptingproof in ExptSA(b0; b1), then A0 outputs a false statement with an accepting proof.

    We are now ready to prove that the terms (6.2) and (6.3) are negligible.

    Claim 6.4. For every probabilistic polynomial-time A it holds thatPr ExptSA(1; 1) = 1 Pr ExptSA(0; 1) = 1 (n)for some negligible function (n).

    Proof. The correctness of the claim follows from the security of the scheme = (G;E;D). Given aprobabilistic polynomial-time adversaryA for which Pr ExptSA(1; 1) = 1 Pr ExptSA(0; 1) = 1 (n), we construct a probabilistic polynomial-time adversary A0 that breaks the security of withessentially the same advantage.

    The adversary A0 receives as input a public-key pk generated by KeyGen(1n), and simulates theview of A as follows:

    1. Key generation:

    A0 sets pk0 = pk, and samples (sk1; pk1) KeyGen(1n) and (; s) S1(1n). A0 sets PK = (pk0; pk1; ).

    2. Leakage queries: Any leakage query f is forwarded to the leakage oracle corresponding to pk.

    3. Decryption queries: Given a ciphertext c = (c0; c1; ) the adversary A0 invokes the NIZKverier V to verify that is an accepting proof with respect to the reference string . If Vaccepts then A0 outputs Decsk1(c1), and otherwise A0 outputs ?.

    4. When A outputs two messages M0 and M1, the adversary A0 obtains c0 = Encpk0(Mb) for arandom b 2 f0; 1g, and outputs the challenge ciphertext c = (c0; c1; ), where:

    22

  • c1 Encpk1(M1). S2((c0; c1; pk0; pk1); ; s) (a simulated NIZK proof).

    5. A0 outputs the output of A.From the point of view of A, the only dierence between the view simulated by A0 and the

    experiment ExptSA(b; 1) is that A0 performs the decryption using sk1 and not sk0. However, theseviews are identical as long as A does not submit an invalid ciphertext that has an accepting NIZKproof. Claim 6.3 guarantees that the latter event has only a negligible probability.

    Claim 6.5. For every probabilistic polynomial-time A it holds thatPr ExptSA(0; 1) = 1 Pr ExptSA(0; 0) = 1 (n)for some negligible function (n).

    Proof. The correctness of the claim follows from the security of the scheme = (G;E;D). Given aprobabilistic polynomial-time adversaryA for which Pr ExptSA(0; 1) = 1 Pr ExptSA(0; 0) = 1 (n), we construct a probabilistic polynomial-time adversary A0 that breaks the security of withessentially the same advantage.

    The adversary A0 receives as input a public-key pk generated by KeyGen(1n), and simulates theview of A as follows:

    1. Key generation:

    A0 sets pk1 = pk, and samples (sk0; pk0) KeyGen(1n) and (; s) S1(1n). A0 sets PK = (pk0; pk1; ).

    2. Leakage queries: Given a function f the simulator A0 outputs f(sk0).3. Decryption queries: Given a ciphertext c = (c0; c1; ) the simulator A0 invokes the NIZK

    verier V to verify that is an accepting proof with respect to the reference string . If Vaccepts then A outputs Decsk0(c0), and otherwise A outputs ?.

    4. When A outputs two messages M0 and M1, the simulator A0 obtains c1 = Encpk1(Mb) for arandom b 2 f0; 1g, and outputs the challenge ciphertext c = (c0; c1; ), where: c0 Encpk0(M0). S2((c0; c1; pk0; pk1); ; s) (a simulated NIZK proof).

    5. A0 outputs the output of A.The claim now follows by noting that the simulated view of A is in fact identical to the exper-

    iment ExptSA(0; b).

    This concludes the proof of the theorem.

    23

  • 6.2 An Ecient CCA1-Secure Scheme

    In this section we prove that a variant of the Cramer-Shoup \Lite" cryptosystem [16] (along thelines of our generic construction in Section 4) is secure against a-priori chosen-ciphertext key-leakageattacks.

    Let G be a group of prime order q, let = (n) be the leakage parameter, and let Ext :Gf0; 1gt ! f0; 1gm be an average-case (log q; )-strong extractor for some negligible = (n).

    We present an encryption scheme with a secret key of size essentially 4 log q bits (four groupelements), and show that the scheme is secure for any leakage of length log q !(log n) m,where m is the length of plaintexts. The following describes the encryption scheme:

    Key generation: Choose x1; x2; z1; z2 2 Zq and g1; g2 2 G uniformly at random. Letc = gx11 g

    x22 , h = g

    z11 g

    z22 , and output the keys

    SK = (x1; x2; z1; z2) ; PK = (g1; g2; c; h) :

    Encryption: On input a message M 2 f0; 1gm, choose r 2 Zq and s 2 f0; 1gt uniformly atrandom, and output the ciphertext

    (gr1; gr2; c

    r; s;Ext(hr; s)M) :

    Decryption: On input a ciphertext (u1; u2; v; s; e), if v 6= ux11 ux22 then output? and otherwiseoutput e Ext(uz11 uz22 ; s).

    Correctness. For any sequence of coin tosses of the key generation and encryption algorithmsit holds that ux11 u

    x22 = (g

    x11 g

    x22 )

    r = cr = v and that uz11 uz22 = (g

    z11 g

    z22 )

    r = hr, and therefore thedecryption algorithm is always correct.

    Proof of security. The proof of security is based on augmenting the proof of Cramer and Shoupwith the ideas presented in Section 4. We prove the following theorem:

    Theorem 6.6. Assuming the hardness of DDH, the above encryption scheme is semantically-secureagainst a-priori chosen-ciphertext (L=4 !(log n) m)-key-leakage attacks, where n denotes thesecurity parameter, L = L(n) denotes the length of the secret key and m = m(n) denotes the lengthof the plaintext.

    Proof. We show that any ecient adversary A that breaks the security of the scheme (recallDenition 3.2) can be used to construct an ecient algorithm A0 that distinguishes between a DHinstance and a non-DH instance with a non-negligible advantage. On input (g1; g2; u1; u2) 2 G4 thealgorithm A0 acts as follows:

    1. A0 chooses x1; x2; z1; z2 2 Zq uniformly at random, and sets c = gx11 gx22 , h = gz11 gz22 , SK =(x1; x2; z1; z2), and PK = (g1; g2; c; h). Then A0 invokes A with input PK.

    2. A0 simulates the leakage oracle and the decryption oracle to A using SK.3. When A outputs two messagesM0 andM1, the simulator A0 chooses b 2 f0; 1g and s 2 f0; 1gt

    uniformly at random, and sends A the challenge ciphertext (u1; u2; ux11 ux22 ; s;Ext(uz11 uz22 ; s)Mb).

    4. If A outputs b then A0 outputs 1, and otherwise A0 outputs 0.

    24

  • In the following we say that a ciphertext (u1; u2; v; s; e) is invalid if logg1(u1) 6= logg2(u2). Theremainder of the proof proceeds as follows. First, we prove that if (g1; g1; u1; u2) is a DH instancethen A's view is identical to the actual attack. Then, we prove that in both the actual attack andin the simulated attack the decryption oracle rejects all invalid ciphertexts except with a negligibleprobability. Finally, we prove that if (g1; g1; u1; u2) is a non-DH instance and the decryption oraclerejects all invalid ciphertexts then A has only a negligible advantage in outputting the bit b. Thus,if A has a non-negligible advantage in the actual attack, then A0 has a non-negligible advantage indistinguishing between DH instances and non-DH instances.

    Claim 6.7. If (g1; g2; u1; u2) is a DH instance then A's view is identical to the actual attack.

    Proof. The actual attack and the simulated attack are identical up to the challenge phase. Itremains to prove that the challenge ciphertext has the correct distribution when (g1; g2; u1; u2) isa DH instance. Indeed, in this case u1 = g

    r1 and u2 = g

    r2 for some randomly chosen r 2 Zq, and

    therefore ux11 ux22 = c

    r and uz11 uz22 = h

    r as it should be.

    Claim 6.8. In both the actual attack and the simulated attack, the decryption algorithm rejects allinvalid ciphertexts except with a negligible probability.

    Proof. The actual attack and the simulated attack are identical up to the challenge phase. There-fore, the probability that the decryption algorithm rejects all invalid ciphertexts is the same in bothattacks.

    We prove the claim by considering the distribution of the point (x1; x2) 2 Z2q from the adver-sary's point of view. The adversary is given the public key (g1; g2; c; h) and therefore from theadversary's point of view the point (x1; x2) is uniformly random subject to logg1(c) = x1 + x2,where = logg1(g2). Moreover, by submitting valid ciphertexts to the decryption oracle the ad-versary does not learn any more information on (x1; x2) (in fact, by submitting a valid ciphertextthe adversary only learns a linear combination of the constraint logg1(h) = z1+ z2 that is alreadyknown from the public key).

    Denote by (u01; u02; v0; s0; e0) the rst invalid ciphertext submitted by the adversary, where u01 =gr011 , u

    02 = g

    r022 , and r

    01 6= r02. Denote by aux the output of all leakage functions that were submitted by

    the adversary prior to submitting the invalid ciphertext. The value aux obtains at most 2 values,and therefore Lemma 2.1 implies that from the adversary's point of view prior to submitting theinvalid ciphertext it holds that

    eH1 ((x1; x2)jPK; aux) H1 ((x1; x2)jPK) log q :In particular, the denition of average min-entropy implies that prior to submitting the invalid

    ciphertext the probability of A in guessing (x1; x2) is at most 2eH1((x1;x2)jPK;aux) 2=q. However,note that if the decryption algorithm accepts the invalid ciphertext then we obtain the followinglinear equations:

    logg1(v0) = r01x1 + r02x2

    logg1(c) = x1 + x2

    As long as (r01 r02) 6= 0 these equations are linearly independent, and therefore the adversarycan be used to guess (x1; x2). Thus, the probability that the decryption algorithm accepts the rstinvalid ciphertext is at most 2=q.

    An almost identical argument holds for all the subsequent invalid decryption queries. The onlydierence is that each time the decryption oracle rejects an invalid ciphertext the adversary can rule

    25

  • out one more value of (x1; x2) from the set f(x1; x2) 2 Z2q : logg1(c) = x1 + x2g. This shows thatthe decryption algorithm accepts the i-th invalid ciphertext with probability at most 2=(q i+1).The claim now follows from the fact that the number of decryption queries is polynomial, and fromthe restriction log q !(log n).Claim 6.9. If (g1; g2; u1; u2) is a non-DH instance and the decryption algorithm rejects all invalidciphertexts, then A has only a negligible advantage in outputting the bit b.Proof. We show that if (g1; g2; u1; u2) is a non-DH instance and the decryption algorithm rejectsall invalid ciphertexts then with overwhelming probability the value uz11 u

    z22 has average min-entropy

    at least log q m + !(log n) given all the other values in the adversary's view. The strongextractor then guarantees that the part of the challenge ciphertext that depends on the bit b is-close to uniform given the adversary's view, for a negligible = (n).

    We prove the claim by considering the distribution of the point (z1; z2) 2 Zq from the adversary'spoint of view. The adversary is given the public key (g1; g2; c; h) and therefore from the adversary'spoint of view the point (z1; z2) is uniformly random subject to logg1(h) = z1 + z2, where =logg1(g2). We assume that the decryption algorithm rejects all invalid ciphertext, and note thatby submitting valid ciphertexts to the decryption oracle the adversary does not learn any moreinformation (the adversary only learns a linear combination of the constraint logg1(h) = z1 + z2).Thus, the adversary does not learn any information on (z1; z2) via decryption queries.

    Let u1 = gr11 , u2 = g

    r22 , and denote by aux the output of all leakage functions chosen by the

    adversary. Then from the adversary's point of view in the challenge phase it holds thateH1 (uz11 uz22 j g1; g2; c; h; aux; u1; u2) = eH1 (r1z1 + r2z2 j ; c; h; aux; r1; r2) :Note that as long as (r1 r2) 6= 0, then for any w = uz11 uz22 the following two equations (in z1 andz2) are linearly independent:

    logg1(h) = z1 + z2logg1(w) = r1z1 + r2z2

    which implies that given (; h; r1; r2) the function (z1; z2)! r1z1 + r2z2 is injective. Applying aninjective function to a distribution preserves its min-entropy, and thereforeeH1 (r1z1 + r2z2 j ; c; h; aux; r1; r2) = eH1 ((z1; z2) j ; c; h; aux; r1; r2)

    = eH1 ((z1; z2) j ; c; h; aux) ;where the second equality follows from the fact that (z1; z2; ; c; h; aux) are all chosen independentlyof (r1; r2). Finally, the leakage aux obtains at most 2

    possible values, and therefore (see Lemma2.1) eH1 ((z1; z2) j ; c; h; aux) H1 ((z1; z2) j ; c; h)

    = H1 ((z1; z2) j ; z1 + z2) log q :

    Combining all of the above, with overwhelming probability it holds thateH1 (uz11 uz22 j g1; g2; c; h; aux; u1; u2) log q :This concludes the proof of Theorem 6.6.

    26

  • 6.3 An Ecient CCA2-Secure Scheme

    In this section we prove that a variant of the Cramer-Shoup cryptosystem [16] (along the lines ofour generic construction in Section 4) is secure against a-posteriori chosen-ciphertext key-leakageattacks.

    Let G be a group of prime order q, let = (n) be the leakage parameter, let Ext : Gf0; 1gt !f0; 1gm be an average-case (log q ; )-strong extractor for some negligible = (n), and let H bea family of universal one-way hash functions H : G3 ! Zq. Rompel [62] showed that universal one-way hash functions can be constructed from one-way functions, and in particular, such functionsexist based on the hardness of DDH.

    We present an encryption scheme with a secret key of size essentially 6 log q bits (six groupelements), and show that the scheme is secure for any leakage of length log q !(log n) m,where m is the length of the plaintext. The following describes the encryption scheme:

    Key generation: Choose x1; x2; y1; y2; z1; z2 2 Zq, g1; g2 2 G, and H 2 H uniformly atrandom. Let c = gx11 g

    x22 , d = g

    y11 g

    y22 , h = g

    z11 g

    z22 , and output the keys

    SK = (x1; x2; y1; y2; z1; z2) ; PK = (g1; g2; c; d; h;H) :

    Encryption: On input a message M 2 f0; 1gm, choose r 2 Zq and s 2 f0; 1gt uniformly atrandom, and compute

    u1 = gr1; u2 = g

    r2; e = Ext(h

    r; s)M; = H(u1; u2; s; e); v = crdr :

    Output the ciphertext (u1; u2; v; s; e).

    Decryption: On input a ciphertext (u1; u2; v; s; e) compute = H(u1; u2; s; e), and if v =ux1+y11 u

    x2+y22 then output the message

    M = e Ext(uz11 uz22 ; s) :

    Otherwise output ?.

    Correctness. For any sequence of coin tosses of the key generation and encryption algorithmsit holds that ux1+y11 u

    x2+y22 = c

    rdr = v and that uz11 uz22 = h

    r, and therefore the decryptionalgorithm is always correct.

    Proof of security. As in Section 6.2, the proof of security is based on augmenting the proof ofCramer and Shoup with the ideas presented in Section 4. Specically, we show that any ecientadversary that breaks the security of the scheme can be used to either distinguish between a DHinstance and a non-DH instance or to break the security of the universal one-way hash functions.We prove the following theorem:

    Theorem 6.10. Assuming the hardness of DDH, the above encryption scheme is semantically-secure against a-posteriori chosen-ciphertext (L=6 !(log n) m)-key-leakage attacks, where ndenotes the security parameter, L = L(n) denotes the length of the secret key and m = m(n)denotes the length of the plaintext.

    Proof. Given an adversary A consider the algorithm A0 that on input (g1; g2; u1; u2) 2 G4 acts asfollows:

    27

  • 1. A0 chooses x1; x2; y1; y2; z1; z2 2 Zq and H 2 H uniformly at random, and sets c = gx11 gx22 ,d = gy11 g

    y22 , h = g

    z11 g

    z22 , SK = (x1; x2; y1; y2; z1; z2), and PK = (g1; g2; c; d; h;H). Then A0

    invokes A with input PK.2. A0 simulates the leakage oracle and the decryption oracle to A using SK.3. When A outputs two messagesM0 andM1, the simulator A0 chooses b 2 f0; 1g and s 2 f0; 1gt

    independently and uniformly at random, computes

    e = Ext(uz11 uz22 ; s)M; = H(u1; u2; s; e); v = ux1+y11 ux2+y22 ;

    and sends A the challenge ciphertext (u1; u2; v; s; e).4. If A outputs b then A0 outputs 1, and otherwise A0 outputs 0.An immediate observation is that if (g1; g2; u1; u2) is a DH instance, then the simulation is

    identical to the actual attack (and therefore A should have a non-negligble advantage in outputtingthe bit b).

    Claim 6.11. If (g1; g2; u1; u2) is a DH instance then A's view is identical to the actual attack.

    Proof. The actual attack and the simulated attack are identical except for the challenge ciphertext.It remains to prove that the challenge ciphertext has the correct distribution when (g1; g2; u1; u2)is a DH instance. Indeed, in this case u1 = g

    r1 and u2 = g

    r2 for some randomly chosen r 2 Zq, and

    therefore ux1+y11 ux2y12 = c

    rdr and uz11 uz22 = h

    r as it should be.

    The more interesting part of the proof is devoted for showing that if (g1; g2; u1; u2) is a non-DHinstance then A has only a negligible advantage in outputting the bit b. From now on we assumethat (g1; g2; u1; u2) is a non-DH instance, where logg1(u1) = r1, logg2(u2) = r2, and r1 6= r2.

    We denote by (u1; u2; v; s; e) the challenge ciphertext given to A, and denote by Collisionthe event in which for one of A's decryption queries (u1; u2; v; s; e) it holds that (u1; u2; s; e) 6=(u1; u2; s; e) and H(u1; u2; s; e) = H(u1; u2; s; e). We say that a ciphertext (u01; u02; v0; s0; e0) isinvalid if logg1(u

    01) 6= logg2(u02).

    In what follows we prove that if the event Collision does not occur then A has only a negligibleadvan