Docsity

Spooky Encryption and its Applications, Lecture notes of Cryptography and System Security

Toggle sidebar
bg1
Spooky Encryption and its Applications
Yevgeniy Dodis
NYU
Shai Halevi
IBM Research
Ron D. Rothblum
MIT
Daniel Wichs
Northeastern University
May 6, 2016
Abstract
Consider a setting where inputs x1, . . . , xnare encrypted under independent public keys.
Given the ciphertexts {ci=Encpki(xi)}i, Alice outputs ciphertexts c0
1, . . . , c0
nthat decrypt to
y1, . . . , ynrespectively. What relationships between the xi’s and yi’s can Alice induce?
Motivated by applications to delegating computations, Dwork, Langberg, Naor, Nissim and
Reingold [DLN+04] showed that a semantically secure scheme disallows signaling in this setting,
meaning that yicannot depend on xjfor j6=i. On the other hand if the scheme is homomorphic
then any local (component-wise) relationship is achievable, meaning that each yican be an
arbitrary function of xi. However, there are also relationships which are neither signaling nor
local. Dwork et al. asked if it is possible to have encryption schemes that support such “spooky”
relationships. Answering this question is the focus of our work.
Our first result shows that, under the LWE assumption, there exist encryption schemes sup-
porting a large class of “spooky” relationships, which we call additive function sharing (AFS)
spooky. In particular, for any polynomial-time function f, Alice can ensure that y1, . . . , yn
are random subject to Pn
i=1 yi=f(x1, . . . , xn). For this result, the public keys all depend on
common public randomness. Our second result shows that, assuming sub-exponentially hard in-
distinguishability obfuscation (iO) (and additional more standard assumptions), we can remove
the common randomness and choose the public keys completely independently. Furthermore,
in the case of n= 2 inputs, we get a scheme that supports an even larger class of spooky
relationships.
We discuss several implications of AFS-spooky encryption. Firstly, it gives a strong counter-
example to a method proposed by Aiello et al. [ABOR00] for building arguments for NP from
homomorphic encryption. Secondly, it gives a simple 2-round multi-party computation protocol
where, at the end of the first round, the parties can locally compute an additive secret sharing
of the output. Lastly, it immediately yields a function secret sharing (FSS) scheme for all
functions.
We also define a notion of spooky-free encryption, which ensures that no spooky relationship
is achievable. We show that any non-malleable encryption scheme is spooky-free. Furthermore,
we can construct spooky-free homomorphic encryption schemes from SNARKs, and it remains
an open problem whether it is possible to do so from falsifiable assumptions.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c

Partial preview of the text

Download Spooky Encryption and its Applications and more Lecture notes Cryptography and System Security in PDF only on Docsity!

Spooky Encryption and its Applications

Yevgeniy Dodis

NYU

Shai Halevi

IBM Research

Ron D. Rothblum

MIT

Daniel Wichs

Northeastern University

May 6, 2016

Abstract Consider a setting where inputs x 1 ,... , xn are encrypted under independent public keys. Given the ciphertexts {ci = Encpki (xi)}i, Alice outputs ciphertexts c′ 1 ,... , c′ n that decrypt to y 1 ,... , yn respectively. What relationships between the xi’s and yi’s can Alice induce? Motivated by applications to delegating computations, Dwork, Langberg, Naor, Nissim and Reingold [DLN+04] showed that a semantically secure scheme disallows signaling in this setting, meaning that yi cannot depend on xj for j 6 = i. On the other hand if the scheme is homomorphic then any local (component-wise) relationship is achievable, meaning that each yi can be an arbitrary function of xi. However, there are also relationships which are neither signaling nor local. Dwork et al. asked if it is possible to have encryption schemes that support such “spooky” relationships. Answering this question is the focus of our work. Our first result shows that, under the LWE assumption, there exist encryption schemes sup- porting a large class of “spooky” relationships, which we call additive function sharing (AFS) spooky. In particular, for any polynomial-time function f , Alice can ensure that y 1 ,... , yn are random subject to ∑n i=1 yi^ =^ f^ (x^1 ,... , xn). For this result, the public keys all depend on common public randomness. Our second result shows that, assuming sub-exponentially hard in- distinguishability obfuscation (iO) (and additional more standard assumptions), we can remove the common randomness and choose the public keys completely independently. Furthermore, in the case of n = 2 inputs, we get a scheme that supports an even larger class of spooky relationships. We discuss several implications of AFS-spooky encryption. Firstly, it gives a strong counter- example to a method proposed by Aiello et al. [ABOR00] for building arguments for NP from homomorphic encryption. Secondly, it gives a simple 2-round multi-party computation protocol where, at the end of the first round, the parties can locally compute an additive secret sharing of the output. Lastly, it immediately yields a function secret sharing (FSS) scheme for all functions. We also define a notion of spooky-free encryption, which ensures that no spooky relationship is achievable. We show that any non-malleable encryption scheme is spooky-free. Furthermore, we can construct spooky-free homomorphic encryption schemes from SNARKs, and it remains an open problem whether it is possible to do so from falsifiable assumptions.

