Next Article in Journal
Effect of Lithology on Mechanical and Damage Behaviors of Concrete in Concrete-Rock Combined Specimen
Next Article in Special Issue
On the Security of the Dandelion Protocol
Previous Article in Journal
On Triangular Multisets and Triangular Fuzzy Multisets
Previous Article in Special Issue
Twisted Edwards Elliptic Curves for Zero-Knowledge Circuits
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

R-LWE-Based Distributed Key Generation and Threshold Decryption

Department of Mathematics, Campus Nord, Universitat Politècnica de Catalunya, 08034 Barcelona, Spain
*
Authors to whom correspondence should be addressed.
Current affiliation: Applied Crypto Group, Orange Labs, 14000 Caen, France.
Current affiliation: LTCI, Télécom Paris, Institut Polytechnique de Paris, 91120 Palaiseau, France.
§
Current affiliation: LIRMM, Université de Montpellier, CNRS, 34095 Montpellier, France.
Mathematics 2022, 10(5), 728; https://doi.org/10.3390/math10050728
Submission received: 3 February 2022 / Revised: 21 February 2022 / Accepted: 22 February 2022 / Published: 25 February 2022
(This article belongs to the Special Issue Recent Advances in Security, Privacy, and Applied Cryptography)

Abstract

:
Ever since the appearance of quantum computers, prime factoring and discrete logarithm-based cryptography have been questioned, giving birth to the so-called post-quantum cryptography. The most prominent field in post-quantum cryptography is lattice-based cryptography, protocols that are proved to be as difficult to break as certain hard lattice problems like Learning with Errors (LWE) or Ring Learning with Errors (R-LWE). Furthermore, the application of cryptographic techniques to different areas, like electronic voting, has also nourished a great interest in distributed cryptography. In this work, we will give two original threshold protocols based in the lattice problem R-LWE: one for key generation and one for decryption. We will prove them both correct and secure under the assumption of hardness of some well-known lattice problems. Finally, we will give a rough implementation of the protocols in C to give some tentative results about their viability, in particular our model generates keys in the order of 10 3 ms and decrypts and encrypts in the order of 10 2 ms.

1. Introduction

The appearance of the computer in the XXth century caused the explosion of cryptography, the safety of which enabled the huge development of the connected society (for example, recent cryptographic endeavours into facilitating the implementation of the Smart City model [1]). Similarly, the development of quantum computing and specifically Shor’s algorithm [2], which renders cryptography based on the discrete logarithm and prime factoring problems effectively useless against a quantum adversary, spawned new types of cryptography.
There are two main types of cryptography that have been developed to overcome the attacks of quantum computers: quantum and post-quantum cryptography. Quantum cryptography relies on quantum algorithms that cannot be broken by quantum adversaries, while post-quantum deals with classical (non-quantum) algorithms that cannot be broken by quantum adversaries. We focus on post-quantum cryptography given that widespread use of moderately powerful quantum computers seems unachievable in the short run. In this realm, the area that has had more recent advancements is lattice-based cryptography, as shown by the fact that in the Status Report on the Second Round of the National Institute of Standards and Technology (NIST) Post-Quantum Cryptography Standardization Process [3] most third-round finalists are lattice-based schemes. Within lattice based schemes, cryptography based in the Learning with Errors (LWE) problem and its variants is especially relevant. We will build our proposals around the Ring Learning with Errors (R-LWE) problem.
There are many applications of post-quantum cryptography, but the one we we focus on is electronic voting. Electronic voting is characterized by a significant lack of trust. The lack of trust in other entities is what initially spawned the concept of cryptography, thus going further in this direction is the next logical step to follow. Therefore, the aim is to “spread” that trust, so that one single corrupt player can no longer break the protocol. Distributed cryptography is this idea of spreading the tasks between several players so that only certain subsets of them can perform the cryptographic protocol. The interest in distributed cryptography, and in particular post-quantic distributed cryptography, can be seen in interesting recent advancements in the area like [4,5].
Adding post-quantum and distributed cryptography finally brings us to our main subject: R-LWE-based distributed key generation and threshold decryption.

1.1. State-of-the-Art

Despite the shown interest and potential usefulness of lattice-based threshold public key encryption cryptography, the amount of existing proposals is scarce, especially of proposals focusing on the R-LWE problem. Most of the existing proposals revolve around the LWE problem (see, for example, [5,6,7,8]), which has the potential problem of keys and ciphertexts growing with O ( n 2 ) instead of with O ( n ) like the R-LWE variant (with n the dimension of the lattice), thus having a higher possibility to need a greater amount of operations and therefore computation time. In the world of threshold encryption based on R-LWE, as far as we know there is only one proposal given in [9], which is based on the homomorphic properties of the presented Fully Homomorphic Encryption scheme. However, this proposal does not come with a distributed key generation protocol (as it relies on a Trusted Third-Party (TTP) for that). Additionally, to the best of our knowledge, none of the mentioned proposals give an implementation to truly analyze computation times, even if implementations of post-quantic protocols is a hot topic, as shown by the Open Quantum Safe project [10]. Furthermore, the Open Quantum Safe project also shows us that despite recent developments, most applications are still on the prototype phase. A summary of the current state of the art can be found in Table 1.

1.2. Contributions

In this work, we present original protocols of both distributed key generation and threshold decryption that, as far as we know, are the first R-LWE-based threshold protocols including both decryption and key generation. The protocols are based on the LWE proposal given by Bendlin and Damgård in [6], whose ideas are transported into the R-LWE setting. Furthermore, we prove these protocols both correct and secure, we give a set of parameters for which our protocols have more than 100 bits of security and we give a rough implementation in C of the protocols to analyze their performance.

1.3. Structure

In Section 2 we will give the preliminaries necessary to follow the work in the fields of cryptographic primitives, distributed cryptography, and Ring Learning with Errors. In Section 3, we present the protocols that act as the main contribution of this work, while in Section 4 we will prove their correctness, and in Section 5 we will prove them secure. Section 6 will be dedicated to analyzing the implementation in C of the protocols, and finally in Section 7 we will give our final concluding thoughts and possible future work. For the appendices, in Appendix A we give correctness and security proofs against an adversary acting actively in both protocols, in Appendix B we give the proofs for auxiliary results, and in Appendix C we give the link to a repository containing the relevant code of our implementation.
Most of the introduction has been taken from the introduction in the Master’s Thesis [11] by Ferran Alborch.

2. Preliminaries

2.1. Notation

Elements in R , Z , or Z q will be indicated as lower case letters (a, b, …), while elements in R n , Z n , or Z q n will be indicated as bold lower case letters ( a , b , ). We will consider Z q with the representatives in q 2 , q 2 . Let X be a random variable, X χ means X follows the probability distribution χ , x χ means x is sampled from a random variable following the distribution χ , Y χ n means Y is a vector such that every coordinate is independently sampled from the distribution χ and for any set J , j $ J is the action of choosing j uniformly at random from J . We will also identify any polynomial of degree n 1 , f ( x ) = a 0 + a 1 x + + a n 1 x n 1 Z q [ x ] with the vector f = ( a 0 , a 1 , , a n 1 ) Z q n . A function g is said to be negligible over n ( g : = neg ( n ) ) if k Z > 0 , n 0 Z > 0 such that n n 0 , | g ( n ) | < 1 n k . Finally, a function f is said to be O ( g ( n ) ) if there exists M > 0 and n 0 such that | f ( n ) | M · g ( n ) for all n > n 0 , while a function f is said to be ω ( g ( n ) ) if for all M > 0 exists n 0 such that | f ( n ) | > M · g ( n ) for all n > n 0 .

2.2. Cryptographic Primitives

We will start by giving some cryptographic primitives, well-known definitions, protocols, or techniques used in cryptography upon which we will build our encryption scheme and protocols. First, we will formally define what an encryption scheme is.
Definition 1.
An encryption scheme is a tuple S = ( M , C , K , E , D ) such that:
  • M is a set called plaintext space.
  • C is a set called ciphertext space.
  • K is a set called key space. Generally a key generation procedure is also specified to generate k K .
  • E = { E k : k K } is a set of functions E k : M × R C called encryption functions. R is a randomness space to account for probabilistic encryption schemes.
  • D = { D k : k K } is a set of functions D k : C M called decryption functions.
Note that if D and E use the same key, then we call it symmetric encryption; otherwise, we call it asymmetric or public key encryption. In public key encryption, K can be divided into two different sets, K s , the secret key space, and K p , the public key space. The public key (known by all entities) is used to encrypt messages and the secret key (known only to the decrypting entity) is used to decrypt them.
Once we have defined a cryptosystem, we need to prove some properties about it to ensure it is useful. The most important of these properties are correctness and security, and from now on we will focus solely on public key encryption.
Definition 2.
Let ( M , C , K , E , D ) be an encryption scheme. The encryption scheme is said to be correct if for all e K p exists some computable d K s such that, given λ the security parameter, the probability
Pr [ D d ( E e ( m ) ) m ] = neg ( λ )
for all m M .
In contrast to the correctness of an encryption scheme, security can be defined in various ways. This is due to the fact that a decryption should always be correct (or always, except with negligible probability) but security depends on the properties of the adversary we want to protect us against (information available, computational power) and what we want to ensure (that the adversary cannot know what message was encrypted or that he cannot distinguish which message has been encrypted from a pool of plaintexts). In our case, we are interested in CPA security.
Attack Game 1
(Attack Games 5.2 and 11.2, [12]). Let S = ( M , C , K , E , D ) be an encryption scheme. Given an adversary A , the Chosen Plaintext Attack (CPA) attack game, has two experiments: Experiment 0 and Experiment 1. For b { 0 , 1 } we define Experiment b as
  • The challenger chooses e $ K p and sends it to the adversary.
  • The adversary submits polynomially many queries to the challenger. For i = 1 , 2 , , A submits two same-length messages m 0 i , m 1 i M . The challenger computes c i = E e ( m b i ) and sends it to the adversary.
  • The adversary outputs a bit b ^ { 0 , 1 } .
