The presently disclosed subject matter relates to computer-implemented blind rotation method for use in fully homomorphic encryption, a computer readable medium, a computing system for fully homomorphic encryption.
Ever since Craig Gentry's breakthrough paper “Fully Homomorphic Encryption Using Ideal Lattices” (Full version in Commun. ACM 53(3):97-105, 2010; included herein by reference) there has been a continued effort to make Fully Homomorphic Encryption (FHE) sufficiently secure and efficient for real-world applications. An FHE allows one to perform computations, e.g., evaluate circuits, over encrypted data without being able to decrypt. For example, input data and computation result may be received and returned in encrypted form. Intermediate data, e.g., an internal state of the computation, may also be in encrypted form.
Even though the result of the computation is returned in an encrypted form, when decrypted the output is the same as if the operations had been performed on the unencrypted data. Homomorphic encryption can be used for privacy-preserving outsourced storage and computation. This allows data to be encrypted and out-sourced to a cloud environment for processing and/or storage, all while encrypted.
For example, homomorphic cryptography may be applied in fields such as health care in which privacy regulations may make it difficult to share plain data, but computations on encrypted medical data may be allowable. For example, a medical model developed, say, to classify medical data may be configured to receive medical data from a third party, say a hospital, in encrypted form. The medical model might, e.g., classify medical data, e.g., as normal or abnormal, or as having some particular medical syndrome, disease, or other disorder. Using homomorphic encryption, the medical model may be applied to medical data that is received in encrypted form. This means that the party that evaluates the medical model does not have access to the plain medical data that corresponds to the encrypted medical data. The user of the service can decrypt the result of the medical model application.
A cryptosystem that supports arbitrary computations on ciphertexts is known as a fully homomorphic encryption (FHE) scheme. Such a scheme enables the evaluation of a wide range of functions, and which can be run on encrypted inputs to produce an encryption of the result. For example, so-called functional completeness can be obtained once a combination of and-gates and or-gates are available as this allows one to implement any Boolean circuit. Such can be run by an untrusted party without revealing its inputs and internal state and output. A fully homomorphic encryption may be leveled, in which case the number of certain operations cannot exceed a predetermined threshold. A leveled fully homomorphic scheme may be converted to an unleveled FHE scheme by performing bootstrapping operations. A bootstrapping operation increases the number of operations than can be performed on an encrypted data item.
A fully homomorphic encryption scheme may support computations expressed in some special form, e.g., as a Boolean or arithmetic circuit. For example, a leveled fully homomorphic encryption scheme may support the evaluation of arbitrary circuits but of a bounded, pre-determined, depth. Unleveled fully homomorphic encryption (FHE) allows the evaluation of arbitrary circuits of unbounded depth. A leveled FHE scheme may be converted to an unleveled FHE scheme by periodic execution of a bootstrapping operation on data. It is known how to compile a computation, e.g., a function, in the form of a circuit.
Since Gentry's paper many FHE schemes have been developed, bringing computation times down with multiple orders of magnitude. Now, many FHE schemes are known. A more recent example of an FHE scheme is described in the paper “TFHE: Fast Fully Homomorphic Encryption over the Torus” by Ilaria Chillotti, et al. (J. Cryptology 33(1):34-91, 2020), included herein by reference
A further FHE scheme is described in the paper “Programmable Bootstrapping Enables Efficient Homomorphic Inference of Deep Neural Networks” by Ilaria Chillotti, Marc Joye and Pascal Paillier, see Cryptology ePrint Archive: Report 2021/091, which is included herein by reference.
Nevertheless, there remains a need to further improve FHE schemes.
The inventors noted that in existing FHE schemes the keys are typically expressed in bits. Increasing the number of possible values, e.g., going from bits to digits, e.g., by increasing a base radix from 2 to a higher number, say 3 or more, in a conventional setting would increase the computational workload of the FHE scheme considerably; in particular, the computational cost of bootstrapping operations will increase. For example, the number of so-called external products which may be used to perform bootstrapping operations, may increase. External products are a bottleneck for some important FHE operations, e.g., for bootstrapping operations; increasing their number is therefore undesirable.
An external product computes the multiplication between a multiplier and a multiplicand; e.g., torus elements or polynomials over the torus. Both multiplier and multiplicand are encrypted though typically with a different encryption scheme. The multiplicand may be one of the encrypted values of the FHE scheme, e.g., an intermediate value which may depend dynamically on input values of the FHE computation, a typical example is LWE encryption though other encryption schemes are possible. The multiplier is typically fixed before the FHE computation, and does not dynamically depend on input values of the FHE computation. The multiplier may be encrypted with an encryption scheme arranged to support multiplications, and which may differ from the scheme with which the multiplicand is encrypted. An FHE system, e.g., a computation system configured for computations encrypted according to an FHE scheme, may thus have access to the multiplier and multiplicand, though both in encrypted form, and be able to compute the multiplication while encrypted. The multiplication result if obtained by the FHE system in encrypted form, typically in an encryption type suitable for intermediate values, such as LWE. External multiplication is often done in polynomials, which means if numbers are to be multiplied, they may be lifted temporarily to polynomials, and converted back to numbers after the multiplication.
The inventors found how to increase the number of possible values of a secret key digit without having an increase in the number of external multiplications.
A computer-implemented blind rotation method is provided for use in fully homomorphic encryption. The method iterates over the secret key digits; however, each iteration comprises at most one external product. Interestingly, the number of external multiplications is at most the number of secret digits, regardless of the range of possible values each secret digit has. Secret digits which have 3 possible values need as many external multiplications as secret digits which have 4 or 5 possible values, etc. There are many more sequences of a given number of secret digits if the secret digits are allowed to have more possible values. In turn, this yields more freedom in the selection of the parameters so as to achieve a desired security level.
For example, an encrypted value may comprise a masked value and multiple masking values. In an iteration, an accumulator may be rotated in one direction over the masked value. This would give the correct rotation, if only the masked value was not masked. To correct for the masking, the accumulator may be rotated back in the opposite direction over an amount indicated by the secret digits and the masking values, e.g., their products. For example, for each pair of a secret digit and a masking value the accumulator may be rotated in the opposite direction as indicated by the combination of the secret digit and a masking value. Efficient implementations can combine more than one pairs of secret digit and masking values in a single opposite-direction rotation.
This can be achieved by computing a multiplier polynomial that indicates the desired amount of rotation in a given iteration. The multiplier polynomial relates to a secret key digit and is thus not accessible to the FHE system in plain form—it is computed in encrypted form. To emphasis the difference between the multiplier polynomial in encrypted form, that is in the form the system obtains it, and the multiplier polynomial that it encrypts the former will be denoted the encrypted multiplier polynomial, and the latter the plain multiplier polynomial. An encrypted multiplier polynomial may be denoted as P(X)
.
One way of constructing the encrypted multiplier polynomial is to construct it from multiple possible plain multiplier polynomials, e.g., corresponding to the possible values of a secret key digit.
Interestingly, the inventors found that it is possible to compute such an encrypted multiplier polynomial without needing further external multiplications. Instead, the encrypted multiplier polynomial can be computed as an encryption of a linear combination of possible plain multiplier polynomials, the coefficients of the linear combination being encrypted in the form of bootstrapping keys. As bootstrapping keys are themselves encrypted, the resulting multiplier polynomial is encrypted yet still indicates the required amount of rotation. For example, the bootstrapping keys for a particular secret digit can be thought of as component-wise encryptions of a vector with at most one non-zero value (which is 1). Each bootstrapping key encrypts data that indicates whether a particular secret key digit has a particular value. The length of the vector may be less or equal to the number of possible values for the secret key digit.
The principles of the invention can be applied in any FHE scheme that relies on external multiplications to implement a bootstrapping operation and that allows the combining of (plain) polynomials and bootstrapping keys to obtain an encrypted multiplier polynomial.
A particularly useful application of blind rotations is in bootstrapping and/or function evaluation. By executing a blind rotation of a so-called test polynomial, the coefficient of the test polynomial that corresponds to a particular exponent can be looked-up, while encrypted. Such a blind rotation can be used for noise reduction and/or function evaluation. Function evaluation in turn can be used for a wide variety of applications, e.g., to implement other arithmetic operations, to implement node evaluation functions for a neural network and so on.
A further aspect is an electronic device, e.g., a computer, configured for blind rotation. The blind rotation method described herein may be applied in a wide range of practical applications. Such practical applications include the encrypted evaluation of software programs without having access to plain data. For example, one may evaluate medical diagnostic software on medical data without having actual access to said medical data nor medical results.
Medical data may comprise a medical image. A medical image may comprise, e.g., multi-dimensional image data, e.g., to two-dimensional (2D), three-dimensional (3D) or four-dimensional (4D) images, acquired by various acquisition modalities such as, but not limited to, standard X-ray Imaging, Computed Tomography (CT), Magnetic Resonance Imaging (MRI), Ultrasound (US), Positron Emission Tomography (PET), Single Photon Emission Computed Tomography (SPECT), and Nuclear Medicine (NM).
An embodiment of the method may be implemented on a computer as a computer implemented method, or in dedicated hardware, or in a combination of both. Executable code for an embodiment of the method may be stored on a computer program product. Examples of computer program products include memory devices, optical storage devices, integrated circuits, servers, online software, etc. Preferably, the computer program product comprises non-transitory program code stored on a computer readable medium for performing an embodiment of the method when said program product is executed on a computer.
In an embodiment, the computer program comprises computer program code adapted to perform all or part of the steps of an embodiment of the method when the computer program is run on a computer. Preferably, the computer program is embodied on a computer readable medium.
Further details, aspects, and embodiments will be described, by way of example only, with reference to the drawings. Elements in the figures are illustrated for simplicity and clarity and have not necessarily been drawn to scale. In the figures, elements which correspond to elements already described may have the same reference numerals. In the drawings,
The following list of references and abbreviations is provided for facilitating the interpretation of the drawings and shall not be construed as limiting the claims. The list refers to
While the presently disclosed subject matter is susceptible of embodiment in many different forms, there are shown in the drawings and will herein be described in detail one or more specific embodiments, with the understanding that the present disclosure is to be considered as exemplary of the principles of the presently disclosed subject matter and not intended to limit it to the specific embodiments shown and described.
In the following, for the sake of understanding, elements of embodiments are described in operation. However, it will be apparent that the respective elements are arranged to perform the functions being described as performed by them.
Further, the subject matter that is presently disclosed is not limited to the embodiments only, but also includes every other combination of features described herein or recited in mutually different dependent claims.
System 110 may comprise a processor system 130, a storage 140, and a communication interface 150. Storage 140 may comprise local storage, e.g., a local hard drive or electronic memory. Storage 140 may comprise non-local storage, e.g., cloud storage. In the latter case, storage 140 may comprise a storage interface to the non-local storage. For example, storage 140 may store encrypted data items, e.g., received from one or more data providers or generated as intermediate results or end results, e.g., outputs, of the computation. Typically, most or all data items on which the computation of system 110 is performed are encrypted with a key (or keys) that is not known to system 110—that is system 110 may not be configured to obtain the plain data items corresponding to the encrypted data items, e.g., such as stored in storage 140. The decryption key in plain form is secret for system 110, though the encryption/decryption key may be available in encrypted form. For example, the processor system may be configured to perform a sequence of FHE operations, which may include such arithmetic operations on encrypted values as addition and multiplication, but may also include arithmetic operations on encrypted polynomials. FHE operations may also include such operations as a blind rotation of a polynomial, a bootstrapping, and the like. Rotation of a polynomial shifts the coefficients of the monomials in a polynomial to the next exponent. For example, a polynomial f(x) mod (xn+1), is rotated over α positions by computing xαf(x)mod(xn+1), or if rotation in the other direction is desired by x−αf(x)mod(xn+1). Blind rotation computes the same procedure on a polynomial, except under cover of encryption. Apart from its interest as a cryptographic operation in its own right, blind rotation also has important applications in FHE, in particular as a building block for bootstrapping operations with or without function evaluation.
System 110 may communicate internally, with other systems, external storage, input devices, output devices, and/or one or more sensors over a computer network. The computer network may be an internet, an intranet, a LAN, a WLAN, etc. The computer network may be the Internet. The system comprises a connection interface which is arranged to communicate within the system or outside the system as needed. For example, the connection interface may comprise a connector, e.g., a wired connector, e.g., an Ethernet connector, an optical connector, etc., or a wireless connector, e.g., an antenna, e.g., a Wi-Fi, 4G or 5G antenna. Communication, e.g., internal communication, may use other communication protocols or media, e.g., an internal data bus.
In system 110, the communication interface 150 may be used to send or receive digital data. For example, system 110 may be configured to receive encrypted data items from an external computer, e.g., a data providing computer. For example, system 110 may be configured to transmit computation results to an external computer, typically, in an encrypted format. For example, communication interface 150 may be used for internal communication in system 110, e.g., to distribute the computation of multiple computation entities, e.g., computing devices.
The execution of system 110 may be implemented in a processor system, e.g., one or more processor circuits, e.g., microprocessors, examples of which are shown herein. System 110 may comprise multiple processors, which may be distributed over different locations. For example, system 110 may use cloud computing.
Some of the figures show functional units that may be functional units of the processor system. For example, a figure may be used as a blueprint of a possible functional organization of the processor system. The processor circuit(s) are not shown separate from the units in most figures. For example, the functional units shown in
For example, system 110 may be configured to receive encrypted data items from a data provider 160. At least some data items may be received in encrypted form. Some data items may be received in plain format. The computation is run on the received data items and possibly also on stored data items. Interestingly, the computation may be performed on the encrypted data, without decrypting the data, e.g., without converting encrypted data items to data in a plain format.
System 110 may be configured for an FHE scheme, e.g., for a number of FHE operations. FHE operations may include gates. For example, an FHE system may be configured for a so-called NAND-gate. For example, an FHE system may have an addition and a multiplication operation, e.g., in a finite field, or finite ring, or the like. The operations of the FHE scheme are in principle sufficient to perform a wide range of computations, with the exception that the size of the computation may be limited, e.g., if the FHE scheme is a leveled scheme without a bootstrapping operation, or without a bootstrapping operation being employed.
Typically, encrypted data in an FHE scheme and as implemented in an FHE system, involves some measure of noise. For example, encryption of a data item may comprise mapping the data item to a point in a key-dependent lattice, to which some noise is added.
When a data item has just been encrypted the noise is low—the encryption is fresh. For example, the amount of noise is so low, that if a data item were to be decrypted, the noise can be removed at some point in the decryption process, e.g., by rounding. On the other hand, the noise should be high enough to make attacks on the system sufficiently hard. For example, in the hypothetical absence of noise, many FHE schemes could be attacked with linear algebra, or other efficient algorithms, e.g., lattice-based algorithms. When a data item is encrypted, noise is added that is chosen so that attacks are hard while FHE operations can still be performed. Most FHE operations will increase the noise that is inherent in an encrypted FHE data item. When many such operations are performed, the noise will reach a level such that correct decryption is no longer possible. At that point, the scheme breaks down. Generally speaking, two approaches have been developed in the art to deal with this phenomenon. The first is a leveled FHE scheme. A leveled FHE scheme can perform some number of operations, one after the other. The leveled FHE scheme is designed such that the worst-case noise at the end of such a number of operations is below a bound needed for decryption. Another approach are so-called bootstrapping operations. A bootstrapping operation reduces noise in an encrypted data item. A bootstrapping operation is possible if the FHE scheme is capable enough to evaluate homomorphically the decryption algorithm in the encrypted domain—sometimes called a bootstrappable FHE scheme. For example, a bootstrapping operation receives helper data related to the encryption key that allows reducing the noise without decryption of the encrypted data items. Typically, the helper data is an encrypted version of the key used to decrypt the data item. Note that the decryption key may be the same as the encryption key, in case of a symmetric-key FHE scheme, or may be distinct therefrom, e.g., in case of an asymmetric-key FHE scheme. In addition to encryption and decryption keys, an FHE scheme may use other keys, such as a key for homomorphic evaluation. The latter is typically a public key corresponding to a private key which may be stored at the data provider.
Although the bootstrapping operation performs the decryption of an encrypted data item, counterintuitively the decryption is performed in an encrypted domain, so that the homomorphic decryption does not actually reveal anything about the plain data item. The bootstrapping operation then performs the noise reduction-typically by homomorphic rounding. The result is an encrypted data item, with a lower, fixed noise level. Typically, the noise present in the ciphertext resulting from bootstrapping results from the bootstrapping operation. One element of a bootstrapping operation can be a blind rotation.
After the bootstrapping, a new sequence of FHE operations can be performed until the noise level becomes so high, that a new bootstrapping operation is needed.
Determining when a bootstrapping is needed can be done by keeping track how large the noise level will be, e.g., assuming a worst-case scenario. Instead of a worst-case scenario, an average-case may be assumed, although this may increase the risk of a computation result which cannot be decrypted. For example, a computation that is inherently robust against occasional errors, such as a neural network evaluation, may be performed using average-case analysis for the noise propagation.
The noise analysis, e.g., worst-case or average-case analysis, may be done beforehand, but may also be done dynamically. The noise-increase may depend on the particular computation. For example, an FHE scalar multiplication increases noise by an amount that depends on the multiplicand. One approach is to perform a bootstrapping operation often, e.g., after every operation, or after every set number of operations, e.g., every two.
FHE schemes can be applied in many settings. For example, FHE system 110 may be operated by a cloud provider. The cloud provider may offer computation and storage services to its clients. By employing FHE encryption, data provider 160, e.g., a client of the cloud provider can send their data in encrypted form. The cloud provider can still perform the required computations, and/or the required storage, but will not be able to know the corresponding to plain data nor the result of the computation. For example, data provider 160 may use an encryption key of a type corresponding to the particular FHE scheme used in the FHE system, to encrypt the data items. When computations results are received by data provider 160 from FHE system 110, a corresponding decryption key may be used to decrypt the encrypted data items. Encryption and decryption keys may be the same—and typically are so.
For example, system 110 may be configured to train machine-learning models, e.g., image classifiers, e.g., medical models, without having access to the plain data items. For example, linear regression may be performed on the input data, possibly, even without bootstrapping. For example, backpropagation may be performed on the input data, possibly, with bootstrapping. The resulting model parameters may be returned to an entity who is in possession of the decryption key. This enables multiple providers of medical data to pool their data, by sending the data to a cloud provider. The cloud provider then returns the model parameters, without ever having access to the plain data.
After the model is trained, the FHE system 110 may be used to offer the model, say, for use with medical data. This can be done with plain model parameters or encrypted model parameters—in both cases with encrypted data, e.g., encrypted input, intermediate and output data. Using plain model parameters, is usually much more efficient. In both cases, an effect of the system is that a computation is performed, say an image classification, e.g., a medical image classification, without the computer knowing the plain data items. For example, a mammogram may be evaluated for cancer, without the image ever being in the plain at system 110 and without system 110 knowing what the outcome of the cancer evaluation is. From a privacy point of view it may be acceptable to operate a plain model on encrypted privacy sensitive data, while it might not be acceptable to operate on plain privacy sensitive data.
Other applications involve, database services, e.g., looking up encrypted data in an encrypted database; for example, the computation may be a comparison between an input item and a database item. For example, multiple computations may be combined to produce a database index that matches an index. For example, the database, may be a genomic database, and the input a gene sequence. For example, system 110 may be used for protected control of a device. For example, a device, even a large device such as a power plant, may send sensor values to system 110 and receive encrypted control signals in return; the control signals being computed from the sensor signals. An attacker of the system may be able to determine the contents of data going to and from system 110, or even gain access to intermediate data of system 110, but he will not be helped by that as the data is encrypted. Even a full break of system 110 will not reveal the data, as the decryption key is not known to system 110. Computing the control signal may involve such mathematical operation as linear algebra, averages, matrix multiplication, polynomial evaluations, and so on, all of which are possible to execute with FHE operations.
For example, a pool of encrypted data items may be maintained in the FHE system; some of these may be received some may be the result of an FHE computation, e.g., intermediate results. For example, the FHE system may be configured to apply an FHE operation to one, two or more encrypted data items in a pool, e.g., a collection of input and/or intermediate and/or output values. The result will be a new encrypted data item that may be stored in the pool. The pool may be stored in a storage of the FHE system. This may be local storage or a distributed storage. In the latter case, it may happen that one or more encrypted data items are represented multiple times in the pool. Encrypted data items may be sent from one computing device to another, e.g., if their values are needed elsewhere. The pool may be implemented in various ways, e.g., as a register file, an array, various data structure, and so on.
For example, in an FHE scheme based on the Learning With Errors (LWE) problem, e.g., such as the Torus-FHE (TFHE) scheme mentioned in the background, an encryption key may be a string of n digits si, a cipher text may be a tuple (a1, . . . , an, b) with b−Σj=1n sj·aj=μ+e. In the latter, + and · respectively represents the addition between torus elements and a product between integers and torus elements, ai are n numbers, μ is the plain data item, and e is the noise, e.g., drawn from a probability distribution, e.g., a Gaussian distribution. The torus may refer, e.g., to the set of real numbers modulo 1, or to the set of integers modulo q divided by q for some integer q. Conventionally, the secret digits s1, . . . , sn of the secret key s are bits. The inventors realized that it would be advantageous to extend this to secret digits sj which can take on more than 2 values, e.g., three values (ternary digits), four values, or even more.
This scheme naturally extends to other mathematical structures, including based on polynomials. The numbers si, ai, b, u, e may therefore be taken from a different mathematical structure. Not all encrypted data items need to be encrypted under the same key, and in fact re-encryptions with a different key is a possible FHE operation. To convert from one key to another a so-called key-switching procedure may be used, which may use so-called key-switching keys. Key-switching keys provided information how elements encrypted under a first key can be re-encrypted under a second key, without revealing either key.
The encrypted data items may represent all kinds of data. For example, encrypted data items may represent numbers that need to be averaged, or which are used for linear regression, etc. For example, the encrypted data items may represent an image. For example, each pixel of the image may correspond to one or more encrypted data items. For example, a grey-scale pixel may be represented by a grey level, which in turn may be represented by a single encrypted data item. For example, 256 grey levels may be encoded in a single encrypted data item. For example, a color pixel may be represented as multiple color levels, e.g., RGB levels, which in turn may be represented by a tuple of encrypted data items. For example, three 256-level colors may be encoded in three encrypted data items. How many encrypted data items are used to represent some type of data depends on the capacity of the FHE scheme. For example, more restrictive FHE schemes may only be capable of encoding one bit per encrypted data item. In that case, one color pixel, may require 24 encrypted data items.
Although without access to the decryption key it may not be possible to say exactly how large the noise is, one can typically bound the noise, e.g., as the initial noise level is known for a fresh encryption and the noise increase for various operations are known. Noise increase may depend on the type of operation, e.g., addition versus multiplication, and on the other parameters if any. For example, an FHE operation may be multiplication with a known, e.g., plain value, e.g., multiplication by 2, multiplication with a known polynomial, and so on. For example, multiplication with a larger value may increase the noise more than multiplication with a smaller value. Exactly how much noise increases given the operations performed can be calculated mathematically, or could be estimated empirically. While some operations may add significant amounts of noise, others may not add noise, e.g., an addition with a plain constant.
A set of FHE operations may be defined for the computation. For example, from a target FHE computation, a network or circuit of operations may be built that together implement the computation. For example, the operations may be Boolean operations. For example, the operations may all be NAND operations. The way the FHE operations are combined, e.g., which operation is applied to which operand in pool determines the computation that is being performed. For example, the computation may be represented as a list of FHE operations that are to be performed together with an indication on which FHE encrypted data item they are to be performed.
As operations are performed, the noise associated with the new computed (not-fresh) encrypted data items may grow. This is not a problem so long the noise stays within a limit needed for decryption. If more operations are to be performed, a bootstrapping operation can be performed.
The size of encrypted data items in an FHE scheme can be quite large. Moreover, the more operations an FHE scheme is to perform without a bootstrapping operation the larger the size of an encrypted data item typically will be. Likewise, a higher resistance against attacks may be obtained with larger FHE parameters and in turn with larger encrypted data items. For example, the data items may be mapped to an FHE system featuring larger FHE parameters, so that more noise can be added while still being able to successfully perform operations. Increasing the range of values that a secret key digit can take on, will increase the entropy, and thus contribute to the FHE security.
In the case of
Blind rotation may be used in a fully homomorphic encryption (FHE) system and may operate on encrypted values such as received or computed in an FHE system. The encrypted values comprise both masking values and a masked value. While working on these numbers, the system may discretize these numbers. Discretized numbers are indicated with a tilde. Discretizing is typically done since usually q>2N; this may be also needed when working on numbers that are not integers. Discretizing is not necessary though; for example, if q≤2N and numbers are integers no discretizing is needed. The masked value is almost equal to a plain value and a mask, however also some noise is typically added. The secret key s is not available in plain to the FHE system, however, to reduce noise the secret key s is available in the form of multiple bootstrapping keys. The bootstrapping keys are an encryption of multiple data items that together represent the secret key digits. Some operations, such a blind rotating or bootstrapping can use the encrypted secret key in the form of bootstrapping key to perform computation on encrypted data.
A polynomial may be blind rotated in two phases: a first phase comprising rotating over the masked value, this could be done in plain, and a second phase comprising compensating for the rotation over the masking value. The latter rotation is done while encrypted and depends on the secret key digits represented by the bootstrapping keys and the masking values. In one iteration over the secret key digits, each secret key digit and corresponding masking value is processed. Each secret key digit needs only one external multiplication. To process one or more secret key digits using a single external multiplication, first an encrypted multiplier polynomial may be constructed. The corresponding plain multiplier polynomial comprises at least a monomial (Xd) the exponent of which indicates the amount of further rotation. The encrypted multiplier polynomial is then used in an external multiplication.
There may be further monomials in the polynomial, which may either be used for further features, e.g., to reduce the number of bootstrapping keys, and/or which may be compensated for in the algorithm to update an accumulator. Preferred plain multiplier polynomials are of the form Xd−Xe, Xd−1 or Xd, though other polynomials could be accommodated. For example, the encrypted multiplier polynomial may be computed as a dot product of a sequence of bootstrapping keys for a particular secret key digit and a sequence of plain polynomials for the multiple possible values (A(i)) of the current secret key digit. For example, the possible plain multiplier polynomials may be ((XA(i)ã
The encrypted multiplier polynomial is externally multiplied with the accumulator. In the above formula, ãj represents a masking value, bsk[ ] a bootstrapping key, A(i) a possible value of the secret digit. These formulas refer to discretized values although this is not necessary.
Efficient choices for the encryptions used may be LWE or GLWE encryption for values, and/or GGSW encryption for the encrypted multiplier polynomial and/or for the bootstrapping keys are a GGSW encryption, and/or GLWE encryption for the blind rotated polynomial. For example, a plain multiplier polynomial Pj may be (XsPj
. An encrypted multiplier polynomial is an encryption of the multiplier polynomial. It is not required to have access to the plain multiplier polynomial to compute the encrypted multiplier polynomial. Note that in GGSW the encrypted multiplier polynomial may be a matrix.
It is noted however, that other choices for the encryption schemes could be used if they support external multiplication. Interestingly, only one external product per secret key digit is needed, regardless of the number of possible values of a secret key digit.
System 200 also has access to a polynomial 210, e.g., received and/or stored at system 200. Polynomial 210 may be a plain polynomial, and is to be blind rotated. The extent of the rotation is indicated by the encrypted value 231. Although polynomial 210 may be plain, after the blind rotation procedure the rotation result will be encrypted under a key unknown to system 200, i.e., the rotation is blind to system 200. Polynomial 210 could also be an encrypted polynomial, but for many applications this is not necessary.
The encrypted value 231 comprises a sequence of masking values (ai) and a masked value (b). There is a relationship between the masked value (b) and the plain value that it represents. The masked value can be computed from a mask and the plain value and the addition of noise. For example, the mask may be computable from a secret key (s) and the sequence of masking values. The secret key (s) comprising a sequence of secret key digits (si). The secret digits may be ternary digits, e.g., having possible values of −1, 0, or 1, or they could be decimal digits, e.g., having possible values of 0, 1, 2, 3, . . . , 9, etc. The random noise may initially be drawn from a noise distribution, e.g., Gaussian noise, e.g., when a fresh encryption is performed. When new encrypted values are computed as a result of computation on previous values, the noise of the new values typically depends on the noise in the input values of the computation and the nature of computation, e.g., multiplications tend to increase noise more than additions. The noise may also change due to bootstrapping operations, in which case the noise may decrease. There is a desire to keep the amount of noise within a decryption bound within which values can still be correctly decrypted.
System 200 also has access to multiple bootstrapping keys that correspond to each secret key digit, the multiple bootstrapping keys being an encryption of multiple data items representing the secret key digit. Like the encrypted values, also encryption of the bootstrapping keys is not known to system 200. Typically, the bootstrapping keys are encrypted under a different key than the encrypted values, e.g., a key s and a key s′ respectively.
The structure of the encrypted values can be exploited to perform the blind rotation. An accumulator may be initialized with polynomial 210 rotated over the masked value in encrypted value 231. An accumulator initiation unit may be configured to perform this task. This part of the rotation is blind by virtue that the masked value is blind, e.g., corresponds to a plain value unknown to system 200. The accumulator is now rotated in the other direction with the masking value, to leave the blind rotated polynomials. The latter may be done by rotating over amounts indicated by the masking values and the secret digits. Typically, this amount is the product of the masking value and the corresponding secret key digit.
The masking values are known to system 200, the secret digits are known in encrypted form as bootstrapping keys 232. A multiplier polynomial unit uses the masking values and the bootstrapping keys 232 to produce an encrypted multiplier polynomial. The encrypted multiplier polynomial is used to cause a rotation over the amount indicated by the masking value and the secret digits. Interestingly, the encrypted multiplier polynomial is computed in an encryption domain that allows computation of the multiplier polynomial while encrypted. For example, such an encryption domain might support addition and multiplication of a plain polynomial and an encrypted polynomial. As the bootstrapping keys are encryptions of polynomials of degree 0, this in effect allows the construction of an encrypted multiplier polynomial that represents the rotation. For example, the encrypted multiplier polynomial P
may be computed by a multiplier polynomial unit. For example, the encrypted multiplier polynomial
P
may be an encryption of a polynomial P of the form Xa
P
may be done by computing the plain multiplier polynomial for all possible values of the secret key digit, and using the bootstrapping key to select the correct one and produce it encrypted form. For example, if a bootstrapping key bsk is an encryption of sj with sj 0 or 1, then (Xa
In system 200 various encrypted objects occur, e.g., encrypted values, such as value 231, bootstrapping keys 232, accumulator 234, multiplier polynomial 233, and so on. Although these could all be encrypted under the same secret key, e.g., a key known to a client of system 200, e.g., a data provider system 160, it may be easier to use different encryption schemes and different keys to optimize the various steps. An example of such a system is provided below in
For example, embodiments may be implemented in the context of FHE scheme described in the paper “Programmable Bootstrapping Enables Efficient Homomorphic Inference of Deep Neural Networks” by Ilaria Chillotti, Marc Joye and Pascal Paillier, see Cryptology ePrint Archive: Report 2021/091. This reference uses secret key digits that can only assume two values; using embodiments herein the described scheme may be implemented using secret key digits that can assume more than two values without increasing the number of external multiplications.
The secret digits 311-313 can assume more than two values. In the example illustrated in
For example, the bootstrapping keys for a particular secret key digit may encrypt binary values, e.g., bits, indicating whether the secret key digit (sj) has a value corresponding to the bootstrapping key. For example, a bootstrapping key bskj(i) for secret key digit sj may encrypt a 0 or 1 depending on whether sj is equal to the i-th possible value, e.g., is equal to A(i). Using bits, a preferred way of encoding one possible value, encode a 0 for all other values. In this way, the number of bootstrapping keys for a secret key digit is one less than the number of possible values of the secret key digits, while still allowing efficient computation of encrypted multiplier polynomials. For example, the bootstrapping keys may encode for a zero value by not indicating any other value for the secret key digit. For example, one, e.g., a client, may compute the bootstrapping key using the following pseudo code:
In the above code bskj(0), . . . , bskj(m−1) are the bootstrapping keys for secret key digit sj. A( ) denotes the possible values of a secret key digit, and m the number of possible values. Note that this uses as many bootstrapping keys are there are possible value, which is not preferred—for example one might skip bskj(0). An alternative notation for the bootstrapping key is to arrange them in a single array, e.g., bsk [ ]
To obtain the masked value, in addition to combining masking value and plain value—some noise will also be incorporated to avoid a linear relationship. Encrypted values will typically either be obtained from outside system 201, or they will be the result of computations on system 201, e.g., output values or intermediate results. For example, the encryption of value 231 may be a so-called learning with error encryption (LWE) encryption.
A polynomial 210 is stored in system 201. Note that polynomial 210 need not be encrypted. This is indicated in
To rotate polynomial 210, an accumulator may be initialized, e.g., by an accumulator initiation unit 221. The accumulator may hold the intermediate result of rotating polynomial 210. Note that the accumulator 234 may be encrypted in a different manner as encrypted value 231. This type of encryption is indicated by a G, for ‘general’. This may be a similar type of encryption as encrypted value 231, except with polynomials instead of with values. The G type of encryption could use the same key and the same number of masking polynomials as the number of masking values, but this is not necessary.
For example, instead of masking values, a masked value, and a masking values, these may all three be polynomials. For example, these may be GLWE values. Note that the key with which accumulator 234 is encrypted may also be different from the key used by the encrypted values, e.g., s′ rather than s—both unknown to system 201. In fact, a key for GLWE values may use polynomials with binary coefficient instead of bits.
For example, the accumulator 234 may be initiated as (ACC←(0, . . . ,0,X−{tilde over (b)}·). The sequence of 0's represents the masking values. As the masking values are zero, in this case, it does not yet matter what key is used. The term X−{tilde over (b)}·
represents rotation over −{tilde over (b)}; it is computed, e.g., modulo XN+1. Here N−1 is the largest exponent used in polynomial 210. The rotation may be direct over the masked value b, but is may also be over a discretized version −{tilde over (b)}. This may for example be preferred if the number of exponents does not support the full size of b.
The rotation over the masked value, comprises a rotation of the plain value but also over the mask. The latter rotation is reverted in several iterations over the masking values. In each iteration, the accumulator is rotated for one more secret digits/masking values. For example, in an embodiment, at the beginning and end of each iteration the accumulator comprises an encryption of polynomial 210 rotated over some number of places. This may be done as follows. In an iteration, an encrypted multiplier polynomial 233 is computed. Multiplication with the encrypted multiplier polynomial is used to rotate the accumulator. However, as the encrypted multiplier polynomial 233 is encrypted, it is not known to system 201 over how many places this is done. To facilitate the multiplication, the encryption of polynomial 233 may use an encryption scheme that facilitates such multiplication. In particular one can make use of a so-called external multiplication, in which one operand is a polynomial encrypted as usual, e.g., as the accumulator while the other exponent is encrypted in a special manner. This is indicated in
After the construction of the encrypted multiplier polynomial P, it may be used to rotate the accumulator. Different options are possible. For example, one may arrange that P is equal to an encryption of a monomial, e.g., P(X)=Xs
For example, one may arrange that P is equal to a monomial minus 1, e.g., P(X)=Xs
Thus, the blind rotation over an encrypted value 231, e.g., an encryption of the value μ, which may be a masking of a value {tilde over (μ)}*, e.g., a scaled and noisy version of μ, may be split-up over a rotation over the masked value—which can be done in plain, and further blind rotations indicated by the current secret key digit (sj) and the corresponding masking value (ãj). The latter series of further blind rotations correct the initial rotation of the masked value, removing the mask and obtaining the correct rotated value, although in encrypted form. The series of iterations are then done in encrypted form, using homomorphic operations. Note that the encrypted value {tilde over (μ)}* may be discretized (as indicated by the tilde) or contain noise (as indicated by the star)
Note that one could correct for multiple masking values and secret digit combinations in one iteration, e.g., by including the monomial
for two or more pairs of corresponding secret digit and masking value. If another combination function is chosen than multiplication, then a combination function may be included, e.g., g(sj, ãj), etc. The combination function could, say, be xor.
In yet a further variant, the multiplier polynomial could have more than one monomial. For example, the plain multiplier polynomial may be of the form Xe
Constructing the multiplier polynomial is done while encrypted. The details of constructing the multiplier polynomial depends on the particular encryption domain chosen, e.g., the particular set of algorithms for encrypting, decrypting, combining, and so on. Typically, constructing the encrypted multiplier polynomial is done on system 201, e.g., as the masking values may change depending on the run. For example, constructing the encrypted multiplier polynomial may use as input on the one hand, the masking value(s) that are corrected for in a particular iteration, these may be obtained from a storage on system 201, and bootstrapping keys that provide encrypted data items that together determine the particular value of a secret key digit or digits. For example, one approach is to compute the plain multiplier polynomial for all possible values of the secret key digit or digits(s) and use the bootstrapping keys to select the right one; the former may be done in plain while the latter is done under cover of encryption.
For example, in one possible construction one can generate all plain multiplier polynomials for all the possible values of a particular secret digit and a particular masking value (possibly discretized). The multiple plain multiplier polynomials can then be selected into a single encrypted multiplier polynomial using the bootstrapping keys to select under encryption. For example, in one possible choice for the multiplier polynomial, one can generate all plain polynomials, e.g., (XA(i)ã
An interesting side effect of the multiplication of the type (XA(i)ã
Finally, the encrypted multiplier polynomial 233 is an encryption of a polynomial comprising a monomial Xe to rotate the accumulator 234 over e steps. For example, the encrypted multiplier polynomial 233 may be an encryption of Xe−1 or Xe+1 or Xe, Xe−Xd and so on. Interestingly, the encrypted multiplier polynomial 233 is in an encryption domain suitable for the multiplication, e.g., the external domain, while the accumulator may be in the general domain for general encryption of polynomials.
System 201 may be configured to update the accumulator, e.g., using an accumulator updating unit 223. For example, the accumulator updating unit 223 may multiply the encrypted polynomial multiplier with the accumulator. The latter may be done using an external multiplication, e.g., using an external multiplier 224. The external multiplier being external in the sense that it implements a so-called external multiplication, e.g., external to the encryption domain of accumulator 234 or value 231. The encrypted multiplier polynomial 233 may perform further steps, such as an addition of the accumulator to the external multiplication result. The inputs to the external multiplication may thus be an encrypted multiplier polynomial (P
) encrypted in the external encryption domain and an accumulator encrypted in the general encryption domain. The result of the external multiplication is in the general encryption domain. If the external multiplier polynomial is in a different encryption domain and uses a different key, say s′, then the external multiplication may include a key switching step to go back to the key s. The key switching may include key-switching keys, which may be provided by the client, e.g., data provider 160. For example, the encrypted multiplier polynomial may be a GGSW encryption, and the blind rotated polynomials, e.g., the accumulator, may be GLWE encryption. As a side effect of blind rotation may be a switch from the key used to encrypt values to the key used to encrypt the bootstrapping keys, a key switch may be employed after a blind rotation as well.
Interestingly, in an iteration only one external multiplication is needed. The number of external multiplications is moreover independent of the number of possible values of the secret digits and of the number of bootstrapping keys that are used. In fact, in an embodiment, one external multiplication is used for each secret key digit. The number of external multiplications could be further reduced, for example by handling multiple secret digits in one iteration. The latter may come at a cost of more bootstrapping keys, while decreasing the number of external multiplications. For example, for a ternary key, one could use 2=(31−1) bootstrapping keys per secret digit, and one external multiplication per secret digit. However, one could also use 8=32−1 bootstrapping keys and one external multiplication per two secret key digits; that is twice the number of bootstrapping keys but half the number of external multiplications.
After multiplication with X−{tilde over (μ)}* the coefficient corresponding to the exponent {tilde over (μ)}* has become the constant term. The constant term is indicated at the right, after blind rotation, with arrow 412. Note that the rotation itself is performed while encrypted. The rotated end result is an encrypted polynomial as well. By selecting, also known as sampling, the constant term one obtains an encryption of the function defined by the test polynomial, e.g., the bootstrapping. It is not necessary that the blind rotation and test polynomial are configured such that the desired outcome is obtained at the constant term, instead one could pick any fixed position in the coefficients and blind rotate such that the desired outcome is obtained at the fixed position.
Function evaluation can for example be used to implement a multiplication from a squaring operation. Consider a test polynomial in which the coefficients represent the square of the exponents; possibly also a noise reduction may be introduced in the coefficient as well. This test polynomial can be used as indicated herein to square a value. To multiply two numbers x and y, e.g., encrypted values, e.g., values such as value 231, e.g., LWE values one can compute the product as (x+y)2−x2−y2 and divide by two, or as
etc. The divisions by 4 can be incorporated in the squaring. Division by 2 can be implemented as programmable bootstrapping as well.
For example, the FHE systems 110, 111-113, 200 and 201 may comprise a communication interface. The communication interfaces may be selected from various alternatives. For example, the interface may be a network interface to a local or wide area network, e.g., the Internet, a storage interface to an internal or external data storage, a keyboard, an application interface (API), etc. In particular, the communication interface may be configured to connect to a computer network. The communication interface may be used to receive a digital data set. The data set may comprise data items, e.g., parameters, values and the like on which computations are to be performed by the FHE system. The data set may comprise instructions, e.g., instructions indicating which FHE operations are to be performed. A data set may comprise both data items and instructions but this is not necessary. For example, in a first embodiment the FHE may be configured with an FHE program, e.g., a sequence of FHE operations possibly together with control commands. The configured FHE program may be executed on data received in the data set. For example, the data set may comprise encrypted sensor values, e.g., obtained from a sensor. For example, the data set may comprise auxiliary data configured to improve the FHE system, e.g., bootstrapping keys, e.g., to decrease noise build up, e.g., switch keys, to switch keys, and so on. Part of the data items may be in plain format, although this is not necessary. Operations on plain data can be performed much more efficiently. It is not unusual that data is a mix of, say, privacy sensitive information, and data which is not privacy sensitive. For example, the data set may on the one hand comprise medical information pertaining to some individual, and on the other hand thresholds against which the medical information needs to be evaluated. In an embodiment, the thresholds may be communicated plain while the medical information is encrypted.
For example, in a second embodiment, the FHE system may be configured with data e.g., a sequence of test values, while the operations to be performed on them are communicated in a data set. In a third embodiment, the FHE system may receive both data items and instructions in the data set.
An FHE system may have a user interface, which may include well-known elements such as one or more buttons, a keyboard, display, touch screen, etc. The user interface may be arranged for accommodating user interaction for configuring the systems, applying the system to new data, etc. Storage may be implemented as an electronic memory, say a flash memory, or magnetic memory, say hard disk or the like. Storage may comprise multiple discrete memories together making up the storage. Storage may comprise a temporary memory, say a RAM. The storage may be cloud storage.
The systems, e.g., system 110, 200, and 201, may be implemented in a single device. Typically, the system comprises one or more microprocessors which execute appropriate software stored at the system; for example, that software may have been downloaded and/or stored in a corresponding memory, e.g., a volatile memory such as RAM or a non-volatile memory such as Flash. Alternatively, the systems may, in whole or in part, be implemented in programmable logic, e.g., as field-programmable gate array (FPGA). The systems may be implemented, in whole or in part, as a so-called application-specific integrated circuit (ASIC), e.g., an integrated circuit (IC) customized for their particular use. For example, the circuits may be implemented in CMOS, e.g., using a hardware description language such as Verilog, VHDL, etc. In particular, the systems may comprise circuits for the evaluation of cryptographic primitives.
A processor circuit may be implemented in a distributed fashion, e.g., as multiple sub-processor circuits. A storage may be distributed over multiple distributed sub-storages. Part or all of the memory may be an electronic memory, magnetic memory, etc. For example, the storage may have volatile and a non-volatile part. Part of the storage may be read-only.
Below several further optional refinements, details, and embodiments are illustrated.
Define N[X]=(
/q
)[X]/(XN+1) where q and N are powers of 2. Define also the binary set
={0,1} and
N[X]=
[X]/(XN+1). For a secret key
+
N [X]k, the
N[X] is given by
)∈
N[X]k+1 where āj
N[X] and
=Σj=1k
j āj+
(
N [X]=
/q
and the above procedure leads to an
/q
)n+1 as the encryption of a plaintext
/q
under the secret key s=(s1, . . . , sn)∈
n, where āj
/q
and
Bootstrapping may comprise a so-called blind rotation. It converts an /q
)n+1 into
(X−{tilde over (μ)}·
)∈
N [X]k+1; namely, a
under key
∈
N[X]k, where {tilde over (μ)}* is a discretized value of
is a test polynomial. Specifically, if
and the test polynomial is programmed as a look-up table so that X−{tilde over (μ)}*·
, up to drift, encodes ƒ(
(sj) for 1≤j≤n.
)
· ACC)
(
) · ACC) */
The blind rotation can be calculated as a series of CMux operations. On input a encrypting a bit b∈{0,1} and two
where denotes the external product of ciphertexts. It can be verified that at the end of the loop the accumulator ACC contains a
under key
. Conventional FHE systems are inherently restricted to binary keys. Algorithm 1 above is algorithm 4 in the paper “TFHE: Fast Fully Homomorphic Encryption over the Torus” by Ilaria Chillotti, Nicolas Gama, Mariya Georgieva, and Malika Izabachène, included herein by reference. The inventors found that if algorithm 1 were extended to, say, ternary keys, then of
would involve 2n external products. For a same value of n, this is twice more than in the binary case. This corresponds almost to a doubling of the workload. It would be advantageous if the range of secret key digits could be extended without incurring a penalty in the form of the number of external products.
In an embodiment, blind rotation for ternary keys can be largely improved. It is observed that the monomial Xs(sji) for all 1≤j≤n and for all 1≤i≤2. An application of the
Accordingly, the following exemplifying embodiment A may be described as follows:
)
) bsk[2j − 1] + (
) bsk[2j])
ACC
Interestingly, the calculation of a blind rotation with ternary keys in embodiment A only requires n external products for a secret key with n ternary digits. The inventors realized this approach may be used for digits allowing more than 3 values. In fact, the proposed approach can be adapted to support arbitrary formats of keys.
For full generality, we suppose that the keys are drawn from an arbitrary set (e.g.,
={0,1, −1} for ternary keys). We let m=#
denote the cardinality of
. The monomial Xs
Herein, the predicate function 1 is defined as: 1{t=sj}=1 when t=sj and 1{t=sj}=0 otherwise. Define the set I={0, . . . , m−1}. The alphabet may be defined as a vector A∈ whose components are the different elements of
. For example, for ternary keys one might have m=3 and write A=(0,1, −1) so that A[0]=0, A[1]=1 and A[2]=−1. Vector A gives rise to a function: A: I→
, i
A(i)=A[i], taking on as input an index i∈I and returning the ith component of A, e.g., starting at i=0. One may therefore write
Denoting with τ0=A[0]=A(0) a first digit in the alphabet, one may write:
Compared to the previous expression for Xs
Hence, defining n(m−1) bootstrapping keys bsk[(m−1)(j−1)+i]←(σj,t) where σj,t=1{t=sj} and with t=A(i), for all 1≤j≤n and for all 1≤≤i m−1, one obtains the algorithm below. Surprisingly, the number of external products remains equal to n—the number of secret digits. For a given security level, we note the value of n is a decreasing function of m.
·
)
Choosing one of the possible values of the secret digits to be 0, one obtains the following optimization:
·
)
ACC
A reduction in the number of external multiplications can be obtained by processing multiple digits of the secret key concurrently. Below this is detailed for two secret key digits. As shown above, the monomial Xs
with σj,t=1{t=sj}. With two digits, this generalized to
Which, for τ0=0, may simplify to:
More generally, for d digits, one gets:
To ease the presentation, we henceforth assume that d|n. We can write
bootstrapping keys as
with (t1, . . . , td)=(A(i1), . . . , A(id)), for all 1≤h≤n/d and for all (i1, . . . , id)∈{0, . . . , m−1}d with (i1, . . . , id)≠(0, . . . , 0). The number of external products decreases to n/d.
)
)
Embodiment C2 assumes that one of the possible values of a secret key digit is 0, e.g., τ0=0. This it is not necessary though. In embodiment C1 and C2, d secret digits are processed in one iteration, e.g., with one external multiplication. It is not needed that the processed digits are consecutive. For example, d may be 2 or more, 3 or more, etc.
An encrypted value may use a sequence of n masking values (ai). To mask the plain value also some noise is also added with noise parameter σ. The encryption is also sometimes referred to as a noisy encryption. Some possible values for n and σ are as follows:
The above numbers may be used in an LWE encryption. The values are suggestions for an acceptable combination of performance, security, and reliability. Specific embodiments with specific requirements regarding, e.g., performance, security, and failure risk may want to choose, e.g., a lower n for higher performance; a higher n and/or a higher σ for higher security; and a lower σ for higher reliability. GLWE can use similar numbers, noting that GLWE encryption uses polynomials.
A secret digits has more than two possible values. Suggestions include ternary digits, e.g., having digits −1, 0, 1; In an embodiment, the possible values of a secret digit are balanced around zero, for example for some integer h, a secret digit may have the following values: {−h, −h+1, . . . , 0, 1, . . . , h−1, h}. For example, one may set h to 1, or 2, or 3, etc. Typically, all secret digits are allowed to have the same number of possible values, although this is not necessary. Balanced possible values have the advantage that they lead to a lower increase of noise during FHE operations.
A value of secret key can be encoded by multiple data items representing the secret key digit. A good choice for the multiple data items are bits. The multiple data items may be implemented as a vector of 0 bits and at most one 1; the 1 indicating the value of the secret key digits. Encrypting the elements of the vectors provides bootstrapping keys.
For completeness, a possible implementation of some FHE operations, including an external multiplication is given below. FHE enables directly performing operations on ciphertexts. Depending on the type of operation, the resulting noise level increases more or less.
(
(
N[X]k+1 be the respective encryptions of plaintexts
N [X]; i.e.,
is a N [X], provided that the resulting noise ē3=ē1+ē2 remains small.
By extension, ≥0 and
(
) with
=Σj=1k
jāj+
is an encryption of K·N[X], provided that K·ē keeps small. If K<0 then K·
∈
N[X] then
·
·μ∈
N[X], provided that
·ē keeps small.
With the previous GLWE notation, let parameters B=2β and with β,
≥1 and such that
β≤Ω where Ω denotes the bit-precision; q=2Ω. Define also the vector g=(2Ω-β, 2Ω-2β, . . . ,
). The
∈
N[X] with respect to a
∈
N[X]k is defined as
where
is a matrix containing on each row a fresh
is the so-called gadget matrix, with Ik+1 the identity matrix of size k+1. It is worth noting that any element d in /q
, viewed as an integer in
can always be approximated by a signed-digit radix-B expansion of size as
where g−1(d):=(d1, . . . , d)∈
with digits
and with an approximation error that is bounded by |g−1 (d) gT−d|≤q/()=
By extension, for a polynomial =p0+ . . . +pN−1 XN−1∈
N[X] whose coefficients are viewed as integers in
the decomposition g−1()∈
N[X]
is defined as g−1(
)=Σj=0N−1 g−1(pj)Xj. Clearly, it holds that ∥g−1(
)gτ−
∥∞≤
. Finally, for a vector of k+1 polynomials,
=(
1, . . . ,
k+1)∈
N[X]k+1, the decomposition G−1(
)∈
N[X
is defined as G−1(
)=(g−1(
), . . . , g−1(
)) and ∥G−1 (
)G2pt−
∥∞≤
.
Interestingly, the gadget decomposition of 1∈
N [X] and μ2∈
N [X], if
←
(
1) and
, is given by
A little algebra shows that
is a 1μ2∈
N[X], provided that the resulting noise (including the approximation error) keeps small.
Starting from the external product, a new leveled operation can be defined: the ‘controlled’ multiplexer or CMux. A CMux acts as a selector according to a bit—but over encrypted data. It takes as input two 0 and
1∈
N [X], and a
encrypting a bit b. The result is a
b, provided that the resulting noise keeps small. The CMux gate is given by:
It can be used for homomorphic computations and, especially, inside bootstrapping.
At the end of the loop of embodiments, A, B1, B2, and C, ACC contains a under key
′. Indeed, let c′j denote the value of the accumulator ACC at iteration i=j; namely,
As a consequence, letting
for some polynomial ∈
N [X] whose constant term is
:=X−{tilde over (μ)}*·
=ū0+ū1 X+ . . . +ūN−1 XN−1 where ū0=
=X−{tilde over (μ)}*·
as a
In more detail, let =(
1, . . . ,
k)∈
N [X]k with
j=s′j,0+ . . . +s′j,N−1 XN−1 for 1≤j≤k. Parsing
(
)∈
N[X]k as (ā′1, . . . , ā′k,
) with ā′j=ā′j,0+ . . . +ā′j,N−1 XN−1 for 1≤j≤k and
=
/q
)kN+1 is a
kN where s′l+1+(j−1)N:=s′j,l for 1≤j≤k and 0≤l≤N−1.
If desired, a key switch be performed. This may be done, for example, to switch back to the original key if the blind rotation caused a key switch. For example, with the above procedure, input ciphertext c←/q
)n+1 and resulting output ciphertext
/q
)kN+1 both encrypt plaintext
In order to convert
for all 1≤i≤kN and 1≤i≤ks for some parameters B:=Bks and
:=
ks defining a gadget decomposition. On input
/q
)kN+1 under the key s′=(s1, . . . , skN)∈
,
∈(»/q»)n+1 where (ā′i,1, . . . , )=g−1 (ā′i) is a
More details on bootstrapping, programmable bootstrapping, and their application to the homomorphic evaluation of neural networks can be found in “Programmable Bootstrapping Enables Efficient Homomorphic Inference of Deep Neural Networks”, cited above and included herein by reference.
Receiving 510 encrypted values. For example, the encrypted values may be received over a communication interface such as a communication interface for a computer network. Encrypted values may represent all kinds of data, in particular they may represent technical data, e.g., sensor values obtained from a value. FHE operations may be performed on the encrypted values that are received. In addition, FHE operations may be performed on other encrypted values, e.g., intermediate results, or previously stored value and the like.
Also received are auxiliary FHE data, the auxiliary data may be encrypted with the same key as the encrypted values and may be used to perform or optimize, etc., the FHE operations. In particular, bootstrapping keys are received.
The blind rotation selectively rotates coefficients of a polynomial as indicated by an encrypted value. For example, a blind rotation may be regarded as a multiplication of the type X−u f(X) modulo a polynomial—typically modulo XN+1, wherein f is a polynomial and u is a value, except that the value u is only available in encrypted form. The output of the blind rotation is also encrypted. The method comprises rotating 520 the polynomial over the masked value in the encrypted value and iterating 530 over the secret key digits. For example, part 530 may implement such control flow operations as “For j=1 to n do”—in case the iteration is over each secret digit individually, or “For j=1 to n/d do”—in case iterations take some digits together.
An iteration may use an external multiplication 544 with an encrypted multiplier polynomial to implement an iteration. For example, in computing part 542 an encrypted multiplier polynomial is constructed from the bootstrapping keys and the masking values. The external multiplication 544 may also comprise other arithmetic operations, e.g., an addition, as in an embodiment.
Many different ways of executing the method are possible, as will be apparent to a person skilled in the art. For example, the order of the steps can be performed in the shown order, but the order of the steps can be varied or some steps may be executed in parallel. Moreover, in between steps other method steps may be inserted. The inserted steps may represent refinements of the method such as described herein, or may be unrelated to the method. For example, some steps may be executed, at least partially, in parallel. Moreover, a given step may not have finished completely before a next step is started.
Embodiments of the method may be executed using software, which comprises instructions for causing a processor system to perform method 500. Software may only include those steps taken by a particular sub-entity of the system. The software may be stored in a suitable storage medium, such as a hard disk, a floppy, a memory, an optical disc, etc. The software may be sent as a signal along a wire, or wireless, or using a data network, e.g., the Internet. The software may be made available for download and/or for remote usage on a server. Embodiments of the method may be executed using a bitstream arranged to configure programmable logic, e.g., a field-programmable gate array (FPGA), to perform the method.
It will be appreciated that the presently disclosed subject matter also extends to computer programs, particularly computer programs on or in a carrier, adapted for putting the presently disclosed subject matter into practice. The program may be in the form of source code, object code, a code intermediate source, and object code such as partially compiled form, or in any other form suitable for use in the implementation of an embodiment of the method. An embodiment relating to a computer program product comprises computer executable instructions corresponding to each of the processing steps of at least one of the methods set forth. These instructions may be subdivided into subroutines and/or be stored in one or more files that may be linked statically or dynamically. Another embodiment relating to a computer program product comprises computer executable instructions corresponding to each of the devices, units and/or parts of at least one of the systems and/or products set forth.
Processor 1120, memory 1122, dedicated IC 1124 and communication element 1126 may be connected to each other via an interconnect 1130, say a bus. The processor system 1110 may be arranged for contact and/or contact-less communication, using an antenna and/or connectors, respectively.
For example, in an embodiment, processor system 1140, e.g., the FHE system or device may comprise a processor circuit and a memory circuit, the processor being arranged to execute software stored in the memory circuit. For example, the processor circuit may be an Intel Core i7 processor, ARM Cortex-R8, etc. In an embodiment, the processor circuit may be ARM Cortex MO. The memory circuit may be an ROM circuit, or a non-volatile memory, e.g., a flash memory. The memory circuit may be a volatile memory, e.g., an SRAM memory. In the latter case, the device may comprise a non-volatile software interface, e.g., a hard drive, a network interface, etc., arranged for providing the software.
While device 1110 is shown as including one of each described component, the various components may be duplicated in various embodiments. For example, the processor 1120 may include multiple microprocessors that are configured to independently execute the methods described herein or are configured to perform steps or subroutines of the methods described herein such that the multiple processors cooperate to achieve the functionality described herein. Further, where the device 1110 is implemented in a cloud computing system, the various hardware components may belong to separate physical systems. For example, the processor 1120 may include a first processor in a first server and a second processor in a second server.
The following numbered clauses include embodiments that are contemplated and nonlimiting.
It should be noted that the above-mentioned embodiments illustrate rather than limit the presently disclosed subject matter, and that those skilled in the art will be able to design many alternative embodiments.
In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. Use of the verb ‘comprise’ and its conjugations does not exclude the presence of elements or steps other than those stated in a claim. The article ‘a’ or ‘an’ preceding an element does not exclude the presence of a plurality of such elements. Expressions such as “at least one of” when preceding a list of elements represent a selection of all or of any subset of elements from the list. For example, the expression, “at least one of A, B, and C” should be understood as including only A, only B, only C, both A and B, both A and C, both B and C, or all of A, B, and C. The presently disclosed subject matter may be implemented by hardware comprising several distinct elements, and by a suitably programmed computer. In the device claim enumerating several parts, several of these parts may be embodied by one and the same item of hardware. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage.
In the claims references in parentheses refer to reference signs in drawings of exemplifying embodiments or to formulas of embodiments, thus increasing the intelligibility of the claim. These references shall not be construed as limiting the claim.
Number | Date | Country | Kind |
---|---|---|---|
21290025.2 | May 2021 | EP | regional |
21197775.6 | Sep 2021 | EP | regional |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/EP2022/060745 | 4/22/2022 | WO |