Contents

  • 1 Introduction
    • 1.1 Technical Overview
    • 1.2 Related Work
  • 2 Definitions
    • 2.1 Local, No-Signaling, and Spooky Relations
    • 2.2 Spooky Encryption
    • 2.3 Additive-Function-Sharing Spooky Encryption
  • 3 LWE-Based Spooky Encryption
    • 3.1 Learning with Errors (LWE) and Multi-Key FHE
    • 3.2 LWE-Based AFS Spooky Encryption
    • 3.3 Beyond AFS-2-Spooky Encryption
  • 4 piO based Spooky Encryption
    • 4.1 Tools
    • 4.2 Two-Key Spooky Encryption from piO
    • 4.3 piO based Multi-key Spooky Encryption
  • 5 From 2-Input to n-Input AFS-Spooky
  • 6 Applications of Spooky Encryption
    • 6.1 Counter Example for the [ABOR00] Heuristic
    • 6.2 2-Round MPC from AFS-Spooky Encryption
    • 6.3 Function Secret Sharing
  • 7 Spooky-Free Encryption
    • 7.1 Application: Succinct 1-round Arguments for NP
    • 7.2 Non-Malleable Encryption is Spooky-Free
    • 7.3 Homomorphic Spooky-Free Encryption
  • References
  • A Proof of Theorem
  • In Section 5 we describe a transformation from a scheme that supports only two-input spooky relations on one-bit inputs to one that supports AFS spooky relations on arbitrary number of inputs (of arbitrarily length each). This transformation can be applied to both our LWE-based and piO-based constructions from above.
  • We show several implications of (AFS-)spooky encryption. On a negative, it gives a strong counter-example to a method proposed by Aiello et al. [ABOR00] for building succinct ar- guments for NP from homomorphic encryption^2 , resolving a question posted by [DLN+04]. On a positive, it immediately yields a function secret sharing (FSS) scheme for all func- tions [BGI15, GI14], and also gives a simple 2-round multi-party computation protocol where, at the end of the first round, the parties can locally compute an additive secret sharing of the output. These application are discussed in Section 6.
  • We also study in Section 7 the concept of spooky free encryption, i.e., an encryption scheme where we can prove that no spooky strategy is feasible. We show that any non-malleable en- cryption scheme is spooky-free, and also build spooky-free homomorphic encryption schemes from SNARKs. It remains an open problem to construct spooky-free homomorphic encryp- tion under more standard assumptions. Spooky-free homomorphic encryption can be used to instantiate the approach of Aiello et al. to get succinct arguments for NP.

1.1 Technical Overview

1.1.1 LWE-based construction

Our LWE-based construction builds on the multi-key FHE scheme from [CM15, MW16]. In that scheme (after some syntactic massaging) secret keys and single-key ciphertexts are vectors in Znq , and decryption consists of computing the inner product modulo q, w = 〈~s, ~c〉, then rounding to the nearest multiple of q/2, outputting zero if w is closer to 0 or one if w is closer to q/2. That scheme, however, also supports homomorphic computation across ciphertexts relative to different keys. Roughly, it features a “lifting procedure” where a dimension-n ciphertext vector relative to one key ~si is “lifted” to a dimension n vector ~c′^ = (~c′ 1 ,... , ~c′) relative to the con- catenated key ~s′^ = (~s 1 ,... , ~s) of dimensionn. These lifted ciphertexts can still be computed on, and the decryption procedure proceeds just as before, except using the higher-dimension vectors.

Namely, to decrypt ~c′^ using s~′, one first computes the inner product w′^ =

s~′, ~c′

modulo q, then

rounds to the nearest multiple of q/2. In other words, we compute the individual inner products

wi =

~si, ~c′i

