\newcommand{\Gen}{\mathsf{Gen}} \newcommand{\Enc}{\mathsf{Enc}} \newcommand{\Dec}{\mathsf{Dec}} \newcommand{\LWE}{\mathsf{LWE}} \newcommand{\Add}{\mathsf{Add}} \newcommand{\Mul}{\mathsf{Mul}} \newcommand{\Eval}{\mathsf{Eval}} \newcommand{\Query}{\mathsf{Query}} \newcommand{\Resp}{\mathsf{Resp}} \newcommand{\ek}{\mathsf{ek}} \newcommand{\st}{\mathsf{st}} \newcommand{\norm}[1]{\| #1 \|}

Encryptions

We introduced private-key encrytion earlier, but public-key encryption is deferred to this section. It is because the hardness assumption: private-key encryption and other primitives can be based on the existence of OWFs, but we need other assumptions to obtain PKE.

Learning with Errors, LWE

In this section, we change the representation of Zq\Z_q so that

Zq{q12,...,0,...,q2}.\Z_q \equiv \set{ -\floor{\frac{q-1}{2}}, ..., 0, ..., \floor{\frac{q}{2}}}.

The modular arithmetic is the same. We also say that an element in Zq\Z_q is small if it is close to 0.

We consider matrix AZqm×nA \in \Z_q^{m \times n} and vector sZqn\vec{s} \in \Z_q^n such that mnm \gg n. Let t:=AsZqm\vec{t}' := A \cdot \vec{s} \in \Z_q^m. Using standard linear algebra, it is efficient to solve Ax=tA \cdot \vec{x} = \vec{t}' (when AA is full rank).

The LWE problem considers the following variant: AA and s\vec{s} are chosen as before, but an additional error vector eZqm\vec{e} \in \Z_q^m is sampled such that e\norm{\vec{e}} is small (we will have each coordinate of e\vec e small in Zq\Z_q). Then, the goal is to find x,y\vec{x}, \vec{y} such that

Ax+y=t,A \cdot \vec{x} + \vec{y} = \vec{t},

where t:=As+e\vec{t} := A \cdot \vec{s} + \vec{e}, xZqn\vec{x} \in \Z_q^n, and yZqm\vec{y} \in \Z_q^m is small. The hardness of this problem, Learning with Errors, is parameterized by q,m,nq, m, n, and the bound of small. When parameters are chosen appropriately, this problem is believed to be hard even for quantum algorithms (the belief is established by reductions from lattice problems which is beyond the scope).

For our purpose, it is easier to use the decision variant of LWE, formalized next.

Definition: Learning with Errors (LWE) Assumption

We say the decisional LWEm,q,ψ\LWE_{m,q,\psi} problem is quantum-hard if for all quantum polynomial-time distinguisher DD there is a negligible function ϵ\eps such that for all nNn\in\N,

Pr[AZqm×n;sψn;eψm:D(A,As+e)=1]Pr[AZm×n)q;tZqm:D(A,t)=1]ϵ(n),\begin{align*} \Pr[A \gets \Z^{m\times n}_q; \vec{s} \gets \psi^n ; \vec{e} \gets \psi^m : D(A, A \cdot \vec{s} + \vec{e}) = 1] \\ - \Pr[A \gets \Z^{m\times n})_q ; \vec{t} \gets \Z^m_q : D(A,\vec{t}) = 1] \le \eps(n), \end{align*}

where m,qNm, q \in \N are functions of nn, and ψ\psi is an efficiently samplable distribution over Zq\Z_q.

Discuss:

  • Again, the hardness depend on the parameters m,q,ψm,q,\psi. For example, when ψ\psi is uniform over Zq\Z_q, the two distributions are identical (but useless).
  • Notice that the above definition also samples s\vec{s} from ψ\psi.
  • The two distributions differ in entropy: (A,t)(A,\vec{t}) consists of mn+mmn + m uniform elements from Zq\Z_q, but (A,As+e)(A, A \cdot \vec{s} + \vec{e}) is sampled from mnmn uniform elements plus (m+n)(m+n) elements from ψ\psi.

