Electronic device for processing homomorphic ciphertext for binary data and method therefor
The electronic device efficiently processes homomorphic ciphertext for binary data by increasing the modulus and applying trigonometric functions to expand the plaintext space, addressing the inefficiencies in conventional methods and ensuring secure computations without decryption.
Patent Information
- Application Number
- PCT/KR2024/002953
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-06
- Filing Date
- 2024-03-07
- Publication Date
- 2024-09-12
AI Technical Summary
Conventional technologies face challenges in efficiently processing homomorphic ciphertext for binary data, particularly in performing calculations and reboots, as the plaintext space within homomorphic ciphertext decreases, making further operations impossible, and rebooting LWE ciphertexts homomorphically encrypted with binary data is inefficient.
An electronic device with a communication unit, memory, and processor that receives homomorphically encrypted binary data, performs a mod-raise operation to increase the modulus, applies a trigonometric function to remove errors, and converts slot values into coefficient values using scaling factors to expand the plaintext space, allowing for efficient operations and reboots by converting between LWE and R-LWE ciphertexts.
Enables efficient performance of various operations and reboots on homomorphic ciphertext for binary data by expanding the plaintext space, preventing data leakage and maintaining security during computations without decryption.
Smart Images

Figure KR2024002953_12092024_PF_FP_ABST
Abstract
Description
Electronic device and method for processing homomorphic encryption for binary data
[0001] The present disclosure relates to an electronic device and method for efficiently processing homomorphic cryptography for binary data.
[0002] As communication technology advances and electronic devices become more widespread, efforts are continually being made to maintain communication security between electronic devices. Accordingly, encryption / decryption technologies are used in most communication environments.
[0003] When a message encrypted using cryptographic technology is transmitted to a recipient, the recipient must decrypt the message to access it. This process wastes resources and time for the recipient to decrypt the encrypted data. Furthermore, if a third party hacks the message while the recipient has temporarily decrypted the message for computational purposes, the message could easily be leaked to a third party.
[0004] To address these issues, homomorphic encryption methods are being studied. Homomorphic encryption allows performing operations on the ciphertext itself without decrypting the encrypted information, yielding the same result as the encrypted value obtained after performing the operation on the plaintext. Therefore, various operations can be performed without decrypting the ciphertext.
[0005] However, when a ciphertext is provided that is a homomorphic encryption of a message composed of binary data, there was a problem in that it was difficult to efficiently perform operations on the ciphertext according to conventional techniques.
[0006] Furthermore, when performing homomorphic operations such as homomorphic multiplication, the plaintext space within the homomorphic ciphertext decreases, and once the plaintext space decreases below a certain size, further operations become impossible. To address this issue, after performing operations on the homomorphic ciphertext a certain number of times, a reboot is performed to expand the plaintext space of the homomorphic ciphertext. Conventional techniques also had the problem that rebooting was not efficient for LWE (Learning With Errors) ciphertexts that homomorphically encrypted binary data.
[0007] The present disclosure has been devised to overcome the above-described problems, and according to the purpose of the present disclosure, various operations or reboots on homomorphic ciphertext for binary data can be efficiently performed.
[0008] An electronic device according to at least one embodiment of the present disclosure for achieving the above-described purpose includes a communication unit, a memory, and a processor, wherein, when a ciphertext obtained by homomorphically encrypting binary data is received from at least one external device through the communication unit, the processor stores the ciphertext in the memory, performs a modraise operation to increase a modulus of the ciphertext, applies a trigonometric function to the ciphertext having the increased modulus to remove an error in the ciphertext, and expands a plaintext space in the ciphertext.
[0009] The processor may perform a first conversion operation for converting a plurality of slot values in the ciphertext into a plurality of coefficient values, select a scaling factor for reducing a message in the ciphertext by a preset size from a set of scaling factors pre-stored in the memory, apply the selected scaling factor to the ciphertext converted by the first conversion operation to reduce the size of the ciphertext, perform the mod-raise operation on the reduced ciphertext, perform a second conversion operation for converting coefficient values of the ciphertext having the increased modulus by the mod-raise operation into slot values, and apply the trigonometric function to the ciphertext converted by the second conversion operation.
[0010] Alternatively, if there are multiple ciphertexts stored in the memory, the processor may perform a calculation by matching ciphertexts to be calculated among the multiple ciphertexts, perform a ring packing operation to convert each of the calculated ciphertexts into one R-LWE (Ring Learning With Errors) ciphertext, and perform the modraise operation on the R-LWE ciphertext.
[0011] In this case, the processor converts the coefficient value of the R-LWE ciphertext having the modulus increased by the modraise operation into a slot value, applies the trigonometric function to the converted R-LWE ciphertext to remove an error in the converted R-LWE ciphertext, performs a gate operation reboot that expands the plaintext space, and converts the slot value of the R-LWE ciphertext with the expanded plaintext space into a coefficient value to obtain the LWE ciphertext to which the gate operation is applied.
[0012] A method for processing homomorphic ciphertext in an electronic device according to at least one embodiment of the present disclosure includes the steps of receiving and storing a ciphertext obtained by homomorphically encrypting binary data from at least one external device, performing a modraise operation to increase a modulus of the ciphertext, applying a trigonometric function to the ciphertext having the increased modulus to remove an error in the ciphertext, and expanding a plaintext space in the ciphertext.
[0013] Here, the step of performing the mod-raise operation may include the step of performing a first conversion operation of converting a plurality of slot values in the ciphertext into a plurality of coefficient values, the step of selecting a scaling factor for reducing a message in the ciphertext by a preset size from the stored set of scaling factors, the step of applying the selected scaling factor to the ciphertext converted by the first conversion operation to reduce the size of the ciphertext, and the step of performing the mod-raise operation on the reduced ciphertext.
[0014] Here, the step of expanding the plaintext space may include the step of performing a second conversion operation for converting a coefficient value of a ciphertext having the increased modulus by the modraise operation into a slot value, and the step of applying the trigonometric function to the ciphertext converted by the second conversion operation to remove the error in the ciphertext and expand the plaintext space in the ciphertext.
[0015] Alternatively, if there are multiple ciphertexts, the method may further include a step of performing a calculation by matching ciphertexts to be calculated among the multiple homomorphic ciphertexts, and a step of performing a ring packing operation to convert each of the calculated ciphertexts into one R-LWE (Ring Learning With Errors) ciphertext.
[0016] Here, the above modraise operation can be applied to the R-LWE ciphertext.
[0017] In addition, the step of expanding the plaintext space within the ciphertext may include the step of performing a conversion operation of converting a coefficient value of the R-LWE ciphertext having a modulus increased by the modraise operation into a slot value, the step of applying the trigonometric function to the converted R-LWE ciphertext to remove the error in the converted R-LWE ciphertext and performing a gate operation reboot to expand the plaintext space, and the step of performing a conversion operation of converting a slot value of the R-LWE ciphertext with the expanded plaintext space into a coefficient value to obtain an LWE ciphertext to which the gate operation is applied.
[0018] According to various embodiments as described above, various operations or reboots on homomorphic ciphertext for binary data can be efficiently performed.
[0019] FIG. 1 is a drawing for explaining the operation of an electronic device according to at least one embodiment of the present disclosure;
[0020] FIG. 2 is a block diagram illustrating a configuration of an electronic device according to at least one embodiment of the present disclosure;
[0021] Figure 3 is a diagram for explaining the reboot of a homomorphic ciphertext.
[0022] FIG. 4 is a flowchart illustrating a method for processing homomorphic cryptography in an electronic device according to at least one embodiment of the present disclosure;
[0023] Figure 5 is a diagram for explaining the process of rebooting the homomorphic ciphertext of binary data.
[0024] Figure 6 is a diagram showing an example of a trigonometric function used in the reboot of Figure 5;
[0025] Figure 7 is a diagram for explaining the process of performing a gate operation reboot process for a homomorphic ciphertext of binary data.
[0026] Fig. 8 is a diagram showing examples of gate operation functions used in the gate operation reboot process of Fig. 7.
[0027] Fig. 9 is a graph showing trigonometric functions included in each gate operation function of Fig. 8.
[0028] Figure 10 is a diagram showing other examples of gate operation functions used in the gate operation reboot process.
[0029] Fig. 11 is a graph showing trigonometric functions included in each gate operation function of Fig. 10.
[0030] FIG. 12 is a drawing for explaining the form of a ciphertext generated in a gate operation reboot process according to at least one embodiment of the present disclosure;
[0031] FIG. 13 is a flowchart illustrating a method for processing homomorphic cryptography to perform binary reboot according to at least one embodiment of the present disclosure; and
[0032] FIG. 14 is a flowchart illustrating a homomorphic cryptographic processing method for performing a gate operation reboot according to at least one embodiment of the present disclosure.
[0033] Hereinafter, the present disclosure will be described in detail with reference to the attached drawings. The information (data) transmission process performed in the present disclosure may apply encryption / decryption as needed, and expressions describing the information (data) transmission process in the present disclosure and patent claims should be interpreted to include cases of encryption / decryption even if not mentioned separately. Expressions in the form of "transmitting (delivering) from A to B" or "A receiving from B" in the present disclosure include cases where another medium is included in the transmission (delivery) or reception, and do not necessarily express only direct transmission (delivery) or reception from A to B.
[0034] In the description of this disclosure, the order of each step should be understood as non-limiting, unless a preceding step must logically and temporally be performed before a succeeding step. That is, except in exceptional cases such as the above, even if a process described as a succeeding step is performed before a process described as a preceding step, the essence of the disclosure is not affected, and the scope of rights should be defined regardless of the order of the steps. In addition, the term "A or B" in this specification is defined to mean not only selectively referring to either A or B, but also including both A and B. Furthermore, the term "including" in this disclosure is intended to encompass the inclusion of additional components in addition to the elements listed as including.
[0035] This disclosure describes only the essential components necessary for the description of the present disclosure, and does not mention components irrelevant to the essence of the present disclosure. Furthermore, the description should not be interpreted as exclusive, encompassing only the mentioned components, but rather as non-exclusive, encompassing other components as well.
[0036] In this disclosure, the term "value" is defined as a concept that includes not only scalar values but also vectors. Furthermore, expressions such as "produce" and "calculate" in this disclosure may be replaced with expressions that generate the result of the corresponding calculation or output. Furthermore, unless otherwise specified, the operations on ciphertexts described below mean homomorphic operations. For example, addition on homomorphic ciphertexts means homomorphic addition on two homomorphic ciphertexts.
[0037] The mathematical operations and calculations of each step of the present disclosure described below can be implemented as computer operations by a known coding method for performing the operations or calculations and / or by coding designed to suit the present disclosure.
[0038] The specific mathematical formulas described below are provided as examples among several possible alternatives, and the scope of the rights of the present disclosure should not be construed as being limited to the mathematical formulas mentioned in the present disclosure.
[0039] For convenience of explanation, the following notation is used in this disclosure.
[0040] a ← D: Select an element (a) according to the distribution (D)
[0041] s1, s2 ∈ R : S1, S2 : S1, S2 are each elements belonging to the set R.
[0042] mod(q) : Modular operation with q elements
[0043] : Rounds internal values
[0044] Hereinafter, various embodiments of the present disclosure will be described in detail using the attached drawings.
[0045] FIG. 1 is a diagram illustrating the operation of an electronic device according to at least one embodiment of the present disclosure. According to FIG. 1, an electronic device (100) can be connected to a plurality of external devices (200-1 to 200-n) via a network (1).
[0046] For convenience of explanation, in the following, the devices (200-1 to 200-n) connected to the electronic device (100) are collectively referred to as external devices, but each of the devices (200-1 to 200-n) may be implemented as various types of electronic devices equipped with communication functions.
[0047] The electronic device (100) may be implemented in various forms, such as a server device, a PC, a laptop PC, a mobile phone, a tablet PC, a kiosk, etc. When implemented as a server device, the electronic device (100) may be implemented as various computing devices, such as a workstation, a cloud, a data drive, a data station, etc.
[0048] Network (1) may include both wired and wireless networks. Wired networks include cable networks or telephone networks, while wireless networks may include any network that transmits and receives signals via radio waves. Wired and wireless networks may also be interconnected.
[0049] Each external device (200-1 to 200-n) can generate a ciphertext. Specifically, each external device (200-1 to 200-n) can generate a homomorphic ciphertext that homomorphically encrypts a message.
[0050] Each external device (200-1 to 200-n) can include cryptographic noise, i.e., errors, generated during the homomorphic encryption process into the ciphertext. Homomorphic ciphertext containing errors can be referred to as LWE (Learning With Errors) ciphertext.
[0051] Specifically, the homomorphic ciphertext generated in each external device (200-1 to 200-n) can be generated in a form in which a result value including a message and an error value is restored when decrypted later using a secret key.
[0052] For example, the homomorphic ciphertext generated from each external device (200-1 to 200-n) can be generated in a form that satisfies the following properties when decrypted using a secret key.
[0053] [Mathematical Formula 1]
[0054] Dec(ct, sk) =<ct, sk> = M+e(mod q)
[0055] Here, < , > represent the usual inner product, ct represents the ciphertext, sk represents the secret key, M represents the plaintext message, e represents the encrypted error value, and mod q represents the modulus of the ciphertext. q should be chosen such that the scaling factor (Δ) is larger than the resulting value M multiplied by the message. If the absolute value of the error value e is sufficiently smaller than M, the decrypted value M+e of the ciphertext is a value that can replace the original message with the same precision in the calculation of significant digits. In the decrypted data, the error is placed on the least significant bit (LSB) side, and M can be placed on the next least significant bit side.
[0056] If the message size is too small or too large, it can be adjusted using a scaling factor. Using a scaling factor allows encryption of not only integers but also real numbers, significantly increasing usability. Furthermore, adjusting the message size using a scaling factor can also adjust the size of the effective area, i.e., the area where the message resides in the ciphertext after the operation.
[0057] Depending on the embodiment, the ciphertext modulus q can be set and used in various forms. For example, the modulus of the ciphertext is the exponentiation of the scaling factor Δ, q=Δ L can be set in the form of . If Δ is 2, then q=2 10 can be set to the same value.
[0058] And the homomorphic ciphertext according to the present disclosure is described assuming that fixed points are used, but can also be applied when floating points are used.
[0059] To generate a ciphertext, each external device (200-1 to 200-n) can generate an encryption key. The encryption key includes a secret key and a public key.
[0060] For example, an external device (e.g., 200-1) can generate a public key using the Ring-LWE technique. Specifically, the external device (200-1) can first set various parameters and rings and store them in its own memory. Examples of parameters may include the length of a plaintext message bit, the sizes of public and private keys, etc.
[0061] The ring can be expressed mathematically as follows:
[0062] [Equation 2]
[0063]
[0064] Here, R is the ring, Zq is the coefficient, and f(x) is the nth-order polynomial.
[0065] A ring is a set of polynomials with predetermined coefficients, where addition and multiplication are defined between elements, and it is a set that is closed under addition and multiplication.
[0066] For example, a ring R denotes a set of n-th order polynomials with coefficients Zq. Specifically, it denotes polynomials that can be obtained as the remainder when a polynomial is divided by an N-th cyclotomic polynomial, where n is Φ(N).
[0067] In mathematical expression 2, (f(x)) represents the ideal of Zq[x] generated by f(x). The Euler totient function Φ(N) means the number of natural numbers that are coprime to N and smaller than N. Φ N If (x) is defined as an Nth-order cyclotomic polynomial, the ring can also be expressed by the following mathematical expression 3.
[0068] [Equation 3]
[0069]
[0070] Meanwhile, the ring R of the above-described mathematical expression 3 can have binary data in the plaintext space. Once such a ring is established, the external device (200-1) can derive a secret key (sk) from the ring. The secret key (sk) can be expressed as follows.
[0071] [Equation 4]
[0072] sk ← (1, s(x)), s(x) ∈ R
[0073] Here, s(x) refers to a randomly generated polynomial with small coefficients.
[0074] And the external device (200-1) produces a first random polynomial (a(x)) from the ring. The first random polynomial can be expressed as follows.
[0075] [Equation 5]
[0076] a(x) ← R
[0077] Additionally, the external device (200-1) can generate an error. Specifically, the external device (200-1) can extract an error from a discrete Gaussian distribution or a distribution with a statistical distance close thereto. This error can be expressed as follows.
[0078] [Equation 6]
[0079] e(x) ←D n αq
[0080] If an error is generated, the external device (200-1) can generate a second random polynomial by modularly calculating the error with the first random polynomial and the secret key. The second random polynomial can be expressed as follows.
[0081] [Equation 7]
[0082] b(x) = -a(x)s(x) + e(x)(mod q)
[0083] Finally, the public key (pk) is set as follows, including the first random polynomial and the second random polynomial.
[0084] [Equation 8]
[0085] pk = (b(x), a(x))
[0086] The above-described key generation method is only an example and is not necessarily limited to this, and it is of course possible to generate public and private keys using other methods.
[0087] Once a public key is generated, the external device (200-1) can generate a homomorphic ciphertext by applying the generated public key to the message to be encrypted. At this time, the external device (200-1) can generate the length of the ciphertext so that it corresponds to the size of the scaling factor.
[0088] In this way, each external device (200-1 to 200-n) can encrypt various messages using the generated encryption key and transmit the ciphertext to the electronic device (100) via the network (1).
[0089] In the present disclosure, a message includes various types of information or data to be transmitted, and may particularly include data composed of binary data. Furthermore, encryption may be homomorphic encryption, and the ciphertext may be homomorphic ciphertext.
[0090] The electronic device (100) stores ciphertexts received from each external device (200-1 to 200-n) and can perform various operations on the ciphertexts when necessary.
[0091] For example, when ciphertexts ct1 and ct2 transmitted by two external devices (200-1, 200-2) are transmitted to the electronic device (100), the electronic device (100) can calculate a value that adds up the information provided from the two external devices (200-1, 200-2). The electronic device (100) can perform various operations at the request of at least one of the two external devices (200-1, 200-2) or another external device.
[0092] The electronic device (100) can transmit the combined calculation result value ct1 + ct2 to the device that requested the calculation. Due to the nature of homomorphic ciphertext, the electronic device (100) can perform the calculation without decryption, and the result value is also in the form of ciphertext. Therefore, even if each external device transmits ciphertext to the electronic device (100), the risk of data within the ciphertext being leaked to the outside can be eliminated. The device that receives the calculation result value can decrypt the received calculation result ciphertext and obtain the calculation result data of the data included in each homomorphic ciphertext.
[0093] When the calculation is completed, the electronic device (100) may perform rounding processing on the calculation result data to detect data in the valid area. Rounding processing means performing rounding of the message in an encrypted state, and may also be referred to as rescaling. Specifically, the electronic device (100) applies the inverse of the scaling factor Δ to each component of the ciphertext. -1 Multiplying and rounding removes the noise region. The noise region can be determined to correspond to the size of the scaling factor. As a result, the message in the valid region excluding the noise region can be detected. Since the process is performed in an encrypted state, additional errors occur, but the size is sufficiently small to be ignored.
[0094] Meanwhile, the electronic device (100) may perform the operation multiple times upon request. In this case, the approximate message weight within the ciphertext obtained from each operation varies. If the approximate message weight exceeds a threshold, the electronic device (100) may perform a reboot. Rebooting may be an operation that expands the plaintext space within the ciphertext. Rebooting may also be expressed as bootstrapping or plaintext space expansion.
[0095] Specifically, if q is less than M in the above mathematical expression 1, M+e(mod q) has a different value from M+e, making decryption impossible. Therefore, the value of q must always be maintained greater than M. However, as the operation progresses, the value of q gradually decreases. Therefore, an operation is required to change the value of q so that it is always greater than M, and this operation is called a reboot operation. As this reboot operation is performed, the ciphertext can be made operable again.
[0096] Meanwhile, as described above, when the message contained in the ciphertext is binary data represented as 0 or 1, conventional processing methods have the problem of inefficient processing such as rebooting. Accordingly, the present disclosure discloses various embodiments for effectively processing ciphertext obtained by homomorphically encrypting a message composed of binary data.
[0097] FIG. 2 is a block diagram illustrating a configuration of an electronic device according to at least one embodiment of the present disclosure. According to FIG. 2, the electronic device (100) includes a communication unit (110), a processor (120), and a memory (130).
[0098] The communication unit (110) is configured to communicate with various external devices (200-1 to 200-n) or other devices.
[0099] The communication unit (110) may include at least one wireless communication module, at least one wired communication module, etc. Each communication module may be implemented in the form of at least one hardware chip.
[0100] For example, the wireless communication module may include at least one module among a Wi-Fi module, a Bluetooth module, an infrared communication module, or other communication modules. In addition, the communication unit (110) may include at least one communication chip that performs communication according to various wireless communication standards such as Zigbee, 3G (3rd Generation), 3GPP (3rd Generation Partnership Project), LTE (Long Term Evolution), LTE-A (LTE Advanced), 4G (4th Generation), 5G (5th Generation), etc.
[0101] The wired communication module may include, for example, at least one of a Local Area Network (LAN) module, an Ethernet module, a paired cable, a coaxial cable, a fiber optic cable, or an Ultra Wide-Band (UWB) module.
[0102] The communication unit (110) can receive ciphertexts from each external device (200-1 to 200-n) by at least one of the various communication methods described above. The received ciphertexts can be stored in the memory (130) under the control of the processor (120).
[0103] The memory (130) may be implemented in various forms, such as volatile memory (e.g., dynamic RAM (DRAM), static RAM (SRAM), or synchronous dynamic RAM (SDRAM)), non-volatile memory (e.g., one time programmable ROM (OTPROM), programmable ROM (PROM), erasable and programmable ROM (EPROM), electrically erasable and programmable ROM (EEPROM), mask ROM, flash ROM, flash memory (e.g., NAND flash or NOR flash), hard drive, or solid state drive (SSD)).
[0104] The memory (130) can store various data including encrypted text received through the communication unit (110), various basic information and programs required for various processing such as operations or rebooting.
[0105] The processor (120) can perform various processing tasks for homomorphic cryptography, such as calculations or reboots, based on various programs and data stored in the memory (130). When the processor (120) performs calculations or reboots, the resulting values can be stored in the memory (130).
[0106] In FIG. 2, each of a communication unit (110), a processor (120), and a memory (130) is illustrated, but the number and type of each component are not limited thereto, and multiple components may be implemented. In addition, depending on the type of electronic device (100), various components such as a display, input / output interface, and sensors may be further included.
[0107] As described above, when a ciphertext homomorphically encrypted with a message composed of binary data is received and stored in the memory (130), the processor (120) can perform a reboot if the plaintext space of the ciphertext falls below a preset threshold. In the present disclosure, rebooting the ciphertext for binary data is referred to as a BinBoot operation.
[0108] Figure 3 is a diagram specifically illustrating the reboot operation. For convenience of explanation, Figure 3 illustrates the operation and reboot process for two ciphertexts (10, 20), but the operation and reboot process can also be performed for two or more ciphertexts.
[0109] Each ciphertext (10, 20) can include an approximate message area (11, 21), respectively. The approximate message area (11, 21) contains a message and an error (m1+e1, m2+e2).
[0110] The processor (120) can perform a specific operation using two ciphertexts (10, 20) as input values, and obtain operation result data (30). Since the two ciphertexts (10, 20) are homomorphic ciphertexts, the operation result data can also become operation result ciphertext (30).
[0111] The ciphertext (30) resulting from the operation may include an approximate message area (31) containing the operation results (m3+e3) between each approximate message. As the operation result increases in value relative to the input value, the approximate message area also increases, thereby reducing the remaining plaintext space (32). If this operation is performed multiple times, the remaining plaintext space (32) eventually disappears or becomes smaller than a limit, making the operation impossible. If this state is determined, the processor (120) may perform a reboot operation.
[0112] It can be seen that the ciphertext (40) that has been rebooted has a constant approximate message area (41) and an expanded plaintext space (42).
[0113] In this way, the reboot method allows continuous computational processing on homomorphic ciphertexts by expanding the plaintext space.
[0114] Figure 4 is a flowchart specifically explaining an example of a method for processing a ciphertext of binary data. According to Figure 4, when a homomorphic ciphertext for binary data (i.e., binary data) is received, the processor (120) stores it (S410).
[0115] In this state, if the processor (120) determines that a reboot is necessary for the ciphertext, it performs a ModRaise operation that expands the modulus of the ciphertext (S420). For example, if a ModRaise operation using a large modulus Q is performed on the ciphertext encrypted with pt, an error such as q0I occurs. Here, q0 is the base modulus, and I is a small-magnitude integer polynomial.
[0116] When the modulus of the ciphertext is expanded by the modraise operation, the processor (120) performs an operation of applying a trigonometric function to the ciphertext with the increased modulus to remove errors in the ciphertext and expand the plaintext space in the ciphertext (S430). This operation is otherwise called an EvalMod operation. The processor (120) can perform the EvalMod operation by evaluating a polynomial approximation of an appropriate scaling of the trigonometric function. For example, if the input for an integer I and a small-sized real number x is x+(2π)·I,
[0117] You can perform EvalMod operations using trigonometric functions such as:
[0118] FIG. 5 is a diagram illustrating a process for rebooting a homomorphic ciphertext of binary data. According to FIG. 5, when a ciphertext ct with a modulus q0 is input, the processor (120) sets the base scaling factor Δ0 to q0 / 2. q0 is the base modulus used for rebooting. By setting the size of the base scaling factor to a small value, such as half of the existing base modulus, the rate at which the plaintext space decreases when each operation on the ciphertext is performed can be reduced.
[0119] The ciphertext ct can be expressed as the following mathematical formula.
[0120] [Equation 9]
[0121]
[0122] In mathematical expression 9, φ can be binary data and ε can be an error.
[0123] The processor (120) can sequentially perform a StC (Slot to Coefficient) operation, a Modraise operation, and a CtS (Coefficient to Slot) operation on the ciphertext ct to obtain a converted ciphertext ct'. The StC (Slot to Coefficient) operation may be a operation that converts multiple slot values within the ciphertext ct into multiple coefficient values. Alternatively, the StC operation may be referred to as a first conversion operation.
[0124] For example, if the StC task assumes that the ciphertext is decrypted into a vector z, then StC can be the task of transforming the coefficients of the ciphertext into a ciphertext that can be decrypted into a polynomial plaintext z(x) whose coefficients are a series of z. The StC task can be composed of homomorphically multiplying by a Discrete Fourier Transform (DFT) matrix.
[0125] Conversely, the CtS operation refers to the operation of converting the coefficient values of the ciphertext into slot values. The CtS operation can also be called a second transformation operation. For example, the CtS operation can be the operation of converting the ciphertext decrypted with the polynomial plaintext z(x)+q0I(x) into the ciphertext decrypted with the vector z+q0I. The CtS operation can also be composed of homomorphic multiplication by the Discrete Fourier Transform (DFT) matrix.
[0126] The DFT matrix is the ring R of the coefficients space. N C of elements and slots space N / 2It is a matrix for performing ring homomorphism between complex vectors. According to DFT, polynomial multiplication can be mapped to component-wise multiplication.
[0127] For example, R N ->C N / 2 The task of converting to can be expressed mathematically as follows.
[0128] [Equation 10]
[0129]
[0130] Here, Δ represents a scaling factor associated with the plaintext coefficient p. The CtS operation, as in Equation 10, can also be called denoising mapping.
[0131] Meanwhile, C N / 2 -> R N The task of converting to can be expressed mathematically as follows.
[0132] [Equation 11]
[0133]
[0134] An operation like Equation 11 could alternatively be called encoding mapping.
[0135] Meanwhile, the expressions “first”, “second”, etc. in the first and second conversion operations are used to distinguish each conversion operation, and the numbers do not indicate the order of each operation.
[0136] As described above, the transformed ciphertext ct' obtained by sequentially performing the StC operation, the modraise operation, and the CtS operation can be expressed as follows.
[0137] [Equation 12]
[0138]
[0139] The processor (120) is R in Equation 12, where (φ + ε1) / 2 + I N / 2 By changing to a small size vector ε2 belonging to , the transformed ciphertext ct" is obtained. The transformed ct" can be expressed as follows.
[0140] [Equation 13]
[0141]
[0142] The processor (120) converts the ct" into f BinBoot Eval_f, a homomorphic evaluation algorithm using (t) BinBoot By applying f, errors are eliminated and the plaintext space is expanded. BinBoot (t) may include trigonometric functions.
[0143] For example, f BinBoot (t) can be expressed as follows.
[0144] [Equation 14]
[0145] f BinBoot (t)=(1-con2πx) / 2
[0146] As a result, the processor (120) R N / 2 Small size error ε belonging to out Ciphertext ct with out can be obtained. ct out can be expressed as follows.
[0147] [Equation 15]
[0148]
[0149] Figure 6 shows the trigonometric function f used for rebooting binary data. BinBoot This is a graph showing an example of (t).
[0150] According to Fig. 6, it can be seen that the ciphertext is transformed so that the valid plaintexts are located at the maximum and minimum peaks of the trigonometric function. Referring to Fig. 6, it can be seen that the gap between the scaling factor and the modulus is significantly reduced, allowing a smaller q0 to be selected, and accordingly, the modulus reduction speed can be significantly reduced. In addition, f BinBoot Since the derivative of (t) vanishes for x ∈ (1 / 2)Z, numerical inaccuracy can be reduced.
[0151] In the above, the BinBoot operation according to one embodiment of the present disclosure has been specifically described. According to another embodiment of the present disclosure, the processor (120) may perform a gate operation reboot operation in addition to the BinBoot operation.
[0152] FIG. 7 is a diagram illustrating a gate operation reboot process according to at least one embodiment of the present disclosure. According to the algorithm of FIG. 7, the processor (120) can perform gate operations simultaneously with rebooting on ciphertexts obtained by homomorphically encrypting a message composed of binary data.
[0153] According to FIG. 7, the processor (120) first sets the modulus q0 to 3Δ0.
[0154] The ciphertext can be expressed in the following format:
[0155] [Equation 16]
[0156]
[0157] Error ε in Equation 16 i Is Satisfies the conditions.
[0158] The processor (120) performs gate operation on two ciphertexts ct1 and ct2 having modulus q0 to obtain ct add Obtain .
[0159] The processor (120) sequentially performs the StC operation, the modraise operation, and the CtS operation on the combined ciphertext, thereby sequentially obtaining the converted ciphertext ct', ct". Steps 2 and 3 of FIG. 7 are identical to steps 1 and 2 of FIG. 5, and since these have been specifically described in FIG. 5, a duplicate description will be omitted.
[0160] In the slot of the acquired ct" This is included. Here, ε is R N / 2 is a small size error belonging to , and I is Z N / 2 It is a small-sized integer vector belonging to .
[0161] The fourth step of Fig. 7 applies the trigonometric function f to the converted ciphertext ct" G This is a rebooting step by applying . The processor (120) can remove error I and convert ψ1+ψ2 into G⊙(ψ1, ψ2) while performing the fourth step.
[0162] Trigonometric function f used in gate operation reboot G can be implemented in various forms depending on the type of gate operation.
[0163] Figure 8 shows specific examples of trigonometric functions used in the gate operation reboot of Figure 7. Figure 8 shows various trigonometric functions f for each operation such as AND, OR, XOR, NAND, NOR, and XNOR. G You can see that it is being used.
[0164] For example, when performing a NAND gate, you can obtain values such as:
[0165] If x0=x1=0, then x0+ x1= 0, and f NAND (0) = 1 = NAND(0,0)
[0166] If x0=1, x1=0, then x0+ x1= 1, and f NAND (1 / 3) = 1 = NAND(1,0)
[0167] If x0=x1=1, then x0+ x1= 2, and f NAND (2 / 3)= 0 = NAND(1,1)
[0168] Fig. 9 shows graphs of each trigonometric function of Fig. 8. Specifically, it shows graphs of trigonometric functions used in AND gates, OR gates, XOR gates, NAND gates, NOR gates, XNOR gates, etc.
[0169] Referring to Fig. 9, we can see that the 0 or 1 / 3, 2 / 3 points are not always located at the peaks in all gate operations. For example, the points (0,0), (1 / 3,0) of the AND gate graph, (1 / 3,1), (2 / 3,1) of the OR gate graph, (0,0), (2 / 3,0) of the XOR gate graph, (0,1), (1 / 3,1) of the NAND gate graph, (1 / 3,0), (2 / 3,0) of the NOR gate graph, and (0,1), (2 / 3,1) of the XNOR gate graph are not located at the peaks of the trigonometric function graphs. This means that the derivatives at those points are not removed.
[0170] Accordingly, in other embodiments of the present disclosure, the trigonometric function can be modified so that these points can also be located at the peak.
[0171] FIG. 10 shows the types of trigonometric functions used in gate operation reboot according to another embodiment of the present disclosure, and FIG. 11 shows graphs of each trigonometric function of FIG. 10.
[0172] According to Fig. 10, AND gates, OR gates, XOR gates, NAND gates, NOR gates, and XNOR gates can be composed of a combination of more complex trigonometric functions than in Fig. 8. Trigonometric functions g in Fig. 10 GWhen the above-described gate operation reboot is performed using (x), as shown in Fig. 11, the 0, 1 / 3, and 2 / 3 points are located at the peak in all gate operations.
[0173] Meanwhile, in Fig. 7, a case of performing gate operation reboot for two ciphertexts ct1 and ct2 is described, but the number of ciphertexts may be greater.
[0174] Figure 12 is a diagram specifically explaining a process for performing gate operation reboot for multiple ciphertexts.
[0175] According to Figure 12, multiple LWE ciphertexts LWE1~ LWE 2N In the state where exists, the processor (120) performs an operation by matching homomorphic ciphertexts to perform an operation. In Fig. 12, an operation of adding 2N ciphertexts in total is performed, and LWE1'~LWE N It represents a case where ' is obtained.
[0176] The processor (120) performs a ring packing operation on each of the calculated ciphertexts to convert them into one R-LWE (Ring Learning With Errors) ciphertext.
[0177] The processor (120) performs a modulo operation on the R-LWE ciphertext to increase the modulus. The modulo operation has been described in detail in the above-described section, so a duplicate description will be omitted.
[0178] The processor (120) performs a CtS operation on R-LWE' whose modulus has been increased by the modulate operation, thereby converting the coefficient value of R-LWE' into a slot value.
[0179] The processor (120) applies a trigonometric function to the converted ciphertext R-LWE" to remove errors in R-LWE" and expand the plaintext space. This step may be referred to as the 'Evalmod' step.
[0180] The processor (120) performs a StC operation to convert the slot value of the R-LWE "where the plaintext space is expanded" back into a coefficient value, thereby obtaining an RLWE ciphertext, and then can obtain N LWE ciphertexts therefrom. Each LWE corresponds to a ciphertext resulting from an operation to which a gate operation is applied.
[0181] FIG. 13 is a flowchart illustrating a homomorphic ciphertext processing method according to one embodiment of the present disclosure.
[0182] According to FIG. 13, the electronic device performs a first conversion operation, i.e., a StC operation, to convert a plurality of slot values within a ciphertext into a plurality of coefficient values (S1310). In addition, the electronic device can select an appropriate scaling factor from a set of pre-stored scaling factors to reduce the message within the ciphertext by a preset size (S1320).
[0183] The electronic device can reduce the size of the ciphertext by applying a scaling factor to the ciphertext converted by the first conversion operation (S1330). For example, if the scaling factor is set to half the base modulus, such as q0 / 2, as shown in FIG. 5, the size of the ciphertext can be reduced by half.
[0184] In this state, the electronic device can increase the modulus by performing a modulate operation on the reduced ciphertext (S1340). The electronic device performs a second conversion operation, i.e., a CtS operation, to convert the coefficients of the ciphertext with the increased modulus into slot values (S1350).
[0185] The electronic device performs a reboot operation (S1360) to remove errors in the ciphertext converted by p by applying a trigonometric function to the ciphertext converted by p, thereby expanding the plaintext space. In other words, rebooting can be performed on a homomorphic ciphertext of binary data.
[0186] Figure 14 is a flowchart illustrating a method for processing homomorphic ciphertexts according to another embodiment of the present disclosure. According to Figure 14, when multiple ciphertexts are provided, the electronic device performs an operation by matching a certain number of ciphertexts (S1410).
[0187] The electronic device can perform a ring packing operation to convert the computational results into a single R-LWE ciphertext (S1420). Various ring packing methods are known, so a detailed description thereof will be omitted.
[0188] The electronic device performs a modraise operation on the generated R-LWE ciphertext (S1430), and then performs a CtS operation to convert the coefficient value into a slot value (S1440).
[0189] The electronic device can perform a gate operation reboot using trigonometric functions to remove errors in the R-LWE ciphertext and expand the plaintext space (S1450). The types and examples of trigonometric functions used in the gate operation reboot have been described in Figures 8 to 11, so a duplicate description will be omitted.
[0190] An electronic device can obtain an LWE ciphertext to which a gate operation is applied by performing a conversion operation that converts a slot value of an R-LWE ciphertext with an expanded plaintext space into a coefficient value (S1460).
[0191] The various processing methods described in FIGS. 4, 13 and 14 can be performed by an electronic device having the configuration shown in FIG. 2, but are not necessarily limited thereto, and may also be performed by another device having a different configuration.
[0192] Although various embodiments have been described above, each embodiment is not necessarily implemented individually, and may be implemented together in a single product by being combined in whole or in part with at least one other embodiment.
[0193] According to the various embodiments above, when homomorphic encrypted password data is assigned as a node value, decision making can be performed efficiently while minimizing the number of comparison operations.
[0194] Various embodiments of the present disclosure may be implemented as software comprising instructions stored in a machine-readable storage media that can be read by a machine (e.g., a computer).
[0195] Specifically, a non-transitory readable storage medium may be provided in which software for making a decision is stored by sequentially performing the steps of receiving and storing a ciphertext homomorphically encrypted with binary data from at least one external device, performing a modraise operation to increase a modulus of the ciphertext, applying a trigonometric function to the ciphertext having the increased modulus to remove an error in the ciphertext, and expanding a plaintext space in the ciphertext.
[0196] A device equipped with such a non-transitory readable medium can perform the homomorphic cryptographic processing method described in the various embodiments described above.
[0197] In the context of non-transitory readable storage media, 'non-transitory' means that the storage medium does not contain signals and is tangible, but does not distinguish between whether data is stored semi-permanently or temporarily on the storage medium.
[0198] Alternatively, a program for performing the method according to the various embodiments described above may be distributed online through an application store. In the case of online distribution, at least a portion of the computer program product may be temporarily stored or temporarily generated on a storage medium, such as the memory of a manufacturer's server, an application store's server, or a relay server.
[0199] Each component (e.g., a module or a program) according to various embodiments may be composed of one or more entities, and some of the aforementioned sub-components may be omitted, or other sub-components may be further included in various embodiments. Alternatively or additionally, some components (e.g., a module or a program) may be integrated into a single entity, which may perform the same or similar functions as those performed by each of the respective components prior to integration. Operations performed by a module, program, or other component according to various embodiments may be executed sequentially, in parallel, iteratively, or heuristically, or at least some operations may be executed in a different order, omitted, or other operations may be added.
[0200] Although the present invention has been described with reference to the attached drawings, the scope of the present invention is determined by the claims described below and should not be construed as being limited to the aforementioned embodiments and / or drawings. It should also be clearly understood that improvements, modifications, and variations apparent to those skilled in the art to the invention described in the claims are also included within the scope of the present invention.
Claims
1. In electronic devices, Department of Communications; memory; and Includes a processor, The above processor, When a ciphertext homomorphically encrypted with binary data is received from at least one external device through the communication unit, the ciphertext is stored in the memory, Perform a modraise operation to increase the modulus of the above ciphertext, An electronic device that removes errors in a ciphertext by applying a trigonometric function to the ciphertext having the increased modulus and expands a plaintext space in the ciphertext.
2. In paragraph 1, The above processor, Performing a first conversion operation to convert multiple slot values within the above ciphertext into multiple coefficient values; Select a scaling factor from a set of scaling factors pre-stored in the above memory to reduce the message in the ciphertext to a preset size, Applying the selected scaling factor to the ciphertext converted by the first conversion operation to reduce the size of the ciphertext, and performing the modraise operation on the reduced ciphertext, A second conversion operation is performed to convert the coefficient value of the ciphertext having the increased modulus by the above modraise operation into a slot value, An electronic device that applies the trigonometric function to the ciphertext converted by the second conversion operation.
3. In paragraph 1, The above processor, An electronic device, wherein, when there are multiple ciphertexts stored in the above memory, the device performs a calculation by matching ciphertexts to be calculated among the multiple ciphertexts, performs a ring packing operation to convert each calculated ciphertext into one R-LWE (Ring Learning With Errors) ciphertext, and performs the modraise operation on the R-LWE ciphertext.
4. In paragraph 3, The above processor, Converting the coefficient value of the R-LWE ciphertext having the increased modulus by the modraise operation into a slot value, applying the trigonometric function to the converted R-LWE ciphertext to remove an error in the converted R-LWE ciphertext, and performing a gate operation reboot to expand the plaintext space. An electronic device that converts the slot values of an R-LWE ciphertext with an expanded plaintext space into coefficient values to obtain an LWE ciphertext to which the gate operation is applied.
5. In a method for processing homomorphic cryptography in an electronic device, A step of receiving and storing a ciphertext obtained by homomorphically encrypting binary data from at least one external device; A step of performing a modraise operation to increase the modulus of the above ciphertext; A method for processing homomorphic ciphertext, comprising: applying a trigonometric function to a ciphertext having the increased modulus to remove errors in the ciphertext and expanding a plaintext space in the ciphertext.
6. In paragraph 5, The steps for performing the above modraise operation are: A step of performing a first conversion operation of converting a plurality of slot values within the ciphertext into a plurality of coefficient values; A step of selecting a scaling factor from a set of previously stored scaling factors to reduce a message in the ciphertext to a preset size; A step of reducing the size of the ciphertext by applying the selected scaling factor to the ciphertext converted by the first conversion operation; and a step of performing the modraise operation on the reduced ciphertext; The step of expanding the above plaintext space is: A step of performing a second conversion operation to convert the coefficient value of the ciphertext having the increased modulus by the modraise operation into a slot value; and A method for processing homomorphic ciphertext, comprising: applying the trigonometric function to the ciphertext converted by the second conversion operation, thereby removing the error in the ciphertext and expanding the plaintext space in the ciphertext.
7. In paragraph 5, If there are multiple ciphertexts, a step of performing an operation by matching ciphertexts to perform an operation among the multiple homomorphic ciphertexts; and Further comprising a step of performing a ring packing operation to convert each of the calculated ciphertexts into one R-LWE (Ring Learning With Errors) ciphertext; A homomorphic ciphertext processing method in which the above modraise operation is applied to the above R-LWE ciphertext.
8. In paragraph 7, The step of expanding the plaintext space within the above ciphertext is: A step of performing a conversion operation to convert the coefficient value of the R-LWE ciphertext having the modulus increased by the modraise operation into a slot value; A step of performing a gate operation reboot to remove the error in the converted R-LWE ciphertext and expand the plaintext space by applying the trigonometric function to the converted R-LWE ciphertext; and A method for processing homomorphic ciphertext, comprising: a step of performing a transformation operation for transforming slot values of an R-LWE ciphertext in which the plaintext space is expanded into coefficient values, thereby obtaining an LWE ciphertext to which the gate operation is applied.
Citation Information
Patent Citations
Apparatus and method for performing approximation operations on ciphertext
JP2020530577A
Computation Method of encrypted data using Homomorphic Encryption and Public Key Encryption and Server using the same
KR1020150043062A
Homomorphic Encryption Method Supporting Floating-Point Arithmetic and Floating-Point Arithmetic Method for Encrypted Message Generated by the Same
KR1020170142419A
Movable wood pallete for loading cargo
KR1020210135883A
Cosmetic composition containing lemon myrtle extract and its manufacturing method
KR102455132B1