, then add them all up and round to the nearest multiple of q/2. We observe (cf. Lemma 3.2) that for the special case of two keys, ` = 2, instead of adding the wi’s and then rounding, we can first round each wi to the nearest multiple of q/2 and then add, and this yields the same result with high probability. Specifically, the error probability is propositional to the rounding error for the overall sum w′. Hence by setting the parameters so that w′^ is very close to a multiple of q/2, we can ensure very low error probability. This observation immediately yields additive function sharing (AFS) spooky encryption for two-argument functions: We just directly use the scheme from [CM15, MW16] to encrypt the two arguments x 1 , x 2 under two keys, then use the multi-key evaluation procedure to compute a

(^2) Although included in the ICALP conference proceedings, the article [ABOR00] was withdrawn before the con- ference and was not presented there.

multi-key ciphertext ~c′^ = (~c′ 1 , ~c′ 2 ) encrypting the value f (x 1 , x 2 ). Viewing each ~c′i as a single- key ciphertext, we just apply the usual decryption procedure of inner-product and rounding to each of them, and the resulting two bits are an additive secret sharing of f (x 1 , x 2 ), except with a small error probability. The error probability can be made negligible by relying on LWE with a super-polynomial approximation factor.

1.1.2 piO-based construction

The LWE-based construction from above inherits from the underlying FHE scheme [CM15, MW16] its dependence on common public randomness, and it suffers from a small probability of error (depending on parameters, this may or may not be negligible). In Section 4 we show that using iO we can construct an AFS encryption scheme without CRS and without errors, and moreover we can support arbitrary spooky relations on two bits, not just additive sharing. For this overview, however, let us focus on the simpler task of constructing AFS spooky scheme for the multiplication function MULT(b 1 , b 2 ) = b 1 · b 2. The starting point of the construction takes a homomorphic encryption scheme (Gen, Enc, Dec, Eval) and adds to the public key an obfuscation of the randomized functionality that decrypts, computes the functions f , and re-encrypts secret-sharing of the result. Specifically, let us denote for any x 1 , y 1 ∈ { 0 , 1 } the function fx 1 ,y 1 (x 2 ) = x 1 · x 2 ⊕ y 1 , and consider the following randomized pro- gram:

Program Psk 1 ,pk 1 (c 1 , pk 2 , c 2 )

  1. y 1 ← { 0 , 1 }. 4. c′ 2 = Eval(pk 2 , fx 1 ,y 1 , c 2 ).
  2. c′ 1 ← Encpk 1 (y 1 ). 5. Output (c′ 1 , c′ 2 ).
  3. x 1 = Decsk 1 (c 1 ).

Given the two pairs (pk 1 , Encpk 1 (x 1 )), (pk 2 , Encpk 2 (x 2 )), and access to the program Psk 1 ,pk 1 , we can run use Psk 1 ,pk 1 (c 1 , pk 2 , c 2 ) to get two ciphertexts c′ 1 and c′ 2 , encrypting y 1 , y 2 , respectively, such that y 1 ⊕ y 2 = x 1 · x 2. We would like, therefore, to add an obfuscation of Psk 1 ,pk 1 to the public key, thereby obtaining AFS spooky multiplication. As described, however, this construction is not even secure when Psk 1 ,pk 1 (c 1 , pk 2 , c 2 ) is only accessed by a perfect black box. The reason is that if the underlying homomorphic encryption is not circuit private, then the evaluated ciphertext c′ 2 could leak information about x 1. To fix this issue, we require the use of circuit-private homomorphic encryption in this construction. In fact, since the adversary could run the program Psk 1 ,pk 1 (c 1 , pk 2 , c 2 ) on arbitrary inputs of its choice, we need a stronger notion of circuit privacy against malicious adversaries [OPP14], that guarantees privacy even if the public-key and ciphertext given to the evaluation algorithm are generated adversarially. Using a malicious circuit private homomorphic encryption scheme, the construction above would be secure if the program Psk 1 ,pk 1 (c 1 , pk 2 , c 2 ) is accessed as a perfect black box (e.g., using VBB obfuscation). However, we would like to rely on the weaker notion of indistinguishability obfuscation (iO), or rather probabilistic iO [CLTV15] (since we are dealing with a randomized program). To do so, we need to somehow argue that the secret key sk 1 that is encoded within the program Psk 1 ,pk 1 is hidden by the weaker obfuscation. To that end we use a technique introduced in the recent work of Canetti et al. [CLTV15]. In one of our hybrids we replace pk 1 with a lossy public-key that reveals

plaintexts we get:

⊕

i∈[n]

j∈[n]

xi,j ⊕

j∈[n]

zj,i

i,j∈[n]

(xi,j ⊕ yi,j ) =

i,j∈[n]

ui · vj = (

i

ui) · (

j

vj ) (1)

which is indeed the result of the multiplication gate.

Thus, if the scheme can support 2d interleaved hops of (two-key) spooky multiplication and (single-key) additive homomorphism then it is an AFS-spooky scheme for the class of all depth d arithmetic circuits. We note that the resulting scheme does not depend on the number of inputs or their length, and it only depends on the complexity of C inasmuch as the underlying scheme depends on the depth of the evaluated circuit. We also mention that the LWE-based scheme does not naturally allow multiple hops, but we can easily extend it to allow this via bootstrapping.

1.1.4 Applications of Spooky Encryption

In Section 6 we describe both positive and negative applications of spooky encryption. On the positive, it immediately yields a function secret sharing (FSS) scheme for all functions [BGI15, GI14]. Previously such a general function secret sharing scheme was only known to follow from sub-exponentially hard indistinguishability obfuscation [BGI15] whereas we can base it on LWE (using our LWE based spooky encryption). Spooky encryption also gives a simple 2-round multi-party computation protocol. Roughly, AFS-spooky encryption lets each party broadcast an encryption of its input under its own key, then everyone individually performs the AFS-spooky evaluation locally, each party can locally decrypt and recover a share of the output, and the output is recover using another round of communication. There are some technicalities that should be addressed for this idea to work, and perhaps the easiest way of addressing them is to use AFS-spooky encryption to construct multi-key FHE with threshold decryption (TMFHE) (as defined in [MW16]), which can then be used to get a two-round protocol as shown in [MW16]. Using our obfuscation based construction (which does not require a CRS), this gives the first 2-round semi-honest secure MPC protocol in the plain model.^3 On the negative side, AFS-spooky encryption yields a counter-example for the transformation of Aiello et al. [ABOR00] from multi-prover (MIP) to single-prover protocols. Their idea was to send all of the MIP queries to a single prover, but encrypted under independents keys of a homomorphic encryption scheme. The single prover can homomorphically implement the actions of the MIP provers on the individual encrypted queries, and hopefully the fact that the queries are encrypted under independent keys means that no cross-influence is possible. It is easy to see that spooky encryption violates this hope (by its very nature). Moreover, we show that this transformation can lead to a total break of soundness - in Section 6.1 we show how using AFS-spooky encryption can lead to an unsound single-prover protocol, when the transformation is applied to a simple two-prover protocol for graph 3-colorability.

(^3) In contrast, [GGHR14] and [MW16] construct 2-round protocols in the CRS model. As for security against a malicious adversary, [KO04] show that 5 rounds are necessary in the plain model (with respect to black-box proofs of security).

1.1.5 Spooky-Free Encryption

Finally, in Section 7 we discuss the notion of spooky-free (SF) encryption, which provably ensures that any correlation that an attacker can induce between the original messages (m 1 ,... , mn) and “tampered messages” (m′ 1 ,... , m′ n), can be simulated by a “local simulator” that produces m′ i only as a function of mi (and some shared randomness). See Definition 7.1. To validate this definition, we show that a spooky-free FHE suffices to prove the security of the natural approach of Aiello et al. [ABOR00], which was discussed above, of converting a succinct MIP into a succinct one-round argument discussed above. Indeed, spooky-freeness ensures that the attacker cannot cause more damage from seeing all n ciphertexts than what it could have done by seeing each plaintext independently. We then turn to the systematic study of spooky-free encryption. First, we show that spooky- freeness implies semantic security. On the other hand, a very weak form of non-malleability (called 1-non-malleability here, or 1-bounded CCA security in [CHH+07]) implies spooky-freeness. How- ever, since the scheme is non-malleable, it is inherently not homomorphic and so we cannot use it to obtain a delegation scheme via the foregoing approach. See Section 7.2. Indeed, to instantiate the approach of Aiello et al. constructing succinct arguments for NP, we need a homomorphic encryption scheme which is spooky free. As a proof of concept, in Section 7. we show how to built such a homomorphic spooky-free encryption using succinct non-interactive ar- guments of knowledge (SNARKs [GW11, BSW12]), true-simulation-extractable NIZKs [DHLW10] and regular FHE. While the use of SNARKs makes this construction uninteresting in the appli- cation to succinct arguments, the clean definition of SF-encryption, coupled with our “proof of concept” implementation, might open the door for future constructions that will be more useful.

1.2 Related Work

The starting point for this line of work is the natural approach, suggested by Aiello et al. [ABOR00], for constructing a secure delegation scheme by combining a multi-prover interactive proof-system (MIP) with a homomorphic encryption scheme as described above. This intuition was questioned by Dwork et al. [DLN+04] and our work confirms, under reasonable cryptographic assumptions, that indeed, the approach of [ABOR00] is not necessarily secure. An approach to overcoming this barrier was taken by Kalai et al. [KRR13, KRR14]. They designed a specific MIP (for P) that is sound even against arbitrary no-signaling adversaries. Since semantic-security rules out signaling strategies, they obtain a secure delegation protocol for any language in P.

Multi-key FHE. A notion that is related to spooky-encryption, introduced by L´opez-Alt et al. [LTV12] is that of multi-key FHE. In a multi-key FHE, similarly to a spooky encryption scheme, the ho- momorphic evaluation procedure gets as input n ciphertexts encrypted under different keys. The difference is that the output of the evaluation in a multikey FHE is a single ciphertext that can only be decrypted by combining all the n keys. In contrast, in a spooky encryption scheme the result of the spooky evaluation is n ciphertexts, c 1 ,... , cn where each ci is encrypted under the ith^ original,. Thus, spooky encryption can be thought of as a specific type of multi-key FHE.

Definition 2.2 (Spooky Encryption). Let (Gen, Enc, Dec) be a public-key bit-encryption scheme and Spooky-Eval be a polynomial-time algorithm that takes as input a (possibly randomized) circuit with n = n(κ) inputs and n outputs, C : ({ 0 , 1 }∗)n^ → ({ 0 , 1 }∗)n, and also n pairs of (public-key, ciphertext), and outputs n ciphertexts. Let C be a class of such circuits, we say that (Gen, Enc, Dec, Spooky-Eval) is a C-spooky encryption scheme if for every security parameter κ, every randomized circuit C ∈ C, and every input ~x = (x 1 ,... , xn) for C, the distributions

SP OOK[C, x 1 ,... , xn] def =    (Dec(sk 1 , c′ 1 ),... , Dec(skn, c′ n)) :

∀i ∈ [n] (pki, ski) ← Gen(1κ), ~ci ← Enc(pki, xi), (c′ 1 ,... , c′ n) ← Spooky-Eval(C, (pki, ~ci)i)

and C(x 1 ,... , xn) are close upto a negligible distance in κ.

We note that the name spooky encryption stems from the application of Definition 2.2 to cir- cuits C that compute spooky mappings. Indeed, as shown by Dwork et al. [DLN+04], the semantic security of (Gen, Enc, Dec) implies that only (almost) no-signaling C’s can be realized, and every homomorphic scheme can realize C’s that compute product mappings.

Spooky Encryption with CRS. We say that (Gen, Enc, Dec, Spooky-Eval) is a C-spooky en- cryption scheme with CRS if Definition 2.2 is satisfied except that we allow all algorithms (and the adversary) to get as input also a public uniformly distributed common random string.

2.3 Additive-Function-Sharing Spooky Encryption

An important special case of spooky encryption allow us to take encryptions ci ← Encpki (xi) under n independent keys of inputs x 1 ,... , xn to an n-argument function f , and produce new ciphertexts under the same n keys that decrypt to additive secret-shares of y = f (x 1 ,... , xn). An encryption scheme that supports such “non-interactive sharing” is called additive-function-sharing spooky encryption (or AFS-spooky). Several variants of this concept are defined below:

  • We can either insist on getting a random secret sharing of y, or contend ourselves with any secret sharing. Below we call the latter variant weak AFS-spooky, and the former is strong AFS-spooky (or just AFS-spooky).
  • Similarly to homomorphic encryption schemes, we can have either a leveled variant where key- generation receives an additional depth parameter d and the result supports only circuits of depth upto d, or a fully AFS-spooky scheme that supports any circuit with a fixed parameter setting.
  • We can either allow non-negligible error probability (i.e., the probability that the computation fails to produce a secret-sharing of the right output y), or insist on a negligible error proba- bility. Below we denote by ε-AFS-spooky the variant where the error probability is bounded by some ε (that need not be negligible), and the variant with negligible error probability is just AFS-spooky.
  • Sometimes we want to consider only two-argument functions f (x 1 , x 2 ), a scheme that only supports two-argument functions is called AFS-2-spooky.

Definition 2.3 (AFS-Spooky). Let E = (Gen, Enc, Dec, Spooky-Eval) be a scheme where (Gen, Enc, Dec) is a semantically secure public-key bit-encryption.

  • E is a weak ε-additive-function-sharing-spooky (weak-ε-AFS-Spooky) if for every boolean cir- cuit C computing an n-argument function f : ({ 0 , 1 }∗)n^ → { 0 , 1 }, and any set of inputs x 1 ,... , xn for C, it holds that

Pr

⊕^ n

i=

yi = C(x 1 ,... , xn) :

(pki, ski) ← Gen(1κ), ~ci ← Enc(pki, xi), (c′ 1 ,... , c′ n) ← Spooky-Eval(C, (pki, ~ci)i), yi ← Dec(ski, c′ i)

 (^) ≥ 1 − ε(κ).

If the above only holds for n ≤ 2 (two-argument functions) then we say that E is weak-ε-AFS- 2-Spooky.

  • E is ε-AFS-(2)-Spooky if it is weak ε-AFS-(2-)Spooky, and in addition any n − 1 of the shares yi above are distributed ε-close to uniform.
  • E is ε-leveled-(weak-)AFS-(2-)Spooky if the Gen procedure receives an additional depth param- eter 1 d, and then the conditions above hold only for circuits of depth upto d.
  • E is (leveled-/weak-)AFS-(2-)Spooky if it is ε-(leveled/weak) AFS-(2-)Spooky for some negli- gible function ε(κ).

Relation to Definition 2.2, and more variants. The variants from Definition 2.3 above are all special cases of the more general Definition 2.2. In particular, an AFS-Spooky scheme is C-spooky relative to a class C that contains a randomized circuit Cf for every n-input function f : ({ 0 , 1 }∗)n^ → { 0 , 1 }, where the output distribution of Cf (x 1 ,... , xn) is negligibly close to random n-out-of-n additive secret-sharing of the value f (x 1 ,... , xn). Similarly weak-AFS-Spooky is C-spooky relative to a similar class C, except the output of Cf can be any additive secret-sharing of f (x 1 ,... , xn), not necessarily a random one. We note that other variants are also possible (and sometimes useful), for example we can consider a non-binary function f , or secret-sharing modulo some p > 2 (or even more general forms of secret sharing). In particular, for the negative example in Section 6 to the multi-prover-to-single-prover transformation, it is convenient to consider a function f that outputs a color c ∈ { 0 , 1 , 2 } and a secret-sharing modulo 3 of that color (and it is sufficient to use ε-leveled-weak-AFS spooky scheme, even for some constant ε < 1 /2.

Weak vs. Strong AFS-Spooky Schemes. We observe that the distinction between the strong and weak variants of AFS-spooky is unimportant, indeed there is an easy transformation from any weak AFS-spooky scheme into a strong one. Hence in the sequel we will only be concerned with realizing the weak variant, but will allow ourselves to rely on the strong variant whenever needed.

Lemma 2.4. There is a transformation that turns any weak AFS-spooky scheme E into a AFS- spooky scheme E′, by only adding one bit to each ciphertext and only a small constant number of operations to each procedure.

have ample evidence to belive the α-DLWE assumption with α = 1/poly(n) [Reg09, Pei09, BLP+13], and it is commonly belived to hold also for super-polynomially (and perhaps even sub-exponentially) small α’s. We show that assuming hardness of the learning-with-errors problem, there exists a function- secret sharing (in the common-random-string model) for any n-argument function f. Our construc- tion builds on the multi-key fully homomorphic encryption construction of Mukherjee and Wichs [MW16], which is a simplification of the Clear-McGoldrick scheme from [CM15]. We summarize the properties of this construction that we need for our purposes.

Theorem 1 ([CM15, MW16]). Assuming the hardness of α-DLWE (for some α(κ)), there exists a multi-key homomorphic encryption with the following properties:

  • The construction works in the common-random-string model. For parameters n, m, q = poly(κ), all instances have access to a uniformly random matrix A ∈ Z(qn −1)×m.
  • For any depth parameter d, the scheme supports multi-key evaluation of depth-d circuits using public keys of size d · poly(κ), while secret keys are vectors ~s ∈ Znq , regardless of the depth parameter. Specifically, there is an efficient procedure Eval that is given as input: - Parameters d, ∈ N, and public keys that support depth-d computations; - A depth-d circuit computing an -argument boolean function f : ({ 0 , 1 }∗)^ → { 0 , 1 }; - Public keys (pk 1 ,... , pkn) and fresh encryptions (bit-by-bit) of each argument xi ∈ { 0 , 1 }∗^ under key pki, denoted ci ← Encpki (xi).

On such input, the Eval procedure outputs a dimension n-vector, ~c′^ = (~c′ 1... ~c′) (with each ~c′ i ∈ Znq ),^4 such that for the secret keys ~si corresponding to pki it holds that

∑^ `

