The present disclosure is directed towards improvements in the field of Fully Homomorphic Encryption.
Homomorphic encryption is a form of encryption that allows computations to be performed on encrypted data without first having to decrypt it. As such, computations can be performed on data that has been homomorphically encrypted without access to the secret key. The output from a computation performed on homomorphically encrypted data will be homomorphically encrypted data. This output can be left in an encrypted form. When the output of a computation performed on homomorphically encrypted data is decrypted, the output from the decryption will be identical to that produced by performing the computation on a plaintext (e.g. decrypted) version of the homomorphically encrypted data. Thus, homomorphic encryption can be used to provide the functionality to add two encrypted numbers or multiply two encrypted numbers (the word ‘or’ is intended to be an inclusive or—a or b means at least one from a, b, and ab; ‘xor’ is intended to be used as exclusive or—a xor b means either a or b). Further, any computation that is a combination of addition and multiplication can be performed on encrypted data.
For example, taking E( ) as an encryption function and x and y as two numbers, E(x), E(y) are the encrypted versions of x and y respectively. I.e. x→E(x), y→E(y). E( ) is homomorphic with respect to addition if we can evaluate E(x+y) (the encrypted sum of two numbers) from the encrypted numbers E(x), E(y) without decrypting them. I.e. E(x)+E(y)→E(x+y). Similarly, E( ) is homomorphic with respect to multiplication if we can evaluate encryption of E(x·y) (the encrypted product of two numbers) from encryption of individual numbers i.e., E(x),E(y) without decrypting them. I.e. E(x)·E(y)→E(x·y)
Thus, homomorphic encryption can be used for privacy-preserving outsourced storage and computation. This allows data to be encrypted and out-sourced to commercial cloud environments for processing, all while encrypted.
Homomorphism and its applications are known from a number of papers including ‘On data banks and privacy homomorphism’ by R. Rivest et al, ‘On privacy homomorphisms by E. Brickell et al, and the papers entitled ‘Fully homomorphic encryption using ideal lattices’ and ‘Toward basing fully homomorphic encryption on worst-case hardness’ by C. Gentry.
For sensitive data, such as health care information, homomorphic encryption can be used to remove privacy barriers that obstruct the efficient exchange of data or to increase the security of existing services. For example, predictive analytics in health care (e.g. the use of analytics based on a user's weight to predict an imminent heart-attack) can be hard to apply via a third party service provider due to medical data privacy concerns—but if the predictive analytics service provider can operate on encrypted data instead, these privacy concerns are diminished or obviated. Moreover, even if the service provider's system is compromised, the data remains secure.
Partially Homomorphic Encryption (PHE) encompasses schemes that support the evaluation of circuits consisting of only one type of gate/operation, e.g., addition xor multiplication.
Fully Homomorphic Encryption (FHE) encompasses schemes that support the evaluation of arbitrary circuits composed of multiple types of gates (e.g. addition or multiplication) of unbounded depth and is the strongest notion of homomorphic encryption. As used herein ‘unbounded depth’ means that a FHE is not limited by a bound specified at setup (i.e. the number of operations that can be performed is not limited).
Homomorphic encryption methods have been developed using different approaches. For example, the research paper entitled “Fully Homomorphic Encryption Using Ideal Lattices” by Craig Gentry describes a method of FHE. This method uses ideal lattices in a lattice-based cryptography system. This method supports both addition and multiplication operations on ciphertexts, from which it is possible to construct circuits for performing arbitrary computation. Further, this scheme is a “bootstrappable” FHE scheme. A bootstrappable FHE scheme is capable of evaluating its own decryption circuit and then at least one more operation (e.g. NAND). To put it differently, ‘bootstrapping’ refers to homomorphically decrypting a ciphertext using a homomorphic encryption of its own decryption key, with the goal of reducing the noise the ciphertext contains.
Previously, there was a problem evaluating a circuit with too many gates. In particular, the evaluation of each gate in the circuit adds noise and, at a certain point, this amount of noise renders the ciphertext impossible to decrypt. However, i) taking the decryption algorithm for a scheme and converting it into a circuit and ii) passing a ciphertext and an encrypted version of the private key through the circuit produced a ‘clean’ ciphertext of the same plaintext—i.e. noise is removed from the ciphertext. Furthermore, the circuit allowed you to run at least one NAND gate on two ciphertexts (a couple of gates that were equivalent to a NAND) and the decryption circuit without the result being rendered unretrievable by noise. As used in this disclosure, unless otherwise specified, the term ‘circuit’ refers to a boolean circuit (i.e., a circuit made of Boolean gates such as AND, NAND, OR, NOR, and NOT gates) that computes a function f.
FHE schemes are based on noisy encryptions. In such encryption schemes, the noise guarantees the security of fresh encryption. However, in such schemes evaluating homomorphic operations increases the noise magnitude and lowers the quality, i.e., computational budget, of ciphertexts. Bootstrapping is used to convert an exhausted ciphertext into an “equivalent” refreshed ciphertext. Exhausted ciphertexts contain high noise and cannot be operated on further, whereas refreshed ciphertexts can support further homomorphic operations.
However, bootstrapping is computationally expensive and slow as it requires a FHE system to perform arbitrary number of additions and multiplications. This makes the overall system very slow. Although this scheme allows to perform large number of computations, it is unfortunately too slow for use for most, if not all, practical application.
The use of CRT (Chinese Reminder Theorem) as part of homomorphic encryption algorithms is known. The use of CRT in homomorphic encryption was introduced in ‘On data banks and privacy homomorphism’ by R. Rivest et al. However, this algorithm is known to be vulnerable to chosen plaintext attack (CPA). One attempt to address this vulnerability is outlined in the paper entitled ‘CRT-based fully homomorphic encryption over the integers’ by Cheon et al. This paper introduced a homomorphic encryption scheme based on CRT (Chinese Reminder Theorem).
According to CRT, if one knows the remainders of the Euclidean division of an integer x by a number of integers, then it is possible to determine uniquely the remainder of the division of x by the product of these integers, so long as the divisors are pairwise and coprime (i.e. no two divisors share a common factor other than 1). CRT is widely used for computing with large integers, as it allows replacing a computation on large integers (where the size of the result falls within a known bound), by several similar computations on small integers.
Assuming a mod p denotes the unique integer in
that is congruent to a modulo p and CRT(p
that is congruent mi modulo pi, the CRT-FHE scheme disclosed by Cheon et al. is based on three functions:
and e1, . . . , ek are p-bit random integers.
The scheme can be regarded as a generalisation of the Dijk-Gentry-Halevi-Vaikutanathan (DGHV) homomorphic encryption scheme which can be extended to a fully homomorphic encryption (FHE) scheme using bootstrapping.
However, as is clear from the above, the CRT-FHE proposed by Cheon et al still requires bootstrapping to perform arbitrary number of additions and multiplications on encrypted numbers, and as a result does not solve the computational and temporal problems caused by bootstrapping.
As used throughout this disclosure, the term random is intended to encompass random and pseudo random numbers. However, random numbers are preferred to pseudo random numbers.
The present disclosure is directed towards a FHE scheme that utilizes Chinese Reminder Theorem (CRT) and learning with errors (LWE). The aim of the present disclosure is to provide a system and method for FHE that does not requires a bootstrapping function. As such, a system and method in accordance with the present disclosure may be configured to perform an arbitrary number of additions or multiplications on encrypted data without the need for decryption or bootstrapping. This will overcome all the computational and storage limitation caused by the bootstrapping.
Further, a system and method in accordance with the present disclosure supports Single Instruction Multiple Data (SIMD) operations. This means that a large set of numbers can be encrypted together and the encrypted operations (e.g. addition, multiplication, or addition and multiplication) on the set of data can be performed with a single instruction.
The present disclosure is directed towards a method of generating keys for fully homomorphic encryption, the method comprising: obtaining a first set of numbers S, wherein the first set of numbers is a set of pairwise coprime numbers P1, . . . , Pk+1; obtaining another parameter, wherein another parameter is a random or pseudo random number P; and calculating a secret key, sk, based on the first set of numbers, and the another parameter.
In some embodiments, k+1=2. In one embodiment, the secret key, sk={S, P}.
In some embodiments, the method further comprises: obtaining a second set of prime numbers r1, r2, . . . , rk+1; obtaining a third set of numbers as the another parameter, wherein the third set of numbers is a set of random or pseudo random numbers s1, . . . , sn; calculating the secret key, sk, based on the first set of numbers, the second set of numbers, and third set of numbers; and calculating a public parameter, q, based on the first set of numbers and the second set of numbers.
In some embodiments, at least one of the first set of numbers, the second set of random prime number, and the third set of random numbers selected based on a security parameter.
In some embodiments, q is calculated by multiplying the first set of numbers together with the first and second extra prime numbers, whereby q=(P1× . . . ×Pk×Pk+1)×(r1×r2× . . . ×rk+1).
In some embodiments, sk={s=(s1, . . . , sn), p=(p1, . . . pk, pk+1), r=(r1,r2, . . . , rk+1)}.
In some embodiments, the method comprises generating re-linearization keys, rlks, wherein generating the rlks comprises encrypting components of the secret key.
In some embodiments, the method comprises using a first set of random numbers a1ij, . . . , anij, eij to generate a first relinearization key θij and using a set of random numbers α1j, . . . , anj, ej to generate a second relinearization key δj.
In some embodiments, the method comprises generating R-keys, wherein generating the R-Keys comprises encrypting components of the secret key.
In some embodiments, encrypting components of the secret key comprises performing an extended Chinese remainder function, XCRT, on the components of the secret key.
The present disclosure is also directed towards a method of fully homomorphic encryption which comprises obtaining a secret key, sk, and a plaintext m1, . . . , mk to be encrypted, wherein the secret key and the public parameter are generated in accordance with any preceding claim.
In some embodiments the method comprises generating and using a random number w.
In some embodiments, calculating the cypher text c comprises calculating c=P·w+CRT(s) (m1, . . . ,mk,s), where e is a random integer in the range {0, 1, . . . , pk+1−1}.
In some embodiments, the method comprises deleting w after it has been used.
In some embodiments, the method comprises selecting a value e representing a random noise or a noise signal.
In some embodiments, the method comprises performing an extended Chinese remainder function, XCRT, on a vector, wherein the vector is based on the plaintext and the value e.
In some embodiments, the vector is m1r1l
In some embodiments, the method comprises selecting a plurality of random numbers a1, . . . , an and subtracting the dot product of vector (a1, . . . , an) and (s1, . . . , sn) from the XCRT.
In some embodiments, the method comprises performing a modulus operation based on q on the XCRT function after the dot product of vector (a1, . . . , an) and (s1, . . . , sn) has been subtracted whereby a cipher value c0 is obtained such that c0=[−(Σi=1naisi)+xcrt(p
In some embodiments, the method comprises a generating a ciphertext c by forming a vector, wherein forming the vector comprises appending the values a1, . . . , an and l1, . . . , lk to C0.
The present disclosure is also directed towards decrypting a ciphertext generated as set out above, using a secret key sk generated as set out above, wherein the secret key comprises s and s equals (s1, . . . , sn), and the ciphertext comprises a vector a=(a1, . . . , an), and the method comprises: determining the sum of i) the first coordinate of the ciphertext; and ii) the dot product of s=(s1, . . . , sn) and the vector a=(a1, . . . , an) of ciphertext.
In some embodiments, the method comprises, for j=1, . . . , k, multiplying
pj to mod to the sum and then performing a modulus operation based on pj on the result, whereby
The present disclosure is also directed towards a method of performing encrypted homomorphic multiplication, wherein the method is configured to perform a function ƒmultiply( ) on two ciphertexts c and c′ together to produce a new ciphertext, cmultiply=ƒmultiply(c, c′), wherein the ciphertext c and c′ are produced using a method of encryption as set out above.
In some embodiments, cmultiply is computed as cmultiply=[(c0*, c1*, . . . , cn*), (l1*, . . . , lk*)], wherein: ct*=ƒ(c, c′, {θij}, {δj}); t is any integer from 0 to n; ƒ( ) is a predetermined function; and {θij}, {δj} are relinearization keys.
In some embodiments, when t=0, ƒ(c, c′, {θij}, {δj}) equals (c0c0′+Σi,j=1, i≠jnc0ij(cicj′+cjci′)+Σj=1ncjcj′c0j); when t>0, ƒ(c, c′, {θij}, {δj}) equals (ctj+Σi,j=1, i≠jn(cicj′+cjci′)ctij), t=1, . . . , n; and lt*=lt+lt′, t=1, . . . , k.
In some embodiments, the present disclosure is also directed towards a method of performing encrypted homomorphic addition, wherein the method is configured to perform a function ƒadd( ) on two ciphertexts c and c′ together to produce a new ciphertext, cadd wherein: cadd=ƒadd(c, c′); cadd is the encryption of the sum of plaintext values corresponding to the ciphertexts c and c′; and the ciphertext c and c′ were produced using a method of encryption as set out above.
In some embodiments the method comprises determining a first set of level values l1*, . . . , lk* for cadd, wherein li* is max{li, li′}.
In some embodiments, the method comprises calculating a set of first intermediary values c(1) and a second set of intermediary values c(2) based on the first set of level values and ciphertexts c and c′.
In some embodiments,
In some embodiments,
The present disclosure is also directed towards a method of performing encrypted homomorphic Plaintext to Ciphertext multiplication wherein the method is configured to perform a function ƒmultiply2( ) on a ciphertext c and a plaintext number x to produce a ciphertext cmultiply2, the ciphertext in an encryption, enc( ), of a plaintext vector (m1, . . . , mk) and cmultiply2=enc(x*m1, . . . ,x*mk).
In some embodiments cmuitiply2=[(c0*, c1*, . . . , cn*), (l1*, . . . , lk*)], wherein: t is an integer value greater than or equal to 0 and less than or equal to n (i.e. 0≤t≤n)); ct*=x * ct mod q, t=0,1, . . . , n; and lt*=lt, t=0,1, . . . , n.
The present disclosure is also directed towards a method of generating Public Key, pk, from a secret key, wherein the secret key was generated as set out above.
In some embodiments, the method comprises: generating a zero vector that is e0=(0,0, . . . ,0); and generating k non-zero vectors, wherein a non-zero vector contains the value 1 in its nth coordinate and 0 in the remaining coordinates, wherein n is an integer and 1≤n≤k whereby e1=(1,0, . . . ,0), e2=(0,1,0, . . . ,0), . . . , ek=(0,0, . . . ,0,1).
In some embodiments, generating the public key comprises encrypting e0, e1, . . . , ek, whereby: pk=(E0=enc(e0), E1=enc(e1), . . . , Ek=enc(ek))
The present disclosure is also directed towards a method of performing Public Key encryption, wherein the method is configured to encrypt a plaintext vector (m1, . . . , mk) with a public key generated as set out above.
In some embodiments, the method comprises performing a plaintext-ciphertext multiplication as described above.
In some embodiments, a plaintext-ciphertext multiplication is performed on a random number r and ciphertext E0; and a plaintext-ciphertext multiplication is performed on each coordinate mi and ciphertext Ei for i=1, . . . , k; and the results of the plaintext-ciphertext multiplications are homomorphically added together, whereby c=r * E0+Σi=1kmi*Ei, wherein: r * E0 and mi*Ei are plaintext-ciphertext multiplications, r and mi are plaintexts, E0 and Ej are ciphertexts, and Σ represents the homomorphic addition of ciphertexts.
In some embodiments, the XCRT function is calculated according to the equation xcrt(nn
n
n, where n1, n2, . . . , nk are a plurality of pairwise coprime numbers, and n′ which is any suitable number.
The present disclosure is also directed towards a computer program comprising instructions which, when executed by a computing system, cause the computing system to carry out a method as set out above.
The present disclosure is also directed towards a computer-readable storage medium or a data carrier signal carrying the above computer program.
The present disclosure is also directed towards a computing system comprising at least computer, the computer system comprising means for performing a method as set out above.
The CRT function, may be defined as follows:
If x ∈ n we can compute the tuple (x1, . . . , xk) by computing each xj=x mod nj for j=1, . . . , k.
For (x1, . . . , xk) ∈ n
n
First, during a precompute stage, a value s is calculated for j=1, . . . , k as
A value t is also calculated during the precompute stage for j=1, . . . , k as tj=[sj−1]nj which can be rewritten as tj=sj−1 mod nj
The CRT of (x1, . . . , xk) can then be calculated as x=crt(x1, . . . , xk)=Σxjsjtj mod n.
The CRT function can be extended to produce a new extended CRT function (XCRT) that performs the same computation as a CRT function does but with a different modulus. Similarly to a CRT function, the XCRT function is calculated based on a plurality of pairwise coprime numbers (n1, n2, . . . , nk), However, the XCRT uses a number n′ which is any suitable number. Thus, the XCRT function may be calculated according to the following equation:
A system in accordance with the present disclosure comprises key generation functions.
In a first embodiment, key generation produces a key that can be used for encryption. In some embodiments the key may also be used for decryption. In order to generate the key, a random number P of bit length η is selected. Two coprime numbers p1 and P2 are also selected. The number p1 may represent the plain-text space. It may be selected so that it has a predetermined bit-size based on the bit-size required to represent the plain-text data. E.g. 64 bits. The number P2 may represent the noise space. In some embodiments, P2 is selected so that it has p bits. The secret key can be set as sk=(P, p1, p2).
The secret key sk can be calculated based on a security parameter λ. In particular, for a given value of λ, ρ represents a bound on the bit-length of the error, η the bit length of the secret greatest divisor, and y the bit length of an AGCD sample that is also equivalent to the cyphertext size. Thus for a given security parameter a, the other parameters may be set as follows:
To encrypt a plain text message m ϵ Zp1 using the secret key sk, a random noise e is selected. In some embodiments e is of bit-length p. A random number w is also selected. Based on these values a ciphertext may be calculated as follows:
The plaintext message m may be calculated from the cyphertext c as follows:
m=c mod P)mod p1
Such a scheme supports fully homomorphic operations. In particular, addition and multiplication are supported. For example, if we have two ciphertexts c1 and c2 where c1 is an encryption of m1 and c2 is an encryption of m2, then
This is based on the fact that, for any cyphertext of a message encrypted with a secret key, decrypting the cyphertext with the secret key will recover the message m. I.e.
Dec(Enc(m,sk(m sk)=m
In particular, if we encrypt m with the secret key sk=(P, p1, p2), encryption comprises calculating a first intermediate value Δ1, where:
Further, a second intermediate value Δ2 is calculated, where:
A cyphertext c can now be calculated:
The calculation of the cyphertext can be rewritten using Chinese Remainder Theorem as:
If we decrypt c using the decryption function described above:
However,
Δ1m+Δ26 mod p1=m
Thus:
Dec(Enc(m,sk),sk)=m
As a result, decryption and encryption in accordance with the present disclosure are correct and consistent. The decryption of an encrypted message results in the original plaintext message without loss or alteration.
To prove the correctness of the homomorphic properties, consider the encryption, performance of a function, and decryption of two messages m and m′. First, the cyphertexts for m and m′ are calculated:
To perform homomorphic addition, c and c′ are added together:
The resulting cyphertext is decrypted:
Similarly for homomorphic multiplication:
The resulting cyphertext is decrypted:
And due to the properties of a scheme according to the present disclosure:
As such,
As a result, a system in accordance with the present disclosure correctly performs homomorphic addition and multiplication.
The security of a scheme in accordance with the present disclosure can be demonstrated by performing a reduction to the approximate greatest common divisor (AGCD). In particular if there is a method X for breaking encryption according to the present disclosure and allowing the recovery of the secret keys from the AGCD sample.
x
i
=P
qi
+r
i
Here, P is the secret, qi are random integers, and ri are small errors.
The proposed scheme refers to a system in accordance with the present disclosure. From the above, assuming method X can recover the secret key P, which is identical to the secret key of the AGCD scheme. Thus, if there exists a method X capable of breaking encryption according to the present disclosure, the same method is used to break the AGCD scheme, validating the security of a system according to the present disclosure.
To ensure the system's security, the parameters can be selected to resist several types of attack.
For example, a lattice reduction attack, such as orthogonal lattice attacks, are optimized methods aimed at solving approximate common divisor problems. To ensure security against all known attacks, the parameters are selected such that:
To protect against brute force attacks on noise:
Thus, in some embodiments, the parameters are selected as follows:
Using the above parameters,
Thus γ=L2k log λ satisfies the security condition:
In a second embodiment, the key generation functions generate a number of different keys. In particular, the system can generate a secret key, a public parameter, re-linearization keys, and R-keys.
To generate the secret key, a first set of numbers is generated. The first set of numbers is generated by selecting a plurality of large pairwise coprime numbers p1, . . . pk, pk+1. In some embodiments, the first set prime numbers comprises k+1 large pairwise coprime numbers, where k is the maximum size of a plaintext vector that can be encrypted by the system.
In some embodiments, the plurality of large pairwise coprime numbers selected for the first set of random numbers are selected by the system, based on a security parameter. The security parameter is selected by a user and sets the level of security of the system. In particular, the security parameter is indicative of the bit-size of the large coprime numbers. The system can be configured such that a user can use the security parameter to select a known standard such as 128 bit, 256-bit, 512-bit security.
In addition, a second set of numbers is also generated. The second set of numbers is generated by selecting a plurality of large prime numbers r1, r2, . . . , rk+1. In some embodiments, the second set of numbers comprises k+1 large prime numbers, where k is the maximum size of a plaintext vector that can be encrypted by the system. The large prime numbers selected for the second set of numbers also can be selected by the system based on the security parameter.
A plurality of random numbers s1, . . . , sn, are also selected by the system. The number n is an integer which sets the size of the ciphertext. The system is configured to calculate a secret key (sk) based on the selected values. In particular, the sk may be calculated as follows:
A public parameter q is also calculated using the first and second sets of prime numbers. In particular, q=(p1× . . . ×Pk×pk+1)×(r1×r2× . . . ×rk+1)
Re-linearization keys (rlks) are also calculated. The rlks are used during multiplication of two encrypted data. The rlks are generated by encrypting the components of the secret key. In particular, for i,j=1, . . . , k the rlks keys for sisj, i≠j and sj2 are calculated as follows:
A first relinearization key θij, corresponding to sisj, may be generated using a first set of random numbers a1ij, . . . , anij, eij. The first relinearization key θij may be determined using the following equation:
A second relinearization key θij, corresponding to sj, may be generated using a second a set of random numbers a1j, . . . , anj, ej. The relinearization key δj may be determined using the following equation:
The resultant first and second relinearization keys ({θij}i,j=, . . . n′{δj}j=1, . . . n) are the relinearization keys (rlks) corresponding to the secret key sk described above.
In addition, R-keys are also calculated. The R-Keys are also calculated based on encrypting components of the secret key. In addition, the R-Keys may be generated using a third set of random numbers γ1i, . . . , γni. For example, k R-keys can be calculated according to the following equation:
where 1≤i≤k.
The resultant (R1, . . . , Rk) R-Keys are the R-keys corresponding to the above secret key sk above.
As a result, suitable keys for performing homomorphic operations:
are provided.
The system also can comprise an encryption function. The encryption function operates on plaintexts (m1, . . . , mk) with the secret key sk. To encrypt, a plurality of random numbers a1, . . . , an are selected. In some embodiments, the numbers are uniformly random—i.e. a1, . . . , an ∈ Fq. In addition, a value e representing a random noise or a noise signal is selected. Based on these values, the secret key, and the public parameter q, a value c0 is obtained. In particular, the XCRT function of the vector (m1r1l
The final ciphertext c is obtained by forming a vector by appending the values a1, . . . , an and l1, . . . , lk to c0 i.e.
C=[(c0,a1, . . . ,an),(l1, . . . ,lk)]
In contrast to the CRT-based encryption algorithm proposed by Cheon et al, a system in accordance with the present disclosure uses (Σi=1naisi).
In addition, in a system in accordance with the present disclosure, and in contrast with the crt-based encryption function proposed by Cheon et al, the XCRT function can be used. In particular, the XCRT of the vector (m1r1l
In addition, in the crt function proposed by Cheon et al, e is placed before the plaintext m1. In contrast, in the vector of the present disclosure, e is placed after the plaintext mk.
Further, the public parameter and random numbers proposed by Cheon et al are not used in the encryption function of the present system in some embodiments—i.e. the CRT function utilized in a system in accordance with the present disclosure operates on m1, . . . , mk and not on m1+e1Q1, . . . , mk+ekQk.
According to the present disclosure, a ciphertext c can also be decomposed into n+1 partial ciphertexts (c0, c1, . . . , cn)—i.e.
C=[(c0,C1, . . . ,Cn),(l1, . . . ,lk)]
As such, the decryption function can be performed according to the following equation:
If c is an encryption of plaintexts (m1, . . . , mk) which equals (c0, . . . , cn) and c′ is an encryption of plaintexts (m1′, . . . , mk′), which equals (c′0, . . . , c′n), then in order to perform a homomorphic addition, we need a function to compute the ciphertext cadd from c and c′ such that, when decrypted, cadd equals (m1, . . . , mk)+(m1′, . . . , mk′)=(m1′+mk, . . . , mk+mk′. In order to perform homomorphic multiplication, we also need a function to calculate the ciphertext cmultiply from c and c′ such that, when decrypted, cmultiply equals (m1*m1′, . . . , mk*mk′).
The system can comprise a homomorphic multiplication function to obtain a ciphertext that is encryption of the product of two plaintexts (m1, . . . , mk) and (m1′, . . . , mk′) I.e. cmultiply=enc(m1*m1′, . . . , mk*mk′). It has surprisingly been found that cmultiply can be calculated as cmultiply=(c0*, c1*, . . . , cn*), where
and t refers to the index value of ct*(for any integer value of t greater than or equal to 0 and less than or equal to n (i.e. 0≤t≤n)).
Remarkably, due to the properties of the XCRT function, the increase or decrease of noise e in xcrt(p
This can be proved as follows:
If we have a first plaintext m1, . . . , mk, it can be written in encrypted form as:
If we have a second plaintext m′1, . . . , m,k, it can be written in encrypted form as:
If, taking the lefthand side of the equations above, we multiply the first encrypted plaintext by the second encrypted plaintext, we get:
If, taking the righthand side of the equations above, we multiply the first encrypted plaintext by the second encrypted plaintext, we get:
If we use the re-linearization keys to replace sisj and sj2 from the equation, we get:
From this equation we can infer that
And from this equation we an infer that
If one then replaces the values of sjsj and sj2 from the equation
Re-equating the lefthand side of the equation to the righthand side of the equation:
The system can comprise a homomorphic addition function to obtain a ciphertext cadd that is encryption of the sum of two plaintexts (m1, . . . , mk) and (m1′, . . . , mk′)—i.e. Cadd=enc(m1+m1′, mk+mk′.
If the two plaintexts have been encrypted using the encryption function above, then: c=enc(m1, . . . ,mk)=[(c0, c1, . . . , cn), (l1, . . . , lk)]and c′=enc(m1′, . . . , mk′)=[(c0′, c1′, . . . , cn′), (l1′, . . . , lk′)]
Intermediary values c(1), c(2) and li*can be computed based on c and c′ using the following equations:
Where Σ represents coordinate-wise sum, * represents a homomorphic multiplication in accordance with the present disclosure as defined in above, and Ril represents homomorphic multiplication of Ri with itself l number of times. The final result is obtained by decomposing c to C0, c1, . . . , cn and c0′ to c0′, c1′, . . . , cn′ and performing a coordinate wise sum of the resultant ci's of c(1) and c(2) to obtain:
Due to the properties of the encryption algorithm according to the present disclosure,
A system according to the present disclosure can provide a second multiplication function, mf2( ), for homomorphic plaintext to ciphertext multiplication. The second multiplication function is configured to generate a ciphertext Cmultiply2 that is an encryption of the product of plaintext (m1, . . . , mk) and a plaintext number x. I.e. mf2((m1, . . . , mk), x)=Cmultiply2=enc(x*m1, . . . ,x*mk).
It has surprisingly been found that cmultiply2 can be calculated as cmultiply2=[(c0*, c1*, . . . , cn*), (l1*, . . . , lk*)], where ct* refers to the index value of ct* (for any integer value of t greater than or equal to 0 and less than or equal to n (i.e. 0≤t≤n)). In particular,
For this function, the level ct* is the same as the level for ct, i.e.
l
t
*=l
t
,t=0,1, . . . ,n
As such the final ciphertext will be
C
Multiply2=[(c0*,c1*, . . . ,cN*),(l1*, . . . ,lK*)]
The system also can be configured in some embodiments to provide a function for generating one or more public keys from a secret key. In some embodiments, the secret key is provided as input, and is used to encrypt the following plaintext vectors: a zero vector that is e0=(0,0, . . . ,0); and
k non-zero vectors that contain the value 1 in the nth coordinate and 0 in the remaining coordinates, where 1≤n≤k. E.g. e1=(1,0, . . . ,0), e2=(0,1,0, ,0), . . . , ek=(0,0, . . . ,0,1).
A public key is then generated by encrypting e0, e1, . . . , ek in accordance with the present disclosure—i.e:
pk=(E0=enc(e0),E1=enc(e1), . . . ,Ek=enc(ek))
The system also can be configured to provide a public key encryption function. The public key encryption function encrypts the plaintext vector (m1, . . . , mk) with the public key (instead of the secret key) to obtain a ciphertext that can only be decrypted using the corresponding secret key from which the public key was generated.
To encrypt the plaintext vector (m1, . . . , mk) with a public key pk generated as described above, the plaintext-ciphertext multiplication function described above is performed: on a random number r and the ciphertext E0 of the public key pk; and on each coordinate mi and ciphertext Ei of the public key pk for i=1, . . . , k. The public key encrypted ciphertext c is then computed by performing a homomorphic addition of all the results of plaintext-ciphertext multiplications. I.e:
where r * E0 and mi*Ei represent plaintext-ciphertext multiplication, the values of r and mi are plaintext values and the values of Ei are ciphertexts. In the above equation, Σ represents the homomorphic addition of ciphertexts.
The present disclosure provides a novel FHE scheme that does not require bootstrapping for performing arbitrary number of computations on encrypted data. As a result, the present disclosure significantly increases the speed of performing calculations on encrypted data without compromising on security. This has the potential to extend the use of FHE into applications where FHE was previously not possible due to time & computational constraints. For example, it may be possible to use FHE in machine learning and artificial intelligence through performing analytics on encrypted data without facing any of the efficiency issues known in conventional approaches.
Number | Date | Country | Kind |
---|---|---|---|
PCT/EP2023/081012 | Nov 2023 | WO | international |
2024/0357 | Jun 2024 | IE | national |
The present application claims the benefit of PCT Application No. PCT/EP2023/081012 filed on Nov. 7, 2023, and Irish Application No. IE 2024/0357 filed on Jun. 21, 2024, the entirety of which both are incorporated herein by reference.