Let W b be the event in which A outputs 1 in the event b, then we define A ’s CPA advantage as
CPAAdv [ A , S ] : = | Pr [ W 0 ] Pr [ W 1 ] | .
Definition 3
(Definitions 5.2 and 11.4, [12]). An encryption scheme S is said to be CPA secure if for all efficient adversaries A , the value CPAAdv [ A , S ] is negligible.
Furthermore, security can be achieved against different types of adversaries depending on what capacities they have. We will focus basically on passive adversaries (also known as honest but curious), who can see all the information the corrupted players have but cannot make them deviate from the protocol, and active adversaries (also known as malicious), who can make the corrupted players deviate arbitrarily from the protocol. Another important distinction to make is whether it is a static adversary, who picks the subset of players it will corrupt prior to the start of the protocol; or a dynamic adversary, who can change the subset of corrupted players during the execution of the protocol. Our security model will be against static adversaries.

2.3. Distributed Cryptography

The specific branch of cryptography we are interested in this work is distributed cryptography.
Definition 4
([13]). A threshold secret sharing scheme of threshold t and u players is a scheme such that given some data D it divides it into u pieces D 1 , D u such that:
  • Knowledge of t + 1 or more pieces D i makes D easily computable.
  • Knowledge of t or less pieces D i leaves D completely undetermined (i.e., all its possible values are equally likely).
Definition 5.
We will call a threshold encryption scheme a secret sharing scheme where what we try to recover is a plaintext from a ciphertext.
One of the first secret sharing schemes and one of the most used up to this day due to its simplicity to compute and understand, is Shamir Secret Sharing. We will use it profusely throughout our work.
Technique 1
([13]). Shamir Secret Sharing over a field F of a secret s F of threshold t works as follows:
  • Choose t elements b i F and define the polynomial f ( x ) : = s + i = 1 t b i x i (i.e., choose a random polynomial f ( x ) F [ x ] such that f ( 0 ) = s ).
  • For every player P j , their share of the secret is f ( i j ) , with i j F { 0 } being different for every player and agreed before-hand.
  • When t + 1 players want to recover the secret, they use Lagrange interpolation to find f ( x ) and then compute f ( 0 ) .
The convenience of this secret sharing scheme lays in two main properties: the recovery of the secret is done through Lagrange interpolation (which is easy to compute) and the shares are linear, which means that a linear combination of the shares is a share of the linear combination of secrets. Both of these properties will be used in our work.
Other distributed cryptographic tools we will use are the Pseudo-Random Secret Sharing (PRSS) and the Non-Interactive Verifiable Secret Sharing (NIVSS) techniques. These tools will be crucial in our proposal, as the security of our protocols is based on being able to mask the relevant information with noise in such a way that the adversary cannot retrieve it. To generate this noise we will use these two protocols.
Definition 6.
A Pseudo-Random Function (PRF), Φ · ( · ) , is a deterministic function that maps two sets (domain and range) on the basis of a key, which when run multiple times with the same input gives the same output but given an arbitrary input the output seems random, i.e., one cannot distinguish the output of a given input from a random oracle. A random oracle is an oracle (a theoretical black box) that responds to every query with a (truly) random response chosen uniformly from its output domain. If a query is repeated, it responds the same way every time that query is submitted.
Technique 2
([14]). Pseudo-Random Secret Sharing in Z q (PRSS) allows u players to non-interactively share a common random value x with a threshold of t players ( t < u ) given a pseudo-random function Φ · ( · ) that with input a key and a value μ outputs values in the interval I = [ a , b ] , a < 0 , b > 0 and whatever group of players of size less or equal than t cannot obtain relevant information on x. The algorithm works as follows:
  • For each subset H of t players a TTP defines a key K H Z q uniformly at random.
  • Each player P j is given K H , H such that P j H .
  • The pseudo-random number they are sharing is
    x : = H Φ K H ( μ )
    for a value μ. Since there are u t such subsets H, we know x [ u t a , u t b ] .
  • To compute x j a Shamir share of x every player computes
    x j = H P j Φ K H ( μ ) · f H ( j )
    where f H ( x ) is the unique degree-t polynomial (in our case f H ( x ) Z q [ x ] with q prime) such that f H ( 0 ) = 1 and f H ( i ) = 0 for all P i H .
Technique 3
([14]). Non-Interactive Verifiable Secret Sharing in Z q (NIVSS), allows a dealer D to share a secret s with u players with threshold t given a value μ and a pseudo-random function ϕ · ( · ) that with input a key and μ outputs values in the interval I = [ a , b ] , a < 0 , b > 0 . It works very similarly to PRSS. The algorithm works as follows:
  • For each subset H of t players the dealer D chooses a key K H Z q uniformly at random.
  • The dealer D gives to player P j all the K H such that P j H .
  • The dealer D reconstructs the pseudo-random value the players share x = H ϕ K H ( μ ) , since he has all the keys.
  • D broadcasts the value s x , and now all the players have a share of s by adding their shares of x to s x .
Finally, as we will be using distributed methods, one must ensure that the order in which the different players send information does not compromise the security of the scheme. Broadly speaking, the last player to send information would have an advantage with respect to the first one due to knowing more information when making its decision. To solve this problem, it is standard to use commitment schemes.
Definition 7
(Definition 8.8, [12]). Given a message space M , a commitment scheme is a pair of efficient algorithms C = ( C , V ) where C (the commiter) is an algorithm that given m M outputs a commitment c and an opening string o and V (the verifier) is a deterministic protocol that given ( m , c , o ) outputs accept or reject, and such that it satisfies the following properties:
  • Correctness: For all m M , if C ( m ) = ( c , o ) then
    Pr V ( m , c , o ) = accept = 1 .
  • Binding: This property is the notion that once a commitment c is generated, it should only commit for one message in M . In particular, for every efficient adversary A that outputs ( c , m 1 , o 1 , m 2 , o 2 ) we must have that
    Pr m 1 m 2 and V ( m 1 , c , o 1 ) = V ( m 2 , c , o 2 ) = accept = neg ( λ ) .
  • Hiding: This property is the notion that the commitment c alone should not reveal any information about the message m. To properly define this, we use a semantic security attack game (see Attack Game 2.1, [12]) where instead of encrypting the messages we compute its commitment. What we ask is, if W b denotes the event that the adversary outputs 1 in experiment b, then
    | Pr [ W 0 ] Pr [ W 1 ] | = neg ( λ ) .

2.4. Ring Learning with Errors

The Learning with Errors (LWE) problem was introduced by Regev in 2005 in a previous version of [15] as a generalization of the parity learning problem, and gave both a cryptographic protocol based on it and a reduction of its security to a hard lattice problem (the GAP Shortest Vector Problem (GAPSVP)).
However, cryptosystems based on the LWE problem have several issues. For example, many of them need to encrypt bit by bit and, more importantly, the public keys required are very costly to store as they are usually (big) matrices of elements in Z q . Coupling these two together we get that a lot of storage space is usually needed to encrypt small amounts of information.
To solve these problems, the Ring Learning with Errors variant was introduced by Lyubasevsky, Peikert and Regev in [16]. It is essentially a particular case of LWE but in polynomial rings over finite rings. The problem is over the polynomial ring R q = Z q [ x ] / f , where f is a monic polynomial in Z q [ x ] .
Given an element a ( x ) R q , one can see the principal ideal generated by a ( x )
a ( x ) = { c ( x ) R q | c ( x ) = a ( x ) · b ( x ) , b ( x ) R q }
as an ideal lattice in Z q n , which we will note as L ( a ) . This correspondence is easy to see in the case f ( x ) = x n + 1 (the particular R q we will use given its specific properties) due to the fact that the vector of coefficients of the product of polynomials in R q can be found through the anticyclic matrix as follows:
a ( x ) · b ( x ) ( mod x n + 1 ) a 1 a n a n 1 a 2 a 2 a 1 a n a 3 a 3 a 2 a 1 a 4 a n a n 1 a n 2 a 1 · b 1 b n
where a = ( a 1 , , a n ) and b = ( b 1 , , b n ) are the coefficients of a ( x ) and b ( x ) , respectively.
With this out of the way we can finally define the Ring Learning with Errors problem, on which a lot of lattice-based cryptography is based.
Definition 8.
Let χ be a probability distribution over R q and s R q . Then, the R-LWE distribution A s , χ is the distribution in R q × R q given by ( a , b = a · s + e ) , where a R q is chosen uniformly at random, e χ and all the operations to compute b are made in R q .
Definition 9.
The decisional R-LWE problem is to distinguish samples from A s , χ from the uniform distribution in R q × R q with a probability that is non-negligibly bigger than 1 2 .
Definition 10.
The search R-LWE problem is to find s given a polynomial amount of samples from A s , χ with non-negligible probability.
Therefore, a sample of the R-LWE distribution is a point of an ideal lattice that has been offset by a margin set by the distribution χ (which is normally taken such that the error is small). Therefore, the search R-LWE problem could be seen as finding a point in the ideal lattice L ( a ) (remember that a vector a uniquely defines an ideal lattice through its anticyclic matrix) “close” to the sample, and the decision R-LWE could be seen as given an ideal lattice L ( a ) , decide whether the points given are all “close” to L ( a ) or are uniformly distributed.
When implementing LWE or R-LWE we will use a certain type of probability distribution over Z q called discrete Gaussians, given their nice properties and ease in sampling values from them. There are several different definitions of discrete Gaussians but in our implementation we will use the following, given it is much easier to sample.
Definition 11
([15]). Ψ σ , σ R + is the distribution in the torus T = R / Z obtained by sampling a Gaussian random variable X , X N ( 0 , σ ) centered in 0 and with standard deviation σ and then reducing modulo 1. Therefore,
Ψ σ ( r ) = k = 1 2 π σ e r k 2 σ 2 , r [ 0 , 1 )
Note that if Y Ψ σ , then Y = X ( mod 1 ) , with X N ( 0 , σ ) where reducing modulo 1 is taking only the decimal part of any real number.
Definition 12
([15]). The discretization to Z q , q Z > 0 of any distribution in T ( Ψ : T R + ), noted as Ψ ¯ : Z q R + is sampling from Ψ, multiplying by q, and then rounding to the closest integer. Therefore,
Ψ ¯ ( i ) : = i 1 2 q i + 1 2 q Ψ ( x ) d x
Note that if Z Ψ ¯ σ then Z = q Y ( mod q ) , with Y Ψ σ .
Definition 13.
We define the truncated Discrete Gaussian of parameters σ and κ as the distribution which samples from Ψ ¯ σ and rejects any sample bigger than κ, when seeing them with representatives in q 2 , q 2 .
In particular, we will use κ Z > 0 such that
Pr Ψ ¯ σ > κ 2 λ
being λ the security parameter.

3. Encryption Scheme and Protocols