i=

~si, ~c′ i

= bq/ 2 c · f (x 1 ,... , xn) + e (mod q)

for some error e ∈ Zq with |e| < αq · poly(κ).

By further making a circular-security assumption, there exists a scheme that supports evaluation of circuits of any depth without growing the public keys.

3.2 LWE-Based AFS Spooky Encryption

Below we show that under the decision-LWE assumption we can construct AFS-spooky encryp- tion schemes (in the common-random-string model). Namely, for every n-argument function f (x 1 ,... , xn), given encryption of the arguments under n independent public keys, we can com- pute an encryption of shares under the same keys of an additive secret-sharing of the output y = f (x 1 ,... , xn).

(^4) Referring to [MW16, Sec. 5.4], the vector ~c′ i is the result of the product Cˆ(i) (^) × Gˆ− (^1) ( w~ˆT (^) ), without the added noise term esmi.

Theorem 2. Assuming the hardness of α-DLWE, there exists a leveled ε-AFS-2-Spooky encryption scheme for ε = α · poly(κ). Further making a circular-security assumption, we get a (non-leveled) ε-AFS-2-spooky encryption scheme.

Proof. We show that the encryption scheme from Theorem 1 is already essentially a leveled weak AFS-2-spooky encryption scheme. Specifically, Theorem 1 tells us that given the description of a depth-d circuit C, computing a 2-argument function f : ({ 0 , 1 }∗)^2 → { 0 , 1 }, together with two public-key and corresponding bit-by-bit encryptions, ci ← Encpki (xi), the Eval procedure yields (~c′ 1 , ~c′ 2 ) ← Eval(C, (pk 1 , c 1 ), (pk 2 , x 2 )) such that 〈sk 1 , ~c′ 1 〉 + 〈sk 2 , ~c′ 2 〉 = y · q/2 + e (mod q), where the ski’s are the secret keys corresponding to the pki’s, y = f (x 1 , x 2 ), and |e| < αq · poly(κ) = εq. Denote vi = [〈ski, ~c′ i〉]q for i = 1, 2 and v = [v 1 + v 2 ]q. Lemma 3.2 below says that instead of first adding the vi’s and then rounding to the nearest multiple of q/2, we can first round and then add, and this will yield the same result except with error probability of at most 2ε. The only catch is that Lemma 3.2 assumes that v 1 , v 2 are chosen at random subject to their sum modulo q being v, whereas in our case we do not have this guarantee. To account for this, we modify our Spooky-Eval procedure, letting it choose a random shift amount δ ∈ Zq and adding/subtracting it from v 1 , v 2 , respectively. In more detail, we change the encryption, decryption, and evaluation in a manner somewhat similar to the proof of Lemma 2.4. Namely, the encryption algorithm Enc′^ outputs the pair (~c, 0) rather than just the ciphertext vector ~c, and the decryption algorithm Dec′, given a pair (~c, δ) first computes the shifted inner product v := [δ + 〈sk, ~c〉]q and then outputs 0 if |v| < q/4 and 1 otherwise. The Spooky-Eval procedure, given as input C and (pki, ˜ci), i = 1, 2, first strips the 0’s from all the pairs (~c, 0) in the encrypted ˜ci’s retaining only the underlying ciphertexts c 1 , c 2. It then applies the undelying evaluation procedure to get

