Apparatus and method for performing statistical operations on homomorphic encrypted text
The device and method efficiently perform statistical operations on homomorphic ciphertext by generating bin masks and using one-way encryption, addressing inefficiencies in existing methods and enhancing computational efficiency and security.
Patent Information
- Application Number
- JP2022575885
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-06-15
- Filing Date
- 2021-06-15
- Publication Date
- 2024-12-05
- Estimated Expiration
- 2041-06-15
AI Technical Summary
Existing methods for performing statistical operations on homomorphic ciphertext are inefficient, requiring significant computational resources and time due to the large amount of computation needed, especially for complex calculations.
An electronic device and method that generates and utilizes bin masks to efficiently perform statistical operations on homomorphic ciphertext by generating number information corresponding to variable combinations, combining ciphertexts, and using one-way encryption for secure data integration.
Enables diverse statistical processing and integration of homomorphic ciphertexts, reducing computational burden and time, while maintaining data security by using one-way encryption.
Smart Images

Figure 0007594839000329 
Figure 0007594839000330 
Figure 0007594839000331
Abstract
Description
[Technical field]
[0001] The present disclosure relates to quasi The present invention relates to an apparatus and method for performing statistical operations on homomorphic ciphertext, and more particularly to quasi The present invention relates to an electronic device and method capable of efficiently performing statistical operations on homomorphic ciphertext. [Background technology]
[0002] With the development of electronic and communication technologies, various services that transmit and receive data between various devices are supported. As one example, cloud computing services in which users store their personal information on a server and use the information on the server are widely used.
[0003] In such an environment, it is essential to use security technology to prevent data leakage. Therefore, the server stores encrypted data. In this case, the server must decrypt the encrypted data every time it searches the stored data or performs a series of operations based on the data, resulting in a waste of resources and time.
[0004] Furthermore, if a third party hacks into the data while it is temporarily decrypted on the server for calculation purposes, there is a problem that personal information can easily be passed on to the third party.
[0005] To solve such problems, quasi Homomorphic encryption methods are being researched. quasi When using homomorphic encryption, even if the encrypted information is not decrypted and calculations are performed on the ciphertext itself, after performing calculations on the plaintext, the same result as the encrypted value can be obtained. Therefore, various calculations can be performed on the ciphertext without decrypting it.
[0006] just, quasiSince operations in a homomorphic ciphertext state require more computations than operations in a plaintext state, the processing time is longer than that of conventional plaintext operations. In particular, statistical operations on data require a large amount of computations even in the plaintext state, quasi There is a need for a method that can perform statistical operations on homomorphic ciphertext more efficiently. Summary of the Invention [Problem to be solved by the invention]
[0007] Therefore, the present invention has been made in consideration of the above problems, and the object of the present invention is to provide a method for manufacturing a semiconductor device comprising the steps of: quasi To provide an electronic device and method capable of efficiently performing statistical calculations on homomorphic ciphertext. [Means for solving the problem]
[0008] In order to achieve the above object, an electronic device according to an embodiment of the present disclosure stores at least one instruction and stores a plurality of variable information in an encrypted state. quasi A method for implementing the present invention includes: a memory for storing a plurality of homomorphic ciphertexts; and a processor for executing the at least one instruction, the processor executing the at least one instruction to: Multiple Quasi When an operation command for a homomorphic ciphertext is received, quasi For each homomorphic ciphertext, number information corresponding to a combination of variables may be generated using a bin mask having different variable information in a divided manner.
[0009] In this case, quasi The homomorphic ciphertext may include a number of slots, each of which may have one piece of variable information.
[0010] Meanwhile, the bin mask includes a plurality of slots, each of the plurality of slots includes information regarding the presence or absence of a variable value, and the processor: quasiFor each homomorphic ciphertext, quasi A plurality of bin masks may be generated for each variable information included in the homomorphic ciphertext, a bin mask corresponding to the combination of variables may be selected from the generated plurality of bin masks, and count information having the combination of variables may be generated using a product between the selected bin masks.
[0011] Meanwhile, the bin mask includes a plurality of slots, each of the plurality of slots includes a plurality of sub-slots including information regarding the presence or absence of a variable value, and the processor: quasi Generate one bin mask for each homomorphic ciphertext, For multiple homomorphic ciphertexts Among a plurality of bin masks, a sub-slot in the bin mask corresponding to the combination of variables may be used to generate number information having the combination of variables.
[0012] In this case, the plurality of sub-slots may be arranged within one slot at a preset bit interval.
[0013] Meanwhile, the processor may generate a first set of information including a plurality of pieces of information for the same feature. quasi Homomorphic ciphertext and second quasi A homomorphic ciphertext quasi It may be combined with homomorphic ciphertext.
[0014] In this case, the processor quasi Homomorphic ciphertext and the second quasi The first method for determining whether a ciphertext is common to all of the common information in the ciphertext is to use the same ciphertext. quasi The first position information in the homomorphic ciphertext and the second Quasi and second position information in the homomorphic ciphertext, quasi Homomorphic ciphertext and the second quasi The homomorphic ciphertext may be combined into one.
[0015] In this case, the processor quasiData encrypted by a one-way encryption method using a common key set in advance for each of a plurality of pieces of information included in the homomorphic ciphertext, and quasi When the position information in the homomorphic ciphertext is input, the first quasi The encrypted data for the homomorphic ciphertext and the second quasi Compare the encrypted data to the homomorphic ciphertext and quasi The first location information and the second location information having information common between homomorphic ciphertexts may be confirmed.
[0016] On the other hand, according to one embodiment of the present disclosure quasi The ciphertext processing method for homomorphic ciphertext stores multiple variable information in an encrypted state. quasi Save multiple homomorphic ciphertexts, Multiple Quasi receiving an operation command for a homomorphic ciphertext; quasi The method includes generating a bin mask having different variable information for each homomorphic ciphertext, generating count information corresponding to a combination of variables using the bin mask, and outputting the generated count information.
[0017] In this case, quasi The homomorphic ciphertext may include a number of slots, each of which may have one piece of variable information.
[0018] Meanwhile, the bin mask includes a plurality of slots, each of the plurality of slots including information regarding the presence or absence of a variable value, and the step of generating the bin mask includes: quasi For each homomorphic ciphertext, quasi The step of generating a plurality of bin masks for each variable information included in the homomorphic ciphertext and generating the count information may include selecting a bin mask corresponding to the combination of variables from the generated plurality of bin masks, and generating count information having the combination of variables using a product between the selected bin masks.
[0019] Meanwhile, the bin mask includes a plurality of slots, each of the plurality of slots includes a plurality of sub-slots including information regarding the presence or absence of a variable value, and the step of generating the bin mask includes: quasi The step of generating one bin mask for each homomorphic ciphertext and generating the number information includes: For multiple homomorphic ciphertexts Among a plurality of bin masks, a sub-slot in the bin mask corresponding to the combination of variables may be used to generate number information having the combination of variables.
[0020] In this case, the plurality of sub-slots may be arranged within one slot at a preset bit interval.
[0021] On the other hand, the present encryption processing method is a first encryption method including multiple pieces of information for the same feature. quasi Homomorphic ciphertext and second quasi A homomorphic ciphertext quasi The step of combining the homomorphic ciphertext may further be included.
[0022] In this case, the step of combining includes the step of: quasi Homomorphic ciphertext and the second quasi The first method for determining whether a ciphertext is common to all of the common information in the ciphertext is to use the same ciphertext. quasi The first position information in the homomorphic ciphertext and the second Quasi and second position information in the homomorphic ciphertext, quasi Homomorphic ciphertext and the second quasi The homomorphic ciphertext may be combined into one.
[0023] In this case, the step of combining includes combining first and second quasi Data encrypted by a one-way encryption method using a common key set in advance for each of a plurality of pieces of information included in the homomorphic ciphertext, and quasi When the position information in the homomorphic ciphertext is input, the first quasi The encrypted data for the homomorphic ciphertext and the second quasi Compare the encrypted data to the homomorphic ciphertext and quasiThe first location information and the second location information having information common between homomorphic ciphertexts may be confirmed.
[0024] Meanwhile, in a computer-readable recording medium including a program for executing a ciphertext processing method according to an embodiment of the present disclosure, the ciphertext processing method includes storing a plurality of variable information in an encrypted state. quasi A plurality of homomorphic ciphertexts are stored, and the plurality of homomorphic ciphertexts are quasi receiving an operation command for a homomorphic ciphertext; quasi The method includes generating a bin mask having different variable information for each homomorphic ciphertext, generating count information corresponding to a combination of variables using the bin mask, and outputting the generated count information. Effect of the Invention
[0025] As described above, according to the present invention, quasi Various statistical processes are possible using homomorphic ciphertext, and data structures are different from each other quasi It also becomes possible to perform integrated statistical processing on homogeneous ciphertexts. [Brief description of the drawings]
[0026] [Figure 1] FIG. 1 is a diagram for explaining a structure of a network system according to an embodiment of the present disclosure. [Diagram 2] FIG. 1 is a block diagram showing a simple configuration of an electronic device according to an embodiment of the present disclosure. [Diagram 3] FIG. 1 is a diagram for explaining a bin count calculation method according to an embodiment of the present disclosure. [Figure 4] FIG. 1 is a diagram for explaining a bin count calculation method according to an embodiment of the present disclosure. [Diagram 5] FIG. 13 is a diagram for explaining an extended bin count calculation operation according to an embodiment of the present disclosure. [Figure 6] FIG. 13 is a diagram for explaining an extended bin count calculation operation according to an embodiment of the present disclosure. [Figure 7] FIG. 13 is a diagram for explaining a method of combining a plurality of encryption tables. [Figure 8] 1 is a diagram for explaining a statistical calculation method using a bin mask according to an embodiment of the present disclosure. FIG. [Figure 9] FIG. 13 is a diagram illustrating a process of generating a bin mask using plain text according to an embodiment of the present disclosure. [Figure 10] FIG. 13 is a diagram illustrating a process of generating a bin mask using plain text according to an embodiment of the present disclosure. [Figure 11] FIG. 13 is a diagram illustrating an approximation algorithm according to an embodiment of the present disclosure. [Figure 12] FIG. 13 is a diagram for explaining a bin mask generation operation using a homomorphic ciphertext according to an embodiment of the present disclosure. [Figure 13] FIG. 11 is a diagram for explaining the operation of a bin count calculation according to an embodiment of the present disclosure. [Figure 14] 1 is a diagram for explaining original data and a target of a large bin count operation according to an embodiment of the present disclosure. [Figure 15] FIG. 13 is a diagram for explaining a method for calculating the number of specific cases using a bin mask. [Figure 16] FIG. 13 is a diagram for explaining a bin count calculation operation using a power bin mask according to an embodiment of the present disclosure. [Figure 17] FIG. 13 is a diagram for explaining a bin counting operation taking into account an error term according to an embodiment of the present disclosure. [Figure 18] 11A and 11B are diagrams for explaining a power bin mask generation operation according to an embodiment of the present disclosure. [Figure 19] FIG. 13 is a diagram for explaining a power bin mask generation operation according to another embodiment of the present disclosure. [Figure 20] 11A and 11B are diagrams for explaining a multiplication operation between multiple bin masks according to an embodiment of the present disclosure. [Figure 21] FIG. 13 is a diagram for explaining a multiplication operation using multiple GPUs. [Figure 22]11 is a diagram for explaining a decoding operation after a multiplication operation according to an embodiment of the present disclosure. FIG. [Diagram 23] FIG. 13 is a diagram illustrating a data structure of a bin mask according to an embodiment of the present disclosure. [Figure 24] FIG. 13 is a diagram illustrating a data structure of a result of a multiplication operation according to an embodiment of the present disclosure. [Diagram 25] 11A and 11B are diagrams for explaining a comparison operation according to the present disclosure. [Figure 26] 1A to 1C are diagrams for explaining various statistical calculation methods according to an embodiment of the present disclosure. [Figure 27] 1A to 1C are diagrams for explaining various statistical calculation methods according to an embodiment of the present disclosure. [Figure 28] 1A to 1C are diagrams for explaining various statistical calculation methods according to an embodiment of the present disclosure. [Figure 29] 11 is a diagram for explaining an operation of calculating a maximum value within a slot according to the present disclosure. FIG. [Diagram 30] FIG. 13 is a diagram for explaining an operation of calculating maximum values in a plurality of columns in a plurality of blocks. [Diagram 31] FIG. 13 is a diagram illustrating a method for calculating a specific ranking value according to an embodiment of the present disclosure. [Diagram 32] 1 is a flowchart illustrating a ciphertext processing method according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0027] The present disclosure will be described in detail below with reference to the accompanying drawings. In the present disclosure, the information (data) transmission process may be encrypted / decrypted as necessary, and any expression describing the information (data) transmission process in the present disclosure and claims should be interpreted as including the case of encryption / decryption, even if not specifically mentioned. In the present invention, expressions such as "transmitting (communicating) from A to B" or "A receiving from B" include transmission (communication) or reception involving other intermediates, and do not necessarily represent only direct transmission (communication) or reception from A to B.
[0028] In the description of the present disclosure, the order of each step should be understood as non-restrictive unless the preceding step must be performed logically and chronologically before the following step. In other words, except for the exceptional cases described above, even if a process described as a following step is performed before a process described as a preceding step, the essence of the disclosure is not affected, and the scope of the rights should be defined regardless of the order of the steps. In this specification, the description "A or B" is defined not only to refer to either A or B selectively, but also to include both A and B. In addition, the term "comprise" in the present invention has a meaning that includes the inclusion of further components in addition to the elements listed as included.
[0029] In this disclosure, only essential components necessary for the description of the disclosure will be described, and components unrelated to the essence of the disclosure will not be mentioned. And, it should not be interpreted as an exclusive meaning including only the mentioned components, but as a non-exclusive meaning that can include other components.
[0030] In this disclosure, the term "value" is defined as a concept that includes not only scalar values but also vectors and polynomials.
[0031] The mathematical operations and calculations of each step of the present disclosure described below may be realized by computer calculations using known coding methods and / or coding methods suitably devised for the present disclosure to perform the operations or calculations.
[0032] The specific formulas described below are described as examples among multiple alternatives, wherever possible, and the scope of the present disclosure should not be interpreted as being limited to the formulas mentioned in the present disclosure.
[0033] For convenience of explanation, the following notation will be used in this specification.
[0034] a←D: Select element (a) according to distribution (D). s 1 , s 2 ∈R: S1, S2 are elements in the R set mod(q): Modular operation with q elements
number
[0035] FIG. 1 is a diagram for explaining the structure of a network system according to an embodiment of the present disclosure.
[0036] Referring to FIG. 1, the network system may include a plurality of electronic devices 100-1 to 100-n, a first server device 200, and a second server device 300, and each component may be interconnected via a network 10.
[0037] The network 10 may be realized by various types of wired / wireless communication networks, broadcast communication networks, optical communication networks, cloud networks, etc., and each device may be connected by a method such as Wi-Fi, Bluetooth, NFC (Near Field Communication), etc. without a separate medium.
[0038] 1, multiple electronic devices 100-1 to 100-n are shown, but multiple electronic devices do not necessarily have to be used, and one device may be used. As an example, the electronic devices 100-1 to 100-n may be realized as various devices such as a smartphone, a tablet, a game player, a personal computer, a laptop, a home server, a kiosk terminal, etc., or may be realized as a home appliance with an IoT function.
[0039] A user may input various information via the electronic devices 100-1 to 100-n that the user uses. The input information may be stored in the electronic devices 100-1 to 100-n themselves, or may be transmitted to and stored in an external device for reasons of storage capacity, security, etc. In FIG. 1, the first server device 200 may play a role in storing such information, and the second server device 300 may play a role in using a part or all of the information stored in the first server device 200.
[0040] Each of the electronic devices 100-1 to 100-n receives the input information. quasi Homogeneous encryption, quasi The homomorphic ciphertext may be transmitted to the first server device 200 .
[0041] Each of the electronic devices 100-1 to 100-n is quasi The encryption noise, i.e., an error, calculated during the process of performing homomorphic encryption may be included in the ciphertext. quasi The homomorphic ciphertext may then be generated in such a way that when decrypted using the private key, a result value including the message and the error value is recovered.
[0042] As an example, the electronic devices 100-1 to 100-n quasi The homomorphic ciphertext may be generated in a form that satisfies the following properties when decrypted using a private key.
[0043] [Formula 1]
number
[0044] If the size of the message is too small or too large, the size can be adjusted using a scaling factor. By using a scaling factor, not only integer messages but also real number messages can be encrypted, which greatly increases the versatility of the method. By adjusting the size of the message using a scaling factor, the size of the area in which the message exists in the ciphertext after the operation, i.e., the size of the valid area, can also be adjusted.
[0045] According to the embodiment, the modulus q of the ciphertext may be set in various forms and used. For example, the modulus of the ciphertext is expressed as q=Δ L If Δ is 2, then q=2 10 may be set to a value such as
[0046] As yet another example, the modulus of the ciphertext may be set to a value multiplied by a number of different scaling factors, each of which may be set to a value within a similar range, i.e., values of similar magnitude. For example, q=q 1 q 2 q 3 q x q 1 , q 2 , q 3 , , q xEach of the scaling factors Δ may be set to values that are similar in magnitude to the scaling factor Δ and are relatively prime to each other.
[0047] If the scaling factor is set in this way, the entire calculation can be separated into multiple modulus calculations using CRT (Chinese Remainder Theorem), thereby reducing the calculation burden.
[0048] It should be noted that by using factors of similar magnitude, when a rounding process is performed in a step described below, results that are approximately similar to those in the preceding example can be obtained.
[0049] The first server device 200 receives quasi Homomorphic ciphertext may be stored in ciphertext form without being decrypted.
[0050] The second server device 300 quasi The first server device 200 may request a specific processing result for the homomorphic ciphertext from the first server device 200. The first server device 200 may perform a specific operation in response to a request from the second server device 300, and then transmit the result to the second server device 300. Here, the specific operation may be a plurality of quasi Addition on homomorphic ciphertexts, quasi The operations may be general operations such as isomorphic product, as well as statistical operations such as average, frequency distribution, linear regression, covariance, and the like.
[0051] At this time, the second server device 300 quasi A combining operation on the homomorphic ciphertext may be performed.
[0052] As an example, the encrypted text ct transmitted by the two electronic devices 100-1 and 100-2 is 1 , ct 2is stored in the first server device 200, the second server device 300 may request the first server device 200 to provide a value obtained by adding up the information provided by both electronic devices 100-1 and 100-2. In response to the request, the first server device 200 performs an operation to add up the two ciphertexts, and then provides the resultant value (ct 1 +ct 2 ) may be transmitted to the second server device 300.
[0053] quasi Due to the nature of homomorphic ciphertext, the first server device 200 may perform the calculation without performing decryption, and the result value may also be in the form of ciphertext. In this case, the first server device 200 may perform bootstrapping on the calculation result.
[0054] The first server device 200 may transmit the computation result ciphertext to the second server device 300. The second server device 300 may decrypt the received computation result ciphertext and quasi The first server device 200 may obtain a calculation result value of the data included in the homomorphic ciphertext, and may perform the calculation multiple times according to a user request.
[0055] On the other hand, while FIG. 1 shows a case in which encryption is performed by the first electronic device and the second electronic device, and decryption is performed by the second server device, the present invention is not limited to this.
[0056] FIG. 2 is a block diagram showing a configuration of an electronic device according to an embodiment of the present disclosure.
[0057] 2, the electronic device 100 may include a memory 110, a processor 120, a communication device 130, a display 140, and an operation input device 150. Such an electronic device may be various devices such as a personal computer (PC), a notebook computer, a smartphone, a tablet, a server, etc.
[0058] The memory 110 may store at least one instruction related to the electronic device 100. For example, the memory 110 may store various programs (or software) for operating the electronic device 100 according to various embodiments of the present disclosure.
[0059] The memory 110 may be realized in various forms such as a RAM, a ROM, a buffer, a cache, a flash memory, a HDD, an external memory, a memory card, etc., but is not limited to any of them.
[0060] The memory 110 may store a message to be encrypted. Here, the message may be various credit information, personal information, etc. cited by the user, or may be information related to the usage history, such as location information, Internet usage time information, etc., used by the electronic device 100.
[0061] The memory 110 may store a public key, and if the electronic device 100 generates the public key directly, may store not only the private key but also various parameters required for generating the public key and the private key.
[0062] The memory 110 is generated in a process described below. quasi The memory 110 may store the homomorphic ciphertext transmitted from the external device. quasi The memory 110 may store a computation result ciphertext that is a result of a computation process described later.
[0063] The communication device 130 is formed to connect the electronic device 100 to an external device (not shown), and may be connected to the external device via a local area network (LAN) or the Internet, or may be connected via a Universal Serial Bus (USB) port or a wireless communication (e.g., WiFi 802.11a / b / g / n, NFC, Bluetooth (registered trademark)) port. Such a communication device 130 may be referred to as a transceiver.
[0064] The communication device 130 may receive a public key from an external device and may transmit a public key generated by the electronic device 100 to an external device.
[0065] The communication device 130 may then receive messages from external devices and generate quasi The homomorphic ciphertext or the result of the operation may be transmitted to an external device.
[0066] The communication device 130 may receive various parameters necessary for generating a ciphertext from an external device. On the other hand, in actual implementation, the various parameters may be directly input by a user via the operation input device 150, which will be described later.
[0067] The communication device 130 receives a quasi An operation on the homomorphic ciphertext may be requested, and the calculated result may be transmitted to an external device, where the requested operation may be an operation such as addition, subtraction, or multiplication (e.g., a modular multiplication operation) or may be a statistical operation, where a modular multiplication operation means a modular operation with q elements.
[0068] The display 140 displays a user interface window for selecting a function supported by the electronic device 100. Specifically, the display 140 may display a user interface window for selecting various functions provided by the electronic device 100. The display 140 may be a monitor such as a liquid crystal display (LCD) or an organic light emitting diode (OLED), and may be realized as a touch screen that can simultaneously perform the functions of the operation input device 150 described below.
[0069] Display 140 may display a message requesting input of parameters required for generating a private key and a public key. Display 140 may then display a message for selecting a message to be encrypted. Meanwhile, in implementation, the encryption target may be directly selected by the user or may be automatically selected. In other words, personal information that needs to be encrypted may be automatically set without the user having to directly select a message.
[0070] The operation input device 150 may receive a selection of a function of the electronic device 100 and a control command for the function from the user. Specifically, the operation input device 150 may receive parameters required for generating a private key and a public key from the user. Note that the operation input device 150 may receive a message to be encrypted from the user.
[0071] The processor 120 controls the overall operation of the electronic device 100. Specifically, the processor 120 may control the overall operation of the electronic device 100 by executing at least one instruction stored in the memory 110. The processor 120 may be configured as a single device such as a central processing unit (CPU) and an application-specific integrated circuit (ASIC), or may be configured as multiple devices such as a CPU and a graphics processing unit (GPU).
[0072] When a message to be transmitted is input, the processor 120 may store the message in the memory 110. The processor 120 may then process the message using various settings and programs stored in the memory 110. quasi It may be homomorphic encrypted, in which case the public key may be used.
[0073] The processor 120 may generate and use the public key required for encryption by itself, or may receive and use the public key from an external device. As an example, the second server device 300 that performs decryption may distribute the public key to another device.
[0074] When generating the key by itself, the processor 120 may generate the public key using the Ring-LWE technique. For example, the processor 120 may first set various parameters and rings and store them in the memory 110. Examples of parameters may include the length of the plaintext message bits, the size of the public key and the private key, etc.
[0075] The ring may be expressed by Equation 2 as follows:
[0076] [Formula 2]
number
[0077] A ring is a set of polynomials with preset coefficients, in which addition and multiplication are defined between elements and which is closed with respect to addition and multiplication. Such a ring may be called an annulus.
[0078] As an example, a ring refers to a set of n-th degree polynomials whose coefficients are Zq. Specifically, when n is Φ(N), it may refer to an N-th degree cyclotomic polynomial. (f(x)) denotes the ideal of Zq[x] generated as f(x). The Euler totient function Φ(N) refers to the number of natural numbers that are relatively prime to N and smaller than N. Φ N If we define (x) as an Nth degree cyclotomic polynomial, the ring can also be expressed as follows: 17 may be used.
[0079] [Formula 3]
number
[0080] On the other hand, the ring of Equation 3 above has complex numbers in the plaintext space. quasi Of the sets of rings mentioned above, only those sets whose plaintext space is real-valued may be used to speed up operations on homomorphic ciphertexts.
[0081] Once such a ring is established, processor 120 may compute a secret key (sk) from the ring.
[0082] [Formula 4]
number
[0083] The processor 120 may then calculate a first random polynomial (a(x)) from the ring. The first random polynomial may be expressed as:
[0084] [Formula 5]
number
[0085] [Formula 6]
number
[0086] [Formula 7]
number
[0087] [Formula 8]
number
[0088] Meanwhile, the processor 120 may control the communication device 130 so that once the public key is generated, it is transmitted to another device.
[0089] Then, the processor 120 performs the following for the message: quasi For example, the processor 120 may generate a homomorphic ciphertext by applying a previously generated public key to the message. quasi A homomorphic ciphertext may be generated.
[0090] The message to be decrypted may be received from an external source or may be entered through an input device directly attached to or connected to electronic device 100. For example, if electronic device 100 includes a touch screen or keypad, processor 120 may store data entered by a user through the touch screen or keypad in memory 110 before encrypting it. quasi When the homomorphic ciphertext is decrypted, the message may be restored to a value obtained by adding an error to a value reflecting the scaling factor. The scaling factor may be a value that is input and set in advance.
[0091] Alternatively, the processor 120 may use the public key to encrypt the multiplied message and scaling factor. In this case, an error calculated during the encryption process may be added to the result of multiplying the message and scaling factor.
[0092] The processor 120 may generate the ciphertext so that the length of the ciphertext corresponds to the size of the scaling factor.
[0093] Then, the processor 120 quasi Once the homomorphic ciphertext is generated, it is stored in memory 110 or, depending on the user's request or a pre-defined default command, quasi The communication device 130 may be controlled to transmit the homomorphic ciphertext to another device.
[0094] Meanwhile, according to one embodiment of the present disclosure, packing may be performed. quasi When packing is used in homomorphic encryption, it becomes possible to encrypt multiple messages with one ciphertext. In this case, when the electronic device 100 performs operations between each ciphertext, the operations are processed in parallel for multiple messages, which significantly reduces the computational burden.
[0095] For example, if the message is composed of multiple message vectors, the processor 120 converts the multiple message vectors into polynomials in a form that can be encrypted in parallel, multiplies the polynomials by a scaling factor, and encrypts the polynomials using the public key. quasi The processor 120 may perform homomorphic encryption, whereby the processor 120 may generate ciphertext that packs multiple message vectors.
[0096] On the other hand, if the data stored in the electronic device 100 is a statistical table, the processor 120 quasi In the process of generating homomorphic ciphertext, variable information is included in multiple slots in the ciphertext. quasi The processor 120 may generate a homomorphic ciphertext. quasi In the process of generating homomorphic ciphertext, quasi A bin mask for the homomorphic ciphertext may be generated. A specific operation for generating the bin mask will be described later with reference to FIG.
[0097] Then, the processor 120 quasi If decryption of homomorphic ciphertext is required, quasi The secret key may be applied to the homomorphic ciphertext to generate a decrypted text in polynomial form, and the decrypted text in polynomial form may be decoded to generate a message. In this case, the generated message may contain errors, as mentioned in Equation 1 above.
[0098] The processor 120 may then perform an operation on the ciphertext. For example, the processor 120 may quasi While maintaining the encrypted state of the homomorphic ciphertext, various statistical calculations such as average, frequency distribution, etc. for a plurality of pieces of information as well as calculations such as addition, subtraction, and multiplication may be performed. A specific statistical calculation method will be described later with reference to FIG. 3.
[0099] Meanwhile, when the calculation is completed, the electronic device 100 may detect data of the valid area from the calculation result data. For example, the electronic device 100 may detect data of the valid area by performing a rounding process on the calculation result data.
[0100] Here, the rounding process means rounding off the message in the encrypted state, and may also be called rescaling. For example, the electronic device 100 may apply a reciprocal of a scaling factor Δ -1 Then, the noise region can be removed by multiplying the noise region by the scaling factor and rounding it off. The noise region may be determined to correspond to the magnitude of the scaling factor. As a result, the message in the valid region from which the noise region has been removed may be detected. Since this is done in an encrypted state, further errors occur, but the magnitude is small enough that they can be ignored.
[0101] The rounding process described above may then use modular multiplication operations as described above.
[0102] In addition, the electronic device 100 can expand the plaintext space of the operation result ciphertext when the weight of the approximate message in the operation result ciphertext exceeds a threshold value. For example, in the above-mentioned formula 1, if q is smaller than M, M+e(mod q) has a value different from M+e, and decryption becomes impossible. Therefore, the value of q must always be kept larger than M. However, as the operation is performed, the value of q gradually decreases. The expansion of the plaintext space means changing the ciphertext ct into a ciphertext having a larger modulus. The operation of expanding the plaintext space may also be called rebooting. By performing rebooting, the ciphertext may become ready for operation again.
[0103] As described above, the electronic device 100 according to the present disclosure has quasi The electronic device 100 can efficiently perform not only arithmetic operations on homomorphic ciphertexts but also complex statistical operations. quasi It is possible to manage homomorphic ciphertexts in a single DB.
[0104] In the following, quasiA specific statistical calculation operation for homomorphic ciphertext will now be described.
[0105] first quasi For efficient statistical computations on homomorphic ciphertexts, this disclosure quasi A homomorphic ciphertext is generated to have the following data structure:
[0106] How to provide SIMD (Single Instruction Multiple Data) function for plain text table data, i.e., multiple record data consisting of multiple features quasi This is about how to store the information in a homomorphic cipher. To do this, data for each feature may be collected and stored in a ciphertext. That is, one ciphertext may store only data that belongs to one feature. This does not mean that one ciphertext contains only one piece of information, but rather that one ciphertext can store a variable value for one feature.
[0107] quasi A homomorphic ciphertext may contain multiple slots, and multiple pieces of information may be stored in each slot. Therefore, by utilizing this, a value for one feature (i.e., the same column information in a table) may be stored in each of multiple slots.
[0108] Specifically, table data may be stored and managed in the following format. For example, the size of a plaintext table is n, m (where n is the length of a data row, and m is the length of a data string (= the number of features)), and quasi Let us consider the number of data that may contain homomorphic ciphertext as M(=
number
[0109] 1.Ciphertext
number
number
number
[0110] In the following, quasi Assume that the homomorphic ciphertext contains information about one feature. quasi The statistical calculation operation for the homomorphic ciphertext will now be described.
[0111] first, quasi Although operations can be performed on homomorphic ciphertext in an encrypted state, operations during the encryption process take a long time, so an efficient calculation method is required.
[0112] In statistical processing, variables that meet specific conditions are searched for, and processing such as averaging and variance is performed on the found variables, so it is necessary to prioritize finding variables that meet specific conditions.
[0113] In this regard, a bin counting operation for searching for variables that satisfy a specific condition will be described below with reference to FIGS.
[0114] 3 and 4 are diagrams for explaining a bin counting method according to an embodiment of the present disclosure. Here, the bin counting operation is an operation that takes data of two or more bin variables as input and plays a role in counting the number of cases for combinations of the variable values in the data.
[0115] 3, there is shown bin data 310, intermediate data 320, and result data 330. For example, as shown in FIG. 3, when the bin values for each of three variables (A, B, C) are {1, 2, 3, 4} (A), {1, 2, 3, 4} (B), and {1, 2} (C), intermediate data may be generated by combining the three variables.
[0116] In this manner, after the intermediate data is generated, the intermediate data with the count values may be used to generate result data 330 indicating possible combinations of the three variables and the counts for those combinations.
[0117] In the following, with reference to FIG. 4, a specific operation for generating the above-mentioned intermediate data will be described.
[0118] Referring to FIG. 4, first, the bin count is calculated when the values of variables A, B, and C are each 1.
[0119] Each variable 410, 420, 430 includes multiple slots, and in the illustrated example is shown as having eight slots, although in implementations there may be more or less than nine slots.
[0120] For each variable, a bin mask may be generated for each variable value. For example, for variable A 410, which has four values, a bin mask 420 may be created that corresponds to each of the four values. For variable B 430, which has four values, a bin mask 420 may be created that corresponds to each of the four values, and for variable C 450, which has two values, a bin mask 460 may be created that corresponds to each of the two values.
[0121] Such a bin mask may be created at the time of encryption, or may be calculated after encryption using a table look-up table function to create the bin mask. More specific operations for generating the bin mask are described with reference to Figures 9 to 12.
[0122] Thereafter, when checking the bin count corresponding to a particular combination, a bin mask corresponding to the combination can be selected and the result can be checked through the product of the selected bin masks. For example, when checking the combination of 1, 1, 1, a multiplication operation can be performed between a bin mask 471 with a value of 1 among the bin masks for variable A 420, a bin mask 472 with a value of 1 among the bin masks for variable B 430, and a bin mask 473 with a value of 1 among the bin masks for variable C 4500.
[0123] The output mask 480 generated by such an operation has a value of 1 in the position corresponding to the combination. This makes it possible to confirm the positions of the variables that make up the combination and the number of combinations.
[0124] By expanding this operation, the bin average and bin variance can also be calculated. The bin average is an operation to obtain the average of data having a specific combination of bin variables for another variable. And the bin variance is an operation to obtain the variance for the data. The method of performing this operation is to multiply the bin mask value for the intermediate data 320 in FIG. 3 by the value of another variable for which the user wishes to obtain the average, and even if only the values for the row having the desired combination of bin values are extracted, they can all be added. Then, the bin mask values are all added, and the two values are divided by the previous value to the next value to obtain the average. Using this method, the variance can also be calculated. A more detailed statistical operation will be described with reference to FIG. 26 to FIG. 30.
[0125] Such bin counts may be used in the classification process, such as in association rule mining, etc. However, in order to increase the accuracy of classification, the number of classification cases must be large, and data analysts may try to combine many variables with a larger range of bin values to calculate bin counts.
[0126] On the other hand, data of various continuous values can be expressed as quantile data for convenience of analysis, for example, there may be 50 variable values for one.
[0127] If there are 50 variable values for one variable, the number of possible cases is quite large. If the number of cases is quite large, creating a bin mask for each variable value and performing bin counting would result in a total number of operations of
number
[0128] Therefore, a modified bin counting method for a variety of types of variables will be described below.
[0129] The bin mask in the following is expressed in the form in which the bin value is encoded. For example, when there is data having a bin value range of [1, 10], the bin value may be expressed by 10 bytes. To express a bin value i (∈[1, 10]), a method of setting the i-th byte of the 10 bytes to 1 and the rest to 0 may be used.
[0130] The bin masks set in this manner may be added together, as will be described with reference to FIG.
[0131] FIG. 5 is a diagram for explaining an extended bin count calculation operation according to an embodiment of the present disclosure.
[0132] 5, one power bin mask 502, 512 may include a plurality of slots, and each of the plurality of slots may include a plurality of sub-slots. In the case of a first variable 501, since it has four different variable values, the first power bin mask 502 may include four sub-slots, and each sub-slot may include information on the presence or absence of a specific variable value. The operation of generating such a power bin mask will be described later.
[0133] In this way, when using the power bin mask, it was necessary to generate separate bin masks for each type of variable in the previous process, but now it is sufficient to have one power bin mask for each type of variable.
[0134] The calculation method is the same as the bin mask method, and if a specific combination is required, the sub-slot of the power bin mask corresponding to the combination may be used to generate output data 520. The output data 520 may then be decoded to calculate the value of each combination (530).
[0135] While the methods shown in Figures 3 and 4 generate individual bin masks for each variable value, the method shown in Figure 5 can be said to be a form in which multiple bin masks are combined into one by using sub-slots that are a division of slots shown in Figures 3 and 4.
[0136] The advantages of utilizing such a power bin mask will be explained with reference to FIG.
[0137] 6, when performing a bin operation on two variables 601 and 604 having bin values of 1 to 4 and using a conventional bin mask, 16 multiplications are required. As a result, the final result cannot be known unless the 16 ciphertexts are decrypted. On the other hand, when using an extended bin mask 602, the result can be obtained with only four multiplications and four decryptions. This is because the multiplication result includes all position information when the variables are 1 to 4.
[0138] Due to the characteristics of the proposed method, multiplication between extended bin masks does not work, so only one extended bin mask can participate in the calculation of the bin count. Since the maximum number of bins that can be put into one bin mask is 50, the reduction in the number of multiplications that can be improved by using the proposed method is 1 / 50. Furthermore, multiplication using an extended bin mask requires multiple bin information to be put into one slot, which increases the bit length to be managed per slot, which may affect the multiplication time. Meanwhile, the above-mentioned number of bins and the number of reductions are merely examples and may be applied. quasi The numbers may be altered using a homomorphic ciphertext method.
[0139] On the other hand, for statistical calculations, it is necessary to use not only tables of one owner but also tables of different owners.
[0140] Therefore, a method for combining tables owned by different devices into one will be described below.
[0141] Different DBs are quasi Homogeneously encrypted data may be stored in different ways. However, if each of the different DBs is classified according to its characteristics and stored according to the characteristics of the table, it is possible to easily combine the two tables.
[0142] Specifically, it is assumed that the encrypted tables are owned by different first electronic device 100-1 and second electronic device 100-2, and that they share key information for binding. If there is a third electronic device 100-3 that obeys the protocol, the two encrypted tables may be bound with the support of the third electronic device 100-3. This method does not require any additional steps other than table encryption. quasi It is efficient in that it can join data without homomorphic encryption operations. From the security standpoint, it has the advantage that no information is leaked except for the number of common data in the process of joining multiple tables (Inner-Join) or the number of data owned by the other party that is not owned by the user (Outer-Join).
[0143] Therefore, the column values that correspond to the keys for the join are quasi Instead of homomorphic encryption, a separate HMAC function may be used to perform one-way encryption that is impossible to decrypt. In this case, since the electronic devices 100-1 and 100-2 share the same HMAC key, the execution result of HMAC for the same key value is the same. However, since the HMAC result also depends on the shared key value, if a different HMAC key is used, a different HMAC value will be obtained even if the key value is the same.
[0144] Such an HMAC value and a position value of a row in the table of the original combined key used to generate the HMAC value may be combined to generate a pair of data, and the set of such data may be sorted using the HMAC key value and then transmitted to the third electronic device 100-3, where the position value means the combined key value and the row number of another data connected thereto.
[0145] The merge authority uses the HMAC value to determine the matching key, and when each electronic device sends adjacent row value information, the first and second electronic devices transmit the encrypted data for that row to the third electronic device 100-3, which combines the metadata of the data sent from the two devices to create metadata for a single merged table, thereby performing the merge.
[0146] A more detailed description of the combining operation is provided below with reference to FIG.
[0147] FIG. 7 is a diagram for explaining a method of combining a plurality of encryption tables.
[0148] Referring to FIG. 7, when two electronic devices 100-1, 100-3 each have a table with different row and column values, and a join key close to 1:1 join that can join the two tables exists in both tables (for example, in the case of two tables containing information related to personal names, a resident registration number, etc.), this means a protocol for creating an encrypted table of type 1) for a joined table that joins the two tables.
[0149] The participants in the protocol are: Data Owning Institution D 1 , D 2 There exists a data joiner F and a data joiner Z who owns the final encrypted join table. Here, D 1 , D 2 may be the electronic device or server shown in Fig. 1. Note that the data combiner may also be the electronic device or server shown in Fig. 1.
[0150] Data Owner D 1 , D 2 is the same quasi Homomorphic encryption key instance (
number
number
number
number
[0151] quasi Homomorphic encryption related parameters and algorithms are 1 , D 2 , Z are shared, and the MAC algorithm (
number
[0152] Data Owner D 1 , D 2 The data owned by may be written as follows:
[0153] Data Owner D 1 , D 2 are respectively
number
number
[0154] The remaining columns feature:
number
[0155] In addition,
number
number
number
[0156] Therefore, Agency D 1 Any user owned by
number
number
[0157] Data Owner D 1 , D 2 For keys that exist in common, it can be divided into Inner-Join, which performs joining, and Outer-Join, which performs joining on all data in the two institutions. The detailed operation is as follows.
[0158] (Initial environment) Institution D 1 , D 2 , F, and Z, and the information they possess is the same as described above.
[0159] 1. Each institution
number
number
number
number
[0160] 2. All data
number
number
number
number
number
number
number
number
[0161] 3. Each institution
number
number
[0162] 4. F was transmitted
number
number
number
number
number
number
number
number
number
number
[0163] First, we will describe the case of Outer-Join.
[0164] a) Ordered data
number
[0165] b)
number
[0166] c) Permutation
number
number
number
number
number
number
number
number
number
number
number
[0167] d) F is
number
number
number
number
number
number
[0168] e) UID X was conveyed
number
number
number
number
[0169] f) Then,
number
number
number
number
number
[0170] g) X is
number
number
[0171] h) F is, respectively
number
number
number
number
number
[0172] The results of i) and h) are
number
number
number
[0173] j) F is the combined encryption table
number
number
[0174] Inner-Join is similar to Outer-Join above, but it differs only in steps a), b), and c) as follows. Note that step f) is not performed.
[0175] a) Ordered data
number
[0176] b)
number
[0177] d) F is
number
number
[0178] In the following, the actual statistical operations using the bin masks mentioned above will be described.
[0179] FIG. 8 is a diagram for explaining a statistical calculation method using a bin mask according to an embodiment of the present disclosure.
[0180] Referring to FIG. 8, raw data and numerical data for the raw data are displayed. The operation of converting raw data into numerical data is common, so a detailed explanation will be omitted. Meanwhile, in the illustrated example, the numerical data is displayed in plain text for ease of explanation, but the actual data is quasi This is the homomorphically encrypted ciphertext state.
[0181] If we want to find the number of people in a metropolitan city who are 60 years old or older using data like the one above, we can count using a bin mask with 3 for age and 2 for region.
[0182] In addition, when calculating the average trust level of Seoul residents, a 1-bin mask is used to detect the corresponding slot for the region, and the encrypted trust level information corresponding to the detected slot is quasi The average may be calculated using isomorphic addition. More detailed conditional statistical operations are described below.
[0183] The following describes in more detail how the above statistical calculations are performed using the above bin mask and the extended bin mask.
[0184] For ease of explanation, categorical variables are referred to as "bin variables" (or bin features), and for computational convenience, bin features are represented as consecutive positive integers starting from 1. For example, a column of a bin variable with three categories would have each row with a value of 1, 2, or 3.
[0185] The system according to the present disclosure may provide statistical calculations for data in which a certain bin variable has a specific value, i.e., belongs to a specific category, because the above-mentioned mean, variance, and standard deviation calculations are calculations for all data, and therefore the statistical characteristics of data in a specific category may differ.
[0186] It should be noted that statistical operations can be performed not only on data with conditions for one bin variable, but also on data with conditions for any number of multiple bin variables.
[0187] The above statistical calculation is equivalent to implementing the following calculation formula in an encrypted state:
[0188] average:
number
number
number
number
number
number
[0189] [Formula 9]
number
number
number
number
number
number
[0190] The above process requires comparison operations between the bin variable sequence and specific integer values.
[0191] but, quasi Since comparison operations using isomorphic operations are costly, the comparison results can be stored in advance in a bin mask and used for operations.
[0192] Certain bin features
number
number
number
number
number
number
number
number
number
number
number
number
[0193] The operation of generating the bin mask used in the statistical calculation will be described in more detail below.
[0194] First, the bin mask may be generated during the encryption stage or after the encryption stage. First, the operation of generating the bin mask during the encryption stage will be described below with reference to FIG.
[0195] 9 and 10 are diagrams for explaining a process of generating a bin mask using plaintext according to an embodiment of the present disclosure. Specifically, they are diagrams for explaining a process of generating a bin mask by referring to plaintext data when encryption is performed by the data owner. Specifically, FIG. 9 shows a case where a v-bit table is used, and FIG. 10 shows a case where a v-bit table is not used.
[0196] 9 and 10, the indices of the bin features for which a bin mask is to be created are expressed as a vector
number
number
[0197] The plain text data table is
number
number
number
[0198] The following describes the operation of generating the bin mask after the encryption operation.
[0199] The generation of the bin mask after the encryption operation is performed in the encrypted state if the plaintext data cannot be accessed. quasi It may be used in generating bin masks using isomorphic arithmetic.
[0200] First, in order to generate the bin mask, it is necessary to realize the following integer comparison operation in the encrypted state:
[0201] [Formula 10]
number
number
[0202] [Formula 11]
number
number
number
[0203] In this case, the following sinc function may be used as the approximation function.
[0204] [Formula 12]
number
number
[0205] first,
number
[0206] [Formula 13]
number
number
number
number
number
number
number
number
number
number
number
number
[0207]
number
number
[0208] [Formula 14]
number
number
[0209] [Formula 15]
number
number
number
[0210] The polynomials generated by such an approximation method are
number
[0211] Using such a method,
number
number
number
[0212] If there is an error here, use the double angle formula
number
number
[0213] FIG. 11 is a diagram illustrating an approximation algorithm according to an embodiment of the present disclosure.
number
number
[0214] Referring to FIG. 11, the ciphertext
number
number
number
number
[0215] Input
number
number
number
number
[0216] In this case, the multiplication operation is
number
[0217] The operation of generating a bin mask using integer comparison operations generated using the above method will be described with reference to FIG.
[0218] FIG. 12 is a block diagram of an embodiment of the present disclosure. quasi FIG. 13 is a diagram for explaining a bin mask generation operation using a homomorphic ciphertext.
[0219] Referring to FIG. 12, the indices of the bin features for which we want to create a bin mask are expressed as the vector
number
number
[0220] It can take as input an encrypted data table X and an encrypted v-bit table v.
[0221] The output value is b
number
[0222] A specific method for calculating the bin count using the generated bin mask will be described below.
[0223] FIG. 13 is a diagram for explaining the operation of the bin count calculation according to an embodiment of the present disclosure.
[0224] Here, the bin count operation is a function that counts the number of rows that satisfy conditions for multiple bin features.
[0225] A vector of bin features as input
number
number
number
number
number
number
[0226] At this time, the previously generated bin mask is used, but since the v-bit is referenced in the previous bin mask process, no separate consideration is required for the v-bit.
[0227] When all the bin masks that meet the conditions are multiplied row-wise, if all the conditions are met, the value will be 1, and if not, the value will be 0.
[0228] Therefore, the bin count operation is performed by adding up the values of all slots that are the result of this multiplication.
[0229] In Figure 13, the input of the bin count calculation, b
number
[0230] and,
number
number
number
number
[0231] Below, a variation of the bin count calculation operation described above is described.
[0232] First, the modified bin counting method (hereinafter referred to as large bin counting) finds the number of all cases that multiple bin features of certain data make, and displays the results in the form of a table.
[0233] A specific operation will be described with reference to FIG.
[0234] FIG. 14 is a diagram for explaining original data and a target of a large bin count operation according to an embodiment of the present disclosure.
[0235] Referring to FIG. 14, a desired result table is shown for 5 bin features A, B, C, D, and E with maximum bin variables.
[0236] If the maximum bin value is
number
number
[0237] The bin counting method uses a pre-created bin mask, as described above.
number
number
[0238] As shown in Figure 14, the method for counting the number of cases where all five features have a value of 1 is as follows. The method will be described with reference to Figure 15.
[0239] FIG. 15 is a diagram for explaining a method for calculating the number of specific cases using a bin mask.
[0240] Referring to FIG. 15, the bin mask
number
[0241] Therefore, by adding up the values of all the rows of the multiplication result, we can obtain the number of cases we are looking for.
[0242] However, in this process of multiplying and adding by the bin mask, it is possible to find only the number of cases among all combinations.
[0243] Therefore, m bin features
number
number
number
[0244] When a data table has n rows and each ciphertext has M slots, each column is
number
number
[0245] The larger the number of bin features for which the number of cases is to be calculated and the larger the respective maximum bin values, the greater the number of multiplication operations required.
[0246] Therefore, a method for calculating the number of cases with fewer multiplications will be described below.
[0247] To this end, a power bin mask may be used instead of a bin mask.
[0248] Each row of the power bin mask is represented as follows when the corresponding bin feature value is i:
number
number
[0249] FIG. 16 is a diagram for explaining a bin count calculation operation using a power bin mask according to an embodiment of the present disclosure.
[0250] Referring to FIG.
number
[0251] In this way, when the power bin mask 1620 is generated, as in the conventional method,
number
[0252] The value of each row of the multiplication result is 0 if none of features B, C, D, and E are 1. Then, add up the values of all the rows. At this time, the number of rows to be added is
number
number
[0253] The example in Figure 16 shows the result of adding only the six columns 1640 presented, where the value in the three least significant bits indicates the number of cases where all features are 1, and the value stored in the three most significant bits indicates the number of cases where feature A is 5 and the rest are 1.
[0254] This result includes all five cases when B, C, D, and E are all 1, and A = 1 to 5. Therefore, this method performs the same number of multiplications as the conventional bin counting method, but it is the same as finding the number of cases that are five times more than the conventional bin counting method.
[0255] Therefore, m bin features
number
number
number
number
number
[0256] On the other hand, in order to apply the power bin mask method as described above, quasi Consider the error term of homomorphic encryption, and set each row of the bin mask to 0 or
number
number
[0257] Bottle mask
number
number
[0258] for that,
number
number
[0259] This new
number
number
[0260] The total bin count operation taking such error terms into account is shown in FIG.
[0261] FIG. 17 is a diagram for explaining a bin counting operation taking into account an error term according to an embodiment of the present disclosure.
[0262] 17, four bin features 1740, 1750 of B, C, D, and E are generated by two new bin features to generate a new big bin mask. In this way, when the big bin mask is generated, it may be multiplied by the previously generated power big mask 1730 to obtain the number of cases.
[0263] To summarize the above bin count calculation operation, a power bin mask and a big bin mask may be generated in advance. This bin masking process may be performed during the encryption process or after the encryption process.
[0264] Once the power bin mask and the big bin mask are generated, a multiplication operation may be performed between the masks, and a decoding process may be performed to confirm the operation result.
[0265] Specifically, for large bin counting, we use one feature (f 0 ) may generate an extended bin mask.
[0266] And the rest
number
number
number
number
number
number
[0267] At this time, the generated expanded bin mask, big bin mask 1, and big bin mask 2 are respectively as follows:
number
number
number
[0268] [Formula 16]
number
number
number
number
number
[0269] Referring to FIG. 18, in the expanded bin mask, the value of each slot is:
number
[0270] On the other hand, certain quasi In a homogeneous encryption system, errors occur in the lower bits, so the value of each slot in the power bin mask is assigned a lower bit.
number
[0271] Input
number
[0272] Here, n is the number of data rows, and M is the number of slots in one ciphertext.
[0273] FIG. 19 is a diagram for explaining a generation operation of a power bin mask according to another embodiment of the present disclosure.
[0274] Referring to Figure 19, all but one of the power bins used to create the mask
number
[0275] A normal bin mask uses 0 or 1 to indicate whether a particular value applies or not.
number
[0276]
number
number
number
number
number
[0277] As a result of this process, a bin mask for the hypothetical new two columns may be generated, i.e., n is the number of rows.
number
[0278] This process is to ensure that the value stored in each slot does not become greater than or equal to the modulus bits during the multiplication of the large bin count.
[0279] Thus, once the large bin count and the big bin count are prepared, a multiplication operation may be performed.
[0280] Specifically, all
number
[0281] Fig. 20 is a diagram for explaining a multiplication operation between a plurality of bin masks according to an embodiment of the present disclosure, and Fig. 21 is a diagram for explaining a multiplication operation using a plurality of GPUs.
[0282] Referring to FIG. 20, each of the GPUs 2010, 2020, 2030, and 2040 may operate in parallel. Therefore, the number of GPUs is
number
number
number
number
[0283] After processing one block, the result is
number
[0284] Save it for all blocks,
number
number
number
[0285] In the calculation process, when the GPU can load one extended bin mask, c big bin masks 1, and c big bin masks 2 at a time, the algorithm is as shown in FIG.
[0286] In FIG. 21, c is a positive integer that is determined according to the memory size of the GPU used.
number
[0287] Since the mask generated by this process is in an encrypted state, it is difficult to use this information as it is. Therefore, the decryption operation after the multiplication operation will be described below.
[0288] FIG. 22 is a diagram for explaining a decoding operation after a multiplication operation according to an embodiment of the present disclosure.
[0289] Referring to FIG. 22, the output value of the previous operation is
number
number
number
number
number
[0290] Since BinBin1 and BinBin2 are representations of m-1 features using two features,
number
number
number
number
[0291] Therefore,
number
number
number
number
[0292] As shown, the input to the algorithm is the result of a multiplication process of the previous bin mask. The result of this process is a multiplication process that counts all cases.
number
[0293] Fig. 23 is a diagram showing a data structure of a bin mask according to an embodiment of the present disclosure. Specifically, Fig. 23 is a diagram showing the area occupied by each slot value when generating a power bin mask 2310 and big bin masks 2320 and 2330.
[0294] Referring to FIG. 23, the feature
number
number
number
number
number
number
[0295] 24 is a diagram showing a data structure of a multiplication result according to an embodiment of the present disclosure, specifically, FIG. 24 shows the use of the modulus bit of any slot obtained as a result of the multiplication process.
[0296] Referring to Figure 24, if we add up the results processed by the same GPU, we get the following results:
number
number
number
number
number
[0297] If we express the contents shown in Figure 24 in mathematical terms, one slot of the power bin mask is
number
number
[0298] What we want to get through this operation corresponds to a specific bin value, so we use the lower bin of any slot of the multiplication result.
number
number
[0299] The multiplication result of any slot may be expressed as follows:
[0300] [Formula 17]
number
number
number
number
[0301] Here, if we consider the addition of the result generated by another block after the multiplication, under the above conditions,
number
number
number
number
[0302] [Formula 18]
number
[0303] [Formula 19]
number
number
number
[0304] Meanwhile, in the above process, m-1 features are expressed by two columns to create a big bin mask, but it is also possible to express them by any natural number k of columns.
[0305] When expressed as k columns,
number
[0306] In this case, the result of the multiplication is
number
[0307] [Formula 20]
number
number
[0308] FIG. 25 is a diagram for explaining a comparison operation according to the present disclosure.
[0309] To calculate the statistics, quasi A comparison of values in homomorphic ciphertext is required, i.e. quasi It is necessary to check whether the ciphertext value in the homomorphic ciphertext corresponds to a specific variable value. Figure 25 shows a comparison algorithm for this purpose.
[0310] Referring to FIG. 25, two variables may be input and a comparison result may be calculated by performing an arithmetic operation on the two variables. quasi In a homomorphic ciphertext state, the comparison result may be calculated using an approximation function to the sinc function as described above.
[0311] 26 to 28 are diagrams for explaining various statistical calculation methods according to an embodiment of the present disclosure.
[0312] Specifically, FIG. 26 is an algorithm 2600 for the averaging method.
[0313] Referring to FIG. 26, the bin feature index vector
number
number
number
number
number
number
number
number
number
number
number
number
[0314] The whole process is as follows:
number
number
number
number
number
number
[0315] The above process is an average process,
number
number
number
number
[0316] FIG. 27 is a diagram for explaining an algorithm 2700 for a method of calculating the variance.
[0317] Referring to Figure 27, like the bin average above, this time we calculate the variance instead of the average. The variance is also calculated for a temporary data sequence.
number
number
number
number
number
number
[0318] The above process adds approximately
number
number
number
number
[0319] FIG. 28 is a diagram for explaining an algorithm 2800 for a method of calculating the correlation coefficient.
[0320] 2feature of data table
number
number
number
number
number
[0321] The difficulty of the above task is to find the reciprocal of the number related to the task. The reason is that it is necessary to set the range of values for which the inverse calculation is required and set the parameters so that the result does not diverge within the range, and approximation algorithms are mainly composed of iterative algorithms. Therefore, for the accuracy of the result, the number of iterations should be increased, but since the cost of calculation increases as the number of iterations increases, it is necessary to perform an appropriate number of iterations. On the other hand, quasi Homomorphic ciphertext requires a reboot operation after a certain number of operations at which an error is contained.
[0322] FIG. 29 is a diagram for explaining the operation of calculating the maximum value in a slot according to the present disclosure.
[0323] Referring to FIG. 29, the algorithm 2900 includes: quasi The value of one slot in the homomorphic ciphertext may be stored, and the stored value may be compared with the values of the different slots in sequence to calculate the maximum value. The comparison operation may use the comparison algorithm shown above.
[0324] FIG. 30 is a diagram for explaining the operation of calculating the maximum values in a plurality of columns in a plurality of blocks.
[0325] Referring to FIG. 30, the algorithm 3000 may first calculate the maximum value having the highest value for each block using an algorithm such as that of FIG. 29, and then calculate the maximum value within multiple blocks by comparing the calculated maximum values.
[0326] Although only the operation of calculating the maximum value has been described above, it is also possible to calculate the minimum value through the operation of calculating a smaller value in the comparison process.
[0327] FIG. 31 is a diagram illustrating a method for calculating a specific ranking value according to an embodiment of the present disclosure.
[0328] 31, the percentile number algorithm 3100 is similar to sorting data in ascending order. First, a sorting process is performed, whereby a value corresponding to the requested percentile number may be calculated.
[0329] FIG. 32 is a flowchart illustrating a ciphertext processing method according to an embodiment of the present disclosure.
[0330] Referring to FIG. 32, first, a plurality of quasi A statistical calculation command for the homomorphic ciphertext is received (S3210). Such a statistical calculation command may include calculation of the number of variables having a particular value, the average or variance of values that satisfy a particular condition, etc.
[0331] And multiple quasi A homomorphic ciphertext may store multiple variable information in an encrypted state.
[0332] and, quasi A bin mask having different variable information is generated for each of the homomorphic ciphertexts (S3220). The bin mask generation is performed as described above. quasi may be generated during the process of generating homomorphic ciphertext, quasi The bin mask may be generated in the state of a homomorphic ciphertext. The bin mask may be a bin mask having only one variable information per slot, or may be an extended bin mask including the presence or absence of multiple variable values, or the above-mentioned power bin mask, big bin mask, etc.
[0333] Then, the bin masks are used to generate number information corresponding to the combination of variables (S3230). Specifically, a count value that meets a specific condition may be calculated using the product of the generated bin masks.
[0334] Then, the calculated number information may be output. This output may be performed in an encrypted state, or the information may be decrypted and output as a decrypted result.
[0335] Therefore, the encryption method according to the present embodiment is as follows: quasi Efficient statistical operations can be performed on homomorphic ciphertexts. The ciphertext processing method shown in Fig. 32 may be performed on an electronic device having the configuration shown in Fig. 2, or on electronic devices having other configurations.
[0336] In addition, the above-mentioned ciphertext processing method may be realized by a program including an algorithm executable by a computer, and the above-mentioned program may be provided by being stored in a non-transitory computer readable medium.
[0337] The non-transitory readable medium refers to a medium that stores data semi-permanently and can be read by a device, rather than a medium that stores data for a short period of time such as a register, cache, memory, etc. In particular, the programs for performing the above-mentioned various methods may be stored and provided in a non-transitory readable medium such as a CD, DVD, hard disk, Blu-ray disk, USB, memory card, ROM, etc.
[0338] Although the preferred embodiment of the present invention has been described in detail above with reference to the accompanying drawings, the present invention is not limited to the above embodiment. It is clear that a person having ordinary knowledge in the technical field to which the present invention pertains can conceive of various modified or altered examples within the scope of the technical intent described in the claims, and it is understood that these also naturally belong to the technical scope of the present invention.
Claims
1. In an electronic device, A memory that stores at least one instruction and stores a plurality of homomorphic ciphertexts that store a plurality of variable information in an encrypted state; a processor for executing said at least one instruction; Including, The processor, An electronic device that executes the at least one instruction to receive an operation command for a plurality of homomorphic ciphertexts and generates, for each of the plurality of homomorphic ciphertexts, number information corresponding to a combination of variables using a bin mask that divides different variable information.
2. the homomorphic ciphertext comprises a plurality of slots; The electronic device of claim 1 , wherein each of said plurality of slots has one variable information.
3. The bin mask is Contains multiple slots, Each of the plurality of slots includes information regarding the presence or absence of a variable value; The processor, 2. The electronic device of claim 1, further comprising: for each homomorphic ciphertext, generating a plurality of bin masks for each variable information included in the homomorphic ciphertext; selecting a bin mask corresponding to the combination of variables from the generated plurality of bin masks; and generating count information having the combination of variables using a product between the selected bin masks.
4. The bin mask may be Contains multiple slots, Each of the plurality of slots includes a plurality of sub-slots including information regarding the presence or absence of a variable value; The processor, The electronic device of claim 1 , further comprising: generating one bin mask for each homomorphic ciphertext; and generating count information having the combination of variables using a sub-slot in a bin mask corresponding to the combination of variables among a plurality of bin masks for the plurality of homomorphic ciphertexts.
5. The electronic device according to claim 4 , wherein the plurality of sub-slots are arranged within one slot at a preset bit interval.
6. The processor, The electronic device of claim 1 , further comprising: a first homomorphic ciphertext and a second homomorphic ciphertext, the first and second homomorphic ciphertext including a plurality of pieces of information for a same feature, being combined into one homomorphic ciphertext.
7. The processor, 7. The electronic device of claim 6, further comprising: a first location information in the first homomorphic ciphertext and a second location information in the second homomorphic ciphertext for common information in the first homomorphic ciphertext and the second homomorphic ciphertext, the first homomorphic ciphertext and the second homomorphic ciphertext being combined together.
8. The processor, 8. The electronic device of claim 7, wherein when data encrypted using a one-way encryption method with a predetermined common key for each of a plurality of pieces of information contained in the first and second homomorphic ciphertexts and location information within the homomorphic ciphertext for the encrypted data are input, the encrypted data for the first homomorphic ciphertext and the encrypted data for the second homomorphic ciphertext are compared, and the first location information and the second location information having information common between both homomorphic ciphertexts are confirmed.
9. A ciphertext processing method for homomorphic ciphertext, comprising: A step of storing a plurality of homomorphic ciphertexts each storing a plurality of pieces of variable information in an encrypted state, and receiving an operation instruction for the plurality of homomorphic ciphertexts; generating a bin mask having different variable information for each of the plurality of homomorphic ciphertexts; generating count information corresponding to combinations of variables using the bin mask; outputting the generated number information; 4. A method of processing a ciphertext comprising:
10. the homomorphic ciphertext comprises a plurality of slots; The ciphertext processing method according to claim 9 , wherein each of the plurality of slots has one piece of variable information.
11. The bin mask may be Contains multiple slots, Each of the plurality of slots includes information regarding the presence or absence of a variable value; The step of generating a bin mask comprises: For each homomorphic ciphertext, generate a plurality of bin masks according to variable information included in the homomorphic ciphertext; The step of generating the number information includes:
10. The ciphertext processing method according to claim 9, further comprising: selecting a bin mask corresponding to the combination of variables from among the generated bin masks; and generating count information having the combination of variables using a product between the selected bin masks.
12. The bin mask may be Contains multiple slots, Each of the plurality of slots includes a plurality of sub-slots including information regarding the presence or absence of a variable value; The step of generating a bin mask comprises: Generate one bin mask for each homomorphic ciphertext; The step of generating the number information includes: The ciphertext processing method according to claim 9 , further comprising generating number information having the combination of variables using a sub-slot in a bin mask corresponding to the combination of variables among a plurality of bin masks for the plurality of homomorphic ciphertexts.
13. The ciphertext processing method according to claim 12 , wherein the plurality of sub-slots are arranged within one slot at a preset bit interval.
14. The ciphertext processing method according to claim 9 , further comprising the step of combining the first homomorphic ciphertext and the second homomorphic ciphertext, each of which includes a plurality of pieces of information for a same feature, into one homomorphic ciphertext.
15. The step of combining includes:
15. The ciphertext processing method according to claim 14, further comprising combining the first homomorphic ciphertext and the second homomorphic ciphertext into one using first position information in the first homomorphic ciphertext and second position information in the second homomorphic ciphertext for common information in the first homomorphic ciphertext and the second homomorphic ciphertext.
16. The step of combining includes:
16. The ciphertext processing method according to claim 15, wherein when data encrypted by a one-way encryption method with a predetermined common key for each of a plurality of pieces of information contained in a first and a second homomorphic ciphertext and position information within the homomorphic ciphertext for the encrypted data are input, the encrypted data for the first homomorphic ciphertext and the encrypted data for the second homomorphic ciphertext are compared, and the first position information and the second position information having information common between both homomorphic ciphertexts are confirmed.
17. A computer-readable recording medium including a program for causing an electronic device to execute a ciphertext processing method, comprising: The ciphertext processing method includes: A step of storing a plurality of homomorphic ciphertexts each storing a plurality of pieces of variable information in an encrypted state, and receiving an operation instruction for the plurality of homomorphic ciphertexts; generating a bin mask having different variable information for each of the plurality of homomorphic ciphertexts; generating count information corresponding to combinations of variables using the bin mask; outputting the generated number information; A computer-readable recording medium comprising:
Citation Information
Patent Citations
Name sorting control method
JP2005301978A
Method for encryption process, method for decryption process, device and program
JP2013125039A
A homomorphic-based method of distributing data from one or more metering devices to two or more third parties
JP2017527192A
System and architecture for supporting analytics on encrypted databases
JP2019035949A
System and architecture for supporting analytics on encrypted databases
US20190050589A1