Having given all the necessary preliminaries, we can finally present our encryption scheme, threshold decryption protocol and distributed key generation protocol, which we will prove correct in Section 4, secure in Section 5, analyze its implementation in Section 6 and give some last thoughts and possible future work in Section 7.
We will use a version of the LPR encryption scheme presented in [16].
Encryption Scheme 1.Let q , n , u Z > 0 , where u is the number of players, and χ be a distribution over R q . The encryption scheme S = ( M , C , K , E , D ) and key generation we will be using is the following:
  • M = { 0 , 1 } n Z q n R q . We will see every m M as an element in R q with m being its vector of coefficients.
  • C R q × R q .
  • This is a public encryption scheme, we have K s R q and K p R q × R q .
    For any pair of keys ( pk , s ) K p × K s we will have s i = 1 u χ (meaning it is the sum of u samples of χ) and pk = ( a E , b E ) = ( a E , a E · s + e ) where a E $ R q and e i = 1 u χ .
  • E = { E pk : pk = ( a E , b E ) K p } such that given a message m M :
    E pk : M C m ( u , v )
    where ( u , v ) = ( a E · r E + e u , b E · r E + e v + m · q 2 ) with r E , e u , e v χ .
  • D = { D s : s K s } such that given a ciphertext ( u , v ) C :
    D s : C P ( u , v ) m
    where we will recover every bit of m by rounding every coefficient of
    v s · u = e · r E + e v s · e u + m · q 2
    to 0 or q 2 ( mod q ) and then mapping 0 to 0 and q 2 to 1.
Now, we will define the Threshold Decryption Protocol based on this encryption scheme and a Distributed Key Generation protocol to work together with it. For clarity, we use a TTP to generate the keys in the encryption protocol, however, what we are looking for is a totally distributed scheme, so we also define a Distributed Key Generation Protocol to take the place of the TTP in the threshold decryption protocol.
Protocol 1.
Let χ be a distribution over R q and Φ · ( · ) a pseudo-random function with image in I D n , that is a vector of n coordinates with each coordinate being in I D an integer interval. Then the Threshold Decryption Protocol works as follows:
  • A TTP generates the keys K H Z q for every subset H of players of size t and distributes them according to the PRSS technique (Technique 2). It also generates the secret key s i = 1 u χ and the public key ( a E , b E ) as stated in the Encryption Scheme 1. Then, the TTP sends to the players ( a E , b E ) and Shamir shares of s . We call s j the Shamir share of s of player P j , understood as a vector of Shamir shares on the coefficients of s .
  • Client receives ciphertext c = ( u , v ) , and sends all players c .
  • Each player P j computes e ˜ j = v s j · u that is a Shamir share of e ˜ = e · r E + e v s · e u + m · q 2 with e , r E , e v , s , e u χ .
  • Each player P j computes x j , as in the PRSS protocol but using μ = u + v (since it changes for every message and it is hard to distinguish from uniformly at random), its Shamir share of x : = H Φ K H ( u + v ) and gets x j + e ˜ j Shamir share of x + e ˜ .
  • Client reconstructs x + e ˜ for every allowed subset of t + 1 players, picks whichever value is repeated more times, then for every coefficient returns 0 if x + e ˜ is closer to 0 than to q 2 and returns 1 otherwise, and this is made public.
See Table 2.
For the key generation protocol, we will assume a commitment scheme is used in the initial steps of interaction, when all the sampling is done and sent.
Protocol 2.
Let χ be a distribution over R q , μ = x + 2 x 2 + + ( n 1 ) x n 1 R q , and Φ · K G ( · ) a pseudo-random function with image in I K G n , where I K G is an integer interval. The Distributed Key Generation Protocol works as follows:
  • For the secret key s R q , each player P j chooses its contribution s j = ( s 1 j , , s n j ) with s j χ . Then, they act as the dealer in a NIVSS (Technique 3) to share every s i j to all players. All players verify the value broadcast when doing the NIVSS ( s i j H ϕ K N H j s K G ( μ ) ) is in the interval u t I K G . Now all players have shares of every s i j and by their linearity also of s i = j s i j . Then, s is the polynomial in R q with coefficients ( s 1 , , s n ) .
  • For the keys K H Z q that will be used for the PRSS in the threshold decryption, for every subset H of t players each player P j chooses uniformly at random K H j Z q their contribution on these keys and shares it with all the players using Shamir secret sharing. Then, the players will have, by adding all the shares received by other players, Shamir shares of K H = j K H j . Finally, all players send privately their shares on K H to all the players in A the complement of H, so they can recover K H .
  • For the contributions to e R q proceed identically to when generating s .
  • For a E R q every player P j chooses its share ( a E , 1 j , , a E , n j ) randomly in R q n and does a Shamir share of it. Then, all players send to all players their share on all the ( a E , 1 j , , a E , n j ) so every player can recover (by adding the shares) j a E , 1 j , , j a E , n j . The polynomial in R q with these coefficients will be a E .
  • Every player computes locally their Shamir shares on b E = a E · s + e by performing these same operations with the shares they have on s and e .
  • Finally, the public key ( a E , b E ) is made public.
See Table 3 for a more detailed look into the steps of interaction needed. Note that we will denote with subindexes the additive contributions and with superindexes the Shamir shares.

4. Correctness

With all the preliminaries on hand and having defined both protocols we can now proceed to prove their correctness. We will give the proof for the case of a passive adversary in the Key Generation phase and an active (or passive) adversary in the Decryption phase, as this will be the case our implementation will use, the reasons for this decision will be explained in Section 6.1. The proof for the case where there is an active adversary during the Key Generation Protocol will be in Appendix A.1.
Theorem 1.
Let n , q , u Z > 0 , n = 2 β and u being the number of players. Let R q = Z q [ x ] / x n + 1 , Φ · D ( · ) be a pseudo-random function with image interval I D n where
I D = ( 2 n u κ 2 + κ ) · 2 λ + β , ( 2 n u κ 2 + κ ) · 2 λ + β ,
χ be a n-dimensional distribution obtained by n independent truncated Discrete Gaussian with parameters σ and κ and
q 4 ( 2 n u κ 2 + κ ) u t 2 λ + β + 1 .
Then Protocol 1 will have correct output against an active static adversary corrupting up to t < u 3 players.
Proof. 
What we want to see first is that | x + e ^ | i q 4 i , where · i notes the coefficient i on the polynomial, given the way the decryption works in Encryption Scheme 1.
Let e ^ = e · r E + e v s · e u . Since the product in R q is done through the anticyclic matrix, we know that
| e ^ | i | e i · r E 1 | + | e i 1 · r E 2 | + + | e i + 2 · r E n 1 | + | e i + 1 · r E n | + | e v i | + | s i · e u 1 | + + | s i + 1 · e u n |
and, therefore, as r E , e v , e u χ and s , e u χ , where every coefficient of χ is truncated by κ , we get that
| e ^ | i 2 n u κ 2 + κ
Furthermore, given that there are u t keys K H , we know that
x i u t I D .
Adding both results, we then get that
x + e ^ i u t ( 2 n u κ 2 + κ ) · 2 λ + β + ( 2 n u κ 2 + κ ) = ( 2 n u κ 2 + κ ) u t 2 λ + β + 1 q 4
as we wanted to see.
Finally, we just need to see that when the client reconstructs, there is indeed a majority of correct results, and this derives directly from having at most t corrupt players, therefore there will be a majority of subsets of t + 1 players where they are all honest, and thus output the correct decryption. □
For the case where we combine both protocols, which means that we replace the TTP in Protocol 1 with Protocol 2, the outputs of this protocol and the TTP are equally generated for the case of a passive adversary in the Key Generation phase, as it cannot make any player deviate from the protocol. Therefore, we can directly apply Theorem 1. Furthermore, the same theorem and proof is valid against a passive adversary corrupting up to t = u 1 players, only noting that we will have all of the decryptions correct as a passive adversary cannot make any player deviate from the protocol.

5. Security

We will divide the proofs of security for the protocols into several theorems to ease the proofs. First, we will prove the CPA security of Encryption Scheme 1 as a one-player scheme, and then we will prove that no information is leaked when distributing the protocols. Finally, we will add everything to prove the CPA security of both protocols used together.

5.1. Security of Encryption Scheme

