Full text
Shorter Lattice-based Zero-Knowledge Proofs for the Correctness of a Shuffle Javier Herranz, Ramiro Mart´ınez, Manuel S´anchez Dept. Matem`atiques, Universitat Polit`ecnica de Catalunya Barcelona, Spain [email protected],[email protected] Abstract. In an electronic voting procedure, mixing networks are used to ensure anonymity of the casted votes. Each node of the network reencrypts the input list of ciphertexts and randomly permutes it in a process named shuffle, and must prove (in zero-knowledge) that the process was applied honestly. To maintain security of such a process in a post-quantum scenario, new proofs are based on different mathematical assumptions, such as lattice-based problems. Nonetheless, the best lattice-based protocols to ensure verifiable shuffling have linear communication complexity on N, the number of shuffled ciphertexts. In this paper we propose the first sub-linear (on N) post-quantum zeroknowledge argument for the correctness of a shuffle, for which we have mainly used two ideas: arithmetic circuit satisfiability results from [6] and Beneˇs networks to model a permutation of Nelements. The achieved communication complexity of our protocol with respect to Nis O(√Nlog2(N)), but we will also highlight its dependency on other important parameters of the underlying lattice ingredients. Keywords: electronic voting, verifiable shuffle, lattice-based cryptography, zeroknowledge 1 Introduction E-voting has already been used in real political elections in Norway, Estonia, Switzerland and Australia, among other countries. It could provide voters with the ability to cast votes from anywhere, aid voters with disabilities to cast their votes autonomously, reduce the logistic costs of an election, obtain accurate vote counts faster and in general improve the flexibility of democratic processes. However we can only take advantage of these benefits if the election system is publicly trusted, for which it has to satisfy strong security requirements. Two key requirements of e-voting are privacy and verifiability. On the one hand each individual voting option has to remain secret, and only the final tally should be revealed. This is usually addressed encrypting votes with an election public key, whose associated secret key is only known by the electoral board and used for the tally. On the other hand, verifiability ensures the integrity of the
election. It should be guaranteed that the final result has not been manipulated and corresponds to the options chosen by eligible voters. Whenever a voter wants to remotely cast an encrypted vote she digitally signs it before sending it to the voting server, that verifies the electronic signature before adding it to a virtual ballot box that will be published in a so called Bulletin Board, enabling everyone to verify that tallied votes come, with a one to one correspondence, from eligible voters. Systems that allow anyone to verify the integrity of the election using only public information without requiring additional interaction are called universally verifiable. At this point we have an apparent contradiction, as the link established by the signature between the voter and its encrypted vote seems to prevent the desired level of privacy. A solution called mixing networks (or mix-nets) was presented by Chaum in its seminal paper [16] and is currently adopted by all previously mentioned actual elections. A mix-net is composed of a set of mixing nodes (or mix-nodes) that consecutively permute and re-encrypt/decrypt the output of the previous mix-node. This operation is called a shuffle. As long as one of these nodes is honest and keeps its permutation secret it should be infeasible to link the identity of the voter that signed one of the input encrypted votes with its value decrypted from the output of the mix-net, thus achieving privacy again. Verifiability can be enforced asking the mix-nodes to publish a zero-knowledge proof of well behaviour, in this case proving that they know a permutation and the randomness used such that their respective output is just a permuted re-encryption of its input, without leaking any additional information. Since the first universally verifiable mix-net was presented by Sako and Kilian in 1995 [32] many proposals have been published with different kind of improvements, that will be discussed in detail in the following subsection 1.1. However there is still one important issue that has to be addressed, all schemes that guarantee universal verifiability publishing proofs of a shuffle in a Bulletin Board need to ensure the long term security of the information that is being published. This is particularly important as many constructions base their privacy on hardness assumptions about problems such as the Discrete Logarithm problem, that is known to be efficiently solvable by a quantum computer using Shor’s algorithm [33]. Even if powerful enough quantum computers are not available now, an adversary could keep this public information until he has the ability to break the security with a quantum computer in the near future. Voting data is specially sensitive information that should remain secret in the long term, while it might still have political and personal implications. Therefore post-quantum hardness assumptions that are believed to hold even against a quantum computer should be used, such as the ones employed by lattice-based, code-based, multivariate polynomials or hash-based cryptography. The main goal of this article is to present the first post-quantum proof of a shuffle with sub-linear size in the number of inputs, that could be used to build secure mix-nets, guaranteeing long term privacy even in a quantum computing era.
1.1 State of the Art The structure of a proof of a shuffle heavily depends on the choice of a way of representing a permutation. A great variety of approaches appear in the literature, from applying permutation matrices [22, 21, 26, 37, 35], permutation networks [2, 3], showing two sets are equal if they are both roots of the same polynomial [31, 24, 7, 25] or using general arithmetic circuits [13]. Most of the work, from the very beginning [1, 30], focuses on reducing the size of the proofs for different scenarios. A comprehensive study of mix-nets and proofs of shuffles can be found in [27]. However only a handful of post-quantum e-voting proposals have been recently published. Del Pino et al. presented EVOLVE in [19], which uses a somewhat homomorphic encryption scheme to add together several ballots before decrypting them. This alternative can only work with elections where the result can be represented as the addition of individual votes, but it can not implement write-ins, that are easily handled by mix-nets. The same limitation applies to the recent work [11], which proposes an elegant way of solving some security issues in [19]. Gjøsteen and Strand also propose the use of fully homomorphic encryption to construct a decryption circuit in [23], but while theoretically interesting it is still far from efficient. The recent work in [5] proposes a practical post-quantum e-voting protocol, but under a very strong trust (perhaps unrealistic) assumption: the shuffle entity has no access to the channels used by voters to cast their bots in the ballot box. Regarding post-quantum mixnets, the universally verifiable mix-nets of Costa et al. and Strand [17, 34, 18] are both quite impractical, either because of the use of fully homomorphic encryption or because correctness proofs have linear (in N) size, with large constants. The only quantum-safe practical mix-net we are aware of is [10] by Boyen et al., based on a different model that only allows verification by a (temporarily trusted) auditor, making it not universally verifiable. The construction of an efficient post-quantum universally verifiable mix-net is still an open problem. In this paper we provide a significant step presenting the first such protocol, to shuffle Nciphertexts, with proofs of sub-linear size in N. A key ingredient for our protocol is the zero-knowledge proof of satisfiability of an arithmetic circuit presented in [6] (and recently improved/generalized in [9]). These proofs achieve post-quantum security properties by using techniques from lattice-based cryptography, and the size of the proofs is sub-linear in the number of gates Mof the arithmetic circuit, since it is O(qMlog3(M)) (in the protocol in [6]). When the soundness property of a zero-knowledge system is satisfied computationally (assuming the hardness of some underlying mathematical problem) then people often refer to such proofs as arguments of knowledge. The proofs in [6, 9] and consequently the proof for the correctness of a shuffle that we present in this paper are indeed arguments of knowledge, but we use both proofs and arguments to refer to them.
1.2 Arithmetic Circuits for Shuffles The idea is to use the powerful result of [6], to prove in zero-knowledge that a shuffle (re-encryption and permutation) has been correctly performed. Let L={C1, . . . , CN}be the input list of Nciphertexts for the shuffling node; he is assumed to re-encrypt each ciphertexts, which leads to L0={C0 1, . . . , C0 N}and then to apply a permutation ρto the list L0, which leads to L00 ={D1, . . . , DN}, where Di=C0 ρ(i), for each i= 1, . . . , N. The list L00 is made public, so the two lists Land L00 are available to the verifier of the zero-knowledge proof of a correct shuffle. In the case of RLWE-based ciphertexts, the re-encryption step L→L0can be easily expressed as an arithmetic circuit, where some secret input wires correspond to the (small) random elements used to re-encrypt each ciphertext. The number of gates of this first sub-circuit is O(N). The challenge is now to express the permutation step, that is the statement that list L00 is a permutation of list L0, as an arithmetic circuit with a small enough number of gates. Our solution is to consider the Beneˇs network that corresponds to that permutation; the circuit that expresses such Beneˇs network takes as input the Nciphertexts in L0along with a bit b∈ {0,1}for each internal 2-in 2-out gate of the Beneˇs network, indicating if the two input wires must be switched or not, in the output of that gate. The final output of the circuit must be the list of Nciphertexts in L00. The number of gates of such a circuit is O(Nlog(N)). 1.3 Our Results We detail how RLWE ciphertexts must be produced and re-encrypted so that shuffling nodes must prove, in particular, that the noise introduced when reencrypting each ciphertext is small enough (and thus, in the tally phase, there will not be errors in the decryption of the final ciphertexts). This fact, along with the correct execution of the re-encryption algorithm and the correct execution of a permutation expressed by a Beneˇs network, constitute the arithmetic circuit to which we apply the results in [6, 9]. Since the number of gates of the circuit is M∈ O(Nlog(N)), the result is a zero-knowledge proof that a shuffle of N ciphertexts has been correctly applied, with post-quantum security based on the hardness of well-known lattice problems, and with size sub-linear on N. 1.4 Organization In Section 2 we review some ingredients of our protocol: RLWE encryption, lattice-based zero-knowledge proofs of satisfiability of arithmetic circuits and Beneˇs networks. Then in Section 3 we propose our protocol, by first describing the arithmetic circuit that represents a shuffle of NRLWE ciphertexts, and then by applying to this circuit the construction in [6]. We analyze our protocol in Section 4, in terms of efficiency and security.
2 Preliminaries 2.1 Ideal Lattices: RLWE Problems and Public Key Encryption Ideal lattices can be seen as ideals in the polynomial ring R=Z[X]/hf(X)i, where the polynomial f(X) = Xn+fnXn−1+···+f2X+f1∈Z[X]. Usually, for real cryptographic applications, we will set na power of 2 and f(X) = Xn+ 1 and we will consider the quotient ring Rq=R/qR=Zq[X]/hXn+ 1isince this setting provides several advantages from an implementation point of view. Let nand qbe integers, R=Z[X]/hf(X)iwith deg(f) = nand Rq= R/qR. Let χσbe a discrete probability distribution over R(usually a Gaussian distribution) with parameter σand a secret polynomial s∈ Rq. Definition 1 (Ring Learning With Errors Distribution). The RLWE distribution Ls,χ over Rq×Rqis sampled by choosing aR ← Rq,eR ←χσand outputting (a, b =a·s+emod q). Definition 2 (Search-RLWE Problem). Given mindependent samples (ai, bi)R ← Ls,χ for a fixed uniformly random s, find s. Definition 3 (Decision-RLWE Problem). Given mindependent samples (ai, bi), decide whether this samples are distributed according to Ls,χσfor a fixed uniformly random s; or according to a uniform distribution over Rq×Rq. Hardness of RLWE comes for large enough choices of q. Solving certain instantiations of Search-RLWE is as hard as quantumly solving an approximate Shortest Vector Problem on an ideal lattice. The problem remains to be hard when the secret sis chosen from the error distribution instead of uniformly at random (see [4] for the reduction). RLWE encryption scheme. This scheme, first proposed by Lyubashevsky, Peikert and Regev in [29], works as follows: Definition 4 (RLWE encryption scheme). We consider the ring Rq= Zq[X]/hXn+ 1iwith na power of 2 and qa prime. Messages are strings of nbits encoded as a polynomial in Rq. An error distribution χmust be chosen, producing “small” elements of Rq. –Gen(1λ): Compute suitable nand qaccording to λ. Choose aR ← Rqand small s, e R ←χ. Output sk =sand pk = (a, b =a·s+e)∈ Rq×Rq. –Enc(pk, z, r, e1, e2): To encrypt a message z∈ {0,1}nwe view it as an element in Rqby using its bits as the 0-1 coefficients of a polynomial. Then we choose small elements r, e1, e2 R ←χand output (u, v)=(r·a+e1, b ·r+ e2+q 2z)∈ Rq×Rq
–Dec(sk, (u, v)): Compute: v−u·s=b·r+e2+jq 2mz−(r·a+e1)·s = (a·s+e)·r+e2+jq 2mz−r·a·s−e1·s =a·s·r+e·r+e2+jq 2mz−r·a·s−e1·s = (e·r−e1·s+e2) + jq 2mz ≈jq 2mz It has been proved that the RLWE encryption scheme is IND-CPA secure, assuming the hardness of RLWE problems [29]. The usual choice for the error distribution χconsists in running nindependent instances (one for each component, if we see elements of Rqas vectors in (Zq)n) of a discrete Gaussian distribution, centered at 0 and with parameter σ, in Zq. In this paper we consider truncated Gaussian distributions: we fix a positive integer ˆ kand we check that the output of the Gaussian falls in the set {−ˆ kσ, . . . , −1,0,1,...,ˆ kσ}; if this is not the case, we reject this sample and do a new one. The statistical distance between the resulting truncated distribution over Rqand the non-truncated Gaussian distribution over Rqcan be bounded by n·e−ˆ k2/2(see for instance [28]). If we take n, ˆ ksuch that this value is negligible in the security parameter, then we can safely use truncated Gaussian distributions with the same parameters (q, n, σ) which are considered secure when discrete Gaussian are employed. The choices of qand σdetermine if the encryption scheme works properly: they must be chosen to ensure that all the coefficients of e·r−e1·s+e2can be upper-bounded by less than q 4, in this way the message zis recovered by rounding each coefficient of v−u·sto 0 or q 2, whichever is closest modulo q. Also, this scheme allows to define a new algorithm Re-Enc to re-encrypt previously encrypted data. This algorithm works as follows: – Re-Enc(pk, (u, v), r0, e0 1, e0 2): To re-encrypt a message zencrypted as (u, v) we choose small r0, e0 1, e0 2 R ←χσand output the pair (u0, v0)=(u, v) + Enc(pk, 0, r0, e0 1, e0 2)∈ Rq×Rq. Notice that every time we re-encrypt a ciphertext the norm of its noise might grow, and therefore only a limited number of re-encryptions are allowed. Parameters have to be chosen so that the encryption scheme supports at least as many re-encryptions as the number of mix-nodes of the mix-net (which is known in advance). Given that this number is typically a fixed small quantity this requirement is usually already satisfied and has no real impact on the parameter selection.
2.2 Zero-Knowledge Arguments for the Satisfiability of Arithmetic Circuits An arithmetic circuit over a field Zqis a directed acyclic graph whose vertices are called gates and edges are called wires. Gates of in-degree 0 are called input gates and usually are associated to variables or constants. The remaining gates are either multiplication gates or addition gates. The general idea of the protocol presented by Baum et al. [6] to prove the satisfiability of an arithmetic circuit over Zqis summarized below: 1. the first idea is to arrange the O(M) wire values of the circuit into a (more or less square) matrix with O(√M) rows and O(√M) columns; 2. using an appropriate lattice-based homomorphic commitment scheme (with outputs being vectors of elements in ZQfor some prime number Q >> q), one commit to each row of the above-mentioned matrix; 3. using techniques from [8], one reduces the satisfiability of the arithmetic circuit to the satisfiability of linear-algebraic statements over committed matrices; 4. the last step consists in using a new zero-knowledge proof, designed by themselves, to prove the satisfiability of such algebraic statements (products and additions of matrices) in an efficient way, with the proofs being as short as possible. Authors of [6] show a possible way of choosing the parameters of the lattice, the commitment scheme and the dimensions of the matrix so that the global protocol to prove satisfiability of the arithmetic circuit has communication complexity O(qMlog3(M) log(Q)). The protocol involves 9 rounds of interaction between the prover and the verifier. The security (including computational soundness) is based on the hardness of both the Short Integer Solution (SIS) and the Learning With Errors (LWE) problems. For the security proof to be valid, they need Q≈q5. 2.3 Beneˇs Networks We will use as a model a permutation network called Beneˇs network proposed by Abraham Waksman in [36]. The use of Beneˇs networks is not new in cryptography, as early results from Masayuki Abe [2] already considered these constructions to apply them to mix-nets. Nevertheless, the asymptotic cost of these solutions were usually worse than others, and they were considered inefficient. In this paper we see that the recent advances in the area of zero-knowledge proofs/arguments for satisfiability of arithmetic circuits may give a new opportunity to this kind of constructions. Formally, a permutation network is an acyclic graph with Ninputs and N outputs where vertices have in-degree and out-degree equal to 2. These vertices are called switch gates and each of them has a special input b∈ {0,1}, which indicates if the two inputs are switched or if they remain in the same order (see figure 1).
Fig. 1. Switch gate Beneˇs networks are constructed recursively. A 2 ×2 Beneˇs network is just a switch gate, and it is trivial that a switch gate models every permutation of 2 elements, namely the identity if b= 0 and a switch if b= 1. Now we can construct a 2k×2knetwork using two 2k−1×2k−1Beneˇs sub-networks and 2k switch gates, that will be able to perform whichever permutation of 2kelements. An easy induction yields that for N= 2k, to craft a N×Nnetwork we will need 2 log2(N)−1 stages of N/2 switch gates each, therefore an O(Nlog(N)) amount of switch gates. Beneˇs networks easily model any of the N! permutations without deadlocks (i.e. for each wire only travels one value). Besides, Beneˇs networks can be extended to arbitrary sizes, and not just powers of 2 [15]. One could imagine that to perform the permutation the prover could just choose the switch bit of each gate uniformly at random from {0,1}, and let the circuit apply the resulting permutation. This will not be correct, since in a shuffle every permutation of Nelements must have the same probability to appear. The random choosing of the bits implies that some permutation will appear more often than others, so the choice is not uniform, as shown in [3]. Therefore, if we denote by SNthe set of permutations of Nelements, the prover must first choose πR ← SN, and then run an algorithm to set the bits accordingly. These algorithms are called routing algorithms and have a best known complexity of O(Nlog(N)), such as [14], so it does not affect the asymptotic complexity of the prover. 3 The Proposed Protocol 3.1 The Circuit that Encodes a Shuffle A shuffling node receives as input a list of Nciphertexts L={C1, . . . , CN}. He first re-encrypts each ciphertext Ci= (ui, vi) using the protocol C0 i= (u0 i, v0 i)←Re-Enc(pk, (ui, vi), r0 i, e0 1,i, e0 2,i), which leads to an intermediate list L0={C0 1, . . . , C0 N}, and then he applies a random permutation ρ∈ SNto L0, which leads to L00 ={D1, . . . , DN}, where Di=C0 ρ(i), for each i= 1, . . . , N. The list L00 is the output of the whole shuffling process (along with the correctness proof that we will describe in this section). The shuffling node computes the Beneˇs network that represents the secret permutation ρ, that is, an assignment b1, b2, . . . , bKof bits for each of the K switch gates of the network, where b`∈ {0,1}, for all `= 1, . . . , K.
Note that we separate the shuffling in two well-differentiated parts / circuits, one for the re-encryption and one for the permutation. An alternative solution (used for instance in [12]) would be to add a re-randomization step in each switch gate of the Beneˇs network. However, the size of the global circuit for the shuffle is smaller with our solution: it contains less re-randomization / reencryption gates, O(N) than the O(Nlog N) re-randomization gates that would be required in this alternative solution. All the elements involved in the encryption scheme are polynomials in the ring Rqof degree at most n−1, so we see each element as a tuple of nelements in the field Zqunderlying the arithmetic circuit that we will consider. For instance, ui↔(ui,0, . . . , ui,n−1). The public inputs of the arithmetic circuit are (the Zqcomponents of) the N ciphertexts in L={C1, . . . , CN}and the Nciphertexts in L00 ={D1, . . . , DN}. So, counting elements in the field Zqof the circuit, we have 4nN public inputs. The secret inputs of the arithmetic circuit are: (i) (The Zqcomponents of) the Ntriples of noise (r0 i, e0 1,i, e0 2,i) used to re-encrypt each ciphertext Ci, which means 3nN elements in Zq, (ii) The Kbits b1, . . . , bKfor the Kswitching gates of the Beneˇs network; we recall that K∈ O(Nlog(N)). What does our circuit Cshuffle do? Essentially, three different things: 1. Check that the components of the noise are small; for instance, if r0 i↔ (r0 i,0, . . . , r0 i,n−1), then the circuit needs to check that r0 i,j ∈ {−ˆ kσ, . . . , −1,0,1,...,ˆ kσ} ⊂ Zq, for all j= 0, . . . , n−1. This checking is encoded as the arithmetic circuit equality (r0 i,j +ˆ kσ)·. . . ·(r0 i,j + 1) ·r0 i,j ·(r0 i,j −1) ·. . . ·(r0 i,j −ˆ kσ) = 0, in Zq. Since this has to be done for each i= 1, . . . , N, each j= 0, . . . , n −1 and each element in the noise triple, we have a circuit with 6ˆ kσnN gates. If some checking fails, the arithmetic circuit is not satisfied. 2. Check that each secret input b`is a bit, that is, check that b`·(1−b`) = 0 in Zq, for all `= 1, . . . , K. These circuits consist of 2K∈ O(Nlog(N)) gates. If some checking fails, the arithmetic circuit is not satisfied. 3. Check that the Beneˇs network, when applied to the result of re-encrypting the ciphertexts in L, produces the ciphertexts in L00. This consists in two phases, one for re-encryption and one for permutation: (a) re-encryption circuit: each re-encryption C0 i= (u0 i, v0 i)←Re-Enc(pk, (ui, vi), r0 i, e0 1,i, e0 2,i) essentially consists in doing two polynomial multiplications and two polynomial additions, in the ring Rq. If we implement these operations with the classical method, this means O(n2) gates for each re-encryption, as an arithmetic circuit over Zq. The complexity of this circuit can be slightly improved when multiplying polynomials if we use Karatsuba’s algorithm. Notice that this would imply that the output is the product of the polynomials over Zq[X], which has (at most) 2n−1 monomials. We can reduce this resulting polynomial into Rq=Zq[X]/hXn+ 1iagain with n−1 subtractions, since Xn=−1.
32. Kazue Sako and Joe Kilian. Receipt-free mix-type voting scheme - a practical solution to the implementation of a voting booth. In Louis C. Guillou and Jean- Jacques Quisquater, editors, EUROCRYPT’95, volume 921 of LNCS, pages 393– 403, Saint-Malo, France, May 21–25, 1995. Springer, Heidelberg, Germany. 33. Peter W. Shor. Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM Journal on Computing, 26(5):1484– 1509, 1997. 34. Martin Strand. A verifiable shuffle for the GSW cryptosystem. In Aviv Zohar, Ittay Eyal, Vanessa Teague, Jeremy Clark, Andrea Bracciali, Federico Pintore, and Massimiliano Sala, editors, FC 2018 Workshops, volume 10958 of LNCS, pages 165–180, Nieuwpoort, Cura¸cao, March 2, 2019. Springer, Heidelberg, Germany. 35. Bj¨orn Terelius and Douglas Wikstr¨om. Proofs of restricted shuffles. In Daniel J. Bernstein and Tanja Lange, editors, Progress in Cryptology – AFRICACRYPT 2010, pages 100–113, Berlin, Heidelberg, 2010. Springer Berlin Heidelberg. 36. Abraham Waksman. A permutation network. J. ACM, 15(1):159–163, January 1968. 37. Douglas Wikstr¨om. A commitment-consistent proof of a shuffle. In Colin Boyd and Juan Gonz´alez Nieto, editors, Information Security and Privacy, pages 407–421, Berlin, Heidelberg, 2009. Springer Berlin Heidelberg.