Encrypted Scalar Multiplication
By using a balanced radix decomposition that includes both positive and negative base halves in scalar multiplication, the noise issue in homomorphic encryption is mitigated, allowing for increased computational efficiency and reduced need for bootstrapping.
Patent Information
- Application Number
- JP2023552030
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-02-26
- Filing Date
- 2022-02-15
- Publication Date
- 2024-10-31
- Estimated Expiration
- 2042-02-15
AI Technical Summary
Homomorphic encryption schemes face challenges in managing noise accumulation during scalar multiplication, particularly in leveled and unleveled encryption, limiting the number of operations that can be performed before bootstrapping is necessary, especially in key switching operations.
A method for determining a set of coefficients for radix decomposition that ensures both positive and negative base halves are used in scalar multiplication, reducing noise and allowing more operations before bootstrapping, by ensuring that subsequent digits in the decomposition are not equal to half the base in absolute value.
This approach reduces noise in homomorphic scalar multiplications, enabling more computations to be performed before bootstrapping, thereby enhancing the efficiency and performance of homomorphic encryption systems.
Smart Images

Figure 0007576713000088 
Figure 0007576713000089 
Figure 0007576713000090
Abstract
Description
[Technical field]
[0001] The subject matter of this disclosure relates to computer-implemented methods for determining a set of coefficients for use by encrypted multiplication; use of such methods for key switching and compiling calculations; devices for determining the set of coefficients, and computer-readable media. [Background technology]
[0002] Homomorphic encryption allows computations, such as circuit evaluation, to be performed on encrypted data without the ability to decrypt it. For example, input data and computation results may be received and returned in encrypted form. Intermediate data, such as the internal state of a computation, may also be in encrypted form.
[0003] The results of the computation are returned in encrypted form, but when decrypted, the output is the same as if the operation had been performed on unencrypted data. Homomorphic encryption can be used for privacy-preserving outsourced storage and computation, allowing data to be encrypted and outsourced to a cloud environment for processing and / or storage, all while remaining encrypted.
[0004] For example, homomorphic encryption can be applied in fields such as healthcare, where privacy regulations may make sharing plain data difficult, but computation of encrypted medical data may be acceptable. For example, to classify medical data, the developed medical model may be configured to receive medical data from a third party, e.g., a hospital, in encrypted form. The medical model may classify the 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 can be applied to the medical data received in encrypted form. This means that the party providing the medical model does not have access to the plain medical data corresponding to the encrypted medical data. Users of the service can decrypt the results of the medical model application.
[0005] Various popular homomorphic encryption schemes make use of noise: for example, encryption of a data item may involve mapping the data item to a point in a key-dependent lattice to which some noise is added.
[0006] When a data item has just been encrypted, the noise is low and the encryption is fresh. For example, if the amount of noise is so low that the data item is decrypted, the noise can be removed at some point in the decryption process, for example by rounding. On the other hand, the noise needs to be high enough to make attacks on the system sufficiently difficult. For example, if noise were hypothetically absent, many homomorphic encryption schemes could be attacked with linear algebra, or other efficient algorithms, for example lattice-based algorithms. Once a data item is encrypted, homomorphic operations can still be performed, but noise chosen to be difficult to attack is added. Most homomorphic operations increase the noise inherent in the encrypted homomorphically encrypted data item. After many such operations are performed, the noise can reach a level where a unique decryption is no longer possible. At that point, the scheme breaks down.
[0007] Generally speaking, two approaches have been developed in the art to address this phenomenon. The first is levelled homomorphic encryption. Levelled homomorphic encryption allows several operations to be performed one after the other. Levelled homomorphic encryption is designed such that the expected or worst case noise at the end of several such operations is below the bounds required for correct decryption, or in any case only limited deviations to the decrypted plaintext occur. Thus, there is a limit to the number of operations that can be performed.
[0008] Another approach is the so-called bootstrapping operation. A bootstrapping operation is possible if the homomorphic encryption is strong enough to homomorphically evaluate the decryption algorithm in the encrypted domain, and such homomorphic encryption is also called bootstrappable homomorphic encryption. A leveled homomorphic encryption scheme can be converted to a non-leveled homomorphic encryption scheme by performing a bootstrapping operation. A bootstrapping operation reduces the noise of the encrypted data items. A bootstrapping operation can reduce the noise of the ciphertext to a fixed amount. A bootstrapping operation increases the number of operations beyond those that can be performed on the encrypted data items, or removes the restriction entirely. If operations are performed and the expected or worst-case noise of the ciphertext approaches a level where unique decryption is no longer possible, bootstrapping is used to reduce the noise. Bootstrapping is usually computationally expensive; therefore, it is advantageous to reduce the number of times it is done.
[0009] There is a need to reduce the noise increase in the ciphertext caused by homomorphic operations in homomorphic encryption schemes. When using leveled homomorphic encryption, the noise increase due to homomorphic operations limits what further operations can be performed on the ciphertext. When using non-leveled homomorphic encryption, the noise increase limits what further operations can be performed before a bootstrapping operation is required. In either case, if a certain probability or degree of decryption error is allowed, this probability and size of the decryption error increases with increasing noise.
[0010] It is particularly important to reduce the noise increase due to scalar multiplication, e.g., the multiplication of an encrypted value by a known integer. This is a common operation in homomorphic computation, e.g., applying a neural network to an encrypted input. Furthermore, scalar multiplication is an important operation in key switching, e.g., in converting homomorphic encryption under a source encryption key to homomorphic encryption under a target encryption key. Key switching is often done as part of bootstrapping.
[0011] In the context of key switching, Ilaria Chillotti, Nicolas Gama, Mariya Georgieva, and Malika Izabachene, "TFHE: Fast fully homomorphic encryption over the torus," Journal of Cryptology, 33(1):34-91, 2020 (incorporated herein by reference), discloses encryption of key bits multiplied by a scalar value based on a radix decomposition of the scalar value, in this case a binary decomposition of radix 2. The scalar value is written as a linear combination of powers of the radix. The encrypted key bits are represented by multiplying the respective ciphertexts that encrypt the key bits by the respective powers of the radix. The encryption of the key bits multiplied by the scalar value is obtained by homomorphically computing a linear combination of the respective ciphertexts according to a set of coefficients. Thus, multiplications with a single large scalar value are effectively replaced by respective multiplications with smaller scalars. An adaptation of this larger-radix key-switching technique is provided in "Programmable Bootstrapping Enables Efficient Homomorphic Inference of Deep Neural Networks" by I. Chillotti et al., which is incorporated by reference herein and available at https: / / eprint.iacr.org / 2021 / 091 / 20210127:133406. [Prior art documents] [Non-patent literature]
[0012] [Non-Patent Document 1] Ilaria Chillotti, Nicolas Gama, Mariya Georgieva, and Malika Izabachene, "TFHE: Fast fully homomorphic encryption over the torus," Journal of Cryptology, 33(1):34-91, 2020 [Non-Patent Document 2] I. Chilotti et al., “Programmable Bootstrapping Enables Efficient Homomorphic Inference of Deep Neural Networks” (https: / / eprint.iacr.org / 2021 / 091 / 20210127:133406) Summary of the Invention [Means for solving the problem]
[0013] According to one aspect of the invention, there is provided a computer-implemented method for determining a set of coefficients for use by a cryptographic multiplication unit, as defined by the claims. A corresponding device is also provided.
[0014] The inventors have realized that noise increase due to scalar multiplication can be reduced by improving the radix decomposition used to multiply the encrypted value by the scalar. Typically, when determining a radix decomposition using radix B, digits are selected from an interval of size B. For odd B, for example, the interval [-(B-1) / 2, (B-1) / 2] can be used. For even B, for example, the interval [-B / 2, B / 2 [or] -B / 2+1, B / 2] containing half the negative radix or containing half the positive radix can be used. For example, "TFHE: Fast fully homomorphic encryption over the torus" uses radix B to determine the so-called gadget decomposition. g in this case the interval [-B / 2,B / 2[ is used, i.e. including half the negative base but not including the positive base. For key switching, the paper uses a binary decomposition, i.e. a base decomposition with base 2, and digits from the interval [0,1], i.e. including half the base but not including the negative base.
[0015] Surprisingly, the inventors have realized that even for even bases, it is beneficial to allow the use of both the positive and negative half-bases in the same base decomposition. This makes it possible to obtain a base decomposition that further reduces the noise in homomorphic scalar multiplication. In particular, the inventors have envisaged determining the base decomposition such that it is guaranteed that the two following digits are not both equal to the half-base in absolute value. The use of such a digit of the base decomposition in the scalar multiplication leads to less noisy ciphertexts, so that more homomorphic computations can be performed before the noise becomes too large and / or bootstrapping becomes necessary. Conversely, less noise means that, given the desired number of operations to be performed before or without bootstrapping, the cryptosystem can be initialized with smaller parameters, e.g. a smaller modulus, leading to improved performance.
[0016] The provided base decomposition is beneficial because it generally results in fewer digits in the absolute value, e.g. the sum of squared digits may be smaller. In general, the more digits of the base decomposition in the absolute value, the greater the increase in noise and multiplication by them will result. In that sense, having a digit equal to half the base in the absolute value represents the worst case situation for that digit. However, this is not always avoidable, e.g. if the scalar value is equal to half the base modulo the base, the least significant digit of the base decomposition needs to be equal to half the base, plus or minus.
[0017] The situation is different for two consecutive digits. Seeing a pair of digits where both digits are equal to half the base in absolute value represents the worst case situation. However, this cannot be avoided when using the interval [-B / 2,B / 2[, i.e. half the base is possible and positive half the base is not possible. It also cannot be avoided when using the interval ]-B / 2,B / 2], i.e. positive half the base is possible but negative half the base is not possible. Surprisingly, however, the inventors realised that it is possible to guarantee that the two subsequent digits of a base decomposition are never both equal to half the base in absolute value when both negative half the base and positive half the base are possible. By ensuring this, a less noisy scalar multiplication is achieved.
[0018] In some embodiments, determining the set of coefficients may include setting at least one digit of the radix decomposition to half radix and setting at least one further digit of the radix decomposition to negative half radix. That is, at least for some scalar inputs to which the radix decomposition procedure is applied, it may return a radix decomposition that includes both a positive half radix and a negative half radix. For other scalar inputs, a radix decomposition that includes only a negative half radix, only a positive half radix, or neither may be determined. Given the possible inputs, both a positive half radix and a negative half radix may be used on average in the same radix decomposition, resulting in less noisy scalar multiplication.
[0019] In some embodiments, the digits of the radix decomposition can be selected from among a positive half-radix and a negative half-radix based on determining whether the selection results in the subsequent digit being equal in absolute value to half the base. The inventors have discovered that if one selection results in the subsequent digit being equal in absolute value to half the base, the other selection does not result in the subsequent digit being equal in absolute value to half the base. Thus, it can be locally guaranteed that consecutive digits equal in absolute value to half the base do not occur. The decision of whether to use a positive or negative half-radix can be made while iteratively determining the radix decomposition or while correcting a previously made radix decomposition, for example.
[0020] In some embodiments, it can be further ensured that a digit equal to half the base in absolute value is followed by a next digit with the same sign as the digit. Here, the digits are considered to be ordered from least significant to more significant; thus, the next digit following the digit is the next more significant digit, e.g., a coefficient of the base one power higher. Zero is considered to be a digit with the same sign. Another way to state this condition is that the product of the digit and the next digit is greater than or equal to zero. This choice further helps reduce noise. A positive half-base followed by a positive next digit can be used to represent the same scalar as a negative half-base followed by the next digit plus one. The first choice is preferred since the next digit is smaller in absolute value. Similarly, a negative half-base followed by a negative next digit or a positive half-base followed by the next digit minus one could also be used, with the first choice having a smaller absolute value for the next digit.
[0021] There are various ways in which the radix decomposition described herein can be determined. One way is to iteratively build the radix decomposition. In some embodiments, the radix decomposition can be determined by: determining a digit from a current scalar; determining a next scalar from the current scalar and a digit; and determining the radix decomposition of the next scalar. This can be used to particularly efficiently enforce the condition that neither of the two following digits is equal to half the radix in absolute value, and / or to enforce the condition that the sign of the next digit is the same as the previous one when the latter is half the radix in absolute value. For example, the radix decomposition can be iteratively determined by initializing the current scalar to a scalar, iteratively determining a digit of the radix decomposition from the current scalar; determining the next scalar from the current scalar and a digit; and updating the current scalar to the next scalar.
[0022] When determining a digit from a current scalar, for example when the current scalar is equal to half the base modulo the base, the digit can be selected from between positive base half and negative base half.
[0023] In some embodiments, this selecting may include selecting half the positive base if selecting half the negative base would result in the next scalar being equal to half the base modulo the base, and selecting half the negative base if selecting half the positive base would result in the next scalar being equal to half the base modulo the base. In this way, it may be ensured that the two trailing digits are not both equal to half the base in absolute value, leading to advantageous base decompositions.
[0024] In some embodiments, this selecting may include selecting half the positive base if it results in the next scalar being less than half the base modulo the base, and selecting half the negative base otherwise. This not only ensures that the following two digits are never equal in magnitude to half the base, but also ensures that the next digit has the same sign as the digit.
[0025] However, it is not necessary to repeatedly determine the radix decomposition in this manner. For example, it is possible to take a radix decomposition determined using known techniques that uses only digits from, for example, [-B / 2,B / 2[, and then correct this radix decomposition to ensure that the two following digits are not both equal to half the radix in absolute value and / or that the sign of the next digit is the same as the previous digit when the latter is half the radix in absolute value. Various examples and alternatives are described herein.
[0026] In some embodiments, the ciphertext of the value is an LWE type ciphertext, based on the hardness assumptions of a learning with errors-type problem, e.g., Learning With Errors (LWE), Generalized Learning With Errors (GLWE), Ring-LWE, Module-LWE, etc. The ciphertext of the value can also be based on the Approx-GCD problem or the NTRU problem. Cryptosystems based on these types of assumptions usually have noisy ciphertexts, with the associated noise problems mentioned above. More generally, the ciphertext used can satisfy the property that homomorphic multiplication of a noisy homomorphic ciphertext by a random scalar increases the noise variance of the noisy homomorphic ciphertext by the variance of the random scalar plus the square of the expectation of the random scalar. The techniques provided herein are particularly suitable for ciphertexts that also have this type of noise increase.
[0027] The provided techniques can also be applied for multiplying non-noisy homomorphic ciphertext by a scalar, such as a Paillier ciphertext. In such cases, noise is not an issue, but the determined coefficients are generally smaller, allowing the provided techniques to enable more efficient scalar multiplication.
[0028] In some embodiments, the base is a power of 2. The operations for computing the base decomposition can be performed particularly efficiently in this case, e.g. division by the base corresponds to a bit shift and the remainder corresponds to the least significant bit of the number. However, in other embodiments, the base is not a power of 2. As the inventors have realized, the provided techniques also work in such cases.
[0029] In some embodiments, the base is a power of 2 of at least 4, at least 8, or at least 16, e.g., at least 4, at least 8, or at least 16. The larger the base, the greater the gain achieved by determining the base decomposition as described herein. Detailed examples of this are provided elsewhere herein.
[0030] In some embodiments, based on the determined radix decomposition, homomorphic scalar multiplication of the encrypted value by the scalar may be performed by homomorphically computing a linear combination of the ciphertexts of the multiple respective values according to the set of coefficients. Thus, the scalar multiplication is performed in a noise-free manner. However, as illustrated by other examples provided herein, the radix decomposition need not be determined at the same moment or by the same device as the homomorphic scalar multiplication.
[0031] In some embodiments, the encrypted values may be homomorphically multiplied by a polynomial. In such cases, a radix decomposition of each scalar coefficient of the polynomial may be determined, and these decompositions of the respective coefficients may be used for homomorphic multiplication. In particular, such homomorphic multiplication by a polynomial may include at least homomorphic multiplication of the encrypted values by constant coefficients of the polynomial, e.g., the homomorphic multiplication may be performed by performing respective homomorphic multiplications by the respective coefficients. For example, homomorphic multiplication by a polynomial may be part of key switching, e.g., for key switching to TRLWE ciphertexts of "Fast fully homomorphic encryption over the torus" and variants thereof.
[0032] In some embodiments, the linear combination may be homomorphically computed by multiplying each of the values of the ciphertext by a respective coefficient from a set of coefficients. These multiplications may be performed at least partially in parallel. Thus, using radix decomposition is beneficial not only from the standpoint of noise evolution, but also to increase the parallelizability of the computation. For example, the multiplications may be performed at least partially by a dedicated processing unit, preferably a GPU or an FPGA.
[0033] A further aspect of the invention relates to the use of the determined radix factorization in a key switching method for noisy homomorphic ciphertext. The key switching method can be used, for example, after bootstrapping a noisy homomorphic ciphertext. Each encrypted key switching value is homomorphically multiplied by a respective coefficient determined from the source ciphertext to calculate a target ciphertext that encrypts the same value as the source ciphertext under a different key. The homomorphic scalar multiplication uses the radix factorization calculated as described herein. Thus, the target ciphertext is obtained in a less noisy state. As a result, for example, more and / or additional types of operations can be applied to the target ciphertext before the next bootstrapping.
[0034] A further aspect of the invention relates to compiling a computation into a homomorphic executable that is executed, e.g., processed, by an encryption computation engine and causes the encryption computation engine to perform a computation on a noisy homomorphic ciphertext. Such a computation may include multiplying a value by a scalar. As part of compiling the computation into a homomorphic executable, a radix decomposition of the scalar may be determined as described herein. The compiling may include including one or more instructions of a homomorphic scalar that multiply an encrypted value of the homomorphic executable by the scalar, the instructions including the determined coefficient. Thus, the use of the determined representation may be hard-coded into the computation. This allows the computation to take advantage of improved noise evolution characteristics due to the improved radix decomposition. Furthermore, since it is already known at compile time that an improved radix decomposition will be used, the compiler may determine the noise increase due to the scalar multiplication, and may, for example, determine the optimal moment of the computation to perform bootstrapping or otherwise optimize the computation based on this determined noise increase.
[0035] Radix decomposition, and homomorphic scalar multiplication, key switching, and compiling using the same can be applied to a wide range of practical applications, including the encrypted evaluation of software programs without access to the plain data, for example, evaluating medical diagnostic software on medical data without actually accessing said medical data.
[0036] The medical data may include medical images. The medical images may include, for example, multidimensional image data, for example, 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).
[0037] The method embodiments can be implemented on a computer as a computer-implemented method or in dedicated hardware, or a combination of both. Executable code for the method embodiments can be stored in 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 includes non-transitory program code stored in a computer-readable medium for performing the method embodiments when said program product is executed on a computer. Alternatively, or in addition, the computer-readable medium can store a homomorphic executable file for performing computations on noisy homomorphic ciphertexts compiled as described herein.
[0038] In one embodiment, the computer program comprises computer program code adapted to perform all or part of the steps of the method embodiments when the computer program is run on a computer. Preferably, the computer program is embodied on a computer readable medium.
[0039] Further details, aspects and embodiments are described, by way of example only, with reference to the drawings, in which elements are illustrated for simplicity and clarity and are not necessarily drawn to scale, and in which elements corresponding to elements already described may have the same reference numerals. [Brief description of the drawings]
[0040] [Figure 1a] FIG. 2 illustrates a schematic example of an embodiment of a device for determining a set of coefficients; [Figure 1b] FIG. 1 illustrates a schematic diagram of an example embodiment of a homomorphic computing system. [Figure 1c] FIG. 1 illustrates a schematic diagram of an example embodiment of a homomorphic computing system. [Figure 2a] FIG. 2 shows a schematic example of an embodiment of a coefficient determination device; [Figure 2b] FIG. 2 shows a schematic example of an embodiment of a coefficient determination device; [Figure 3a] FIG. 10 is a schematic diagram illustrating an example embodiment of a method for determining a radix composition digit from a current scalar; [Figure 3b] FIG. 10 is a schematic diagram illustrating an example embodiment of a method for determining a radix composition digit from a current scalar; [Figure 4a] FIG. 1 illustrates a schematic diagram of an example embodiment of a device for performing homomorphic scalar multiplication. [Figure 4b] FIG. 1 illustrates a schematic diagram of an example embodiment of a device for performing key switching of homomorphic ciphertext. [Figure 5a] FIG. 2 illustrates a schematic example of an embodiment of a method for determining a set of coefficients for use by an encryption multiplication unit; [Figure 5b] FIG. 2 illustrates a schematic diagram of an example embodiment of a method for homomorphic scalar multiplication of encrypted values; [Figure 6] FIG. 1 illustrates a schematic diagram of an example embodiment of a key switching method. [Figure 7] FIG. 1 illustrates a schematic diagram of an example embodiment of a method for compiling computations into a homomorphic executable. [Figure 8a] 1 is a schematic diagram of a computer readable medium having a writeable portion containing a computer program according to one embodiment; [Figure 8b] FIG. 1 is a schematic diagram illustrating a representation of a processor system according to one embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0041] Reference List The following list of references and abbreviations is provided to facilitate interpretation of the drawings and should not be construed as limiting the claims. 100, 101 Encryption computing system 110 Coefficient Determination Device 120 Homomorphic Computing Devices 121 Encryption Multiplication Unit 130 Processor System 140 Storage 150 Communication Interface 160 Data Provider Systems 200, 201 Coefficient determination device 221 Division Unit 222 Digit Determination Unit 223 Radix Decomposition Unit 224 Resolution Correction Unit 230 Scalar 231 Current Scalar The current scalar modulo 232 233 Quotient of base division 236, 240, 250 base decomposition 237-239, 241-246, 251-256 digits 310 if the current scalar modulo the base is less than half the base Set the current scalar modulo the base to 315 digits If the current scalar modulo base 320 is greater than half the base 325 Set digit to current scalar modulo base minus base 330 If choosing half the negative base results in the next scalar being equal to half the base modulo the base 331 If choosing half the base plus results in the next scalar being less than half the base modulo the base 335 Select half of the base number plus If choosing half the base plus 340 results in the next scalar being equal to half the base modulo the base 345 Selecting half of a negative base number 400 homomorphic scalar multiplication device 421 Radix Decomposition Unit 422 Encryption Multiplication Unit 423 Coefficient Calculation Unit 424 Target Ciphertext Calculation Unit 430 Radix decomposition 431-433 digits 439 Scalar 440 Encrypted Value 441-443 Value Ciphertext 450 Encrypting the product of an encrypted value and a scalar 460 Source Ciphertext 461-463 Modulus of encrypted key switching value 470 Radix decomposition of coefficients 480 Encrypted Key Switch Value 490 Target Ciphertext Determine the 500 factor 500' Perform homomorphic multiplication by a scalar 510 Scalar, getting the cardinality 520 Determining the coefficients 530 Coefficients 540 Computing Linear Combinations Homomorphically 600 Key switching 610 Acquiring key switching information 620 Obtaining the source ciphertext 630 Determining the coefficients 640 Computing the target ciphertext 700 Compiling calculations 720 Include instructions 1000 Computer Readable Medium 1010 Writable area 1020 Computer Programs 1110 Integrated circuits 1120 Processing Unit 1122 Memory 1124 Dedicated Integrated Circuit 1126 Communication Elements 1130 Interconnect 1140 Processor System
[0042] The presently disclosed subject matter can be implemented in many different forms, but in this specification, one or more specific embodiments are shown in the drawings and described in detail, and the present disclosure should be regarded as an exemplification of the principles of the presently disclosed subject matter and is not intended to be limited to the specific embodiments shown and described.
[0043] In the following, for the sake of understanding, the elements of the embodiments are described in terms of their operations. However, it will be apparent that each element is configured to perform the functions as described by them.
[0044] Furthermore, the presently disclosed subject matter is not limited to only the embodiments, but also includes all other combinations of features described herein or recited in different dependent claims from each other.
[0045] Various embodiments relate to determining a scalar radix decomposition with respect to a given radix. For purposes of explanation, some radix decompositions that do not have an even radix and / or do not allow using both a positive half of the radix and a negative half of the radix as digits are discussed here.
[0046] Let B be an integer > 1. Let the positive integer k < B n be such that 0 ≦ k i Using B
Number
[0047] It is also possible to extend the digit set to {-(B - 1), …, B - 1}. In such a case, the integer k is k = -B < k’ i Using B Σ i k’ i Bi It can be written in the form of. Such a radix decomposition is sometimes called the modified radix B form of k. The modified radix B form is not unique. For example, (2,2)4=(1,-2,2)4 are two modified radix 4 forms for 10. For example, an integer can be re-encoded in digits of the set {-B0,…,B - 1 - B0} for any integer 0≦B0<B.
[0048] If the radix B is odd,
Number
[0049]
Table 1
[0050] Using a variation of the above algorithm, a radix decomposition for an even radix B≧4 can be obtained. This results in a modified radix B representation, but it is not balanced. The digit k'obtained in this way i is in the set
Number
[0051]
Table 2
[0052] FIG. 1a illustrates generally an example of an embodiment of a device 110 for determining a set of coefficients for use by a cryptographic multiplication unit.
[0053] The encryption multiplication unit may be configured to homomorphically multiply the encrypted value by a scalar. The encrypted value may be represented by a ciphertext of a plurality of respective values. The ciphertext of each value may be a noisy homomorphic ciphertext that encrypts the value multiplied by a respective power of a base. The encryption multiplication unit may be configured to homomorphically calculate a linear combination of the ciphertext of each value according to a corresponding coefficient from a set of coefficients. The encryption multiplication unit may be included in the device 110 itself. For example, it may be implemented by a processor system of the device. In this case, the device 110 may be configured to perform homomorphic scalar multiplication. The device 110 may be a device for homomorphically multiplying the encrypted value by a scalar, for example, a key switching device.
[0054] It is also possible for device 110 to determine a set of coefficients suitable for homomorphic scalar multiplication without performing such homomorphic scalar multiplication itself. Thus, the encryption multiplication unit may also be external to device 110. For example, device 110 may be a compilation device for compiling computations into a homomorphic executable file, which may later be executed by device 110 or another device.
[0055] The device 110 may include a processor system 130, a storage 140, and a communication interface 150. The storage 140 may include local storage, such as a local hard drive or electronic memory. The storage 140 may include non-local storage, such as cloud storage. In the latter case, the storage 140 may include a storage interface to the non-local storage. For example, the storage 140 may be for storing scalars and cardinal numbers. The cardinal number may be even. The storage 140 may store additional information, such as a set of ciphertexts of values representing encrypted values, as discussed elsewhere.
[0056] The device 110 can communicate internally with other devices, external storage, input devices, output devices, and / or one or more sensors via a computer network. The computer network can be the Internet, an intranet, a LAN, a WLAN, etc. The computer network can be the Internet. The device can optionally include a connection interface 150 configured to communicate with other devices as needed. For example, the connection interface can include 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. Communications, e.g., internal communications, may use other communication protocols or media, e.g., an internal data bus.
[0057] Device 110 may use communication interface 150 to send or receive digital data. For example, device 110 may be configured to receive a ciphertext set of values representing encrypted values, e.g., from a data provider device. Device 110 may perform homomorphic scalar multiplication of the encrypted values by scalars. Device 110 may transmit the result of the homomorphic scalar multiplication, or a computation result based thereon, to another device, e.g., the data provider device or another device. As another example, device 110 may receive a description of a computation to be compiled and / or transmit a homomorphic executable file obtained by compiling this computation, e.g., by providing a compilation web service, or the like.
[0058] Execution of device 110 may be implemented in processor system 130, e.g., one or more processor circuits, e.g., microprocessors, examples of which are provided herein. Device 110 may include multiple processors, which may be distributed across different locations. For example, device 110 may use cloud computing.
[0059] The processor system 130 may be configured to determine the set of coefficients as digits of a base decomposition of the scalar with respect to the base. The determined digits may be between a negative half base, inclusive, and a positive half base, inclusive. The determining may include ensuring that the trailing two digits are not both equal in absolute value to the half base.
[0060] For example, the scalars may be coefficients of a polynomial with which the encrypted value is multiplied. For example, the processor system 130 may be configured to determine a set of respective coefficients for each scalar coefficient of the polynomial. These sets of coefficients may be output, for example, as the respective polynomial coefficients with which the ciphertext of the value is multiplied.
[0061] The set of coefficients can include multiple coefficients, for example, at least 5 or at least 10. The processor system 130 can be configured to determine a set of coefficients of a given maximum size, and thus can also be configured to only support scalars up to a given size, or to allow scalars of any size.
[0062] The processor system 130 may be further configured to provide a set of coefficients to an encryption multiplication unit for homomorphically multiplying the encrypted value by a scalar. This may be done in many different ways. The encryption multiplication unit may be included in the device 110 itself, for example, implemented by the processor system 130. In this case, the set of coefficients may be provided via a bus, via internal communication, via an API call, via storage, etc.
[0063] The set of coefficients may also be provided to an external encryption multiplication unit, for example, in the form of a homomorphic executable file for execution by the encryption computation engine. The set of coefficients may be made available to the encryption multiplication unit by making it available in some manner, for example, as part of such a homomorphic executable file. For example, the set of coefficients may be sent to a device or system that includes the encryption multiplication unit; or the set of coefficients may be placed in storage accessible by the system or device that includes the encryption multiplication unit.
[0064] For example, device 110 may be a compiler device that compiles computations into a homomorphic executable, in which case the device may provide a set of coefficients to an encryption multiplication unit by including the set of coefficients in the homomorphic executable, which may then be executed by any suitable encryption computation engine that includes such an encryption multiplication unit.
[0065] Some of the figures show functional units that may be functional units of a processor system. For example, the figures can be used as blueprints for possible functional organisation of a processor system. The processor circuitry is not shown in most of the figures in isolation from the units. For example, the functional units shown in figures 2a, 2b, 4a, 4b (see below) may be implemented in a device such as device 110, in whole or in part, in computer instructions that are stored, for example, in an electronic memory of device 110 and executable by a microprocessor of device 110. In hybrid embodiments, the functional units are implemented partly in hardware, for example as a coprocessor, for example an arithmetic and / or cryptographic coprocessor, and partly in software that is stored and executed on device 110.
[0066] In some embodiments, device 110 may be configured to homomorphically multiply the encrypted values by scalars by homomorphically computing a linear combination of the ciphertext of a plurality of respective values according to a set of coefficients. Computing the linear combination may include homomorphically multiplying the ciphertext of each value by a respective coefficient from the set of coefficients. The multiplication may be performed at least partially in parallel. For example, processor system 130 may include a dedicated processing unit (not shown), such as a GPU or FPGA, to perform homomorphic scalar multiplications or sub-operations of homomorphic scalar multiplications, such as elementary operations on tensors, matrices, vectors, scalars, etc.
[0067] For example, device 110 may be a device for performing calculations using homomorphic encryption ciphers, e.g., device 110 may be used to perform calculations on data even if the data is received in encrypted form, e.g., from a data provider.
[0068] The computation performed may include a scalar multiplication, e.g., a multiplication of an encrypted value by a scalar that corresponds to the multiplication of a value by the scalar in the computation. Alternatively, or in addition, the scalar multiplication may be performed as part of a key switching operation, in which a source ciphertext under a source encryption key is transformed into a target ciphertext that encrypts the same value under a different target encryption key. Thus, such a scalar multiplication does not correspond to the scalar multiplication of the computation, but may be implemented to allow the computation to be performed under encryption, e.g., as part of or after a bootstrapping operation.
[0069] For example, storage 140 may store encrypted data items, e.g., encrypted data items received from one or more data providers or generated as intermediate or final results of computations, e.g., output. Typically, most or all of the data items on which device 110 performs computations are encrypted with a key(s) that are not known to device 110 - that is, device 110 may not be configured to obtain the plain data items corresponding to the encrypted data items, e.g., stored in storage 140. The encryption / decryption keys may be available in encrypted form, but the decryption keys in plain form are secret to device 110. For example, the processor system may be configured to perform a sequence of homomorphic encryption operations, which may include arithmetic operations on encrypted values, such as addition and multiplication, but also arithmetic operations on encrypted polynomials. Homomorphic operations may also include operations such as key switching, bootstrapping, etc.
[0070] 1b illustrates generally an example of an embodiment of a cryptographic computation system 100. The system 100 is configured to perform computations using homomorphic encryption, e.g., fully homomorphic encryption. In this example, the device performing the scalar multiplication is also capable of computing the set of coefficients.
[0071] In this example, system 100 includes a data provider device 160 and an encryption computing device 110. Device 110 may be configured to receive encrypted data items from data provider 160. At least some of the data items may be received in encrypted form. Some of the data items may be received in plain form. Computations are performed on the received data items, and possibly also on the stored data items. Interestingly, the computations may be performed on the encrypted data without decrypting the data, e.g., without converting the encrypted data items to data in plain format.
[0072] The device 110 in this example may be based on the device 110 of FIG. 1a and may include, for example, the processor system 130, the storage 140, and / or the communication interface 150 of FIG. 1a. In this example, the device 110 includes an encryption multiplication unit 121 implemented, for example, by the processor system of the device. As part of performing the encrypted calculation, the encryption multiplication unit 121 may perform homomorphic encryption of the value encrypted by the scalar. The encrypted value may be represented by a ciphertext of the value. To perform the multiplication by the scalar, the device 110 may determine a set of coefficients as digits of a radix decomposition of the scalar, as described elsewhere. Thus, a less noisy scalar multiplication is achieved.
[0073] For example, the value ciphertext may be provided by data provider device 160 or may be derived from an encrypted value provided by data provider device 160. The value ciphertext may be a ciphertext of a key switch value for performing key switching. These may be obtained, for example, from the data provider device, another device, or storage.
[0074] Although not shown in this figure, the cryptographic computing system 100 may include multiple cryptographic computing devices, for example, three or more than three. The encrypted computation may be distributed among the multiple cryptographic computing devices. The cryptographic computing devices may exchange intermediate computation results, typically encrypted, with each other. Each cryptographic multiplication device may be implemented like the cryptographic computing device 110 and may perform a scalar multiplication by determining a set of coefficients and homomorphically multiplying the encrypted value by the scalar using the coefficients.
[0075] Fig. 1c shows a schematic example of an embodiment of a cryptographic computing system 101. The system 100 is configured to perform computations using homomorphic encryption, e.g. fully homomorphic encryption. The example of Fig. 1c is based on the example of Fig. 1b, and various considerations discussed with respect to that figure also apply here. Based on the data provider device 160 of Fig. 1b, the data provider device 160 is shown. Based on the cryptographic computing device 110 of Fig. 1b, the cryptographic computing device 120 is shown. As in Fig. 1b, the cryptographic computing device may comprise an encryption multiplication unit 121, for example implemented by a processor system of the cryptographic computing device 120.
[0076] The encryption computing device 120 may perform the encrypted computation including scalar multiplication of the encrypted values using encryption multiplication unit 121, as in Figure 1b. In this example, the set of coefficients for performing the scalar multiplication is not determined by the encryption computing device 120, but instead by the compiler device 110. The compiler device may be based on device 110 of Figure 1a and may include, for example, the processor system 130, storage 140, and / or communication unit 150 described with respect to Figure 1a.
[0077] The compiler device 110 may compile the computation into a homomorphic executable. The homomorphic executable may be a representation of the computation in terms of a set of instructions of an executable by a cryptographic computation engine of the cryptographic computation device 120. For example, the homomorphic representation may represent the computation in terms of a set of primitive instructions such as scalar multiplication, addition, bootstrapping operations, etc. Execution of the homomorphic executable by the cryptographic computation device 120 may result in the computation being performed on a noisy homomorphic ciphertext. Various representations of homomorphic executables known per se may be used, for example Boolean circuits, arithmetic circuits, data flow graphs, or executable bytecodes.
[0078] The computation may include one or more multiplications of a value by a scalar. For such multiplications, compiler device 110 may determine a set of coefficients as described herein. Compiler device 110 may include in the homomorphic executable one or more instructions for homomorphically multiplying the encrypted value by a scalar, e.g., one or more instructions that cause the encryption computation engine to perform homomorphic scalar multiplication. The instructions may include the determined coefficients. As a result, encryption computation device 120 may compute the scalar multiplication with less noise.
[0079] With reference to Figures 1b and 1c, homomorphic encryption schemes can be applied to many settings. For example, one or more of the encrypting computing devices 110, 120 can be operated by a cloud provider. The cloud provider can provide computation and storage services to its clients. By utilizing homomorphic encryption, the data provider 160 of Figure 1b or 1c, e.g., the clients of the cloud provider, can send their data in encrypted form. The cloud provider can still perform the necessary computations and / or the necessary storage, but cannot know the corresponding plain data. For example, the data provider 160 can encrypt a data item using an encryption key of a type corresponding to the particular homomorphic encryption system used. Once the computation results are received by the data provider 160 from the encrypting computing device 110, 120, the corresponding decryption key can be used to decrypt the encrypted data item. The encryption key and the decryption key can be, and usually are, the same.
[0080] For example, the encrypted computing system 100, 101 can be configured to train a machine learning model, e.g., an image classifier, e.g., a medical model, without the encrypted computing device having access to the plain data items. For example, a linear regression can be performed on the input data, perhaps without bootstrapping. For example, backpropagation can be performed on the input data, perhaps with bootstrapping. The resulting model parameters can be returned to the entity in possession of the decryption key. This allows multiple providers of medical data to pool 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. The encryption key may be equal to the decryption key.
[0081] After the model has been trained, the encrypted computing system 100, 101 can be used to provide the model for use, for example, with medical data. This can be done using plain model parameters or encrypted model parameters. In either case, it can be done using encrypted data, e.g., encrypted input, intermediate, output data. Using plain model parameters is usually much more efficient. In either case, the effect of the system is that the computation is done, e.g., image classification, e.g., medical image classification, without the computer knowing the plain data items. For example, a mammogram may be evaluated for cancer, but the image is never plain in the encryption computing device 110, 120, and it is known what the outcome of the cancer evaluation is without the encryption computing device 110, 120, or cooperation of such devices. From a privacy perspective, it may be acceptable to operate a plain model on encrypted privacy-sensitive data, but not on plain privacy-sensitive data.
[0082] Other uses include database services, for example searching encrypted data in an encrypted database; for example the computation can be a comparison of an input item to a database item. For example, multiple computations can be combined to produce a database index that matches the index. For example, the database can be a genome database and the input can be a gene sequence. For example, the system 100, 101 can be used for the protected control of devices. For example, the devices, even large devices such as power plants, can send sensor values to the encrypted computing devices 110, 120 and receive encrypted control signals in return. The control signals are computed from the sensor signals. An attacker of the system can determine the content of the data going to or coming from one or more of the encrypted computing devices 110, 120, or even access intermediate data of these devices, but it is of no use to him because the data is encrypted. A complete decryption of all the encrypted computing devices 110, 120 of the system 100, 101 would not reveal any data, since the decryption keys are not known to these devices. The computation of the control signal may involve mathematical operations such as linear algebra, averaging, matrix multiplication, polynomial evaluation, etc., all of which can be performed with homomorphic encryption operations.
[0083] For example, a pool of encrypted data items may be maintained in the cryptographic computing system; some of these may be received and some may be the result of an encrypted computation, e.g., intermediate results. For example, the cryptographic computing device 110, 120 may be configured to apply a homomorphic encryption operation to one, two, or more encrypted data items in the pool, e.g., a collection of input and / or intermediate and / or output values. The result may be a new encrypted data item that may be stored in the pool. The pool may be stored in a storage of the cryptographic computing system, which may be a local storage or a distributed storage. In the latter case, one or more encrypted data items may be represented multiple times in the pool. The encrypted data items may be sent from one computing device to another computing device, 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 structures, etc.
[0084] The ciphertext is typically a noisy homomorphic ciphertext, e.g. encryption may include a noise addition step. The amount of noise may vary as homomorphic operations are applied. Decryption may include a noise removal step that is guaranteed to return the correct or nearly correct plaintext as long as the noise remains bounded. In homomorphic encryption schemes based on the Learning With Errors (LWE) problem, e.g. the FHE system on a torus mentioned in the Background, the encryption key is a string of n-digits s i , bits; the ciphertext can be a tuple (a1, ..., a n , b), where
number
[0085] This scheme extends naturally to other mathematical structures, including those based on polynomials. Thus, for a number s i , a i , b, u, e can be taken from different mathematical structures. It is not necessary that all encrypted data items are encrypted under the same key, and in fact re-encryption with a different key is a possible homomorphic encryption operation. To convert from one key to another, a so-called key switching procedure can be used, which uses a so-called key switching key. The key switching key provides information on how to re-encrypt an element encrypted under a first key under a second key without revealing either key.
[0086] The encrypted data items may represent any kind of data. For example, the encrypted data items may represent numbers that need to be averaged, numbers 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 grayscale pixel may be represented by a gray level, which may then be represented by a single encrypted data item. For example, 256 gray levels may be encoded into a single encrypted data item. For example, a color pixel may be represented as multiple color levels, e.g., RGB levels, which may then be represented by a tuple of encrypted data items. For example, three 256 levels of color may be encoded into three encrypted data items. The number of encrypted data items used to represent a type of data depends on the capacity of the homomorphic encryption scheme. For example, a more restrictive homomorphic encryption scheme may only be able to encode one bit per encrypted data item. In that case, one color pixel may require 24 encrypted data items.
[0087] Without access to the decryption key, it may not be possible to say exactly how much noise there is, but it can usually be bounded, for example because the initial noise level is known for a fresh encryption and the increase in noise for various operations is known. The increase in noise may depend on the type of operation, e.g., multiplication versus addition, and other parameters, if any. For example, a homomorphic encryption operation may be a scalar multiplication: a multiplication with a known, e.g., plain, value. For example, multiplication with a large value may increase noise more than multiplication with a small number. The exact amount of noise increased given the operation being performed can be mathematically calculated or empirically estimated. Some operations may add a significant amount of noise, while others may not, e.g., addition of a plain constant.
[0088] A set of homomorphic encryption operations may be defined for a computation. For example, from the homomorphic encryption operations, a network or computation circuit that together implements the computation may be constructed, for example by the compiler device 110 of FIG. 1c. For example, the operations may include Boolean operations, and the operations may include at least one scalar multiplication. However, this is not necessary to apply the techniques herein, for example, a scalar multiplication may be applied as part of a key switch, in which case the computation performed need not also include a scalar multiplication, or in which case such a scalar multiplication need not be implemented in accordance with the techniques provided. The manner in which the homomorphic encryption operations are combined, for example which operations are applied to which operands in the pool, determines the computation being performed. For example, a computation may be represented as a list of homomorphic encryption operations to be performed, along with an indication regarding the encrypted data items on which they are performed.
[0089] As operations are performed, there may be more noise associated with newly computed (non-fresh) encrypted data items. This is not a problem as long as the noise remains within the limits required for decryption. If more operations are to be performed, then a bootstrapping operation can be performed. However, it may be desirable to limit the noise increase due to homomorphic operations and / or the bootstrapping itself, in order to increase the number of operations that can be performed prior to bootstrapping, or even if bootstrapping is not required at all.
[0090] Specifically, let Enc denote a homomorphic encryption scheme. In various settings, it may be necessary to evaluate c←k · Enc(x) for a scalar k and a noisy homomorphic ciphertext Enc(x). While it may be possible to compute c←k · Enc(x) directly, this may result in a significant increase in the noise in the ciphertext.
[0091] A smaller noise increase can be achieved if the encrypted value x is represented by a set of ciphertexts of the value, e.g., Enc(B i x), 0≦i≦n are the powers B of the base B. i , each of which is multiplied by, for example, precomputed by the data provider or other party. For example,
number
number
[0092] Various homomorphic encryption schemes satisfy the property that multiplying a noisy homomorphic ciphertext by a random scalar increases the noise variance of the noisy homomorphic ciphertext multiplicatively by the variance of the random scalar plus the squared expectation of the random scalar. There are many homomorphic encryption schemes for which this is true, such as LWE-type ciphertexts based on LWE, GLWE, Ring-LWE, Module-LWE, or similar types of strength assumptions; or ciphertexts based on the Approx-GCD or NTRU problems.
[0093] For variable X,
number
number
number
number
number
number
number
number
[0094] At first glance, from the point of view of reducing noise, when the base B is even, it does not seem to make a difference whether a base decomposition using a given base uses coefficients equal to half the negative base, half the positive base, or both. In each case, the noise contribution k' i 2 are the same. Interestingly, however, the inventors have noticed that allowing only half the positive bases or half the negative bases leads to suboptimal selections for other digits as well, and therefore to suboptimal base decompositions in terms of noise reduction. For example, when applied to k=22 with B=4, using only half the negative bases leads to the base decomposition (1,-2,-2,-2)4, whereas (1,1,2)4 is better. Similarly, using only half the positive bases leads to suboptimal base decompositions for other scalars.
[0095] Therefore, the inventor:
number
number
number
[0096] Interestingly, by using both negative half-base and positive half-base, it is possible to ensure that the two trailing digits are not equal to half-base in absolute value. Ensuring this generally results in reduced noise and therefore less noisy homomorphic scalar multiplication. Optionally, it can also be ensured that a digit equal to half-base in absolute value is followed by a next digit with the same sign as the digit. This requirement is itself beneficial, as it results in reduced noise. This is especially beneficial when combined with ensuring that the trailing digit is not equal to half-base in absolute value. From a noise reduction perspective, a radix decomposition that satisfies both properties is considered optimal.
[0097] A radix decomposition that satisfies the above properties can be said to be a balanced non-adjacent form. In particular, mathematically, given an even base B, there is a modified base B representation of an integer k, k' n ,…,k'2,k'1,k'0) for all i 1.
number
number
number
number
[0098] FIG. 2a schematically shows an example of an embodiment of a coefficient determination device 200 based on the device 110 of any one of FIGS. 1a-c, for example. The device 200 can determine a set of coefficients as digits of a radix decomposition with respect to an even radix for use by an encrypted multiplication unit.
[0099] The device 200 in this figure can determine a set of coefficients in an iterative manner, from the least significant to the most significant. Given the current scalar K, 231, the device 200 determines the current digit k i of the radix decomposition 236, 238. Based on the current scalar 231 and the digit 238, the next scalar for which the radix decomposition is then determined is determined. For example, the current scalar K can be updated to the next scalar and then the procedure can be repeated. By initializing the current scalar 231 for the scalar to be decomposed and repeatedly determining the current digits 237, 238, 239, etc., the radix decomposition 236 of the scalar can be obtained.
[0100] To determine the current digit 238 from the current scalar K 231, the coefficient determination device 200 can utilize a division unit 221 configured to calculate the value of the current scalar modulo the radix, K mod B, 232, in other words, the remainder of the division by the radix. In this example, the remainder 232 is represented as a value within the interval [0, B - 1], for example, 0 ≦ K mod B < B, but other intervals of the same size, for example,
Number
[0101] Separate from the calculation of the value 232, the division unit 221 can also calculate the quotient 233 obtained by dividing the result of subtracting the remainder 232 from the current scalar 231 by the radix, for example, K' = (K - (K mod B)) / B. The quotient 233 can represent the remaining value for determining the radix decomposition in the next scalar, for example, in the next iteration.
[0102] When the base is a power of two, division unit 221 may be implemented particularly efficiently; for example, value 232 may correspond to the least significant bits of the current scalar K, and value 233 may correspond to the most significant bits.
[0103] The digit determination unit 222 may be configured to determine a current digit 238 from the remainder 232 and the quotient 233 .
[0104] The digit determination unit calculates the current digit k from the remainder K mod B and the quotient 233. i Two example embodiments of methods that can be applied to determine are shown in Figures 3a and 3b, respectively.
[0105] If the remainder K mod B is not equal to half the base, the current digit k i There is generally only one possible choice for K'. If the remainder K mod B is less than half the base, the current digit may be set to the remainder itself, as shown by steps 310, 315 in Figures 3a and 3b. The next scalar can then be set to the quotient K'. If the remainder K mod B is greater than half the base, the current digit may be set to the remainder minus the base, as shown by steps 320, 325 in Figures 3a and 3b. The next scalar can then be set to the quotient plus one.
[0106] If the remainder K mod B is equal to half the base, then the digit k i can be chosen between the positive half-base and the negative half-base. Interestingly, a decision criterion is used that results in the positive half-base being used in at least some cases and the negative half-base being used in at least some other cases. In particular, the digit k i may be selected based on determining whether this selection results in the subsequent digit being equal in magnitude to half the base, which may be guaranteed not to be the case, leading to a base decomposition that has beneficial noise properties.
[0107] In particular, as shown in Figure 3a, if choosing half the negative base results in the next scalar being equal to half the base modulo the base, then one can choose half the positive base, 335. This can be the case if the quotient K' modulo the base is equal to B / 2-1, 330: in this case, choosing half the negative base results in the next scalar being the quotient plus 1, equal to B / 2 modulo the base.
[0108] Similarly, if choosing half the positive base results in the next scalar being equal to half the base modulo the base, 340, then we can choose half the negative base, 345. This can be 340 if the quotient K' modulo the base is equal to B / 2: in this case, choosing half the positive base results in the next scalar being equal to the quotient, equal to B / 2 modulo the base.
[0109] In general, if choosing neither a negative half base nor a positive half base would result in the next scalar being equal to half the base modulo the base, then either choice is acceptable with a view to avoiding trailing digits equal to B / 2. Although Figure 3a does not prescribe this, it is possible, for example, to always choose B / 2 or always choose -B / 2 in such cases.
[0110] A particularly useful choice is to ensure that a digit equal to half the base in absolute value is followed by a next digit with the same sign as that digit. This is shown in FIG. 3b. As shown in this figure, if the next scalar results in less than half the base modulo the base, and in particular if the quotient modulo the base is less than half the base, 331, then the positive half of the base can be selected, 335. Otherwise, the negative half of the base can be selected, 345. This decision procedure can result in a balanced non-adjacent form. Note that decision 331 in FIG. 3b results in the same digit selection as decisions 330 and 340 in FIG. 3a; in that sense, the decision procedure in FIG. 3b is a more specific version of the decision procedure in FIG. 3a.
[0111] A detailed example of an algorithm for determining the radix decomposition is presented here. This algorithm implements the determination procedure of Figure 3b and results in a balanced non-adjacent form.
[0112] [Table 3]
[0113] The algorithm processes the digits from least significant to most significant, i.e., from right to left. It uses a temporary register K that represents the current scalar and is initialized to k. The successive digits k' i is the smallest absolute remainder of K modulo B, i.e., k' i ≡K(mod B) and
number
[0114]
number
number
number
number
number
[0115]
number
number
number
number
[0116] In all cases:
number
number
[0117]
number
number
[0118] Note that the algorithm can be easily extended to cover the case k=0 by returning (0) for input k=0.
[0119] A detailed analysis of the noise characteristics of using a radix decomposition determined according to the algorithm provided in Figure 3b or above is given. This analysis is given in terms of the notation of the algorithm, but it is believed to apply to radix decompositions of other BNAF formats, with even radixes.
[0120] In the above, if the algorithm is k’ i = K mod B, then
Number
Number
[0121] Some notations are introduced here. Define the quantity K that tracks the successive values of K entering the loop in iteration i i and, K i mod B 2 = e i B + d i such that, K i mod B 2 is represented as the pair (e i , e i < B where 0 ≤ d i , d i ). By construction,
Number
[0122]
Table 4
[0123] In the last column, knowledge of (e i , d i ) is d i+1Note that only the
number
number
[0124] The corresponding Markov matrix P has element (i,j) denoting the probability of transitioning from case i to case j (1 ≤ i,j ≤ 4).
number
[0125] Associated stationary probability vector
number
number
number
number
number
[0126] This can be achieved as follows: i Except for =0, cases 1 and 2 in the table are symmetric. Therefore, π1=Pr[k' i = 0] + π4, so
number
number
number
number
number
[0127] As a result, we can derive the following: Let B ≥ 2 be an even integer. Then, the digit k' of the uniformly random BNAF format according to the above algorithm is i but
number
[0128] This is the identity
number
number
number
[0129] The above analysis shows that radix decomposition provides better noise control in homomorphic encryption schemes.
number
number
number
number
number
number
number
[0130] The following table shows the difference for several bases B.
number
[0131] [Table 5]
[0132] It may be observed that the advantages of the provided techniques are particularly large for larger bases, for example, bases up to 4, at least 8, or at least 16. This also applies to bases that are not powers of 2.
[0133] Also note that an amplification effect is achieved when multiple scalar multiplications are performed, for example when the results of multiple scalar multiplications are added together. For example, in key switching, the number of scalar multiplications is large, and scales both with the number of levels of precision of the radix factorization and with the ciphertext dimension (e.g., at least 128, at least 256, or at least 1024, e.g., 10 for a 128-bit security level). 3 ≒2 10 ), therefore, using the provided technique is particularly beneficial for key switching, especially when the parameters are large.
[0134] 2b illustrates, in a schematic manner, an example of an embodiment of a coefficient determination device 201 based on, for example, the device 110 of any of the figures 1a-1c. The device 201 can determine a set of coefficients for use by an encryption multiplication unit as digits of a radix decomposition 250 for an even radix.
[0135] The radix decomposition 250 may be determined in such a way as to guarantee that the two following digits are not both equal in absolute value to half the radix. To this end, the device 201 may first determine a radix decomposition 240 that does not provide this guarantee, and then correct the radix decomposition 240 to obtain the radix decomposition 250.
[0136] In particular, shown in the figure is a scalar K, 230 for which a radix decomposition is determined. Also shown is a radix decomposition unit 223 that determines a radix decomposition 240 of the scalar 230. The digits 241-246 of the radix decomposition 240 can be between a negative radix half, inclusive, and a positive radix half, inclusive,. In some cases, the unit 223 can use the negative radix half as needed, but never the positive radix half. For example, the radix decomposition unit 223 can apply the algorithm "Signed Digit Radix B Re-encoding (B≧4 even, only use negative radix half)" discussed elsewhere herein. In other cases, the unit 223 can use the positive radix half as needed, but never the negative radix half. It is also possible that the unit 223 can output a radix decomposition using both the negative radix half and the positive radix half.
[0137] However, the radix decomposition unit 223 is not configured to ensure that the trailing two digits are not both equal to half the radix in magnitude. Thus, for at least some scalars K, the radix decomposition unit 223 can output a radix decomposition in which the trailing two digits are equal to half the radix in magnitude.
[0138] A resolution correction unit 224 may be used to determine a radix decomposition 250 by correcting the radix decomposition 240 to ensure that the two trailing digits are not both equal to half the radix in absolute value. The digits 251-256 of the radix decomposition 250 may still be between the negative half radix, including, and the positive half radix. For at least some scalars 230, at least one of the digits 251-256 may be set to the positive half radix and at least one of the digits 251-256 may be set to the negative half radix.
[0139] One way unit 224 can make the correction is by iterating through digits 241-246 of base decomposition 240 from least significant to most significant, e.g., from left to right in the diagram. If the current digit of base decomposition 240 is not equal to either half a negative digit or half a positive digit, it may be left unchanged in corrected base decomposition 250.
[0140] If the current digit is equal to a negative half digit or a positive half digit in the radix decomposition 240, this digit may be selected from among the positive half base and the negative half base in the radix decomposition 250 based on a determination of whether the selection results in the subsequent digit being equal to the half base in absolute value. For example, switching the current digit from the negative half base to the positive half base may decrease the subsequent digit by one, and switching the current digit from the positive half base to the negative half base may decrease the subsequent digit by one. On the other hand, if no switching is made, the subsequent digit may be the same in the radix decomposition 250 as in the radix decomposition 240. Thus, by selecting the current digit from the positive or negative half base, it is possible to avoid the next digit also being equal to the positive or negative half base.
[0141] A particular case is shown in the figure. In this example, the original base decomposition 240 includes multiple trailing digits 242, 243, 244, each equal to half the negative base, followed by digit 245 that is not equal to half the negative base. When iterating from the lowest to the highest, digit 242 may be found first. Since digits 242, 243 are both equal to half the negative base, digit 242 may be switched to digit 252, which is equal to half the positive base. In this case, the trailing digit 243 cannot be reduced by one because it is already equal to half the negative digit. In this case, the trailing digit 243 can instead be set to digit 253 equal to half the base minus one. The next digit 244 in this example also cannot be reduced by one because it is already equal to half the negative base, and therefore is similarly set to digit 254 equal to half the base minus one. The digit 245 in this example is not equal to half the negative base, so it can be reduced by one to obtain the digit 255.
[0142] More generally, a sequence of one or more consecutive digits 242-244, all equal to half a negative digit, followed by a digit 245 not equal to half a negative digit, can be corrected to a sequence beginning with a digit 252 equal to half a positive base number; followed by zero or more digits 253-254 equal to half the positive base number minus one; followed by a digit 255 equal to the corresponding original digit 245 minus one. This can be achieved by taking advantage of the fact that the forms (b,-B / 2,...,-B / 2,-B / 2) and (b-1,B / 2-1,...,B / 2-1,B / 2), where b is not equal to -B / 2, are equivalent.
[0143] The same principle applies if the original base decomposition 240 uses, for example, digits equal to half a positive base instead of digits equal to half a negative base.
[0144] Thus, the decomposition correction unit 224 can ensure that the two following digits are not both equal to half the base in absolute value. Interestingly, the decomposition correction unit 224 can further ensure that a digit equal to half the base in absolute value is followed by a next digit having the same sign as the digit. To this end, the decomposition unit 224 may select a digit of the radix decomposition from among the positive half base and the negative half base based not only on a determination of whether the selection results in the following digit being equal to half the base in absolute value, but also on whether the selection results in the next digit having the same sign as the digit. Thus, a radix decomposition in BNAF format can be obtained.
[0145] This is explained in detail in the following example algorithm, which takes as input a modified base B format that does not use the positive half base and returns the set
number
[0146] [Table 6]
[0147] Interestingly, it can be observed from this algorithm that turning the input representation into a BNAF improves the decomposition in terms of noise evolution of homomorphic scalar multiplication, for example by ensuring that the two following digits are not both equal to half the base in absolute value and / or by ensuring that a digit equal to half the base in absolute value is followed by a next digit with the same sign as that digit. Interestingly, in some cases the resulting representation can also be shorter, e.g. k' n =0, which can make it more efficient to perform homomorphic scalar multiplication.
[0148] Fig. 4a illustrates in schematic form an example of an embodiment of a device 400 for performing homomorphic scalar multiplication. The device 400 may be based, for example, on the device 110 of Fig. 1a or 1b, or on the device 120 of Fig. 1c.
[0149] The device can obtain the encrypted value 440 and a scalar k, 439 by which the encrypted value is multiplied. The value to be encrypted can be any value that can be homomorphically multiplied by a scalar, e.g., a real number; a real number on a torus [0,1]; a polynomial; an integer, etc. The scalar is an integer.
[0150] For example, values are modular integers. For example, when encrypted values are on a (discretized) torus, scalars can be viewed as modular integers (see, for example, "Programmable Bootstrapping Enables Efficient Homomorphic Inference of Deep Neural Networks"). Mathematically, a real torus [0,1) is a quotient
number
number
number
number
[0151] The scalar can be positive or negative, e.g., positive values greater than or equal to the base or the square of the base, or negative values less than or equal to the negative base or the square of the base. The term "scalar" is used herein to mean a plain, e.g., unencrypted, value. Thus, the device 400 can access the scalar 439 in an unencrypted form, but not the value 440 by which the scalar is multiplied. The scalar can be, for example, a coefficient of a polynomial by which the encrypted value 440 is multiplied. Despite not knowing (or in any case not using) the value 440 in the plain, the device 400 can still compute an encryption 490 of the value multiplied by the scalar 439.
[0152] The device 400 may comprise a radix decomposition unit 421 configured to determine a set of coefficients 430 for a scalar multiplication as a radix decomposition as described herein, for example using the techniques of Figure 2a or 2b. However, it is not necessary that the device 400 includes the radix decomposition unit 421: the device 400 may also obtain the set of coefficients 430 in another manner, for example as included in a homomorphic executable for performing calculations on a noisy homomorphic ciphertext.
[0153] To perform homomorphic scalar multiplication, the device 400 may include an encryption multiplication unit 422. The encryption multiplication unit 422 may be configured to homomorphically multiply an encrypted value 440 by a scalar 439 based on a set of coefficients 430, thus obtaining an encryption 450 of a product of the encrypted value and the scalar. The encrypted value 440 may be represented by a plurality of respective value ciphertexts 441-443. The respective value ciphertexts 441, 442, 443 are multiplied by a respective power of a base B i It may be a noisy homomorphic ciphertext that encrypts the value x multiplied by x. Usually, all ciphertexts 441-443 are encryptions under the same key, which may be a symmetric or asymmetric key. For example, the encryptions may be LWE type ciphertexts, or ciphertexts based on Approx-GCD or NTRU.
[0154] For example, device 400 may be configured to receive ciphertexts of values 441-443 from another party, e.g., a party outsourcing the computation or a party providing key switching material. Device 400 may also compute ciphertexts of values 441-443 itself. For example, if repeated multiplications of encrypted value x with respective scalars are required, device 400 may generate encryptions Enc(B i x) once and reuse them for each scalar multiplication. In such a case, to reduce the amount of noise introduced from the scalar multiplication, the device 400 preferably performs bootstrapping on the encryptions 441-443 of each value before performing the scalar multiplication.
[0155] The encryption multiplication unit 422 may, for example,
number
[0156] The linear combination is calculated by multiplying each value of the ciphertext 441-443 by a respective coefficient 431-433 from a set of coefficients, e.g., k i ·Enc(B ix). Interestingly, each of these multiplications may be performed at least partially in parallel, for example using dedicated processing units such as GPUs or FPGAs to perform the multiplications or operations that are part of them. In this way, splitting a large multiplication into respective scalar multiplications by smaller numbers improves parallelism, and therefore performance, and allows better use of dedicated processing units.
[0157] The example in this figure can be easily extended to homomorphic multiplication of the encrypted value by the polynomial k+k'x+.... Such homomorphic multiplication can be implemented based on the radix decomposition of each coefficient k, k',... of the polynomial. For example, scalar 439 can represent the constant coefficient k of the polynomial and can be extended with additional coefficients k',... of the polynomial. The digit k of the radix decomposition of the constant coefficient k i , 431-433 are polynomials k with their coefficients k, k', ... i +k i 'x+.... Thus, the polynomials 431-433 may be determined by determining the radix decomposition of each of the coefficients of the polynomials, as described herein. Homomorphic multiplication may be performed by homomorphically multiplying the ciphertexts of the values 441-443 by the respective polynomials 431-433. Thus, in this case, the homomorphic multiplication of the encrypted value by a constant coefficient k, and the homomorphic multiplication by the other coefficient k' of the polynomial are sub-operations of the homomorphic multiplication of the encrypted value by the polynomial.
[0158] Fig. 4b illustrates diagrammatically an example of an embodiment of a device 401 for performing key switching of noisy homomorphic ciphertexts. The device 401 may for example be based on the device 110 of Fig. 1a or 1b.
[0159] The device 401 may be configured to obtain a source ciphertext 460. The source ciphertext 460 may be a noisy homomorphic encryption that encrypts a source encrypted value under a source encryption key. The device 401 may determine a target ciphertext 490 that encrypts the same source encrypted value under a different target encryption key. This determination of encryption of the same value under different keys is also referred to as key switching. By using the techniques provided herein, the target ciphertext 490 may be obtained with less noise.
[0160] As a concrete example, the provided technique can be used in the key switching technique provided in Algorithm 2 of "TFHE: Fast fully homomorphic encryption over the torus." In particular, this technique can be used to perform key switching from TLWE to TLWE, e.g., N=1 in Algorithm 2 of the paper.
[0161] Key switching may be based on computing a linear combination of one or more key switching values under encryption. The device 401 may obtain key switching information 480 including each of these key switching values in encrypted form. The ciphertext for each key switching value may be a noisy homomorphic ciphertext that encrypts the key switching value, also called a key digit, multiplied by a respective power of a base under a target encryption key. The ciphertext for the key switching value is also called a key switching key. In "Fast fully homomorphic encryption over the torus," the key switching key is KS. i,j It is shown that:
[0162] The device 401 derives from the source ciphertext each of the coefficients a′ of each of the encrypted key switching values 480. iThe device 401 may further comprise a coefficient calculation unit 423 capable of determining the respective coefficients a' 461-463. The manner in which this is done depends on the exact key switching procedure applied. The device 401 may further comprise a radix decomposition unit 421. The radix decomposition unit 421 may determine the respective coefficients a' 461-463 as described herein. i The coefficient a' corresponding to i,1 ,…,a' i,t The set of coefficients may be used to multiply the encrypted key switching value by the coefficients 461-463. Thus, the coefficient calculation unit 423 and the radix decomposition unit 421 together produce the ciphertext of the key switching value
number
[0163] For example, in the paper "TFHE: Fast fully homomorphic encryption over the torus", the coefficient
number
number
number
number
number
number
number
[0164] The device 401 may further comprise a target ciphertext computation unit 424 that computes a target ciphertext 490, including homomorphically multiplying each encrypted key switching value 480 described herein by each coefficient 470, e.g., using an encryption multiplication unit described herein. For example, in a "TFHE" key switching procedure, the target ciphertext 490 is multiplied by the coefficients of the original algorithm, e.g.,
number
number
[0165] Various other key switching techniques may be similarly improved using the techniques provided. In particular, key switching may involve multiplying in the key switching value by a polynomial. This may involve multiplying the key switching value by a scalar, e.g., a constant coefficient of a polynomial, as a sub-operation that may be performed as described in this figure. For example, the "TFHE: Fast fully homomorphic encryption over the torus" key switching technique may be used for key switching from TLWE to TRLWE, where the coefficient
number
[0166] Instead of or in addition to using polynomials, bases higher than 2 can also be used for key switching. In such cases, a base-higher-than-2 radix decomposition can be determined for each coefficient that is multiplied by each key switching value. For example, an application of TFHE: Fast fully homomorphic encryption over the torus key switching to higher radixes is described in Programmable Bootstrapping Enables Efficient Homomorphic Inference of Deep Neural Networks. The techniques provided can also be used to improve the radix decomposition used in that key switching procedure.
[0167] 5a illustrates in schematic form an example of an embodiment of a method 500 for determining a set of coefficients for use by an encryption multiplication unit. The encryption multiplication unit may be configured to homomorphically multiply an encrypted value by a scalar. The encrypted value may be represented by a ciphertext for each of a plurality of values. The ciphertext for each of the values is a noisy homomorphic ciphertext that encrypts the value multiplied by a respective power of a base. The encryption multiplication unit may be configured to homomorphically compute a linear combination of the ciphertext for each of the plurality of values according to the set of coefficients. The encrypted multiplication itself is not part of the method 500.
[0168] The method 500 may include obtaining a scalar and a base 510. The base may be an even number.
[0169] The method 500 may include determining 520 the set of coefficients as digits of a base decomposition of the scalar with respect to a base. The determined digits may be between negative half the base, inclusive, and positive half the base, inclusive. Determining 520 may include ensuring 521 that no two subsequent digits are both equal in absolute value to half the base.
[0170] The method 500 may include providing 530 the set of coefficients to an encryption multiplication unit for homomorphically multiplying the encrypted value by a scalar.
[0171] Fig. 5b illustrates a schematic example of an embodiment of a method 500' for homomorphic scalar multiplication of encrypted values. The method 500' is the same as the method 500 of Fig. 5a, except that the method 500' further includes homomorphically multiplying 540 the encrypted value by the scalar by homomorphically computing, by the encryption multiplication unit, a linear combination of the ciphertexts of the plurality of respective values according to the set of coefficients.
[0172] FIG. 6 illustrates generally an example embodiment of a key switching method 600 for noisy homomorphic ciphertext.
[0173] The method 600 may include obtaining 610 key switching information including respective encrypted key switching values, e.g., key digits. The encrypted key switching values may be represented by a ciphertext for each of a plurality of key switching values. The respective key switching value ciphertext may be a noisy homomorphic ciphertext that encrypts the key switching value, e.g., the key digits multiplied by respective powers of a base under a target encryption key.
[0174] The method 600 may include obtaining 620 a source ciphertext. The source ciphertext may be a noisy homomorphic encryption that encrypts a source encrypted value under a source encryption key.
[0175] The method 600 may include determining 630 each modulus of each encrypted key switching value from the source ciphertext.
[0176] The method 600 may include computing 640 a target ciphertext that encrypts the source encrypted values under the target encryption key. Computing 640 may include homomorphically multiplying 500′ each encrypted key switching value by a respective coefficient according to a method described herein, e.g., method 500′ of FIG.
[0177] 7 illustrates generally an example embodiment of a method 700 for compiling a computation into a homomorphic executable. The homomorphic executable may be executable by a cryptographic computation engine. The homomorphic executable may cause the cryptographic computation engine to perform a computation on a noisy homomorphic ciphertext. The computation may include multiplying a value by a scalar.
[0178] The method 700 may include determining 500 a coefficient to use in homomorphically multiplying the value as the encrypted value by a scalar according to a method described herein, such as method 500 of FIG. 5a.
[0179] The method 700 may include including 720 one or more instructions in the homomorphic executable for homomorphically scalar multiplying the encrypted value by the scalar. The one or more instructions may include the determined coefficient.
[0180] As will be apparent to one of ordinary skill in the art, many different ways of performing the methods 500, 500', 600, 700 are possible. For example, the order of steps may be in the order shown, but the order of steps may be changed or some steps may be performed in parallel. Furthermore, other method steps may be inserted between the steps. The inserted steps may represent improvements to the methods as described herein or may be unrelated to the methods. For example, some steps may be performed, at least in part, in parallel. Furthermore, a given step may not be completely finished before the next step is started.
[0181] The method embodiments may be implemented using software that includes instructions to cause a processor system to perform the method 500, 500', 600, or 700. The software may include only steps taken by a particular subentity of the system. The software may be stored on a suitable storage medium such as a hard disk, floppy, memory, optical disk, etc. The software may be transmitted as a signal over a wired, wireless, or data network, e.g., the Internet. The software may be made available for download and / or remote use at a server. The method embodiments are implemented using a bitstream configured to configure a programmable logic, e.g., a field programmable gate array (FPGA), to perform the method.
[0182] It will be understood that the presently disclosed subject matter also extends to computer programs adapted to carry out the presently disclosed subject matter, in particular computer programs on or in a carrier. The programs may be in the form of object code, such as source code, object code, code intermediate source and partially compiled form, or in other forms suitable for use in implementing the method embodiments. An embodiment relating to a computer program product includes computer executable instructions corresponding to each of the processing steps of at least one of the described methods. These instructions may be stored in one or more files, which may be subdivided into subroutines and / or statically or dynamically linked. Another embodiment relating to a computer program product includes computer executable instructions corresponding to each of the devices, units and / or parts of at least one of the described systems and / or products.
[0183] Typically, the devices described herein, for example in Figs. 1a-1c, comprise one or more microprocessors that execute appropriate software stored in the system; for example, the software may be downloaded and / or stored in a corresponding memory, for example a volatile memory such as RAM or a non-volatile memory such as Flash. Alternatively, the system may be implemented in whole or in part in programmable logic, for example as a field programmable gate array (FPGA). The system may be implemented in whole or in part as a so-called application specific integrated circuit (ASIC), for example an integrated circuit (IC) customized for their specific application. For example, the circuit may be implemented in CMOS, for example using a hardware description language such as Verilog, VHDL, etc. In particular, the system may include a circuit for evaluation of cryptographic primitives.
[0184] The processor circuitry may be implemented in a distributed fashion, for example as multiple sub-processor circuits. The storage may be distributed across multiple distributed sub-storages. Some or all of the memory may be electronic memory, magnetic memory, etc. For example, the storage may have volatile and non-volatile portions. Part of the storage may be read-only.
[0185] 8a shows a computer readable medium 1000 having a writable portion 1010 and a computer readable medium 1001 also having a writable portion. The computer readable medium 1000 is shown in the form of an optically readable medium. The computer readable medium 1001 is shown in the form of an electronic memory, in this case a memory card. The computer readable media 1000 and 1001 can store data 1020, which can represent instructions that, when executed by a processor system, cause the processor system to perform an embodiment of a blind rotation method according to an embodiment. Alternatively, or in addition, the data can represent a homomorphic executable file into which the computations are compiled as described herein.
[0186] The data 1020 may be embodied on the computer readable medium 1000 as a physical mark or by magnetization of the computer readable medium 1000. However, any other suitable embodiment is contemplated. Furthermore, although the computer readable medium 1000 is illustrated here as an optical disk, it will be appreciated that the computer readable medium 1000 may be any suitable computer readable medium, such as a hard disk, a solid state memory, a flash memory, etc., and may be non-recordable or recordable. The computer program 1020 includes instructions for causing a processor system to perform the method of determining coefficients.
[0187] FIG. 8b shows a schematic diagram of a processor system 1140 according to an embodiment of a device for determining a set of coefficients. The processor system comprises one or more integrated circuits 1110. The architecture of the one or more integrated circuits 1110 is shown in FIG. 6b. The circuit 1110 comprises a processing unit 1120, e.g., a CPU, for executing computer program components to perform the method according to the embodiment and / or to implement the modules or units thereof. The circuit 1110 comprises a memory 1122 for storing programming code, data, etc. Part of the memory 1122 may be read-only. The circuit 1110 may comprise a communication element 1126, e.g., an antenna, a connector, or both. The circuit 1110 may comprise a dedicated integrated circuit 1124 for performing some or all of the processing defined in the method. The processor 1120, the memory 1122, the dedicated IC 1124, and the communication element 1126 may be interconnected via an interconnect 1130, e.g., a bus. The processor system 1110 can be configured for contact and / or contactless communication using antennas and / or connectors, respectively.
[0188] For example, in one embodiment, the processor system 1140, e.g., a device for determining a set of coefficients, may comprise a processor circuit and a memory circuit, the processor configured to execute software stored in the memory circuit. For example, the processor circuit may be an Intel Core i7 processor, an ARM Cortex-R8, etc. In one embodiment, the processor circuit may be an ARM Cortex M0. The memory circuit may be a 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., configured to provide the software.
[0189] Although device 1110 is shown as including one of each of the described components, various components may be duplicated in various embodiments. For example, processor 1120 may include multiple microprocessors, where the multiple microprocessors are configured to independently execute the methods described herein, or where the multiple processors are configured to perform steps or subroutines of the methods described herein such that they cooperate to achieve the functions described herein. Furthermore, when device 1110 is implemented in a cloud computing system, various hardware components may belong to separate physical systems. For example, processor 1120 may include a first processor in a first server and a second processor in a second server.
[0190] It should be noted that the above embodiments are illustrative rather than limiting of the presently disclosed subject matter, and that those skilled in the art may design many alternative embodiments.
[0191] In the claims, 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 defined in the 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, denote the selection of all or any subset of the elements from the list. For example, the expression "at least one of A, B, and C" is to be understood as including A only, B only, C only, 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 device claims 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.
[0192] In the claims, references in parentheses refer to the reference signs in the drawings of exemplary embodiments or to formulas of embodiments, thus increasing the clarity of the claims. These references should not be construed as limiting the claims.
Claims
1. 1. A computer-implemented method (500, 500') of determining a set of coefficients for use by an encryption multiplication unit, the encryption multiplication unit being configured to homomorphically multiply an encrypted value by a scalar, the encrypted value being represented by a ciphertext of a plurality of respective values, the ciphertext of each value being a noisy homomorphic ciphertext, the ciphertext of each value being an encryption of a value multiplied by a respective power of a base, the encryption multiplication unit being configured to homomorphically compute a linear combination of the ciphertext of the plurality of respective values according to the set of coefficients, the method comprising: - obtaining a scalar and a base (510), where the base is even (510); determining (520) a set of coefficients as digits of a base decomposition of a scalar with respect to a base, the determined digits being between, inclusive of, the negative half-base and the positive half-base, said determining including ensuring (521) that no two consecutive digits are both equal in absolute value to the half-base; Providing a set of coefficients to an encryption multiplication unit for homomorphically multiplying the encrypted value by a scalar (530); The method (500, 500') includes:
2. 2. The method of claim 1, comprising setting at least one digit of the radix decomposition to half the radix and setting at least one further digit of the radix decomposition to negative half the radix.
3. 2. The method of claim 1, wherein said ensuring includes selecting a digit of the base decomposition from among a positive base half and a negative base half based on determining whether the selection results in successive digits being equal in absolute value to half the base.
4. 2. The method of claim 1, comprising ensuring that a digit equal in magnitude to half the base is followed by a next digit having the same sign as the digit.
5. 2. The method of claim 1, comprising: determining a digit of a radix decomposition from a current scalar; determining a next scalar from the current scalar and the digit; and determining a radix decomposition of the next scalar.
6. selecting a digit from among half the positive base and half the negative base, said selecting comprising: - choosing half the positive base if choosing half the negative base results in the next scalar being equal to half the base modulo the base; - choose half the positive base if choosing half the positive base results in the next scalar being equal to half the base modulo the base, then choose half the negative base The method (500, 500') of claim 5, comprising:
7. 6. The method (500, 500') of claim 5, comprising selecting a digit from among a positive base and a half-base of a negative base, said selecting comprising selecting the half-base of a positive base if said selecting results in the next scalar being less than half-base modulo the base, and selecting the half-base of a negative base otherwise.
8. The method (500, 500') of claim 1, wherein the ciphertext of the value is a Learning With Errors (LWE) type ciphertext.
9. The method (500, 500') of claim 1, wherein the base number is a power of 2, preferably at least 4, more preferably at least 8.
10. 2. The method (500') of claim 1, further comprising: homomorphically multiplying (540) the encrypted value by a scalar by homomorphically computing, by an encryption multiplication unit, a linear combination of the ciphertext of a plurality of respective values according to a set of coefficients.
11. 11. The method (500, 500') of claim 10, wherein homomorphically computing the linear combination comprises multiplying the ciphertext of each of the plurality of values by a respective coefficient from a set of coefficients, the multiplications being performed at least partially in parallel.
12. 1. A computer-implemented key switching method (600) for key switching of a noisy homomorphic ciphertext from a source encryption key to a target encryption key, the method comprising: obtaining (610) key switching information including respective encrypted key switching values, the encrypted key switching values being represented by a plurality of respective key switching value ciphertexts, each key switching value ciphertext being a noisy homomorphic ciphertext, each key switching value ciphertext being an encryption of the key switching value multiplied by a respective power of a base under a target encryption key; Obtaining a source ciphertext (620), where the source ciphertext is a noisy homomorphic encryption, where the source ciphertext is an encryption of a source-encrypted value under a source encryption key (620); - determining (630) each modulus of each encrypted key switching value from the source ciphertext; - computing (640) a target ciphertext, the target cipher being an encryption of the source encrypted value under the target encryption key, comprising homomorphically multiplying (500') each encrypted key switching value by a respective coefficient according to the method of claim 10 or 11; The method (600).
13. 1. A computer-implemented method (700) of compiling a computation into a homomorphic executable, the homomorphic executable being executable by a cryptographic computation engine and causing the cryptographic computation engine to perform a computation on a noisy homomorphic ciphertext, the computation comprising multiplying a value by a scalar, the method comprising: - determining a coefficient to use for homomorphically multiplying the value as encrypted by a scalar according to the method (500) of claim 1; including in the homomorphic executable one or more instructions for homomorphically multiplying the encrypted value by a scalar (720), the one or more instructions including the determined coefficient; The method (700).
14. 1. A device (110, 200, 201, 400, 401) for determining a set of coefficients for use by an encryption multiplication unit (121, 422, 423), the encryption multiplication unit being configured to homomorphically multiply an encrypted value by a scalar, the encrypted value being represented by a ciphertext of a plurality of respective values, the ciphertext of each value being a noisy homomorphic ciphertext, the ciphertext of each value being an encryption of a value multiplied by a respective power of a base, the encryption multiplication unit being configured to homomorphically compute a linear combination of the ciphertext of the plurality of respective values according to the set of coefficients, the device being: a storage (140) for storing a scalar and a base, the base being an even number; a processor system (130) configured to determine a set of coefficients as digits of a base decomposition of a scalar with respect to a base, the determined digits being between, including, the negative half base and the positive half base, said determining including ensuring that no two consecutive digits are both equal in absolute value to the half base, and the processor system (130) configured to provide the set of coefficients to an encryption multiplication unit for homomorphically multiplying the encrypted value by the scalar. A device (110, 200, 201, 400, 401).
15. - instructions which, when executed by a processor system, cause the processor system to perform a method according to any one of claims 1 to 13; A homomorphic executable file in which computations are compiled according to the computer-implemented method of claim 13. A transitory or non-transitory computer-readable medium (1000) including data (1020) representing one or more of:
Citation Information
Patent Citations
Scalar multiplication device and scalar multiplication method
JP2017067859A
Systems and processes for running private programs on untrusted computers
JP2018522291A
Method and system for advanced data-centric cryptography using geometric algebra
JP2019528028A
Ciphertext comparison method using homomorphic encryption and apparatus for performing the same
US20200136798A1