We will split the proof of security of Encryption Scheme 1 in three distinct parts: reducing the security of the encryption scheme to the decisional R-LWE problem, reducing the R-LWE problem with the Ψ ¯ n distribution to the R-LWE problem with truncated discrete Gaussian, and finally reducing the decisional R-LWE problem to the Discrete Gaussian Sampling over K (K-DGS) with K the field such that R is its ring of integers, a well-known lattice problem assumed to be hard to solve. We will make this splitting because the first reduction will be for any distribution χ , while the second reduction will be specifically for the distribution Ψ ¯ n . The first reduction follows the ideas from the reduction of Regev’s encryption scheme to LWE given in [15]. For the detailed proof see Appendix B.
Theorem 2.
Given χ a distribution over R q , there exists a reduction to the semantic security of the Encryption Scheme 1 from the decisional R - LWE problem with distribution χ.
Note that the reduction is to the semantic security of the scheme and not the CPA security. However, it is well-known that in public key encryption both notions are equivalent (see, for example, Theorem 11.1 in [12]).
Second, we want to be able to ensure that if we know how to solve an instance of the decision R-LWE problem with a truncated discrete Gaussian we can solve an instance of the decision R-LWE problem with the Ψ ¯ n distribution. This is clearly so given an instance of the decision R-LWE problem with the Ψ ¯ n distribution one can see it as an instance with the truncated discrete Gaussian distribution except for a negligible amount of times. Therefore, the advantage of the adversary solving both instances will differ at most a negligible amount, as we needed.
Finally, we need to see that our R-LWE instance is as hard to solve as a lattice problem, in our case as hard to solve as K-DGS, where K is the field such that R is its ring of integers, in other words, R = O K (for more detail in the definition of K-DGS refer to Definition 2.10 and Section 2.3.3 in [17]). This job has already been done in [17], though to do so properly we need to give some clarifications about different ways to define the R-LWE distribution.
Let K be a number field with R its ring of integers. Let R be the fractional co-differential ideal of K ( R = { x K | Tr ( x R ) Z } ), and let T R = K R / R . Let q 2 be an integer modulus. Let us unpack this. First, in our specific case of K being a cyclotomic field with n = 2 k for some k, we have R = Z [ x ] / x n + 1 , so in turn it can be seen that R is isomorphic to R. Second, K R = K Q R which is isomorphic to R n , so looking it component by component T R could be seen as isomorphic to T n with T = R / Z . With this out of the way we can see their definition.
Definition 14
(Definition 2.14, [17]). For s R q and an error distribution ψ over K R , the R-LWE distribution A s , ψ over R q × T R is sampled by independently choosing a $ R q and an error term e ψ , and outputting ( a , b = ( a · s ) / q + e mod R ) .
Now our postulate is that this definition taking as Ψ an n-dimensional spherical continuous Gaussian with parameter ξ (which is a distribution used in [17]) and then raising it to R q again, is a more general definition to our Definition 8 using Ψ ¯ ξ q , in the sense that if we can solve an instance of the R-LWE problem defined with the distribution in Definition 8 we can solve an instance of the R-LWE problem with the distribution in Definition 14. It can be seen as one, as a spherical Gaussian in R n can be seen as the product of n independent Gaussians over R with the same standard deviation. Then, in essence what we are doing in Definition 14 is multiply a times s, then divide the result by q (which we can as we are seeing the elements in K R which is a field) and adding the error distribution. Then, we reduce it modulo R thus landing in T R . Now, if we look it component by component we have in essence computed a · s / q and then added to each component a sample of Ψ ξ q , so when raising it again to R q (by multiplying by q and rounding) we get that q ( a · s / q ) = a · s R q and to every component we have added an independent sample taken from Ψ ¯ ξ q . Therefore, if ρ ξ n is the spherical Gaussian with parameter ξ , given an adversary who solves R - LWE Ψ ¯ ξ q it is easy to give an adversary who solves R - LWE ρ ξ n .
Therefore, we can apply the result from [17], for which we need to give two quick lattice definitions.
Definition 15
([17]). The minimum distance of a lattice L is the length of the shortest non-zero lattice vector
λ 1 ( L ) : = min 0 v L v
The dual lattice of a given lattice L is defined as
L : = { x Z n | L , x Z }
Definition 16
(Definition 3.1, [18]). For a lattice L , and a positive real ϵ > 0 , we define its smoothing parameter η ϵ ( L ) to be the smallest s such that ρ 1 s ( L { 0 } ) ϵ , where ρ r ( L ) : = x L ρ r ( x ) for a lattice L , and ρ r ( x ) : = exp ( π x / r 2 ) for some element x R n .
Finally, we can give the following result.
Lemma 1
(Corollary 7.3, [17]). There is a polynomial-time quantum reduction from K - DGS with function γ to the (average-case, decision) problem of solving R - LWE ρ ξ n using l samples with ξ = α n l log ( n l ) 1 4 , α > 0 and
γ ( I ) = max η ( I ) · 2 α · ω log ( n ) , 2 n λ 1 ( I )
as long as α q ω log ( n ) , where I is an ideal lattice.
In conclusion, we have seen that breaking the security of Encryption Scheme 1 is at least as hard as solving the decision R-LWE problem with a truncated discrete Gaussian, which is at least as hard as solving the decision R-LWE problem with the Ψ ¯ n distribution, which in turn is at least as hard as solving the K-DGS problem.

5.2. Non-Leakage of Information

In this section, we need to see that the adversary does not gain any extra information by interacting with the distributed protocol. We will start first with the Protocol 1, seeing that an adversary A cannot distinguish between interacting with the protocol or with random inputs. Furthermore, we will also give the adversary the ability to choose its shares of the secret key and the PRSS keys, as it makes the game easier and it only serves to see that the protocol’s security is even stronger than what is usually required.
To appropriately do so we will need the following auxiliary lemmas about statistical distance, the proofs of which will be in Appendix B.
Lemma 2.
Let Y be a probability distribution over Z such that | Y | is bounded by κ and X be a discrete uniform distribution in the integer interval [ a , a ] with a κ · 2 λ . Then, Δ ( X , X ˜ ) 2 λ , where X ˜ = X + Y .
Lemma 3.
Let X , Y be two probability distributions over a countable support N such that Δ ( X , Y ) 2 λ , and n Z > 0 with n = 2 β for some β R > 0 . Then Δ ( X n , Y n ) 2 λ + β .
With these auxiliary lemmas we can go ahead and prove the adversary cannot distinguish between interacting with the protocol and random values.
Theorem 3.
Assume that Φ · ( · ) is a secure pseudo-random function modeled as a random oracle, that the keys K H have been securely generated and distributed, that the secret key s has been securely generated and shared and that the parameters follow the conditions of Theorem 1. Then, the Decryption Protocol (Protocol 1) is secure against a passive and static adversary, corrupting up to t = u 1 players.
Proof. 
We want to construct an Attack Game in which the adversary cannot distinguish between the protocol executed correctly or with random values to show that the distribution does not leak anything about the secret key s nor the error e .
Let C denote the set of corrupted players and B the set of honest players. The Attack Game works as follows. Assume that the challenger knows the secret key s and the K H such that C H (the keys that the adversary does not know) which have been securely generated. Assume that the challenger sends to the adversary A the ciphertext ( u , v ) and then A submits ( s C , K H C , d C ) as the challenge, where s C are the shares on the secret key of the corrupted players, K H C are the keys K H such that C H (the keys A knows) chosen by A , and d C are the shares on the decryption of the corrupted players. Then, the challenger generates consistent shares on s for the players not in C.
Once all these preliminaries are done, the challenger chooses b $ { 0 , 1 } and proceeds as following:
  • If b = 0 : The challenger uses the decryption protocol to compute the shares of the decryption d B for the honest players. It computes the decrypted message m and outputs ( d B , m ) .
  • If b = 1 : The challenger computes for every H such that C H some element r H I D n uniformly at random and we denote as y the polynomial in R q with vector of coefficients C H Φ K H ( u + v ) + C H r H . Then the challenger generates d B consistent shares of y + m q 2 (the challenger knows m as it can be computed using the protocol, given that everything needed is known) and outputs ( d B , m ) .
Finally A outputs b ˜ { 0 , 1 } , meaning whether it thinks it has interacted with the protocol or with a simulation, and the Game concludes.
It is clear that m will be correct in both cases given the proof of Theorem 1, and furthermore, y + m q 2 will be an effective “decryption” of m in the sense that every coefficient will be closer to 0 if m i = 0 and closer to q 2 if m i = 1 , because
| y | i u t I D 2 q 4 .
Therefore we only need to see that d B are indistinguishable whether they are computed with b = 0 or with b = 1 . Let us see it. First of all, y and x are computationally indistinguishable to the adversary given the properties of pseudo-randomness of Φ · ( · ) . We now want to see that the way y and y + e · r E + e v s · e u = y + e ^ are distributed are at a negligible statistical distance. It is clear that y is distributed in the interval u t I D n (with u t values distributed uniformly in I D ) and as we have seen in the proof of Theorem 1 e ^ is in the interval [ 2 n u κ 2 + κ , 2 n u κ 2 + κ ] n . Therefore, as the distribution of every coefficient is identical and independent we have that by Lemma 2
Δ ( y i , { y + e ^ } i ) 2 λ β
and by Lemma 3
Δ ( y , y + e ^ ) 2 λ
so the distribution of y and y + e ^ are at a negligible statistical distance. Therefore, we get that y + m q 2 and x + e ^ + m q 2 are computationally indistinguishable.
Finally, adding it all together we get that the output ( d B , m ) is computationally indistinguishable whether it has been computed with b = 0 or with b = 1 , so
Pr b ˜ = b 1 2 = neg ( λ )
as we wanted to see. □
After Theorem 3, we have only seen that Protocol 1 is secure when the keys are securely generated and against a passive adversary corrupting t u 1 players, but it is standard to see that the same protocol is secure against an active adversary corrupting t < u 3 players if instead of the client reconstructs m using the shares of all subsets of t + 1 players, as that will give a majority of correct outputs.
The reason behind this is that we have already seen that no information is leaked, so we only need to see that the adversary cannot abort the protocol or cause an incorrect output. In case of an active adversary (who can cause players to deviate arbitrarily from the protocol), what is needed is that if all combinations of t + 1 players are decrypting the message, there needs to be a majority of combinations of t + 1 players with no corrupt players. This gives us that t < u 3 is enough.
Now, we need to see that Protocol 2 leaks no information against an adversary corrupting up to t = u 1 players. To do so we will once again see that the adversary cannot distinguish between interacting with the protocol or a simulation where the challenger sets before-hand the values of the keys.
Theorem 4.
Assuming that the image interval of the pseudo-random function Φ · K G ( · ) is I K G n where
I K G = κ · 2 λ + β , κ · 2 λ + β ,
that C is a commitment scheme such that it has a trapdoor and the parameters follow the conditions on Theorem of correctness, then the Key Generation Protocol (Protocol 2) is secure against a passive and static adversary, corrupting up to t = u 1 players.
Proof. 
We want to construct an Attack Game in which the adversary cannot distinguish between the protocol executed correctly and a simulation where the challenger sets the values of s , e , a E and K H for all H before-hand.
Let C denote the set of corrupt players and B the set of honest players. The Attack Game works as follows. Assume that whenever a corrupt player needs to sample a uniform distribution it sends a query to the challenger for a random value from a random oracle. Let C C = Commit ( s ˚ C , e ˚ C , K N H C s , K N H C e , K H C , a E C ) the challenge output by A , the first step of the interaction in Protocol 2 as we can see in Table 3. Then, the challenger chooses b $ { 0 , 1 } and proceeds as follows:
  • If b = 0 : The challenger and the adversary follow Protocol 2 to generate a E , b E and the shares s B , e B , K H B , a E B and outputs ( a E , b E , s B , e B , K H B , a E B ) .
  • If b = 1 : The challenger samples s , e u χ , a E $ R q and every K H $ Z q and computes b E = a E · s + e . Then he uses the trapdoor in the commitment scheme to recover ( s ˚ C , e ˚ C , K N H C s , K N H C e , K H C , a E C ) , and proceeds as follows. We will divide the explanation depending on what he is simulating to ease comprehension, but everything will be done simultaneously, following the flow of information seen in Table 3.
    -
    For the “generation” of s , the challenger will use the keys K N H C s (of which he knows all of them given that they were generated through queries to the random oracle through the challenger) to recover s C , the contribution of the corrupt players to s . With this information, the challenger can compute s B the contribution of the honest players to s such that s = s C + s B . With these values computed the challenger follows with the protocol.
    -
    For the “generation” of e the challenger proceeds identically as with generating s .
    -
    For the “generation” of K H , the challenger samples random values in Z q for K H B (the first step) and commits them. It then will receive K H C from the adversary (the shares of K H pertaining to the corrupt players) and will compute consistent Shamir shares K H B so that the players share K H . Then, as in the protocol, the challenger sends the shares K H B to all players not in H.
    -
    For the “generation” of a E , the challenger samples random values in R q for a E B (the first step) and commits them. It then will receive a E C (the shares of a E pertaining to the corrupt players) and will compute consistent Shamir shares a E B so that the players share a E . Then, as in the protocol, the challenger sends the shares a E B to all players.
    -
    For the “generation” of b E the challenger outputs b E at the end of the protocol.
    Then, the challenger outputs ( a E , b E , s B , e B , K H B , a E B ) .