(~c′ 1 , ~c′ 2 ) ← Eval(C, (pk 1 , c 1 ), (pk 2 , x 2 )).

Next it chooses a uniform δ ∈ Zq and returns the two ciphertexts (~c′ 1 , δ) and (~c′ 2 , −δ). It is now clear that the values v 1 , v 2 that are obtained during decryption are indeed individually random (over the choice of δ), but their sum modulo q does not depend on δ. Applying Lemma 3.2 and denoting yi = Dec′ sk((~c′ i, δi)), we have y 1 ⊕ y 2 = C(x 1 , x 2 ) except with error probability at most 2ε (over the choise of δ). This yeilds a leveled 2ε-AFS-2-Spooky encryption scheme (using the leveled version of Theorem 1), or a “fully” 2ε-AFS-2-Spooky (if we also assume circular security).^5

Lemma 3.2. Fix some modulus q ∈ Z, bit b ∈ { 0 , 1 }, and a value v ∈ Zq such that v = b · q/2 + e (mod q) for some bounded error |e| < q/ 4. Consider choosing v 1 , v 2 uniformly at random in Zq subject to v 1 + v 2 = v (mod q), and denote vi = bi · q/2 + ei (mod q) with bi = [dv 1 · 2 /qc] 2 ∈ { 0 , 1 } and |ei| ≤ q/ 4. Then Prv 1 ,v 2 [b 1 ⊕ b 2 = b] > 1 − 2(|e| + 1)/q.

Proof. Consider first the case b = 0 and v = e ≥ 0. For this case consider choosing at random v 1 ∈ Zq and setting v 2 = [v − v 1 ]q = [e − v 1 ]q. It is easy to check that the condition b 1 ⊕ b 2 = b = 0 is satisfied whenever we have

v 1 , v 2 ∈

( (^) −q 4

  • e, q 4

or v 1 , v 2 ∈

[ (^) −q 2

−q 4

( (^) q 4

  • e, q 2

(^5) We note that the addition of the δ shift in fact yields directly the “strong” version of AFS-2-spooky.

Joining the addition layer after the i’th iteration to the multiplication layer in the i + 1’st iteration, we get d levels of AFS-2-spooky evaluation of `^2 function of the form

fi,j

(xi, 1 ,... , xi,), (xj, 1 ,... , xj,)

( ⊕`

k=

xi,k

( ⊕`

k=

xj,k

and a final layer of single-key evaluation of homomorphic addition. Each of these functions at each level t is evaluated by applying the Eval procedure to functions of the form

F˜c 1 ...,c,c′ 1 ...,c′ (sk,^ sk

′) = (^

⊕`

k=

Decsk(ck)

( ⊕`

k=

Decsk′ (c′ k)

evaluated on the fresh encryptions ˜c( i t), ˜c( jt ).

Corollary 4. Assuming the hardness of α-DLWE, there exists a leveled ε-AFS-spooky encryption scheme for ε = α · d · poly(κ). Further making a circular-security assumption, we get a (non-leveled) ε-AFS-spooky encryption scheme.

4 piO based Spooky Encryption

In this section we show a construction based on probabilistic iO, in conjunction with lossy ho- momorphic encryption, that can support many 2-key spooky relations, even beyond AFS-spooky. Compared to our LWE-based construction from Section 3, the construction here does not need a CRS and has no error probability, and it supports more spooky distributions. On the other hand, we are making a much stronger assumption here, and also we need a different scheme for different spooky relations.^7 The construction in this section supports in particular the functionality that we need for our generic transformation from Section 5 that turns an AFS-2-spooky scheme to an AFS-n-spooky one. The resulting AFS-n-spooky also does not need a CRS and has no error probability. Moreover, for that case we have a single scheme supporting all AFS-spooky relations.

Organization of this Section. In Section 4.1 we introduce our tools, defining probabilistic indis- tinguishability obfuscation (using a slightly weaker variant of the definition of Canetti et al. [CLTV15]) and lossy homomorphic encryption with malicious circuit privacy. In Section 4.2 we describe and prove our construction for 2-input spooky encryption scheme, and finally in Section 4.3 we show how to obtain a multi-input AFS-spooky encryption.

4.1 Tools

4.1.1 Probabilistic Indistinguishability Obfuscation.

Our construction uses probabilistic iO, a notion that was recently introduced by Canetti et al. [CLTV15]. Loosely speaking, this is an obfuscator for probabilistic circuits with the guarantee that the obfus- cations of any two “equivalent” circuits are computationally indistinguishable. (^7) We can extend the construction so that a single scheme can handle several spooky relations, as long as there is some way of representing relations where we can verify that a given relation is no-signaling.

Canetti et al. define several variants of piO, where the main distinction is the precise formulation of what it means for circuits to be equivalent. Our definition corresponds to a (weakened variant) of their X-Ind piO (which can be realized assuming sub-exponentially secure iO and sub-exponentially secure OWF, see Theorem 5 below). Roughly, our variant only considers pairs of circuits with the property that for every input, their output distributions are identical, while the definition in [CLTV15] allows a small statistical gap. To formally define piO, we consider a (possibly randomized) PPT sampling algorithm S that given as input a security parameter 1κ, outputs a triple (C 0 , C 1 , z), where C 0 and C 1 are randomized circuits (to be obfuscated) and z is some auxiliary input. We say that a sampler S is an equivalent- circuit-sampler if with probability 1 it outputs circuits C 0 and C 1 such that for every x the circuits C 0 (x) and C 1 (x) generate identical distributions.

Definition 4.1 (Probabilistic Indistinguishable Obfuscation (piO), [CLTV15]). A probabilistic in- distinguishability obfuscator is a probabilistic polynomial-time algorithm piO that, given as input a security parameter 1 κ^ and a probabilistic circuit C, outputs a circuit C′^ = piO(1κ, C) (which may be deterministic) of size at most |C′| = poly(κ, |C|) such that the following two properties hold:

  1. For every individual input x, the distribution C(x) and

piO(1κ, C)

(x) are identical.^8

  1. For every equivalent-circuit-sampler S, the following two distribution are computationally indistinguishable:

{(C 0 , C 1 , piO(1κ, C 1 ), z) : (C 0 , C 1 , z) ← S(1κ)} =c {(C 0 , C 1 , piO(1κ, C 2 ), z) : (C 0 , C 1 , z) ← S(1κ)}

We note that our correctness guarantee is incomparable to that given by [CLTV15]. Indeed, motivated by their PRF based construction, the [CLTV15] definition basically requires that no PPT adversary can distinguish between oracle access to C and to piO(1κ, C) (so long as the adversary is not allowed to repeat its queries). On the one hand our definition is weaker in that it only considers each input individually, but on the other hand it is stronger in that it requires that for each such individual input the distributions are identical. Our correctness guarantee can be easily obtained using the [CLTV15] construction by using an underlying PRF {fs}s with the property that fs(x) is individually uniformly random for every x. The latter can be easily obtained by taking any PRF and xor-ing its output with a fixed random string.

Theorem 5 ([CLTV15]). Assume the existence of a sub-exponentially indistinguishable indistin- guishability obfuscator for circuits and a sub-exponentially secure puncturable PRF. Then, there exists a probabilistic indistinguishability obfuscator.

4.1.2 Lossy Encryption

Loosely speaking, a lossy encryption scheme is an encryption scheme in which public-keys are indistinguishable from “lossy keys,” and ciphertexts generated using such lossy keys contain no information about their plaintext.

Definition 4.2 ((Perfectly) Lossy Encryption). We say that an encryption scheme (Gen, Enc, Dec) is lossy if there exists a PPT algorithm Gen˜ that on input 1 κ^ outputs ˜pk such that: (^8) The latter distribution is defined also over the randomnees of piO. Note that this does not imply that the joint distribution for multiple inputs will be the same in the two cases.

Theorem 6 (Folklore). Assuming the hardness of DDH, there exists a lossy homomorphic encryp- tion scheme with malicious circuit privacy for NC 1 circuits.

The fact that the encryption scheme can be lossy follows from the fact that the encryption algo- rithm in [NP01] basically just generates DDH tuples. We can make the scheme lossy by generating a single DDH triple as part of the public-key and re-randomizing it in the encryption procedure (rather than generating a fresh DDH tuple). The indistinguishable lossy key will contain a random triplet of group element which do not form a DDH tuple.

Remark 4.5. Ostrovsky et al. [OPP14] show that using their unbounded (statistical) simulation based definition, there exists a scheme for any poly-size circuit assuming compact FHE in addition to DDH (or any bounded-depth circuit assuming leveled FHE). We believe that the their techniques should apply also to our (perfect) indistinguishability based definition but we leave this to a future revision.

Homomorphic Evaluation of Randomized Circuits. For our application, we need to handle randomized circuits rather than deterministic ones. We extend the syntax of homomorphic eval- uation to support evaluating a randomized circuit: For a randomized circuit C on `-bit inputs, a public key pk, and ciphertext c that allegedly encrypts the input to C, we let Evalpk(C, c) denote the distribution which is induced by choosing randomness r for C, defining Cr = C(· ; r), and then outputting Evalpk(C[r], c). We rely on the following lemma (which is folklore, although we could not find a proof of it in the literature).

Lemma 4.6. Let (Gen, Enc, Dec, Eval) be a homomorphic encryption scheme for a class of ran- domized circuits C, that enjoys perfect malicious circuit privacy. Then, for every alleged public-key pk and ciphertext c, there exists an “effective plaintext” x ∈ { 0 , 1 }`^ such that for every two circuits C 1 , C 2 ∈ C for which the output distributions C 1 (x) and C 2 (x) are identical, it holds that also the two distributions Evalpk(C 1 , c) and Evalpk(C 2 , c) are identical.

Proof. This lemma follows by mapping the randomness of the two circuits. First, we can assume without loss of generality that both circuits rely on the same randomness space (e.g., by considering the joint space which is the Cartesian product of the spaces for the two circuits). Denote this joint randomness space by R. Since C 1 (x; r) and C 2 (x; r) are identically distributed (over the choise of r ∈ R), there exists a permutation π over R such that for every r ∈ R it holds that C 1 (x; r) = C 2 (x; π(r)) (as deterministic circuits). Note that the distribution Evalpk(C 1 , c) is a convex combination of the distributions Evalpk(C 1 [r], c) for the different r’s, and Evalpk(C 2 , c) is a convex combination of the distributions Evalpk(C 2 [π(r)], c). We conclude the proof by appealing to the circuit privacy of the encrypiton scheme.

4.2 Two-Key Spooky Encryption from piO

Our construction relies on a property of two-input relations that we call re-sampleability. Roughly, it should be possible to sample efficiently from the distribution of the second coordinate conditioned on a particular fixed value for the first coordinate.

Definition 4.7 (Efficiently Re-Sampleable). A randomized polynomial-size circuit C : { 0 , 1 }^1 × { 0 , 1 }^2 → { 0 , 1 }′ 1 × { 0 , 1 } ′ 2 is efficiently re-sampleable if there exists a polynomial-size random- ized “resampling circuit” RSC , such that for any input (x 1 , x 2 ) to C, the distribution C(x 1 , x 2 ) is identical to the “resampled distribution” {(y 1 , y′ 2 ) : (y 1 , y 2 ) ← C(x 1 , x 2 ), y 2 ′ ← RSC (x 1 , x 2 , y 1 )}.

We construct a 2-key spooky scheme that supports any 2 input/output circuit that is both efficiently re-sampleable and no-signaling.

Theorem 7 (2-Key Spooky Encryption from piO). Let C : { 0 , 1 }^1 × { 0 , 1 }^2 → { 0 , 1 }′ 1 × { 0 , 1 } ′ 2

be an efficiently re-sampleable no-signaling circuit, with re-sampling circuit RSC. If there exist (1) piO, and (2) a perfectly-lossy homomorphic encryption scheme that can evaluate C and RSC , and is perfectly malicious circuit private, then there exists a C-spooky encryption scheme, which is also perfectly lossy (and hence semantically secure).

We stress that the encryption scheme that we need for Theorem 7 must be able to evaluate C and RSC and be perfectly malicious circuit private, but it need not be compact. Theorem 6 gives such a scheme for NC 1 circuits based on DDH and as noted in Remark 4.5, we believe that a scheme that supports any poly-size circuit can be constructed assuming both DDH and FHE (note that [CLTV15] show that full-fledged FHE can be built based on piO).

Remark 4.8 (Almost No-Signaling). We note that for Theorem 7 we need C to be perfectly no- signaling, specifically we need C(x, y) 1 and C(x, y′) 1 to be identically distributed for all x, y, y′. A natural relaxation of no-signaling circuits, considered in previous works (e.g., [DLN+04, KRR13, KRR14]), allows these distributions to be statistically close (rather than identical). Such circuit is called almost no-signaling. Dwork et al. (using a slightly different terminology) showed that a semantically secure scheme can only be spooky for almost no-signaling circuit. The question of constructing a scheme that supports also almost no-signaling circuits is left to future work.

4.2.1 Proof of Theorem 7

Let piO be a probabilistic indistinguishability obfuscator and let (Gen, Enc, Dec) be the encryption scheme from the theorem statement. Let Gen˜ be the corresponding lossy key generation algorithm and Eval the homomorphic evaluation algorithm with malicious circuit privacy. Each instance of our construction uses two public/secret keys pairs, where only the first pair is used for “normal encryption and decryption,” and the other pair is only used for spooky evaluation. In addition to the two pairs, the public key also contains an obfuscated program that implements spooky evaluation using the secret key. That obfuscated program has a secret key hard-wired, and given two ciphertexts c 1 , c 2 it decrypt the first one, then evaluates the re-sampling circuit RSC homomorphically on the other. A complete description of the resulting scheme is found in Fig. 1. We first show that the scheme supports spooky evaluation of the circuit C and then show that it is a lossy encryption scheme (and in particular is semantically secure).

Lemma 4.9. The scheme (Gen-Spooky, Enc-Spooky, Dec-Spooky, Spooky-Eval) is C-spooky.

Proof. The spooky evaluation procedure gets as input two public-keys pk-spooky 1 =

pk 11 , pk 21 , P˜ 1

pk-spooky 2 =

pk 12 , pk 22 , P˜ 2

, and matching ciphertexts c 1 = Enc-Spooky(pk-spooky 1 , x 1 ) and