Docsity

Fast Cryptographic Primitives and Circular-Secure Encryption Based on Hard Learning Problems, Lecture notes of Cryptography and System Security

Toggle sidebar
bg1
Fast Cryptographic Primitives and
Circular-Secure Encryption
Based on Hard Learning Problems
Benny Applebaum?, David Cash, Chris Peikert??, and Amit Sahai???
1Princeton University
2Georgia Institute of Technology
3SRI International
4UCLA
Abstract.
The well-studied task of learning a linear function with errors
is a seemingly hard problem and the basis for several cryptographic
schemes. Here we demonstrate additional applications that enjoy strong
security properties and a high level of efficiency. Namely, we construct:
1.
Public-key and symmetric-key cryptosystems that provide security
for key-dependent messages and enjoy circular security. Our schemes
are highly efficient: in both cases the ciphertext is only a constant
factor larger than the plaintext, and the cost of encryption and
decryption is only
n·polylog
(
n
) bit operations per message symbol in
the public-key case, and
polylog
(
n
) bit operations in the symmetric
case.
2.
Two efficient pseudorandom objects: a “weak randomized pseudoran-
dom function” — a relaxation of standard PRF — that can be com-
puted obliviously via a simple protocol, and a length-doubling pseudo-
random generator that can be computed by a circuit of
n·polylog
(
n
)
size. The complexity of our pseudorandom generator almost matches
the complexity of the fastest known construction (Applebaum et al.,
RANDOM 2006), which runs in linear time at the expense of relying
on a nonstandard intractability assumption.
Our constructions and security proofs are simple and natural, and involve
new techniques that may be of independent interest. In addition, by
combining our constructions with prior ones, we get fast implementations
of several other primitives and protocols.
Keywords: Encryption, Key-dependent message security, Learning problems,
Lattice-based cryptography
?
This material is based upon work supported by the National Science Foundation
under Grants CNS-0627526, CCF-0426582 and CCF-0832797. Any opinions, findings,
and conclusions or recommendations expressed in this material are those of the
author(s) and do not necessarily reflect the views of the National Science Foundation.
??
This material is based upon work supported by the National Science Foundation
under Grants CNS-0716786 and CNS-0749931.
???
Research supported in part from NSF grants 0716389, 0627781, 0830803, a subgrant
from SRI as part of the Army Cyber-TA program, an equipment grant from Intel, an
Alfred P. Sloan Foundation Fellowship, and an Okawa Foundation Research Grant.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17

Partial preview of the text

Download Fast Cryptographic Primitives and Circular-Secure Encryption Based on Hard Learning Problems and more Lecture notes Cryptography and System Security in PDF only on Docsity!

Fast Cryptographic Primitives and

Circular-Secure Encryption

Based on Hard Learning Problems

Benny Applebaum?, David Cash, Chris Peikert??, and Amit Sahai??? (^1) Princeton University (^2) Georgia Institute of Technology (^3) SRI International (^4) UCLA

Abstract. The well-studied task of learning a linear function with errors is a seemingly hard problem and the basis for several cryptographic schemes. Here we demonstrate additional applications that enjoy strong security properties and a high level of efficiency. Namely, we construct:

  1. Public-key and symmetric-key cryptosystems that provide security for key-dependent messages and enjoy circular security. Our schemes are highly efficient: in both cases the ciphertext is only a constant factor larger than the plaintext, and the cost of encryption and decryption is only n · polylog (n) bit operations per message symbol in the public-key case, and polylog (n) bit operations in the symmetric case.
  2. Two efficient pseudorandom objects: a “weak randomized pseudoran- dom function” — a relaxation of standard PRF — that can be com- puted obliviously via a simple protocol, and a length-doubling pseudo- random generator that can be computed by a circuit of n · polylog (n) size. The complexity of our pseudorandom generator almost matches the complexity of the fastest known construction (Applebaum et al., RANDOM 2006), which runs in linear time at the expense of relying on a nonstandard intractability assumption. Our constructions and security proofs are simple and natural, and involve new techniques that may be of independent interest. In addition, by combining our constructions with prior ones, we get fast implementations of several other primitives and protocols.

Keywords: Encryption, Key-dependent message security, Learning problems, Lattice-based cryptography ? (^) This material is based upon work supported by the National Science Foundation under Grants CNS-0627526, CCF-0426582 and CCF-0832797. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation. ?? (^) This material is based upon work supported by the National Science Foundation under Grants CNS-0716786 and CNS-0749931. ??? (^) Research supported in part from NSF grants 0716389, 0627781, 0830803, a subgrant

from SRI as part of the Army Cyber-TA program, an equipment grant from Intel, an Alfred P. Sloan Foundation Fellowship, and an Okawa Foundation Research Grant.

1 Introduction