Finally, A outputs b ˜ { 0 , 1 } , meaning whether it thinks it has interacted with the protocol or with the simulation, and the Game concludes.
It is clear that the flow of information is the same in both cases and that the values will be both correct and what the challenger sampled beforehand, so we just need to see that the adversary cannot distinguish between the values received when b = 0 from the ones received when b = 1 . For s (and e ) it is clear that they are indistinguishable, as we used the trapdoor in the commitment scheme to set the values necessary before any messages were sent from the adversary to the challenger. Furthermore, we know that no information was leaked in the NIVSS as because of Lemmas 2 and 3 we know that no information was leaked as in the proof of Theorem 3.
For K H (and in turn a E as they are analogous), we need to see that the adversary cannot distinguish from K H B generated by the protocol or them being random in Z q . To see this we will use the security of Shamir secret sharing, as the adversary can only control up to t players. Therefore, the value shared is completely undetermined by the shares of the corrupt players, so both cases ( b = 0 and b = 1 ) are indistinguishable to the adversary.
Finally, by adding everything up, we get that ( a E , b E , s B , e B , K H B , a E B ) are indistinguishable whether we have b = 0 or b = 1 , so
Pr b ˜ = b 1 2 = neg ( λ )
as we wanted to see. □
As in Section 4, we have also proven the equivalent to this last theorem for an active adversary, however we will not use the result for the implementation, for reasons we will state in Section 6.1. The proof can be found in Appendix A.2.
Having proved the security of each protocol individually, we only need to see that using both protocols together still gives us an encryption scheme which is semantically secure.
Theorem 5.
Assume the conditions in Theorems 1 and 4 are fulfilled. Then, if K-DGS γ is hard, then encryption under keys generated by Protocol 2 and decryption following Protocol 1 is semantically secure against a static and passive adversary corrupting up to t = u 1 players acting through the Key Generation phase and the same adversary being active corrupting up to t < u 3 players in the Decryption phase.
Proof. 
First, using the result in Theorem 4, we can see that the adversary cannot distinguish between executing both protocols, or replacing the key generation with keys generated by the challenger. Then, using Theorem 1, we can see that the adversary cannot distinguish between taking part in the decryption or having the challenger decrypt all by itself. Therefore, we get that the adversary cannot distinguish between the semantic security game when both distributed protocols are used from the basic semantic security game of Encryption Scheme 1. This means, using what we have seen in Section 5.1 that breaking semantic security when both protocols are being used is as hard as breaking semantic security of the encryption scheme, so using the reduction to K-DGS γ and that we assume this problem to be hard, we have that our protocols are semantically secure, as we wanted to see. □

6. Implementation

The first step for the implementation is finding good parameters that guarantee the security of the particular instance of the R-LWE problem. To verify it we will use the bounds on ξ in Lemma 1 and the LWE hardness estimator given by Albrecht et al. in [19]. We use the LWE estimator because, as far as we know, no major attacks are known to exploit the particular properties of R-LWE, so the estimated hardness for LWE translates as estimated hardness for R-LWE.

6.1. Choosing Parameters

We set the security parameter λ = 100 . We need to find the following parameters: n , q , κ and ξ which will then allow us to compute I D and I K G . We will first leave everything in function of n and q, and we will then use the concrete hardness of an instance of the R-LWE problem to fix n and q.
Let n = 2 β and q Z > 0 . Using the conditions on I D on Theorem 1 we get that
κ = 1 + 1 + 2 n u q u t 2 λ + β + 1 4 n u
To find ξ , we will use the following lemma, the proof of which is in Appendix B.
Lemma 4.
Let Ψ ¯ σ q be a discrete Gaussian. Then, c > 0 :
Pr Ψ ¯ σ q > c 2 π e c 1 2 2 σ 2 c 1 2 .
Using the bound on Definition 13 and Lemma 4 we can get the following bound:
Pr Ψ ¯ ξ q > κ = Pr Ψ ¯ ξ q > κ + 1 2 2 π e κ + 1 2 2 ξ 2 κ + 1 2 2 λ
which when isolating the ξ gives us the following bound:
ξ κ + 1 2 2 2 log π 2 2 λ κ + 1 2 .
From here we will take the equality, as with a fixed q the larger the standard deviation the greater the hardness of that specific instance of the decision R-LWE problem.
Now, we can find n and q using the LWE hardness estimator, which given n , q , α outputs the concrete hardness of that specific instance. We will set n as a power of 2, as it allows us to use more efficient multiplication algorithms and q as a prime near a power of 2. Using this, we implemented a Python algorithm to find these parameters. The code can be found in the repository in Appendix C. This has yielded the following results as parameters for u = 7 and t = 2 and more than 100 bits of security, as can be seen in Table 4.
In this code, there is also the computing of parameters for the case of an active adversary in Key Generation phase using the conditions on Theorem A1, meaning that to have 100 bits of security against this type of adversary we need to bump up to n = 8192 . This, as we will see with the results in Section 6.3, hurts the viability of the protocols, that is why we take our main proposal as secure against an adversary who acts passively in the Key Generation phase and actively in the Decryption phase.

6.2. Implementation Particulars

There are several implementation decisions we have taken and need to be discussed. First, we have not coded a truly interactive protocol between u different players, but rather a simulation where one processor computes all the steps simulating the interaction, in the sense that the protocols are divided by steps between communication phases where all computing can be done without the need to interact with other entities. Then, the program computes how much time every step costs for every player and picks the maximum as the “official” time for that step. As we only want to analyze roughly how viable our protocols are, this approximate works for us. This approximation also means that the execution of the simulation lasts considerably longer than the “real time” for the execution, thus limiting us with the amount of players we can reasonably use.
Second, to have the most compact possible form of Shamir Secret Sharing we have used Shamir over the field of Z q instead of embed it in Q . This is the main reason why we have taken q prime, as none of the reductions require it.
Third, regarding the implementation of the PRF, we have used the main result in [20], which says that Hash-based Message Authentication Code (HMAC) is a PRF under the condition that the underlying compression function is a PRF. To ensure this condition is satisfied we have used the HMAC based around SHA-3.
Finally, regarding the Commitment Scheme we have used for the Key Generation protocol, we have used the hash of the message we want to send concatenated with a random string. We have used SHA-2 because, as far as we know, it is secure enough. However, should the need arise, it could be swapped for a more secure alternative. Furthermore, we only needed to use a commitment scheme after the first round where every player sets their values. This is so because once all the values have been set and all the shares sent, the contributions of the adversary are no longer needed, as the honest players can already generate a majority of correct values. And given that no other value needs to be set in a way the adversary cannot exploit (as the adversary becomes irrelevant), a commitment scheme in any further communication step seems unnecessary. However, this commitment phases could be added with no major change to the protocol nor the proof of security or correctness, only a slightly slower execution.

6.3. Results of the Simulation

In this final section, we will discuss the results we have obtained from the execution of the code for the simulation of both protocols. You can find the code in the repository linked in Appendix C. The specifications of the system where we have executed the programs are found in Table 5. Furthermore, we have used the following C libraries: FLINT (Fast Library for Number Theory) to ease computations in R q , which in turn uses the GMP and MPFR libraries to deal with multiple precision numbers, and OpenSSL library for cryptography-related functions like Hashes or HMACs. It is also worth mentioning that any result we obtain from the execution of the simulation has been found by averaging the times of 10,000 executions of the code, so as to better portray the results, getting rid of outliers.
From what we have seen to this point there are two main dependencies: growth of time in respect to the threshold t and growth of time in respect to the dimension of the lattice. This is so because the threshold defines the minimum number of players needed (and vice versa, given a number of players we can get the maximum threshold it allows) depending if we are protecting ourselves against an active or a passive adversary. As we have seen in Section 6.1 given the adversary model, given an n we can find the rest of parameters that make the protocol secure (taking into account that there is a minimum n for which this analysis works).
In regards to the dependency on t, analyzing the protocols theoretically lets us see that when performing either the PRSS or the NIVSS there are u t different keys K H , meaning that the number of additions grows asymptotically with the value u t . This means that the dependency should be approximately exponential in the active case where u = 3 t + 1 and approximately linear in the passive case where u = t + 1 . When obtaining results from the simulation, we have gathered results for the values of t most frequently used in real-life applications like electronic voting, which means t < 3 against active adversaries and t < 7 for passive adversaries. This decision is mainly due to how we have implemented the simulation, as instead of having the several players’ protocols being executed at the same time, we have them executed consecutively and then take the maximum time spent as the overall time. In the case of the Key Generation, as there are various steps of interaction, this process is applied to every one of the steps. Therefore, due to time constraints, we were limited in how many players we could simulate in the protocols while running 10,000 executions of the codes. Having said all that, the results we obtained for the dependency on t followed our predictions. In the active case they behaved greater than linearly in the three points we had, and in the passive case it behaved approximately linearly. A more in-depth analysis cannot be made unless more extensive data is gathered.
In regards to the dependency on n, given that there is multiplication of polynomials in both protocols, which is implemented using the Karatsuba algorithm that scales by the order of n log 2 ( 3 ) > n 1.5 , the time grows asymptotically with this value. The results obtained for the dependency on n, which can be seen in Figure 1, show the expected results only in the decryption phase against a passive adversary. For the other cases, we see linear, or practically linear, behavior for the range of values of n we are interested in for real life applications. This is due to the fact that the protocols need to perform a much higher number of additions than products, and this difference ends up being high enough for the linear growth of the addition to offset the growth of the product at these values of n.
Finally, we want to discuss the viability of the protocols. As we can see in Table 6, the Key Generation times are significantly slower than the Decryption time, between 4 and 7 times slower. This, however, does not pose a big problem, as by design in most implementations one round of Key Generation will be used to decrypt many messages; therefore, we can focus our main analysis in the decryption times. In that front, the 530.36 ms per decryption in the active case translates to approximately 7000 messages per hour, while the 131.73 ms per message in the passive case translates to approximately 27,000 messages per hour. As we can see it will be half these votes per hour with n = 8192 , which will be needed against an active adversary as we have said in Section 6.1.