An useful set of parameter:

  • m(n)=poly(n)n2m(n) = \poly(n) \ge n^2, the smaller the harder LWE
  • q(n)=npoly(n)q(n) = n^{\poly(n)} so that we can write an element in poly(n)\poly(n) bits
  • ψ\psi a distribution such that B=poly(n)\exists B = \poly(n), ψ\psi outputs aB|a| \le B except with negligible probability (think ψ\psi as a uniform dist); the larger BB compared to qq the harder LWE

NIST candidate, CRYSTALS-Kyber:

  • n=256kn = 256 k for k=3,4,5k=3,4,5
  • q=3329q = 3329 so it can be viewed as O(n)O(n)
  • ψ\psi binomial distribution, 3 or 5 fair trials (so that e5\card{e} \le 5)

Ref: [KL, 14.3]. Remark: Chen [Chen24] recently posted a quantum algorithm that solves LWE for a large range of parameters in polynomial time. It is not yet fully reviewed, but it would be a huge breakthrough if it holds.

Corollary:

Suppose that gcd(q,2)=1\gcd(q,2)=1. If (A,As+e)(A,t)(A, A \cdot \vec s + \vec e) \approx (A, \vec t), then (A,As+2e)(A,t)(A, A \cdot \vec s + 2\cdot \vec e) \approx (A, \vec t).

Proof idea: because qq and 22 coprime, AA and 2A2A are identically distributed (and t\vec t as well).

An Encryption Based on LWE

If we have the following decisional LWEm,q,ψ\LWE_{m,q,\psi}:

{A,As+e}{A,t}\set{A, A\cdot \vec{s} + \vec{e}} \approx \set{A, \vec{t}}

Then, given dNd \in \N such that gcd(d,q)=1\gcd(d,q) = 1, we also have

{A,As+de}{A,t}\set{A, A\cdot \vec{s} + d\vec{e}} \approx \set{A, \vec{t}}

by a simple reduction that multiply the former indisintinguishability by dd (because AA and t\vec{t} are both uniform over Zq\Z_q). Hence, we can construct a secret-key encryption.

Construction: Secret Key Encryption from LWE

Parameters: m,qNm, q \in \N as a function of nn, ψ\psi a distribution over Zq\Z_q.

Gen(1n)\Gen(1^n): output k:=sψnk := \vec{s} \gets \psi^n

Enck(m)\Enc_k(m): for binary message m{0,1}m\in\bit, sample aZqn\vec{a} \gets \Z_q^n and eϕe \gets \phi, output c:=(a,t=as+2e+m)c:=(\vec{a}, t = \vec{a} \cdot \vec{s} + 2e + m) (where the arithmetic is in Zq\Z_q).

Deck(c)\Dec_k(c): output

m:=(tasmod  2)m' := (t - \vec{a}\cdot \vec{s} \mod 2)

The correctness is direct. The (secret-key) CPA security can be proved by a reduction RR such that when ever the adversary AA of the encryption asks for an encryption, RR takes the next row from its LWE input and adds mm. The details are skipped here.

Homomorphic Encryption

Definition: Homomorphic encryption.

A (public or secret key) encryption scheme (Gen,Enc,Dec)(\Gen,\Enc,\Dec) is said to be homomorphic if the scheme provides efficient (Add,Mul)(\Add, \Mul) operations that satisfies the syntax and correctness below.

  • Addition: For any messages m0,m1Z2m_0, m_1 \in \Z_2,

    Prk[(ciEnck(mi))i{0,1};Deck(Add(c0,c1))=m0+m1]=1\Pr_k[(c_i \gets \Enc_k(m_i))_{i\in\bit}; \Dec_k(\Add(c_0, c_1)) = m_0+m_1] = 1
  • Multiplication: For any messages m0,m1Z2m_0, m_1 \in \Z_2,

    Prk[(ciEnck(mi))i{0,1};Deck(Mul(c0,c1))=m0m1]=1\Pr_k[(c_i \gets \Enc_k(m_i))_{i\in\bit}; \Dec_k(\Mul(c_0, c_1)) = m_0 \cdot m_1] = 1
  • Multiply by constant: For any messages m0,m1Z2m_0, m_1 \in \Z_2,

    Prk[c0Enck(m0);Deck(Mul(c0,m1))=m0m1]=1\Pr_k[c_0 \gets \Enc_k(m_0); \Dec_k(\Mul(c_0, m_1)) = m_0 \cdot m_1] = 1

Here, the message space and the arithmetic operations (+,)(+,\cdot) are in Z2\Z_2, but one may define similarly for other algebra.

[Ref: Barak@Prinecton]

Discuss:

  • The homomorphic operations are requiring correctness (not security).
  • We sometimes relax the correctness to “except for negligible probability” due to technical construction
  • The above definition requires only for “single hop” homomorphic operation, which means that Add\Add and Mul\Mul work for ciphertexts freshly encrypted by Enc\Enc
  • We may define tt-hop operations so that Add\Add or Mul\Mul work also for ciphertexts that is output by (t1)(t-1)-hop Add\Add or Mul\Mul
  • Ideally, we want unlimited-hop operations. Since (+,)(+,\cdot) in Z2Z_2 implement logical (XOR, AND), that enables any boolean-circuit computation on ciphertexts. This is called Fully Homomorphic Encryption, FHE.
  • Less ideally, if a scheme achieves unlimited-hop Add\Add and multiply by constant, it is called additive homomorphic encryption (or linear homomorphic), which is still useful.
  • Notice that Add\Add and Mul\Mul need no key, which is essential (otherwise, given key, it would be trivial to perform the operations)
  • It is trivial and cheating to output (add,c0,c1)(\text{add}, c_0, c_1) as the output of Add\Add (and Mul\Mul resp.), which belows up the size of the ciphertext and leaves the actual arithmetic to Dec\Dec. However, in the above 1-hop Add and Mul definition, we have no way to require it (because one may always pad c0c_0 with unused bits). For more-than-constant hops, we require the ciphertext size to be small even after homomorphic evaluations.

Alternatively, we define homomorphic encryption with respect to a class of circuits C\cC.

Definition: Homomorphic encryption for class C\cC.

Let C\cC be a class of circuits. We say the encryption scheme (Gen,Enc,Dec,Eval)(\Gen,\Enc,\Dec, \Eval) is homomorphic for C\cC if for any CCC \in \cC, for any m1,...,m{0,1}m_1,...,m_\ell \in \bit where \ell is the input size of CC, let kGen(1n)k \gets \Gen(1^n) be the encryption key,

Prk[(ciEnck(mi))i[];Deck(Eval(C,c1,...,c))=C(m1,...,m)]=1.\Pr_k[(c_i \gets \Enc_k(m_i))_{i\in[\ell]}; \Dec_k(\Eval(C, c_1,..., c_\ell)) = C(m_1,...,m_\ell)] = 1.

Moreover, we require the output size of Eval\Eval to be compact, that is, bounded by Enck(mi)\ell' \cdot |\Enc_k(m_i)|.

The above secret-key encryption based on LWE has a direct homomorphic addition. To see why, consider two ciphertexts that is encrypted using the same key s\vec{s},

c0:=(a0,a0s+2e0+m0),c1:=(a1,a1s+2e1+m1)c_0:=(\vec{a}_0, \vec{a}_0 \cdot \vec{s} + 2e_0 + m_0), c_1:=(\vec{a}_1, \vec{a}_1 \cdot \vec{s} + 2e_1 + m_1)

The homomorphic Add(c0,c1)\Add(c_0, c_1) is defined to be the coordinate-wise addition:

Add(c0,c1):=(a0+a1,(a0s+2e0+m0)+(a1s+2e1+m1))=(a,as+2e+(m0+m1))\begin{align*} \Add(c_0, c_1) := & (\vec{a}_0+\vec{a}_1, (\vec{a}_0 \cdot \vec{s} + 2e_0 + m_0) + (\vec{a}_1 \cdot \vec{s} + 2e_1 + m_1))\\ = & (\vec{a}', \vec{a}'\cdot \vec{s} + 2e' + (m_0+m_1)) \end{align*}

where a=a0+a1\vec{a}' = \vec{a}_0+\vec{a}_1 and e=e0+e1e' = e_0+e_1. The multiplication by constant is also coordinate-wise multiply by plaintext m1m_1. Notice that the correctness holds as long as eq/4e' \le q / 4 before modulo qq. Hence, we can perform O(q/B)O(q/B) operations (of addition or multiply by constant) and then still obtain the correct decrytion, where B,qB, q are the LWE parameters.

Multiplicative homomorphism is more involved. We show an application of additive homomorphic encryption first.

Definition: Public-key encryption.

(Gen,Enc,Dec)(\Gen,\Enc,\Dec) is said to be a public-key encryption scheme if the following syntax, correctness, and security holds.

  1. Gen\Gen is a PPT algorithm, (pk,sk)Gen(1n)(\pk, \sk) \gets \Gen(1^n)
  2. Enc\Enc is a PPT algorithm, for all pk\pk and all m{0,1}m \in \bit, cEncpk(m)c \gets \Enc_\pk(m)
  3. Dec\Dec is a deterministic algorithm, for all sk\sk and cc, mDecsk(c)m \gets \Dec_\sk(c) such that m{0,1}m \in \bit \cup \bot.

Correctness: For all nN,m{0,1}n \in \N, m \in \bit,

Pr[(pk,sk)Gen(1n):Decsk(Encpk(m))=m]=1.\Pr[(\pk, \sk) \gets \Gen(1^n) : \Dec_\sk(\Enc_\pk(m)) = m] = 1.

Security: For all NUPPT DD, there exists a negligible function ϵ()\eps(\cdot) such that for all nNn\in\N, m0,m1{0,1}m_0, m_1 \in \bit, DD distinguishes between the following distributions with probability at most ϵ(n)\eps(n):

  • {(pk,sk)Gen(1n):(pk,Encpk(m0))}n\set{(\pk, \sk)\gets \Gen(1^n) : (\pk, \Enc_\pk(m_0))}_n
  • {(pk,sk)Gen(1n):(pk,Encpk(m1))}n\set{(\pk, \sk)\gets \Gen(1^n) : (\pk, \Enc_\pk(m_1))}_n

With this definitions, there are some immediate impossibility results:

  • Perfect secrecy is impossible: given pk\pk, the adversary can try to encrypt all messages with all randomness.
  • Deterministic encryption is also impossible: the adversary can try to encrypt the same message and get the same ciphertext.

Also, IND-CPA security is implied directly. Yet another difference compared to secret-key encryptions is that, the security for long messages is implied directly.

Lemma:

If (Gen,Enc,Dec)(\Gen,\Enc,\Dec) is secure public-key encryption, then for any polynomial length ()\ell(\cdot), for all m0,m1{0,1}(n)m_0, m_1 \in \bit^{\ell(n)}, the two distributions are indistinguishable:

  • {(pk,sk)Gen(1n):(pk,Encpk(m0,1),...,Encpk(m0,(n)))}n\set{(\pk, \sk)\gets \Gen(1^n) : (\pk, \Enc_\pk(m_{0,1}), ..., \Enc_\pk(m_{0,\ell(n)}))}_n
  • {(pk,sk)Gen(1n):(pk,Encpk(m1,1),...,Encpk(m1,(n)))}n\set{(\pk, \sk)\gets \Gen(1^n) : (\pk, \Enc_\pk(m_{1,1}), ..., \Enc_\pk(m_{1,\ell(n)}))}_n

where mb,im_{b,i} denotes the ii-th bit of mbm_b.

Similarly, the adversary may adaptively choose (m0,i,m1,i)(m_{0,i}, m_{1,i}) depending on the earlier ciphertexts Encpk(mb,i),i<i\Enc_\pk(m_{b,i'}), i' \lt i. That is called multi-message security and is also implied by single-message security.

Ref: [KL, 12.2]

Public-key Encryption from Additive Homomorphic Encryption

Theorem:

Let (G,E,D,Eval)(G, E, D, \Eval) be a secret-key homomorphic encryption scheme for the class of functions C:={fz:z{0,1}}C_\ell := \set{f_z : z \in \bit^\ell}, where :=(n)\ell:=\ell(n) is a polynomial of the security parameter nn (given to GG to be chosen later), and fz(x):=zxf_z(x) := z \odot x is the inner product of \ell-bit vetors. Then, the following (Gen,Enc,Dec)(\Gen, \Enc, \Dec) is a public-key encryption scheme.

  • Gen(1n)\Gen(1^n): let sk=kG(1n)\sk = k \gets G(1^n), sample \ell-bit string r=(r1,...,r){0,1}r=(r_1,...,r_\ell) \gets \bit^\ell such that r0r \neq 0^\ell, compute R1Ek(r1),...,REk(r)R_1 \gets E_k(r_1), ..., R_\ell \gets E_k(r_\ell). Output sk\sk and public key

    pk=(r1,...,r,R1,...,R).\pk = (r_1,..., r_\ell, R_1, ..., R_\ell).
  • Encpk(m)\Enc_\pk(m): sample \ell-bit string uu uniformly at random subject to ru=mr \odot u = m. Output

    c:=Eval(fu,R1,...,R).c := \Eval(f_u, R_1, ..., R_\ell).
  • Decsk(c)\Dec_\sk(c): it simply output Dsk(c)D_\sk(c).

The correctness follows because r0r \neq 0^\ell implies the existence of uu and then by the correctness of Eval\Eval. The efficiency is also direct (just need to sample rr and uu with care). The security is sketched below.

Firstly, consider the hybrid scheme that in Gen\Gen, we encrypt RiEnck(0)R_i \gets \Enc_k(0) instead of Enck(ri)\Enc_k(r_i). By CPA security of (G,E,D)(G,E,D), the hybrid is indistinguishable from the real (Gen,Enc,Dec)(\Gen, \Enc, \Dec).

Secondly in the hybrid, the ciphertext cc is an encryption of 0 of the (G,E,D)(G,E,D) scheme. It could be attemping to think we were finished, but unfortunately as written, cc depends on uu and then uu still depends on mm (indeed, different encryptions of 0 might reveal something). The key is to observe that c|c| is short. Let t:=ct:=|c| be the output size of Eval\Eval, and let :=4t\ell := 4t. Informally, tt-bit cc is too short to provide sufficient information about 4t4t-bit uu, and then it is information-theoretically hiding mm.

To be formal, we use Leftover Hash Lemma as follows. Let FR():=Eval(f(),R1,...,Rn)F_R(\cdot) := \Eval(f_{(\odot)}, R_1, ...,R_n). Then, the adversary is given (r,FR(u))(r, F_R(u)) and aims to find m=rum = r \odot u, where RR is independent of rr. Rewrite the computation as

Ext(r,u):=(r,m=ru).Ext(r, u) := (r, m = r \odot u).

Notice that rr is uniform, uu is subject to mm, and FR(u)F_R(u) is tt-bits. Observe that, subject to any fixed mm (of 1 bit) and any fixed FR(u)F_R(u) (of t=/4t=\ell/4 bits), the min-entropy of uu is at least /2\ell/2. Because hr(u)=ruh_r(u) = r \odot u is a universal hash family, by leftover hash lemma, rur \odot u is statistically close to a uniform bit by statistical difference 2Ω(/2)2^{-\Omega(\ell/2)}.

Ref: Rothblum, TCC 2011, Homomorphic Encryption: From Private-Key to Public-Key

Homomorphic Multiplication

Consider the encryption scheme for LWE. The ciphertext has format c=(a,b)c = (\vec a, b), and the decrytion is done by baTsb - \vec a^T \vec s, where s\vec s is the decryption key, and mod  2\mod 2 is skipped. We can view the decryption as a function,

fa,b(x):=baTx,f_{\vec a, b}(\vec x) := b - \vec a^T \vec x,

and the decryption is to compute fa,b(s)f_{\vec a, b}(\vec s). To obtain additive homomorphism, we are exactly performing

fa,b(x):=fa1,b1(x)+fa2,b2(x),f_{\vec a', b'}(\vec x) := f_{\vec a_1, b_1}(\vec x) + f_{\vec a_2, b_2}(\vec x),

so that the decryption works as

fa,b(s)=fa1,b1(s)+fa2,b2(s).f_{\vec a', b'}(\vec s) = f_{\vec a_1, b_1}(\vec s) + f_{\vec a_2, b_2}(\vec s).

For multiplication, we would like to perform similarly,

fa,b(x):=fa1,b1(x)fa2,b2(x).f_{\vec a', b'}(\vec x) := f_{\vec a_1, b_1}(\vec x) \cdot f_{\vec a_2, b_2}(\vec x).

This would give a correct decrytion when we compute fa,b(s)f_{\vec a', b'}(\vec s). However, we begin with linear functions fa1,b1f_{\vec a_1, b_1}, but we end with

(b1a1Tx)(b2a2Tx)=b1b2(b1a2T+b2a1T)x+i,ja1,ia2,jxixj,(b_1 - \vec a_1^T \vec x)\cdot(b_2 - \vec a_2^T \vec x) = b_1 b_2 - (b_1 \vec a_2^T + b_2 \vec a_1^T) \vec x + \sum_{i,j} a_{1,i} a_{2,j} x_i x_j,

a quadratic function (degree 2 of x\vec x). Moreover, the ciphertext size goes from n+1n+1 to ~n2n^2. This is far from ideal, and there are many techniques to resolve this. One is known as “relinearization”, and the trick is to provide the encryptions of

  • sis_i for i[n]i \in [n], where sis_i is the ii-th coordinate of s\vec s.
  • sisjs_{i}\cdot s_{j} for i,j[n]i,j\in[n].

Since the encryptions (of the above values sisjs_i\cdot s_j) are another linear function gci,j(y)g_{c_{i,j}}(\vec y), the homomorphic multiplication can then

  1. Compute fa,bf_{\vec a', b'} from fa1,b1f_{\vec a_1, b_1} and fa2,b2f_{\vec a_2, b_2}
  2. In fa,bf_{\vec a', b'}, substitute xixjx_i x_j with gci,j(y)g_{c_{i,j}}(\vec y), which yields fa,b(y)f_{\vec a'', b''}(\vec y), a linear function of size n+1n+1.

The encryption of sisjs_{i}\cdot s_{j} are given as public evaluation key in such constructions.

Notice This relinearization is oversimplified. Actually, the b1b2b_1 b_2 term in fa,b(x)f_{\vec a', b'}(\vec x) consists of products, such as a1Ts2e2\vec a_1^T \vec s \cdot 2e_2. The naive representation of a1Ts\vec a_1^T \vec s is a large integer of order qq, but that would incur huge error and incorrect decryption. A careful bitwise decomposition of b1b_1 and b2b_2 will reduce the error factor to poly(n,logq)\poly(n, \log q).

Ref:

Fully Homomorphic using Bootstrapping

The above homomorphic addition and multiplication (over Z2Z_2) are amazing because we can continue to perform the operations on the ciphertexts repeatedly even when the ciphertexts comes from the previous homomorphic operation. That correctness / functionality hold as long as the error term 2e2e is <q/4\lt q/4 before modulo qq.

The homomorphic addition incurs a small error: each Add\Add introduces a factor at most 22. Starting with B=poly(n)B = \poly(n) and q=npoly(n)q = n^{\poly(n)}, we have the budget to perform many additions.

However, the homomorphic multiplication incurs a much higher error due to the relinearization. Since the error increases exponentially in the number of operations, the <q/4\lt q/4 bar is indeed a critical limitation.

To this end, Gentry (STOC 2009) introduced the idea of “bootstrapping.” That is, to view the high-error ciphertext as a constant string, the decryption algorithm plus the string as a circuit, and then the decryption key as the input of the circuit. That is, define

  • Circuit fDec,c(x)f_{\Dec, c}(x): it takes input xx and then run and ouput Decx(c)\Dec_x(c).

Then, we can encrypt the decryption key k1k_1 using another key k2k_2, and call the result as the evaluation key ek:=Enck2(k1)\ek := \Enc_{k_2}(k_1). With that, we can homomorphically perform decryption on high-error cc:

  • c2Eval(fDec,c,ek=Enck2(k1))c_2 \gets \Eval(f_{\Dec, c}, \ek = \Enc_{k_2}(k_1)).

The above c2c_2 can be later decrypted by k2k_2 as

Deck2(c)=fDec,c(k1)=Deck1(c),\Dec_{k_2}(c') = f_{\Dec,c}(k_1) = \Dec_{k_1}(c),

where the first equality holds if the error incurred by fDec,cf_{\Dec,c} is smaller than O(q/B)O(q/B). Thus, we need a homomorhic encryption scheme such that

  • The circuit depth of Dec\Dec is bounded by small number dd
  • The Eval\Eval works correctly for circuit depth more than d+1d+1 (because we want to perform at least one operation on c2c_2)

The LWE-based encryption has a simple Dec\Dec, which computes firstly a linear operation and secondly a modulo qq division, which takes circuit depth poly(logq)\poly(\log q). This is why we want to minimize the error of homomorphic multiplication.

With that, we can generate a chain of keys k1,k2,...,kk_1, k_2, ..., k_\ell such that each key encrypts the previous one, so that we can perform many operations. This is known as “leveled homomorphic encryption.”

Alternatively, let k1=k2=kk_1 = k_2 = k, and thus ek=Enck(k)\ek = \Enc_{k}(k), which is known as “bootstrapping.” Because ek\ek is given to the evaluator (to perform Eval\Eval), ek\ek is essentially public and known to any adversaries. That introduces a significant concern in security: we do not know how to prove or disprove that the encryption is still secure given such Enck(k)\Enc_{k}(k), and this is called “circular security” and used as an additional assumption. Circular security gives a fully homomorphic encryption (and it is still the only known way).

Application: Private Information Retrieval

Definition: Private information retrieval (PIR)

A protocol (Query,Resp,Dec)(\Query, \Resp, \Dec) is a PIR if it satisfies the following syntax, correctness, and privacy. Let NN be the size of a database xx such that x=N|x| = N.

  • (q,st)Query(i)(q,\st) \gets \Query(i)
  • aResp(x,q)a \gets \Resp(x, q)
  • bDec(st,a)b \gets \Dec(\st, a)

Correctness: for all xx, all i[N]i\in[N],

Pr[(q,st)Query(i),aResp(x,q):Dec(st,a)=xi]=1\Pr[(q,\st) \gets \Query(i), a \gets \Resp(x, q) : \Dec(\st, a) = x_i] = 1

Privacy: for all xx, all i0,i1[N]i_0, i_1 \in [N], for all NUPPT DD, the following are indistinguishable:

{(q0,st0)Query(i0):q0}{(q1,st1)Query(i1):q1}\set{(q_0,\st_0) \gets \Query(i_0) : q_0} \approx \set{(q_1,\st_1) \gets \Query(i_1) : q_1}

Moreover, we define the computation time and the communication to be the time and output size of Query,Resp,Dec\Query, \Resp, \Dec.

There are many settings of PIR, for example, the database xx and thus the query may be answered by multiple servers. We consider the simpler single server setting here. There is trivial solutions, but we want the protocol to be efficient. Using a somewhat homomorphic encryption, we can construct an efficient PIR with short communication and client time.

Ref: Lin, Mook, Wichs, Doubly Efficient Private Information Retrieval and Fully Homomorphic RAM Computation from Ring LWE. STOC 2023.