The problem of “learning a linear function with errors” (LWE) has found many interesting cryptographic and complexity-theoretic applications in the last few years (see [32, 36, 46, 37, 45, 25], to name a few). Informally, the LWE problem, for a dimension n and modulus q, is to recover a secret vector s ∈ Znq given arbitrarily many “noisy random inner products” (ai, bi ≈ 〈ai, s〉) ∈ Znq × Zq , where the ai ∈ Znq are uniform and independent. The “learning parity with noise” problem (LPN) is the special case where q = 2. These problems have been studied extensively in several works, and their known best algorithms require 2 O(n^ log^ q/^ log^ n)^ time and space [11]. Much evidence suggests that no efficient algorithm can solve LWE/LPN with better than negligible probability, even using quantum computation. In particular, the LPN problem can be formulated as the famous problem of decoding a random binary linear code, and therefore a successful attack would imply a major breakthrough in coding theory. The LPN problem also occupies a central position in learning theory: an efficient algorithm for it could be used to learn several important concept classes, including 2-DNF formulas, juntas, and any function with a sparse Fourier spectrum [21]. For the case of the LWE, hardness is supported by a remarkable connection to worst-case lattice problems. Regev [46] showed that solving LWE (for certain Gaussian-like error distributions) is as hard as quantumly solving some apparently intractable lattice problems, such as the approximate shortest vector problem GapSVP. Recently, Peikert [43] also gave a classical reduction from GapSVP (and variants) to LWE. The LWE/LPN problems provide an interesting combination of two useful properties: efficiency, i.e., instances of the problem can be generated by “cheap” operations such as (modular) addition and multiplication (or even simple bit operations in the case of LPN), and simple algebraic structure, i.e., the noisy inner products are computed by an “almost linear” function. Indeed, previous works relied on these properties to obtain cryptography with low complexity [32, 4, 35, 6], and to derive desirable cryptographic features such as random self-reducibility (with respect to the choice of a) and pseudorandomness [10]. Interestingly, other problems that provide the latter feature, such as those from number theory, typically require relatively expensive computational operations such as exponentiation over large groups.

1.1 Our Results In this paper, we further exploit the properties of LWE/LPN to obtain new cryptographic constructions that are both efficient and enjoy desirable security properties.

Circular-secure encryption schemes. One of our main applications is the construction of efficient encryption schemes (in both the symmetric- and public- key settings) that achieve security against certain key-dependent message (KDM)

security in the presence of key-leakage under a stronger version of the LPN assumption. We stress that key-leakage security is incomparable to the notions studied here.

Fast pseudorandom objects.

Pseudorandom generator. Based on the hardness of LPN, we construct a pseudo- random generator (PRG) that doubles its input length and can be computed by a Boolean circuit of size O˜(n) (i.e., quasilinear size). This is considerably faster than previous constructions of linear-stretch PRGs (e.g., [18, 17, 24]), which suffer from polynomial overhead. (Similar limitations also hold for previous coding-based constructions [10, 22].) To the best of our knowledge, the only exception is the construction of [5] which is computable by linear-size (NC^0 ) circuits. This con- struction is based on a plausible, yet non-standard, assumption of Alekhnovich [3]. Roughly speaking, that assumption says that a noisy random codeword of a code with sparse generating matrix is pseudorandom. This assumption is rela- tively new and, while seemingly reasonable, it has not been widely studied yet. Moreover, unlike our LPN-based assumption, Alekhnovich’s assumption posits pseudorandomness rather than just one-wayness, which is in general a stronger notion.

Application. Typical cryptographic functions introduce a multiplicative compu- tational overhead that grows with the desired level of security. Recently, Ishai et al. [34] showed that many cryptographic tasks can be implemented while incurring only a constant computational overhead compared to insecure implementations of the same tasks.^5 These results were based on the PRG construction of [5], and hence on non-standard intractability assumptions. By plugging our PRG into the reductions of [34], we get implementations with polylogarithmic overhead for several primitives such as commitment schemes, symmetric encryption schemes, and public-key encryption schemes (under the assumption that the latter exist). This provides an interesting alternative to the original suggestion of [34], as it relies on a standard assumption and still gives a considerable improvement over typical (non-IKOS) schemes.^6 We view this result as an important support for the possibility of cryptography with low overhead.

Randomized weak pseudorandom function. We also obtain a simple construction of randomized weak pseudorandom function family (RWPRFs). This primitive

(^5) We make the usual security requirement that the advantage of any polynomial-time attacker must be negligible in the input length. (^6) A trivial construction of primitives with polylogarithmic security can be achieved by starting from an exponentially strong primitive (e.g., PRG) and applying it separately on input blocks of polylogarithmic size. This construction results in primitives with weak (quasi-polynomial) security. In contrast, our construction starts from a weaker assumption (in particular, it does not require exponential hardness) and it results in a primitive whose security is essentially the same as the security of the assumption (up to standard polynomial loss).

relaxes the standard notion of pseudorandom function family [27] in two ways: it provides security only when the function is evaluated on randomly chosen points, and it uses secret internal randomness. To make this notion nontrivial we require an efficient “equality-tester” that verifies whether different invocations of the PRF (with independent internal randomness) correspond to the same preimage. While this primitive is considerably weaker than PRFs, we argue that in some scenarios RWPRFs can be used instead of standard PRFs. Moreover, the use of internal randomness provably admits more efficient constructions.^7 Our construction has several interesting syntactic properties: it is injective and symmetric (one can replace the roles of the argument and the key without violating security). Moreover, we describe a simple constant-round protocol for obliviously evaluating the function. Such a protocol allows two parties, one holding a point x and another holding a key k, to evaluate the function fk(x) without learning each other’s inputs. Pseudorandom functions that allow oblivious evaluation (OPRFs) were recently shown to be a useful cryptographic tool [23, 30]. An oblivious RWPRF can replace an OPRF in some settings (despite its weaker cryptographic properties), and hence our construction provides an alternative to the relatively small number of existing schemes (see [23] and references within).

Practical efficiency vs. asymptotic efficiency. In this paper, we treat effi- ciency in asymptotic terms. Still, we believe that some of our results may turn to be useful in practice as well. Indeed, our LPN-based constructions mainly rely on addition and multiplication of large binary matrices. These operations can be performed very fast in practice [12, 2] even if one does not employ the asymptotically-fast algorithms used in our analysis (e.g., for matrix multiplica- tion), which might not be applicable in practice. In particular, as in the case of the HB protocol [32, 35], our schemes (or variants of them) might turn to be useful for hardware implementation by computationally-weak devices. We leave this direction for future study.

1.2 Techniques

Our LWE-based public key construction involves a few techniques that may be of independent interest and application. In the LWE-based cryptosystems of [46, 44], the secret key is a vector s ∈ Znq chosen uniformly at random, while the message space is Zp for some p  q. An important idea in the work of Boneh et al. [13] is the ability to generate, given only a public key, a ciphertext that decrypts to a message related to s. Because decryption in the LWE-based schemes of [46, 44] is essentially a linear operation, it is easy to generate ciphertexts that are somehow related to s. However, because (^7) For example, it can be shown that PRFs cannot be computed by constant-depth circuits with unbounded fan-in AND and XOR gates [38]. In contrast, our construction can be computed by such circuits of depth 2. Moreover, one can show that, under plausible assumptions, RWPRFs can be constructed even in weaker classes such as NC^0.

random variable are identically distributed. We say that two ensembles {Xn} and {Yn} of distributions indexed by n are statistically indistinguishable if ∆(Xn, Yn) = negl(n). The ensembles are computationally indistinguishable if for every probabilistic polynomial-time adversary A, the distinguishing advantage | Pr [A(Xn) = 1] − Pr[A(Yn) = 1]| = negl(n). A distribution ensemble {Xn}n∈N is pseudorandom if Xn is computationally indistinguishable from U (Dn) where Dn is the domain of Xn (which is usually clear from the context).

2.1 Noisy Learning Problems

We recall the learning with error (LWE), due to Regev [46], for which learning parity with noise (LPN) is a special case. For positive integers n and q ≥ 2, a vector s ∈ Znq , and a probability distribution χ on Zq , define As,χ to be the distribution over Znq × Zq obtained by choosing a vector a ∈ Znq uniformly at random, an error term x ← χ, and outputting (a, 〈a, s〉 + x).

Definition 1. For an integer function q = q(n) and an error distribution χ over Zq , the learning with errors problem LWEq,χ in n dimensions is defined as follows: given access to an oracle that produces independent samples from As,χ for some arbitrary s ∈ Znq , output s with noticeable probability, e.g., 1 / 2 , over all the randomness of the oracle and the algorithm. The learning parity with noise problem LPNε is the special case of LWEq,χ for q = 2 and χ = Berε.

We say that LWEq,χ is hard (or intractable) for a class of adversaries (by default, probabilistic poly (n)-time algorithms) if there does not exist an algorithm in the class that can solve it for infinitely many n. Note that LWE as defined above is a “worst-case” style of problem in that the value of s ∈ Znq is arbitrary, not random as is typical in cryptography. This is not too important of a distinction, because LWE is amenable to randomized self-reduction and amplification techniques [10, 46]. In particular, here we give a reduction from the form of the problem in Definition 1 to an average-case decision problem, for prime power moduli and “narrow enough” error distributions. In other words, under the hypotheses of the lemma, the LWE distribution is pseudorandom if the search problem is hard.

Lemma 1. Let q = pe^ be a prime power with p = poly (n), and let χ be a distribution over Zq that produces an element in {− p− 2 1 ,... , p− 2 1 } ⊂ Zq with overwhelming probability. There is a probabilistic polynomial-time reduction from solving LWEq,χ to distinguishing (with non-negligible advantage) between As,χ for uniformly random s ∈ Znq and the uniform distribution U = U (Znq × Zq ).

Proof (sketch). The proof is a simple extension of prior ones for prime moduli (see, e.g., [46, Lemma 4.2]), therefore we sketch only the new elements. The idea is to use a distinguisher to recover the least significant digit (in base p) of each entry of s, after which the error distribution can be made narrow enough to solve

for all the remaining digits of s via rounding and linear algebra. Due to space limitations, the entire proof is deferred to the full version. For i = 0,... , e, define the hybrid distribution Ai s,χ that is obtained by drawing a sample (a, b) from As,χ and outputting (a, b + pi^ · r) ∈ Znq × Zq for a uniformly random r ∈ Zq (freshly chosen for each sample). By a hybrid argument and standard amplification techniques, we can use an algorithm D that distinguishes between As,χ and U to solve for s′^ = s mod p. Having done so, we can then transform As,χ into Ap·t,χ, where p · t = s − s′^ ∈ Znq. A sample from the latter distribution is of the form (a, b = p · 〈a, t〉 + x) for x ← χ; because x ∈ {− p− 2 1 ,... , p− 2 1 } with overwhelming probability, we may round b to the nearest multiple of p and learn the value of 〈a, t〉 mod p exactly. With enough samples of this form, we may then solve for t by linear algebra.

We are interested in error distributions χ over Zq that are derived from Gaussians. For any r > 0, define the one-dimensional Gaussian probability distribution by its density function Dr (x) = exp (−π(x/r)^2 )/r. For α > 0, define Ψ¯α to be the distribution on Zq obtained by drawing y ← Dα and outputting bq · ye mod q. Regev [46] demonstrated strong evidence for the hardness of the LWE problem with such a Gaussian error distribution, by giving a quantum reduction from approximating well-studied lattice problems to within O˜(n/α) factors in the worst case to solving LWEq, Ψ¯α , when (say) α · q ≥ n. Recently, Peikert [43] also gave a related classical reduction for similar parameters. For our public-key encryption algorithms, we also need the discrete Gaussian distribution DZm,r over the integer lattice Zm, which assigns probability propor- tional to

i∈[m] Dr^ (xi) to each^ x^ ∈^ Z

m. It is possible to sample efficiently from DZm,r for any r > 0 [25].

2.2 Key-Dependent Message Security

We now define key-dependent message security for encryption, following the presentation of Boneh et al. [13], which generalizes the definition of Black et al. [9]. In this definition, an adversary plays a game with a challenger that answers encryption queries for functions of the users’ secret keys. The adversary is restricted to queries for functions from a certain family, which we will denote F ⊂ {f | f : K^ → M}, where K and M are the keyspace and message space of the encryption scheme. Strictly speaking, F is a family of sets of functions parameterized by the security parameter n and the number of users. Let us fix a public-key encryption scheme, and let A be an adversary. We will write Enc(pk, m) to denote encrypting message m under public key pk. The game proceeds as follows:

  1. The challenger chooses a bit b ← { 0 , 1 }. It also chooses (pk 1 , sk 1 ),... , (pk, sk) by running the scheme’s key generation algorithm times. It gives pk 1 ,... , pk to the adversary.
  2. A makes encryption queries of the form (i, f ), where 1 ≤ i ≤ and f ∈ F. To process a query, if b = 0, the challenger computes m ← f (sk 1 ,... , sk)

modulo q of all those a¯i that have been kept so far; if so, (a, b) is kept, otherwise it is discarded. Note that the probability of keeping a particular sample is at least ϕ(q)/q ≥ 1 /2 (where ϕ denotes the Euler totient function), so with high probability, T accumulates the required n samples after drawing O(n^2 ) samples from D. Now by construction, A¯ is invertible modulo q. Also observe that each sample is kept or discarded based only on its a component, so when D = As,χ, we have b¯ = A¯T^ s + ¯x where ¯x is drawn from χn. The second stage actually transforms (fresh) samples from D into samples from a possibly different distribution. Given a draw (a, b) ∈ Znq × Zq from D, T outputs (a′, b′) ∈ Znq × Zq , where

a′^ = − A¯−^1 a and b′^ = b + 〈a′, b¯〉.

Observe that because A¯ is invertible modulo q and a ∈ Znq is uniform, a′^ ∈ Znq is uniform as well. We now consider the two cases for D. If D = U , then (a′, b′) is also distributed according to U , because b ∈ Zq is uniform and independent of a. If D = As,χ, then b = 〈a, s〉 + x for some x ← χ, so we have

b′^ = 〈a, s〉 + x − 〈 A¯−^1 a, A¯T^ s〉 + 〈a′, x¯〉 = 〈a′, x¯〉 + x.

Therefore, (a′, b′) is distributed according to A¯x,χ, as desired.

3.2 The Cryptosystem

We now define a KDM-secure cryptosystem based on the LWE problem. For technical reasons, our construction uses a prime power modulus q = p^2 of a certain size, with messages taken over Zp. (Other choices of q = pe^ are possible, but q = p^2 seems to correspond to the mildest underlying assumption.) Note that any element v ∈ Zq may be written as v = (v 1 , v 0 ) ∈ Zp × Zp, where v 1 and v 0 are the most and least significant digits in the base-p representation of v, respectively, with the digits chosen from the set of residues {− p− 2 1 ,... , p− 2 1 }. Recall that by Lemma 1, the LWE distribution As,χ (for uniform s ∈ Znq ) is pseudorandom if the search problem LWEq,χ is hard, and if the error distribution χ is concentrated on { 0 } × Zp (which will be the case in our system, by design). For simplicity, we start with a scheme that encrypts a single element of Zp at a time, later extending it to an amortized version in Section 3.4. Our scheme is very similar to Regev’s cryptosystem [46], with two main differences. First, the entries of the secret key s ∈ Znq are chosen from the (narrow) error distribution χ (rather than uniformly), so that they may be represented unambiguously as elements of the message space Zp (see Lemma 3); this is secure due to Lemma 2. Second, we modify the encryption algorithm so that it induces a ‘nice’ distribution over ciphertexts (see Lemma 4). Specifically, the encryption algorithm chooses a random vector r ∈ Zm^ from a discrete Gaussian distribution (rather than from { 0 , 1 }m), and adds a small extra term e to ‘smooth out’ the ciphertext distribution. These steps may be seen as applying Regev’s main worst-case to average-case reduction [46] to the (already random) public key.

Construction 1 The construction is parametrized by q = p^2 for some prime p, and an error parameter α; we instantiate these parameters below. Let χ = Ψ¯α, the discretized Gaussian over Zq.

  • Key generation: The secret key is s ← χn. The public key is (A, b) ∈ Znq ×m× Zmq , which is made up of m ≥ 2(n + 1) lg q draws (ai, bi) from As,χ. That is, b = AT^ s + x for independent A ← Znq ×mand x ← χm.
  • Encryption: Before specifying the encryption algorithm, we define a dis- tribution EA,b over Znq × Zq , which has parameters r = ω(

log m) and r′^ = r ·

m · (α + (^21) q ). The distribution is obtained by choosing r ← DZm,r and e ← Ψ¯r′^ and outputting

(Ar, 〈r, b〉 + e) ∈ Znq × Zq.

To encrypt a message z ∈ Zp given the public key (A, b), draw a sample (u, v) from EA,b and output the ciphertext (u, c = v + z · p) ∈ Znq × Zq.

  • Decryption: To decrypt a ciphertext (u, c) given the secret key s, output the z ∈ Zp such that z · p is closest to c − 〈u, s〉 modulo q.

The main constraints on the parameters are given by the correctness require- ment (α cannot be too large) and the hardness requirement (α should be large enough to invoke the worst-case lattice connections of [46, 43]). These constraints are satisfied if the following inequalities hold true:

n q

n p^2

≤ α ≤

p ·

m · ω(log n)

By routine calculations, it is possible to satisfy the above inequalities for m = O(n log n), p = O˜(

mn), and α = 1/ O˜(m ·

n). This yields an underlying worst-case approximation factor of O˜(n/α) = O˜(n^2.^5 ) for lattice problems such as GapSVP.

Theorem 2. For parameters satisfying Equation (1), the above cryptosystem is KDM-secure with respect to the set of affine functions over Zp, assuming that LWEq,χ is hard.

3.3 Proof of Security

Overview. The proof of Theorem 2 has the following structure. First we show completeness, including correct decryption of key-dependent messages. Next we prove KDM security in two main steps. The first step is to show that the view of the adversary in the real attack game may be generated faithfully, up to negligible statistical distance, via an alternate game: starting from the distribution As,χ (for uniformly random s ∈ Znq ), the game invokes the transformation from Lemma 2 several times to produce independent distributions As 1 ,χ, As 2 ,χ,... for each user (where each si ← χn), and generates the users’ public keys from these distributions in the natural way.

Finally, the next lemma is used for showing statistical security in the final hybrid game.

Lemma 6. With overwhelming probability over the choice of a ‘malformed’ public key (A, b) from the uniform distribution U (Znq ×m× Zmq ), the distribution EA,b is within negligible statistical distance of the uniform distribution U (Znq × Zq ).

Proof Details.

Correctness. By Lemma 4, the noise in the c component of a ciphertext is distributed according to Ψ¯β for some

β ≤

2 r′^ ≤ 4 α

m · ω(

log n) ≤

p · ω(

log n)

by Equation (1). By the exponential tail inequality for Gaussians and the defini- tion of Ψ¯β , the noise term does not exceed q/ 2 p = p/2, except with negligible probability. We remark that the scheme can be made correct with probability 1 by modifying the key generation and encryption schemes to reject and re-sample values of x, r, e that are ‘too long;’ however, this comes at the cost of an extra O˜(√n) factor in the noise parameter α and the underlying approximation factor for lattice problems.

The first hybrid game. We now describe an alternate game that faithfully simulates the true KDM attack game, up to negligible statistical distance. The game starts with access to the distribution As,χ for uniformly random s ∈ Znq. For each user i, it applies the transformation described in Lemma 2 (using fresh draws from As,χ) to produce the distribution Asi,χ, where si is distributed according to χn. As a side-effect, the transformation also outputs invertible square matrices A¯i ∈ Znq×n and vectors b¯i ∈ Znq such that for all i,

s = A¯−i T(b¯i − si) mod q.

Note that by setting the right-hand sides equal for any i, j and reducing modulo p, we have

A¯−T i (si^ −^ b¯i) = A¯−T j (sj^ −^ b¯j ) mod p ⇐⇒ si = A¯Ti,j · sj + b¯i,j mod p, (2)

where A¯i,j = A¯− j 1 A¯i and ¯bi,j = ¯bi − A¯Ti,j · b¯j. The game then generates a public key (Ai, bi) for each user i in the usual way by drawing m samples from Asi,χ. We now describe how the game answers (key-dependent) message queries. Suppose the adversary requests an encryption, under the jth user’s public key (Aj , bj ), of the function ft,w(si) = 〈t, si〉 + w ∈ Zp (for some t ∈ Znp , w ∈ Zp) applied to the ith user’s secret key si. Observe that

ft,w(si) = 〈t, si〉 + w = ( A¯i,j · t ︸ ︷︷ ︸ t′∈Znp

)T^ · si + 〈t, b¯i,j 〉 + w ︸ ︷︷ ︸ w′∈Zp

The game therefore draws a sample (u, v) ← EAj ,bj and outputs

(u − t′^ · p, v + w′^ · p) ∈ Znq × Zq.

This completes the description of the game. By the above description and Lemmas 2 and 5, the following claim is apparent.

Claim. The views of the adversary in the real attack game and in the hybrid game are within negligible statistical distance.

The final hybrid game. The last hybrid game proceeds exactly as the one above, except that the initial distribution As,χ is replaced with U (Znq × Zq ). Note that the game above only treats As,χ as an oracle (it never uses s directly), so As,χ may be replaced in this way. Now by Lemma 2, all the public keys (Ai, bi) generated by the game are uniform and independent. Moreover, by Lemma 6, all the (key-dependent) message queries are answered by ciphertexts that are uniform and independent of the message. The next claim follows, and the proof of Theorem 2 is complete.

Claim. Assuming that LWEq,χ is hard, the two hybrid games are computationally indistinguishable. Moreover, the adversary’s advantage in the final hybrid game is negligible.

3.4 Amortized Extension

The system described in Section 3.2 encrypts only a single element z ∈ Zp per syndrome u ∈ Znq , so the ciphertext is a factor at least n larger than the message, and the encryption algorithm performs at least n · m operations per message element. Peikert, Vaikuntanathan, and Waters [44] proposed a significantly more efficient amortized version of the cryptosystem, which can encrypt ` = O(n) symbols using only about twice the time and space as the basic scheme. We can show that a variant of that system is also KDM-secure.

Construction 3 Just as in Construction 1, the scheme is parametrized by q = p^2 and α ∈ (0, 1).

  • Key generation: The secret key is S ← χn×. The public key is (A, B) ∈ Znq ×m× Zmq ×for m ≥ 2(n + ) lg q, where B = AT^ S + X for independent A ← Znq ×mand X ← χm×.
  • Encryption: first define the distribution EA,B over Znq × Z`q , obtained as follows: choose r ← DZm,r where r = ω(

log m), choose e ← Ψ¯ (^) r`′ where r′^ = r ·

` · m · (α + (^21) q ), and output (u, v) = (Ar, BT^ r + e). Note that the parameter r′^ is a

factor larger than in Construction 1. To encrypt a message z ∈ Zp, draw (u, v) ← EA,B and output (u, c = v + z · p).

  • Decryption: output the z ∈ Z`p such that z · p is closest to c − ST^ u modulo q.

We should also show how to sample the noise vector in quasilinear time without using too many random bits. At first glance, this seems to be hard, and indeed, we are not aware of any such sampling procedure^8. However, we can bypass this problem by using a fast sampling procedure suggested in [5]. This procedure Sam samples an m-length noise vector e by using more than m random bits. To compensate this loss Sam also outputs a “leftover” vector – a vector v which is almost-random even when e is given. This allows us to concatenate v to the output of the PRG.

4.2 The Construction

The following lemma shows that for a random matrix A, the mapping (s, e) 7 → As + e is pseudorandom even when it is applied to polynomially-many random strings s 1 ,... , s`. The proof combines the ideas of [10] with a standard hybrid argument and is therefore omitted from this version.

Lemma 8. Let 0 < ε < 12 be a noise parameter and let m(n), (n) be arbitrary polynomials. If LPNε is hard, then the distribution (A, A·S+E) is pseudorandom, where A ← Um(n)×n, S ← Un×(n), and E ← Berm ε (n)×`(n).

The following fact is based on [16].

Fact 4 For every r ≤ 0. 172 the product of a matrix in Zm×m

r 2 and a matrix in Zm

r (^) ×m 2 can be computed by a circuit of size^ O˜(m^2 ). We will use a sampling procedure due to [5]. Lemma 9 (implicit in [5]). There exist positive integers k > 1 and c > 2 k, and a sampling algorithm Sam that uses (k + k/c)N random bits and outputs a pair of strings (e, v) whose joint distribution is 2 −Ω(N^ )^ statistically-close to (BerN 2 −k , Ukn). Moreover, Sam can be implemented in NC^0 and therefore by a circuit family of size O(N ). We can now present our construction.

Construction 5 Let N = n^12. Let k, c and Sam : { 0 , 1 }(k+k/c)N^ → { 0 , 1 }N^ × { 0 , 1 }kN^ be the constants and sampling algorithm promised by Lemma 9. Let e(r) and v(r) denote the first and second entries of Sam(r). Define the function

G(A, S, r) def = (A, A · S + e(r), v(r))

where, A ∈ Zn

(^6) ×n 2 ,^ S^ ∈^ Z

n×n^6 2 ,^ r^ ∈ {^0 ,^1 }

(k+k/c)N (^) , e(r) is parsed as a matrix in Zn

(^6) ×n 6 2 , and matrix addition is computed entry-wise. Theorem 6. Assuming that LPN 2 −k is hard, the function G defined in Con- struction 5 is a PRG with linear-stretch that can be computed by a circuit family of size quasilinear in the output length. (^8) For example, the time complexity of the noise-sampling procedure of [22] is quadratic in the length of the error vector (for a constant error rate).

Proof. It can be easily verified that G takes less than (k + 0.6)N input bits and outputs more than (k + 1)N bits, and therefore, the stretch is linear in the input length. Pseudorandomness follows by Lemmas 9 and 8 as the tuple (A, A · S + e(r), v(r)) is statistically-indistinguishable from the tuple (A, A · S + e(r), Ukn^7 ), which, in turn, is computationally-indistinguishable from Un^4.^5 +n^7 +kn^7. Finally, by Fact 4, Lemma 9, and since entry-wise addition of two matrices is computable by linear-size circuits, the generator G can be computed by a circuit-family of size O˜(N ). ut

5 Weak Randomized PRF

An efficiently computable randomized function family F : { 0 , 1 }n^ × { 0 , 1 }m(n)^ → { 0 , 1 }s(n)^ is called a randomized weak pseudorandom function (RWPRF) if it satisfies the following:

  • (weak pseudorandomness) For every polynomial p(·) the sequence ( A 1 , FS (A 1 ),... , Ap(n), FS (Ap(n))

is pseudorandom,

where S ← Un and (A 1 ,... , Ap(n)) ← (Um)p(n)^ and fresh internal randomness is used in each evaluation of FS.

  • (verifiability) There exists an efficient equality-tester algorithm V such that

Pr[V (Y 1 , Y 2 ) = equal] > 1 − negl(n) Pr[V (Y 1 , Y 2 ′ ) = not-equal] > 1 − negl(n),

where S ← Un, A ← Um, A′^ ← Um, Y 1 ← FS (A), Y 2 ← FS (A), and Y 2 ′ ← FS (A′).

The PRG construction from the previous section, suggests a simple implemen- tation of RWPRF. We let S ∈ Zn 2 ×`(n)be the secret key of the function family, and let A ∈ Zm 2 (n)×nbe the argument on which the function is being evaluated.

The randomized function is defined as fS(A) = AS + E where E ∈ Berm ε(n)×(n) is a secret error vector which is randomly chosen in each invocation. By Lemma 8, the resulting function family is pseudorandom when it is evaluated on randomly chosen inputs A 1 ,... , Aq. Also, given y = fS(A) and y = fS(B), one can easily check, with overwhelming probability, whether A and B are equal, even without knowing the key S. Note that now we have no limitation on the amount of randomness used to generate the error matrix E. Hence, we can rely on the hardness of, say LPN 1 / 4 , and generate the error matrix E by taking the entry-wise product of 2 random matrices. The resulting function is quite efficient, and can be computed by a depth two Boolean circuit of size O(nm), or, by a circuit of size O˜(m) for a proper choice of the parameters. (The first option uses the trivial circuit for matrix multiplication, and the latter relies on Fact 4.) When(n) = m(n) the function is symmetric, that is, one can replace the role of the argument and the key without violating the pseudorandomness property.

Comparison to the OPRF of [23]. Let us briefly compare the efficiency of our scheme to the standard instantiation of OPRF [23] which is based on the Naor- Reingold function [42]. Our scheme uses large number of OT calls – if we set ` to be 1, which does not affect the security of the construction, this number is linear in the security parameter n. In contrast, the FIPR scheme uses only O(m) calls where m is the length of the input. On the other hand, the additional overhead of FIPR is m modular multiplications and a single exponentiation, where our protocol performs only m vector additions (O(mn) bit-wise XORs). This tradeoff is interesting as, by using the batch-OT protocol of [33], OT operations cost almost as little as symmetric operations. Furthermore, by using standard techniques one can compute all the OT operations in a preprocessing stage. In such case, it seems that the current scheme has the potential to obtain better performance, at least in some usage scenarios. (This possibility deserves further study.) Application. Oblivious evaluation of pseudorandom function was recently used by Hazay and Lindell [30] to obtain an efficient two-party protocol for secure set-intersection (an explicit version for the semi-honest model appears in [23]). Our construction can be used in their protocol whenever the inputs of the parties are randomly distributed. This restriction is natural in some scenarios (e.g., when the inputs are names of entities or keys that were randomly selected by some authority) and can be always obtained at the expense of using a random oracle. We also note that RWPRF can be used to derive an identification scheme: we let parties share a key for the RWPRF and verify the identity of a party by querying the value of the function on a random point. When this protocol is instantiated with our function we get the well known HB protocol [32]. (This view is implicit in [36].)

6 Fast Circular-Secure Symmetric Encryption

6.1 The Construction

We now construct a symmetric encryption scheme. Our construction can be viewed as using the previous weak, randomized PRF in an analogous way to the standard construction of symmetric encryption from PRF, except that to deal with the error introduced by the PRF randomization we need to make the message redundant. This is done by employing an additional efficiently decodable error correcting code. As mentioned before, a similar construction was suggested in [26]. Let =(n) be a message-length parameter which is set to be an arbitrary polynomial in the security parameter n. (Shorter messages are padded with zeroes.) Let ε = 2−k^ and 0 < δ < 1 be constants. We will use a family of good binary linear codes with information words of length (n) and block length m = m(n), that has an efficient decoding algorithm D that can correct up to (ε + δ) · m errors. We let G = G be the m × ` binary generator matrix of this family and we assume that it can be efficiently constructed (given 1n).

Construction 7 Let N = N (n) be an arbitrary polynomial (which controls the tradeoff between the key-length and the time complexity of the scheme). The private key of the scheme is a matrix S which is chosen uniformly at random from Zn 2 ×N.

  • Encryption: To encrypt a message M ∈ Z` 2 × N, choose a random A ← Zm 2 ×n and a random noise matrix E ← Bermε ×N. Output the ciphertext

(A, A · S + E + G · M).

  • Decryption: Given a ciphertext (A, Z) apply the decoding algorithm D to each of the columns of the matrix Z − AS and output the result.

Observe that the decryption algorithm errs only when there exists a column in E whose Hamming weight is larger than (ε + δ)m, which, by Chernoff Bound, happens with negligible probability.

Quasilinear-time implementation. To get a quasilinear time implementation (for sufficiently long messages), we instantiate the above scheme with the error- correcting codes of Spielman [47, Thm. 19] which maps bits to m = Θ() bits with constant relative-distance and with the property that the encoding can be computed via a circuit of size O() and the decoding can be decoded by a circuit of size O( log ). Hence, the complexity of encryption (and decryption) is dominated by the complexity of the product A · S. (The error matrix E can be generated in linear time by taking the entry-wise product of k random matrices R(1),... , R(k)^ ← Zm 2 ×N.) To compute this product in quasilinear time we set N = n^6 and assume that m = Ω(n^6 ), i.e., assume that the message length N · is at least Ω(n^12 ). In this case, by Fact 4, the encryption and decryption can be computed by a circuit of size O˜(N `).

Useful properties. The scheme enjoys several useful “homomorphic properties” which follow from its linear structure. In particular, given an encryption (A, Y) of an unknown message M under an unknown key S, one can transform it to an encryption (A′, Y′) of M + M′^ under the key S + S′, for any given M′, S′. This is done by letting A′^ = A and Y′^ = Y + AS′^ + GM′. Furthermore, if the message M is the all zeroes string, then it is possible to convert the ciphertext (A, Y) to be an encryption (A′, Y′) of the key S itself or, more generally, to be an encryption of T · S for an arbitrary linear transformation T ∈ Z` 2 × n. This is done by letting Y′^ = Y and A′^ = A + G · T. Indeed, in this case Y′^ = A′S + E + G(TS).

By choosing T to be the

In (^0) `−n×n

, we can get an encryption of the key itself

(padded with zeroes). We summarize these properties in the following lemma.

Lemma 11. There exist efficiently computable transformations f, g, h such that for every unknown S ∈ Zn 2 ×Nand M ∈ Z2 × N and known S′^ ∈ Zn 2 ×N, M′^ ∈ Z 2 × N and T ∈ Z2 × n: f (M′, EncS(M)) ≡ EncS(M + M′), g(S′, EncS(M)) ≡ EncS+S′ (M), and h(T, EncS(0×N^ )) ≡ EncS(TS), where EncK(A) denotes a random encryption of the message A under the key K.