7. Conclusions and Future Work

For our concluding considerations, we would like to summarize the limitations that this work has and how it could be improved in future works, as well as to give some insight to some possible other uses outside the ones outlined above.
Construction-wise, our proposal has two main limiting factors: First, the fact that we compute the drowning noises through both the PRSS technique and NIVSS technique means that computation time will increase asymptotically exponentially with the number of players in an active adversary setting, which is not desirable. Should other techniques be used for non-interactively sharing the noise value, this could be avoided. Second, and more inherent to the structure of our protocols, is the fact that using noise drowning by itself causes our implementation to use very high dimensions for the lattices. This is due to the fact that to guarantee statistical indistinguishability we need the noise to be exponentially bigger than the secret while the LPR encryption scheme requires the noise to be smaller than q 4 , meaning that the parameter ξ is proportionately very small compared to the modulus q. This then has an influence in the dimension of the lattice needed to ensure that the concrete instance of the R-LWE problem has the desired amount of bits of security. This limitation could only be avoided by using a different way to ensure security than noise drowning, which is a pivotal element in our proposal.
Implementation-wise, we would like to reiterate that our proposed codes are a proof of concept of approximate viability, and in no case an attempt to give a computationally secure and efficient program. As so, the codes should be carefully analyzed to ensure computational security (for example, some of the random samplings are not truly indistinguishable from uniformly at random) and that no other implementation based attacks (like side-channel attacks) can be performed. Furthermore, for any type of important practical application, the codes should be optimized in efficiency.
Finally, we would also want to state the fact that even if the protocols presented were thought of with the idea of using them together, their security proofs are independent, and therefore they can be used separately. This means that in a case where a TTP can be trusted with the key generation, only the decryption protocol may be used, and then make the process completely interactiveless. Additionally, while the key generation protocol is more particularly tailored to the needs of the encryption scheme, it would not be too hard to extract the main principles for generating the different types of elements, therefore being easily generalizable with a similar security proof. This opens the gateway to a whole new set of possibilities for applications.

Author Contributions

Conceptualization, R.M. and P.M.; methodology, R.M. and P.M.; software, F.A. and R.M.; validation, F.A.; formal analysis, F.A., R.M. and P.M.; investigation, F.A., R.M. and P.M.; resources, F.A., R.M. and P.M.; writing—original draft preparation, F.A.; writing—review and editing, F.A., R.M. and P.M.; supervision, P.M.; project administration, F.A., R.M. and P.M.; funding acquisition, P.M. All authors have read and agreed to the published version of the manuscript.

Funding

This research has been partially funded by the European Union PROMETHEUS project (Horizon 2020 Research and Innovation Program, grant 780701) and the Spanish Ministry of Economy and Competitiveness, through Project MTM2016-77213-R.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
CPAChosen Plaintext Attack
GAPSVPGAP Shortest Vector Problem
HMACHash-based Message Authentication Code
K-DGSDiscrete Gaussian Sampling over K
LWELearning with Errors
NISTNational Institute of Standards and Technology
NIVSSNon-Interactive Verifiable Secret Sharing
R-LWERing Learning with Errors
PRFPseudo-Random Function
PRSSPseudo-Random Secret Sharing
TTPTrusted Third-Party

Appendix A. Correctness and Security against Active Adversaries

Appendix A.1. Correctness

We will prove correctness of the Decryption protocol against an active (or passive) adversary when the keys are generated by the Key Generation protocol against an active adversary.
Theorem A1.
Let n Z > 0 be the number of coefficients in R q , u Z > 0 be the number of players, Φ · D ( · ) be a pseudo-random function with image interval I D n , χ be a distribution in R q where every coefficient is a truncated Discrete Gaussian with parameters σ and κ,
I D = [ 4 n u 3 κ 2 2 λ + β + 1 + κ · 2 λ + β , 4 n u 3 κ 2 2 λ + β + 1 + κ · 2 λ + β ] ,
I K G = κ · 2 λ + β , κ · 2 λ + β .
and
q 4 4 n u 3 κ 2 2 λ + β + 1 + κ u t 2 λ + β + 1
Then, Protocol 1 will have correct output except with probability 2 λ β against an active adversary corrupting up to t < u 3 players.
Proof. 
What we want to see first, as before, is that | x + e ^ | i q 4 i , where · i notes the coefficient i on the polynomial, given the way the decryption works in Encryption Scheme 1.
Let e ^ = e · r E + e v s · e u . As the product in R q is done through the anticyclic matrix, we know that
| e ^ | i | e i · r E 1 | + | e i 1 · r E 2 | + + | e i + 2 · r E n 1 | + | e i + 1 · r E n | + | e v i | + | s i · e u 1 | + + | s i + 1 · e u n | .
Now, we still have r E , e v , e u χ but for t of the contributions we can only assure that they are in 2 · I K G , so we get that
| e ^ | i 2 n u 3 2 κ · 2 λ + β + 2 u 3 κ κ + κ = 4 n u 3 κ 2 ( 2 λ + β + 1 ) + κ
Furthermore, given that there are u t keys K H , we know that
x i u t I D .
Adding both results we then get that
| x + e ^ | i u t 4 n u 3 κ 2 2 λ + β + 1 + κ · 2 λ + β + 4 n u 3 κ 2 2 λ + β + 1 + κ = 4 n u 3 κ 2 2 λ + β + 1 + κ u t 2 λ + β + 1 q 4
as we wanted to see.
Finally, we just need to see that when the client reconstructs, there is indeed a majority of correct results, and this derives directly from having at most t corrupt players; therefore, there will be a majority of subsets of t + 1 players where they are all honest, and thus output the correct decryption. □
As in Section 4, the same proof works against a passive adversary corrupting up to t = u 1 players.
However, in the case of dealing with an active adversary in the key generation phase, to have a truly correct scheme we need to see that the protocol cannot be halted by any actions performed by a malicious adversary. However, in the protocol, whenever a verification fails the protocol halts. To deal with these we implement the following dispute resolution policy, where a dispute is raised whenever a player receives a value that fails verification stating there which other player sent the values.
The policy works as follows, once the protocol is halted the players look at the disputes that have risen, and then “eliminate” all players involved in them, in the sense that a new execution of the key generation protocol will start without both players involved in every dispute, and in case a player is involved in more than one dispute only the first one will be analyzed. This policy ensures that the protocol will produce a correct output with at most t halts since no dispute can be risen between honest players, and given that the security of the scheme is based only on assuming that there is at least one contribution on s and e following the distribution, the output generates no problems. Finally, note that since in every dispute there is at most one honest player, the ratio of corrupt players will never go above u 3 .

Appendix A.2. Security

To be able to prove security when the Key Generation is against an active adversary, we will only need to reword the Theorem as follows.
Theorem A2.
Assuming that Φ · ( · ) is a secure pseudo-random function modeled as a random oracle, that the keys K H have been securely generated and distributed, that the secret key s has been securely generated and shared, and that the parameters follow the conditions of Theorem A1, the Decryption Protocol (Protocol 1) is secure against an active and static adversary, corrupting up to t < u 3 players.
The proof is analogous to the proof of Theorem 1.
We will now prove that the Key Generation leaks no information when acting against an active adversary corrupting up to t < u 3 players. As before, we will prove that the adversary cannot distinguish between interacting with the protocol or a simulation where the challenger sets before-hand the values of the keys.
Theorem A3.
Assuming that the image interval of the pseudo-random function Φ · K G ( · ) is I K G n where
I K G = κ · 2 λ + β , κ · 2 λ + β ,
that C is a commitment scheme such that it has a trapdoor and the parameters follow the conditions on Theorem of correctness, then the Key Generation Protocol (Protocol 2) is secure against an active and static adversary, corrupting up to t < u 3 players.
Proof. 
We want to construct an Attack Game in which the adversary cannot distinguish between the protocol executed correctly and a simulation where the challenger sets the values of s , e , a E and K H for all H beforehand.
Let C denote the set of corrupt players and B the set of honest players. The Attack Game works as follows. Assume that whenever a corrupt player needs to sample a uniform distribution it sends a query to the challenger for a random value from a random oracle. Let C C = Commit ( s ˚ C , e ˚ C , K N H C s , K N H C e , K H C , a E C ) the challenge output by A , the first step of the interaction in Protocol 2 as we can see in Table 3. Then, the challenger chooses b $ { 0 , 1 } and proceeds as follows:
  • If b = 0 : The challenger and the adversary follow Protocol 2 to generate a E , b E and the shares s B , e B , K H B , a E B and outputs ( a E , b E , s B , e B , K H B , a E B ) .
  • If b = 1 : The challenger samples s , e u χ , a E $ R q and every K H $ Z q and computes b E = a E · s + e . Then he uses the trapdoor in the commitment scheme to recover ( s ˚ C , e ˚ C , K N H C s , K N H C e , K H C , a E C ) , and proceeds as follows. We will divide the explanation depending on what he is simulating to ease comprehension, but everything will be done simultaneously, following the flow of information seen in Table 3.
    • For the “generation” of s , the challenger will use the keys K N H C s (of which he knows all of them as he/she controls more than t players), to recover s C , the contribution of the corrupt players to s . With this information, the challenger can compute s B the contribution of the honest players to s such that s = s C + s B . With these values computed, the challenger proceeds with the protocol.
    • For the “generation” of e the challenger proceeds identically as with generating s .
    • For the “generation” of K H , the challenger recovers K H C (as it controls more than t players) the contribution of the corrupt players to K H . With this information, the challenger can compute K H B the contribution of the honest players such that K H = K H C + K H B for all H. With these values computed, the challenger proceeds with the protocol.
    • For the “generation” of a E , the challenger recovers a E C (as it controls more than t players) the contribution of the corrupt players to a E . With this information, the challenger can compute a E B the contribution of the honest players such that a E = a E C + a E B . With these values computed, the challenger proceeds with the protocol.
    • For the “generation” of b E the challenger outputs b E at the end of the protocol.
    Then, the challenger outputs ( a E , b E , s B , e B , K H B , a E B ) .
Finally, A outputs b ˜ { 0 , 1 } , meaning whether it thinks it has interacted with the protocol or with a simulation, and the Game concludes.
It is clear that the flow of information is the same in both cases and that the values will be correct and what the challenger has sampled beforehand, so we just need to see that the adversary cannot distinguish between the values received when b = 0 from the ones received when b = 1 . We can see they are indistinguishable as the challenger uses the trapdoor in the commitment scheme to get the values necessary before any message were sent from the challenger to the adversary. Moreover, once again, we know that no information was leaked in the NIVSS by the same reasoning from the proof of Theorem 4.
Therefore, ( a E , b E , s B , e B , K H B , a E B ) are indistinguishable to the adversary whether they have been computed with b = 0 or b = 1 , so
Pr b ˜ = b 1 2 = neg ( λ )
as we wanted to see. □
Having proved the security of each protocol individually, we only need to see that using both protocols together still gives us an encryption scheme which is semantically secure.
Theorem A4.
Assume the conditions in Theorems A1 and A3 are fulfilled. Then, if K-DGS γ is hard, then encryption under keys generated by Protocol 2 and decryption following Protocol 1 is semantically secure against a static and passive adversary corrupting up to t = u 1 players acting through the Key Generation phase and the same adversary being active corrupting up to t < u 3 players in the Decryption phase.
Proof. 
The proof is analogous to the proof of the Main Theorem but changing Theorems 1 and 4 for Theorems A1 and A3, respectively. □

Appendix B. Proofs of Auxiliary Theorems and Lemmas

Appendix B.1. Proof of Theorem 2

Theorem A5.
Given χ a distribution over R q , there exists a reduction to the semantic security of the Encryption Scheme 1 from the decisional R - LWE χ problem.
Proof. 
What we want to see is that given an efficient adversary A who has non-negligible semantic security advantage, we can construct an efficient adversary B with access to A who given an instance of the decisional R-LWE problem, it can solve it with probability non-negligibly bigger than 1 2 .
Let ( a ¯ i , b ¯ i ) R q × R q be an instance of the decisional R-LWE problem. What we need B to do is to output whether a polynomial amount of instances are samples of the distribution A s , χ or of the uniform distribution over R q × R q , in other words, we want to know whether b ¯ i = a ¯ i · s ¯ + e ¯ for some s ¯ R q and e ¯ χ .
Note that any adversary A who breaks semantic security may be of one of two types. Either A has non-negligible semantic security advantage against the encryption scheme when ( a E , b E ) are generated independently uniformly at random (instead of having b E = a E · s + e ) or it does not. We will construct two different adversaries for these cases.
Assume first that A has a negligible semantic security advantage against the encryption scheme when ( a E , b E ) are generated independently uniformly at random. Let ( a 1 , b 1 ) be an instance of the R - LWE χ problem, then we define the following attack game.
Attack Game A1.The attack game goes as follows:
  • Set the public key to ( a ¯ 1 , b ¯ 1 ) and send it to A .
  • Receive m 01 , m 11 from the adversary, and choose b 1 $ { 0 , 1 } .
  • Compute u 1 = a ¯ 1 · r E + e u and v 1 = b ¯ 1 · r E + e v + m b 1 1 q 2 with r E , e u , e v χ , and send ( u 1 , v 1 ) to A .
  • Receive b ^ 1 from the adversary.
Then, B will work as follows. When given the instances, it picks ( a ¯ 1 , b ¯ 1 ) and performs the Attack Game 1 with A a polynomial amount of times. Then, it computes the advantage
SSAdv 1 [ A , S ] = Number of queries where b ^ 1 = b 1 Total number of queries 1 2 .
We know from how we have defined the adversary A , as SSAdv [ A , S ] is non-negligible, if the instances follow the distribution A s , χ then SSAdv 1 [ A , S ] will be non-negligible and if the instances are uniform over R q × R q then SSAdv 1 [ A , S ] will be negligible. This means that with non-negligible probability B can solve the decisional R - LWE χ problem as we wanted.
Assume now that A has a non-negligible semantic security advantage against the encryption scheme when ( a E , b E ) are generated independently uniformly at random. Let, once again, ( a 1 , b 1 ) and ( a 2 , b 2 ) be two instances of the R - LWE χ problem, then we define the following attack game.
Attack Game A2.The attack game goes as follows:
  • Set the public key to ( a ¯ 1 , a ¯ 2 ) and send it to the adversary.
  • Receive m 02 , m 12 from the adversary, and choose b 2 $ { 0 , 1 } .
  • u 2 = b ¯ 1 and v 2 = b ¯ 2 + m b 2 2 q 2 and send ( u 1 , v 1 ) to A .
  • Receive b ^ 2 from the adversary.
Then, B will work as follows. When given the instances, it picks two of them ( a ¯ 1 , b ¯ 1 ) and ( a ¯ 2 , b ¯ 2 ) , and performs the Attack Game 2 with A a polynomial amount of times. Then, it computes the advantage
SSAdv 2 [ A , S ] = Number of queries where b ^ 2 = b 2 Total number of queries 1 2 .
We know from how we have defined the adversary A , since SSAdv [ A , S ] is non-negligible, if the instances follow the distribution A s , χ then SSAdv 2 [ A , S ] will be non-negligible and if the instances are uniform over R q × R q then SSAdv 2 [ A , S ] will be negligible, since if b ¯ i are uniformly at random then v 2 is independent from the public key and m b 2 2 . This means that with non-negligible probability B can solve the decisional R - LWE χ problem as we wanted, since it is possible to distinguish, with non-negligible probability, a negligible event from a non-negligible event. □

Appendix B.2. Proofs of Lemmas 2 and 3

Lemma A1.
Let Y be a probability distribution over Z such that | Y | is bounded by κ and X be a discrete uniform distribution in the integer interval [ a , a ] with a κ · 2 λ . Then, Δ ( X , X ˜ ) 2 λ , where X ˜ = X + Y .
Proof. 
The first thing to notice is that for any z Z such that | z | > κ + a , we will clearly have X ˜ ( z ) = X ( z ) = 0 , as the support of X ˜ will only go from κ a to κ + a . Furthermore, for n [ a + κ , a κ ] , we can do the following analysis:
X ˜ ( n ) = m = κ κ Y ( m ) X ( n m ) = X ( n ) m = κ κ Y ( m ) = X ( n ) = 1 2 a + 1
using that n m will always fall in the support of X (thus X ( n m ) is never zero), that X is uniform and that Y only takes values in [ κ , κ ] .
Now taking everything together we get from the definition of statistical distance:
Δ ( X ˜ , X ) = 1 2 n Z X ˜ ( n ) X ( n ) = 1 2 n [ a κ , a + κ 1 ] [ a κ + 1 , a + κ ] X ˜ ( n ) X ( n ) 1 2 n [ a κ , a + κ 1 ] [ a κ + 1 , a + κ ] max m { X ( m ) } = 1 2 n [ a κ , a + κ 1 ] [ a κ + 1 , a + κ ] 1 2 a + 1 = 2 · 2 κ 2 · ( 2 a + 1 ) κ κ · 2 λ = 2 λ .
Lemma A2.
Let X , Y be two probability distributions over a countable support N such that Δ ( X , Y ) 2 λ , and n Z > 0 with n = 2 β for some β R > 0 . Then Δ ( X n , Y n ) 2 λ + β .
Proof. 
We define the n-dimensional distributions
X ^ i = ( Y , , Y i , X , , X )
where we have X n = X ^ 0 and Y n = X ^ n . It is also clear that
Δ ( X ^ i , X ^ i + 1 ) = Δ ( X , Y ) .
Finally, because of the triangle inequality for distances
Δ ( X n , Y n ) = Δ ( X ^ 0 , X ^ n ) i = 0 n 1 Δ ( X ^ i , X ^ i + 1 ) = n Δ ( X , Y ) 2 λ + β

Appendix B.3. Proof of Lemma 4

To prove the lemma we will use another distribution called rounded discrete Gaussian.
Definition A1.
The rounded Gaussian distribution over Z with parameter σ > 0 is defined by the probability function
Ω σ ( z ) = z 1 2 z + 1 2 ρ σ ( x ) d x
for z Z with
ρ σ ( x ) = 1 2 π σ 2 e x 2 2 σ 2 .
The distribution we are interested in is Ω ^ σ , its standard reduction modulo q as it is defined as
Ω ^ σ ( i ) = k Z Ω ( i + k q ) .
It is clear once again from the definition that if Y Ω σ , then Y = X with X = N ( 0 , σ ) , hence the name rounded Gaussian.
Now, we can see the relation between Ω ^ and Ψ ¯ .
Lemma A3.
For any σ R , we have that Ω ^ σ is indeed a random variable and in fact we have that Ω ^ σ = Ψ ¯ σ q .
Proof. 
First, we need to see that Ω ^ σ is a random variable. Indeed,
i = 0 q 1 Ω ^ σ ( i ) = i = 0 q 1 k Z Ω σ ( i + k q ) = k Z i = 0 q 1 Ω σ ( i + k q ) = k ¯ Z Ω σ ( k ¯ ) = k ¯ Z k ¯ 1 2 k ¯ 1 2 ρ σ ( x ) d x = + ρ σ ( x ) d x = 1 .
Now, we can see that Ω ^ σ ( i ) = Ψ ¯ σ q ( i ) for all i Z q , and therefore Ω ^ σ = Ψ ¯ σ q as random variables.
Ω ^ σ ( i ) = k Z Ω σ ( i + k q ) = k Z i + k q 1 2 i + k q + 1 2 1 2 π σ e x 2 σ 2 d x = k Z i 1 2 q i + 1 2 q 1 2 π σ e q ( y + k ) 2 σ 2 q · d y = i 1 2 q i + 1 2 q k Z 1 2 π σ q e y + k 2 σ q 2 d y = Ψ ¯ σ q ( i )
where we have used the change of variables y = x k q q and the dominated convergence theorem. □
Therefore, if we know a bound for Ω ^ , we know a bound for Ψ ¯ . Given this result, we can now bound the distributions using the fact that Ω is a rounded Gaussian and Mill’s inequality:
Pr N ( 0 , σ ) > t = 2 t + ρ σ ( x ) d x 2 π e t 2 σ 2 t .
Lemma A4.
For all c , σ > 0 , then
Pr Ψ ¯ σ q > c 2 π e c 1 2 2 σ 2 c 1 2 .
Proof. 
Let c , σ > 0 , then
Pr Ψ ¯ σ q > c = Pr Ω ^ σ > c Pr Ω σ > c = 2 j = c + j 1 2 j + 1 2 ρ σ ( x ) d x = 2 c 1 2 + ρ σ ( x ) d x 2 π e c 1 2 2 σ 2 c 1 2
where we have used Lemma A3, thus seeing what we wanted. □

Appendix C. Link to Repository

All relevant codes for the implementation can be found in the following GitHub repository, last update made on 20 December 2021: https://github.com/FerranAlborch/Implementation-RLWE-based-distributed-key-generation-and-threshold-decryption.

References

  1. Saračević, M.; Adamović, S.; Maček, N.; Elhoseny, M.; Sarhan, S. Cryptographic keys exchange model for smart city applications. IET Intell. Transp. Syst. 2020, 14, 1456–1464. [Google Scholar] [CrossRef]
  2. Shor, P.W. Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM Rev. 1999, 41, 303–332. [Google Scholar] [CrossRef]
  3. Alagic, G.; Alperin-Sheriff, J.; Apon, D.; Cooper, D.; Dang, Q.; Kelsey, J.; Liu, Y.K.; Miller, C.; Moody, D.; Peralta, R.; et al. Status Report on the Second Round of the NIST Post-Quantum Cryptography Standardization Process; US Department of Commerce, NIST: Washington, DC, USA, 2020.
  4. De Feo, L.; Meyer, M. Threshold schemes from isogeny assumptions. In Proceedings of the IACR International Conference on Public-Key Cryptography, Edinburgh, UK, 4–7 May 2020; pp. 187–212. [Google Scholar]
  5. Devevey, J.; Libert, B.; Nguyen, K.; Peters, T.; Yung, M. Non-interactive CCA2-secure threshold cryptosystems: Achieving adaptive security in the standard model without pairings. In Proceedings of the IACR International Conference on Public-Key Cryptography, Virtual Event, 10–13 May 2021; pp. 659–690. [Google Scholar]
  6. Bendlin, R.; Damgård, I. Threshold decryption and zero-knowledge proofs for lattice-based cryptosystems. In Proceedings of the Theory of Cryptography Conference, Zurich, Switzerland, 9–11 February 2010; pp. 201–218. [Google Scholar]
  7. Singh, K.; Rangan, C.P.; Banerjee, A. Lattice-based identity-based resplittable threshold public key encryption scheme. Int. J. Comput. Math. 2016, 93, 289–307. [Google Scholar] [CrossRef]
  8. Boneh, D.; Gennaro, R.; Goldfeder, S.; Jain, A.; Kim, S.; Rasmussen, P.M.; Sahai, A. Threshold cryptosystems from threshold fully homomorphic encryption. In Proceedings of the Annual International Cryptology Conference, Santa Barbara, CA, USA, 19–23 August 2018; pp. 565–596. [Google Scholar]
  9. Zhang, X.; Xu, C.; Jin, C.; Xie, R.; Zhao, J. Efficient fully homomorphic encryption from RLWE Ext. A Threshold Encryption Scheme. Future Gener. Comput. Syst. 2014, 36, 180–186. [Google Scholar] [CrossRef]
  10. OQS Development Team. Open Quantum Safe (OQS). Available online: https://openquantumsafe.org/ (accessed on 20 January 2022).
  11. Alborch Escobar, F. RLWE-Based Distributed Key Generation and Threshold Decryption. Master’s Thesis, Universitat Politècnica de Catalunya, Barcelona, Spain, 2021. [Google Scholar]
  12. Boneh, D.; Shoup, V. A Graduate Course in Applied Cryptography (2020). Draft Version 0.5 2020. Available online: https://toc.cryptobook.us/book.pdf (accessed on 10 December 2021).
  13. Shamir, A. How to share a secret. Commun. ACM 1979, 22, 612–613. [Google Scholar] [CrossRef]
  14. Cramer, R.; Damgård, I.; Ishai, Y. Share conversion, pseudorandom secret-sharing and applications to secure computation. In Proceedings of the Theory of Cryptography Conference, Cambridge, MA, USA, 10–12 February 2005; pp. 342–362. [Google Scholar]
  15. Regev, O. On lattices, learning with errors, random linear codes, and cryptography. J. ACM (JACM) 2009, 56, 1–40. [Google Scholar] [CrossRef]
  16. Lyubashevsky, V.; Peikert, C.; Regev, O. On ideal lattices and learning with errors over rings. J. ACM (JACM) 2013, 60, 1–35. [Google Scholar] [CrossRef]
  17. Peikert, C.; Regev, O.; Stephens-Davidowitz, N. Pseudorandomness of Ring-LWE for any ring and modulus. In Proceedings of the 49th Annual ACM SIGACT Symposium on Theory of Computing, Montreal, ON, Canada, 19–23 June 2017; pp. 461–473. [Google Scholar]
  18. Micciancio, D.; Regev, O. Worst-case to average-case reductions based on Gaussian measures. SIAM J. Comput. 2007, 37, 267–302. [Google Scholar] [CrossRef] [Green Version]
  19. Albrecht, M.R.; Player, R.; Scott, S. On the concrete hardness of learning with errors. J. Math. Cryptol. 2015, 9, 169–203. [Google Scholar] [CrossRef] [Green Version]
  20. Bellare, M. New proofs for NMAC and HMAC: Security without collision-resistance. In Proceedings of the Annual International Cryptology Conference, Santa Barbara, CA, USA, 17–21 August 2006; pp. 602–619. [Google Scholar]
Figure 1. Times of the simulation for n = 256 , 512 , 1024 , 2048 , 4096 , 8192 .
Figure 1. Times of the simulation for n = 256 , 512 , 1024 , 2048 , 4096 , 8192 .
Mathematics 10 00728 g001aMathematics 10 00728 g001b
Table 1. State-of-the-art.
Table 1. State-of-the-art.
ProposalLattice ProblemKey GenerationImplementation
 [6]LWE
[7]LWE
[8]LWE
[5]LWE
[9]R-LWE
Our proposalR-LWE
Table 2. Decryption protocol.
Table 2. Decryption protocol.
Decryption Protocol
      Inputs: s j , K H s.t. j H , Φ · ( · ) , f H
Player P j
( u , v )
x j = H j Φ K H ( u + v ) · f H ( j )
e ˜ j = v s j · u
x j + e ˜ j
Table 3. Key Generation protocol.
Table 3. Key Generation protocol.
Key Generation Protocol
  Inputs: χ , Φ · K G ( · ) , μ
Player P j
s j , e j χ K H j , K N H j s , K N H j e $ Z q | H | = n t s ˚ j = s j H Φ K N H j s K G ( μ ) e ˚ j = e j H Φ K N H j e K G ( μ ) a E j $ R q K H j , a E j = Shamir . Shares ( K H j , a E j ) C j = Commit ( s ˚ j , e ˚ j , K N H j s , K N H j e , K H j , a E j )
C j
C k k = 1 u
s ˚ j , e ˚ j , K N H j s , K N H j e , K H j , a E j
s ˚ k , e ˚ k , K N H k s , K N H k e , K H k , a E k k = 1 u
Verify ( C k ) j = { accept or reject } k = 1 u
Verify ( C k ) j k = 1 u
Verify ( C i ) k i , k = 1 u
if Verify ( C i ) k = ’reject’ for some i , k abort
Verify . interval ( s ˚ k ) j = { accept or reject } k = 1 u Verify . interval ( e ˚ k ) j = { accept or reject } k = 1 u s j = k = 1 u s ˚ k + H P j Φ K N H j s K G ( μ ) · f H ( j ) e j = k = 1 u e ˚ k + H P j Φ K N H j e K G ( μ ) · f H ( j ) K H j = k = 1 u K H k a E j = k = 1 u a E k
Verify . interval ( s ˚ k ) j , Verify . interval ( e ˚ k ) j k = 1 u
Verify . interval ( s ˚ i ) k , Verify . interval ( e ˚ i ) k i , k = 1 u
if Verify . interval ( s ˚ i ) k = ’reject’ for some i , k abort
if Verify . interval ( e ˚ i ) k = ’reject’ for some i , k abort
a E j , K H j to k s . t . H P k
a E k , K H k s . t . H P j k = 1 u
K H = Reconstruct . Shamir ( K H k ) s . t . H P j a E = Reconstruct . Shamir ( a E k ) b E j = a E · s j + e j
a E , b E j
b E k k = 1 u
b E = Reconstruct . Shamir ( b E k )
b E
Table 4. Parameters for secure implementation.
Table 4. Parameters for secure implementation.
n=4096
q=713,623,846,352,979,940,529,142,984,724,747,568,191,373,381
κ =168
ξ =14.897861091181875
I D =8,403,614,205,785,368,527,542,540,898,258,331,059,093,504
I K G =872,305,872,233,851,041,593,123,383,308,976,128
Bits of Security=121
Table 5. Specifications of the system.
Table 5. Specifications of the system.
Operating SystemUbuntu 18.04.5 LTS
CPU Intel ® Core™ i5-8500
Memory15.4 GiB
Word Size64 bits
CPU Clock Speed3.00 GHz
Table 6. Time comparison between active and passive adversary.
Table 6. Time comparison between active and passive adversary.
nKey GenerationDecryptionEncryption
ActivePassiveActivePassive
40967031.34 ms1005.63 ms530.36 ms131.73 ms191.79 ms
819214320.01 ms2160.05 ms1167.24 ms372.75 ms539.71 ms
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Alborch, F.; Martínez, R.; Morillo, P. R-LWE-Based Distributed Key Generation and Threshold Decryption. Mathematics 2022, 10, 728. https://doi.org/10.3390/math10050728

AMA Style

Alborch F, Martínez R, Morillo P. R-LWE-Based Distributed Key Generation and Threshold Decryption. Mathematics. 2022; 10(5):728. https://doi.org/10.3390/math10050728

Chicago/Turabian Style

Alborch, Ferran, Ramiro Martínez, and Paz Morillo. 2022. "R-LWE-Based Distributed Key Generation and Threshold Decryption" Mathematics 10, no. 5: 728. https://doi.org/10.3390/math10050728

APA Style

Alborch, F., Martínez, R., & Morillo, P. (2022). R-LWE-Based Distributed Key Generation and Threshold Decryption. Mathematics, 10(5), 728. https://doi.org/10.3390/math10050728

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop