WO2021256843A1 - 동형 암호문에 대한 통계 연산 수행하는 장치 및 방법 - Google Patents

동형 암호문에 대한 통계 연산 수행하는 장치 및 방법 Download PDF

Info

Publication number
WO2021256843A1
WO2021256843A1 PCT/KR2021/007517 KR2021007517W WO2021256843A1 WO 2021256843 A1 WO2021256843 A1 WO 2021256843A1 KR 2021007517 W KR2021007517 W KR 2021007517W WO 2021256843 A1 WO2021256843 A1 WO 2021256843A1
Authority
WO
WIPO (PCT)
Prior art keywords
homomorphic
ciphertext
information
empty
mask
Prior art date
Application number
PCT/KR2021/007517
Other languages
English (en)
French (fr)
Inventor
천정희
이윤호
남유진
김승지
Original Assignee
주식회사 크립토랩
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 크립토랩 filed Critical 주식회사 크립토랩
Priority to US17/999,389 priority Critical patent/US20230208611A1/en
Priority to CN202180042724.0A priority patent/CN115918028A/zh
Priority to EP21826346.5A priority patent/EP4149045A4/en
Priority to KR1020227040329A priority patent/KR102522708B1/ko
Priority to JP2022575885A priority patent/JP2023529690A/ja
Publication of WO2021256843A1 publication Critical patent/WO2021256843A1/ko

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/008Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols involving homomorphic encryption
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/52Multiplying; Dividing
    • G06F7/523Multiplying only
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/065Encryption by serially and continuously modifying data stream elements, e.g. stream cipher systems, RC4, SEAL or A5/3
    • H04L9/0656Pseudorandom key sequence combined element-for-element with data sequence, e.g. one-time-pad [OTP] or Vernam's cipher
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/46Secure multiparty computation, e.g. millionaire problem

Definitions

  • the present disclosure relates to an apparatus and method for performing statistical calculation on homomorphic ciphertext, and more particularly, to an electronic device and method for efficiently performing statistical calculation on homomorphic ciphertext.
  • a cloud computing service in which a user stores his/her personal information and the like in a server and uses the information of the server is also being actively used.
  • the server stores the encrypted data.
  • the server whenever the server searches for stored data or performs a series of operations based on the data, it must decrypt the encrypted data, resulting in wasted resources and time.
  • homomorphic encryption methods are being studied. If the homomorphic encryption method is used, even if an operation is performed on the ciphertext itself without decrypting the encrypted information, the same result as the encrypted value after operation on the plaintext can be obtained. Accordingly, various operations can be performed without decrypting the ciphertext.
  • an object of the present disclosure is to provide an electronic device and method capable of efficiently performing statistical calculations on homomorphic ciphertext.
  • the electronic device stores at least one instruction (instruction) and stores a plurality of isomorphic ciphertext for storing a plurality of variable information in an encrypted state; and a processor that executes the at least one instruction, wherein the processor executes the at least one instruction, so that when an operation command for the plurality of homomorphic ciphertexts is received, different variable information for each of the homomorphic ciphertexts is distinguished.
  • the number information corresponding to the variable combination may be generated by using the blank mask having the void mask.
  • the homomorphic cipher text includes a plurality of slots, and each of the plurality of slots may have one variable information.
  • the blank mask includes a plurality of slots, each of the plurality of slots includes information on the existence of one variable value, and the processor is configured for each of the isomorphic ciphertext by variable information included in the isomorphic ciphertext.
  • a plurality of empty masks may be generated, an empty mask corresponding to the variable combination may be selected from among the plurality of generated empty masks, and number information having the variable combination may be generated by using a product between the selected empty masks.
  • the blank mask includes a plurality of slots, each of the plurality of slots includes a plurality of sub-slots including information on the existence of one variable value, and the processor generates one An empty mask may be generated, and number information having the variable combination may be generated by using a sub-slot in the empty mask corresponding to the variable combination among the plurality of empty masks.
  • the plurality of sub-slots may be arranged in one slot with a predetermined bit interval.
  • the processor may combine a first homomorphic ciphertext and a second homomorphic ciphertext including a plurality of pieces of information on the same characteristic into one homomorphic ciphertext.
  • the processor uses the first location information in the first figure ciphertext and the second location information in the second isomorphic ciphertext for information common in the first isomorphic ciphertext and the second isomorphic ciphertext, the first isomorphic ciphertext
  • the ciphertext and the second homomorphic ciphertext may be combined into one.
  • the processor when the processor receives data encrypted by a one-way encryption method with a common key preset for each of a plurality of pieces of information included in the first and second homomorphic ciphertexts and location information in the homomorphic ciphertext for the encrypted data, By comparing the encrypted data for the first homomorphic ciphertext and the encrypted data for the second homomorphic ciphertext, the first location information and the second location information having information common between the two homomorphic ciphertexts may be confirmed.
  • the ciphertext processing method for the homomorphic ciphertext includes storing a plurality of homomorphic ciphertexts for storing a plurality of variable information in an encrypted state, and receiving an operation command for the plurality of homomorphic ciphertexts; generating an empty mask having different variable information for each of the plurality of homomorphic ciphertexts, generating number information corresponding to a variable combination using the empty mask, and outputting the generated number information includes
  • the homomorphic ciphertext may include a plurality of slots and may have one variable information in each of the plurality of slots.
  • the empty mask includes a plurality of slots, each of the plurality of slots includes information on the existence of one variable value, and the step of generating the empty mask includes: generating a plurality of bin masks for each variable information included in Number information having the above variable combinations may be generated.
  • the empty mask includes a plurality of slots, and each of the plurality of slots includes a plurality of sub-slots including information on the existence of one variable value, and the generating of the empty mask includes isomorphic ciphertext.
  • the number information having the variable combination is generated by using a sub-slot in the bin mask corresponding to the variable combination among the plurality of empty masks.
  • the plurality of sub-slots may be arranged in one slot with a predetermined bit interval.
  • the encryption processing method may further include combining the first homomorphic ciphertext and the second homomorphic ciphertext including a plurality of pieces of information for the same characteristic into one homomorphic ciphertext.
  • the first position information in the first figure cipher text and the second position information in the second homomorphic cipher text for common information in the first isomorphic cipher text and the second isomorphic cipher text are used to obtain the second
  • the first homomorphic ciphertext and the second homomorphic ciphertext may be combined into one.
  • data encrypted by a one-way encryption method with a common key preset for each of a plurality of pieces of information included in the first and second homomorphic ciphertexts and location information within the homomorphic ciphertext for the encrypted data is input , by comparing the encrypted data for the first isomorphic cipher text and the encrypted data for the second isomorphic cipher text, the first location information and the second location information having information common between the two isomorphic cipher texts may be confirmed.
  • the cipher text processing method stores a plurality of isomorphic cipher texts for storing a plurality of variable information in an encrypted state and receiving an operation command for the plurality of homomorphic ciphertexts, generating an empty mask having different variable information for each of the plurality of isomorphic ciphertexts, using the empty mask, the number corresponding to a variable combination generating information, and outputting the generated number information.
  • various statistical processing is possible using the homomorphic ciphertext, and statistical processing is possible by merging homomorphic ciphertexts having different data structures.
  • FIG. 1 is a diagram for explaining the structure of a network system according to an embodiment of the present disclosure
  • FIG. 2 is a block diagram illustrating a simple configuration of an electronic device according to an embodiment of the present disclosure
  • 3 and 4 are diagrams for explaining a bin count calculation method according to an embodiment of the present disclosure
  • FIGS. 5 and 6 are diagrams for explaining an extended bin count operation operation according to an embodiment of the present disclosure.
  • FIG. 7 is a view for explaining a method of combining a plurality of encryption tables
  • FIG. 8 is a view for explaining a statistical calculation method using an empty mask according to an embodiment of the present disclosure.
  • 9 and 10 are diagrams for explaining a process of generating an empty mask using plain text according to an embodiment of the present disclosure.
  • FIG. 11 is a diagram illustrating an approximation algorithm according to an embodiment of the present disclosure.
  • FIG. 12 is a view for explaining an operation of generating an empty mask using a homomorphic cipher text according to an embodiment of the present disclosure
  • FIG. 13 is a view for explaining an operation of an bin count operation according to an embodiment of the present disclosure.
  • FIG. 14 is a diagram for explaining original data and a goal of a large bin count operation according to an embodiment of the present disclosure
  • 15 is a view for explaining a method of calculating the number of numbers in a specific case using an empty mask
  • 16 is a view for explaining a bin count operation using a power bin mask according to an embodiment of the present disclosure
  • 17 is a view for explaining a bin count operation in consideration of an error term according to an embodiment of the present disclosure.
  • FIG. 18 is a view for explaining an operation of generating a power bin mask according to an embodiment of the present disclosure
  • 19 is a view for explaining an operation of generating a power bin mask according to another embodiment of the present disclosure.
  • 20 is a diagram for explaining a multiplication operation between a plurality of bin masks according to an embodiment of the present disclosure
  • 21 is a diagram for explaining a multiplication operation using a plurality of GPUs
  • 22 is a diagram for explaining a decoding operation after a multiplication operation according to an embodiment of the present disclosure
  • FIG. 23 is a diagram illustrating a data structure of an empty mask according to an embodiment of the present disclosure.
  • 24 is a diagram illustrating a data structure of a result of a multiplication operation according to an embodiment of the present disclosure
  • 25 is a view for explaining a comparison operation according to the present disclosure.
  • 26 to 28 are views for explaining various statistical calculation methods according to an embodiment of the present disclosure.
  • 29 is a diagram for explaining an operation of calculating a maximum value in a slot according to the present disclosure.
  • FIG. 30 is a diagram for explaining an operation of calculating a maximum value in several columns in a plurality of blocks
  • 31 is a diagram illustrating a method of calculating a value of a specific rank according to an embodiment of the present disclosure.
  • 32 is a flowchart illustrating a cipher text processing method according to an embodiment of the present disclosure.
  • Encryption/decryption may be applied as needed to the information (data) transmission process performed in the present disclosure, and the expressions describing the information (data) transmission process in the present disclosure and claims are all encrypted/decrypted, even if not separately mentioned. It should be construed as including cases.
  • expressions such as "transfer from A to B (transfer)" or "A receives from B” include transmission (transmission) or reception with another medium included in the middle, and must be from A to B. It does not represent only direct transmission (delivery) or reception.
  • value is defined as a concept including not only a scalar value but also a vector and polynomial form.
  • Each of S1 and S2 is an element in the R set.
  • FIG. 1 is a diagram for explaining the structure of a network system according to an embodiment of the present disclosure.
  • a 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 configuration includes a network 10 ) can be connected to each other.
  • the network 10 may be implemented as various types of wired and wireless communication networks, broadcast communication networks, optical communication networks, cloud networks, etc., and each device may be connected in a manner such as Wi-Fi, Bluetooth, NFC (Near Field Communication), etc. without a separate medium. may be
  • FIG. 1 Although it is illustrated in FIG. 1 that there are a plurality of electronic devices (100-1 to 100-n), a plurality of electronic devices is not necessarily used, and one device may be used.
  • the electronic devices 100-1 to 100-n may be implemented as various types of devices such as smartphones, tablets, game players, PCs, laptop PCs, home servers, kiosks, etc. It can also be implemented in the form of home appliances.
  • the user may input various information through the electronic devices 100-1 to 100-n used by the user.
  • the input information may be stored in the electronic devices 100-1 to 100-n itself, or may be transmitted to and stored in an external device for reasons such as storage capacity and security.
  • the first server device 200 serves to store such information
  • the second server device 300 may serve to use some or all of the information stored in the first server device 200 . have.
  • Each of the electronic devices 100 - 1 to 100 - n may homomorphically encrypt the input information and transmit the same type ciphertext to the first server device 200 .
  • Each of the electronic devices 100-1 to 100-n may include encryption noise, that is, an error, calculated in the process of performing homomorphic encryption, in the ciphertext.
  • the homomorphic cipher text generated by each electronic device 100-1 to 100-n may be generated in a form in which a result value including a message and an error value is restored when it is later decrypted using a secret key. have.
  • the homomorphic ciphertext generated by the electronic devices 100-1 to 100-n may be generated in a form satisfying the following properties when it is decrypted using a secret key.
  • > denotes a normal inner product
  • ct denotes ciphertext
  • sk denotes a secret key
  • M denotes a plaintext message
  • e denotes an encryption error value
  • mod q denotes the modulus of the ciphertext. q should be chosen to be greater than M, the result of which the scaling factor ( ⁇ ) is multiplied by the message. If the absolute value of the error value e is sufficiently small compared to M, the decryption value M+e of the ciphertext is a value that can replace the original message with the same precision in significant digit operation.
  • an error may be disposed on the least significant bit (LSB) side
  • M may be disposed on the least significant bit side.
  • the size of the message may be adjusted using a scaling factor.
  • the scaling factor is used, not only integer messages but also real number messages can be encrypted, so that usability can be greatly increased.
  • the size of the message using the scaling factor the size of the area in which messages exist in the ciphertext after the operation is performed, that is, the size of the effective area can also be adjusted.
  • the ciphertext modulus q may be set and used in various forms.
  • the ciphertext modulus may be set to a value obtained by multiplying a plurality of different scaling factors.
  • Each factor may be set to a value within a similar range, that is, a value having a similar size to each other.
  • q q 1 q 2 q 3 ...
  • q x each have a size similar to the scaling factor ⁇ and can be set to a value with a small relationship to each other.
  • the entire calculation can be divided into a plurality of modulus calculations according to CRT (Chinese Remainder Theorem), so that the calculation burden can be reduced.
  • CRT Choinese Remainder Theorem
  • the first server device 200 may store the received homomorphic ciphertext as an ciphertext without decrypting it.
  • the second server device 300 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 according to the request of the second server device 300 , and then transmit the result to the second server device 300 .
  • the specific operation may be not only general operations such as addition and isomorphic product of a plurality of isomorphic ciphertexts, but also statistical operations, for example, operations such as mean, frequency distribution, linear regression, covariance, etc. .
  • the second server device 300 may perform a combining operation for a plurality of homomorphic ciphertexts.
  • the second server device 300 transmits the two electronic devices 100 A value obtained by adding up information provided from -1 and 100-2) may be requested from the first server device 200 .
  • the first server device 200 may perform an operation of summing two ciphertexts according to a request, and then transmit the result value (ct 1 + ct 2 ) to the second server device 300 .
  • the first server device 200 may perform an operation without decryption, and the result value may also be in the form of an ciphertext. In this case, the first server device 200 may perform boot strapping on the operation result.
  • the first server device 200 may transmit the operation result ciphertext to the second server device 300 .
  • the second server device 300 may decrypt the received operation result ciphertext to obtain operation result values of data included in each homomorphic ciphertext.
  • the first server device 200 may perform an operation several times according to a user request.
  • FIG. 1 illustrates 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 thereto.
  • FIG. 2 is a block diagram illustrating a configuration of an electronic device according to an embodiment of the present disclosure.
  • the electronic device 100 may include a memory 110 , a processor 120 , a communication device 130 , a display 140 , and a manipulation input device 150 .
  • the electronic device may be a personal computer (PC), a laptop computer, a smart phone, a tablet, a server, and the like.
  • At least one instruction related to the electronic device 100 may be stored in the memory 110 .
  • various programs (or software) for operating the electronic device 100 according to various embodiments of the present disclosure may be stored in the memory 110 .
  • the memory 110 may be implemented in various forms such as RAM, ROM, Buffer, cache, flash memory, HDD, external memory, memory card, etc., but is not limited thereto.
  • the memory 110 may store a message to be encrypted.
  • the message may be various types of credit information and personal information cited by the user, or information related to a usage history such as location information used in the electronic device 100 and Internet use time information.
  • the memory 110 may store the public key, and when the electronic device 100 directly generates the public key, it may store the public key and various parameters necessary for generating the private key as well as the private key.
  • the memory 110 may store the isomorphic ciphertext generated in the process described below.
  • the memory 110 may store the same type cipher text transmitted from the external device.
  • the memory 110 may store an operation result ciphertext that is a result of an operation process to be described later.
  • the communication device 130 is formed to connect the electronic device 100 with an external device (not shown), and is connected to an external device through a local area network (LAN) and the Internet network, as well as a USB (USB) device.
  • Universal Serial Bus) port or a wireless communication (eg, WiFi 802.11a/b/g/n, NFC, Bluetooth) port may be connected through the port.
  • a communication device 130 may be referred to as a transceiver.
  • the communication device 130 may receive the public key from the external device, and may transmit the public key generated by the electronic device 100 itself to the external device.
  • the communication device 130 may receive a message from the external device, and may transmit the generated homomorphic ciphertext or operation result to the external device.
  • the communication device 130 may receive various parameters necessary for generating the ciphertext from the external device. Meanwhile, in implementation, various parameters may be directly input from the user through the manipulation input device 150 to be described later.
  • the communication device 130 may receive a request for an operation on the homomorphic ciphertext from the external device, and may transmit the calculated result to the external device.
  • the requested operation may be an operation such as addition, subtraction, multiplication (eg, a modular multiplication operation), or may be a statistical operation.
  • the modular multiplication operation means performing a modular operation with q elements.
  • the display 140 displays a user interface window for receiving a selection of a function supported by the electronic device 100 .
  • the display 140 may display a user interface window for receiving selections of various functions provided by the electronic device 100 .
  • the display 140 may be a monitor such as a liquid crystal display (LCD), organic light emitting diodes (OLED), etc., and may be implemented as a touch screen capable of simultaneously performing the functions of the manipulation input device 150 to be described later. .
  • the display 140 may display a message requesting input of parameters necessary for generating a private key and a public key.
  • the display 140 may display a message in which the encryption target selects a message.
  • the encryption target may be directly selected by the user or may be automatically selected. That is, personal information that requires encryption may be automatically set even if the user does not directly select a message.
  • the manipulation input device 150 may receive, from a user, a function selection of the electronic device 100 and a control command for the corresponding function. For example, the manipulation input device 150 may receive parameters necessary for generating a private key and a public key from a user. Also, the manipulation input device 150 may receive a set message to be encrypted from the user.
  • the processor 120 controls the overall operation of the electronic device 100 .
  • 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 a plurality of components such as a CPU and a graphics processing unit (GPU).
  • the processor 120 may store it in the memory 110 .
  • the processor 120 may homogeneously encrypt the message by using various setting values and programs stored in the memory 110 .
  • the public key may be used.
  • the processor 120 may generate and use the public key required to perform encryption by itself, or may receive and use the public key from an external device.
  • the second server device 300 performing decryption may distribute the public key to other devices.
  • the processor 120 may generate a 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 a plaintext message bit, the size of a public key and a private key, and the like.
  • the ring can be expressed by Equation 2 as follows.
  • R is a ring
  • Zq is a coefficient
  • f(x) is an nth-order polynomial
  • a ring is a set of polynomials having predetermined coefficients, and means a set in which addition and multiplication are defined between elements and closed to addition and multiplication. Such rings may be referred to as rings.
  • the ring means a set of nth-order polynomials having a coefficient Zq.
  • n when n is ⁇ (N), it may mean an N-th cyclotomic polynomial.
  • (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 prime to N and smaller than N. If ⁇ N (x) is defined as an Nth-order cyclotonic polynomial, the ring can also be expressed as the following Equation (3). Here, N may be 2 17 .
  • the secret key sk may be expressed as follows.
  • the ring of Equation 3 described above has a complex number in the plaintext space. Meanwhile, in order to improve the operation speed for homomorphic cipher text, only a set having a real space in the plaintext space among the set of rings described above may be used.
  • the processor 120 may calculate a secret key sk from the ring.
  • s(x) denotes a polynomial randomly generated with small coefficients.
  • the processor 120 may calculate a first random polynomial (a(x)) from the ring.
  • the first random polynomial can be expressed as follows.
  • the processor 120 may calculate an error.
  • the processor 120 may extract an error from a discrete Gaussian distribution or a distribution having a close statistical distance thereto. This error can be expressed as follows.
  • the processor 120 may calculate the second random polynomial by modularly calculating the error on the first random polynomial and the secret key.
  • the second random polynomial can be expressed as follows.
  • the public key pk is set in a form including the first random polynomial and the second random polynomial as follows.
  • the processor 120 may control the communication device 130 to be transmitted to other devices.
  • the processor 120 may generate a homomorphic cipher text for the message.
  • the processor 120 may generate a homomorphic ciphertext by applying the previously generated public key to the message.
  • the message to be decoded may be received from an external source or may be input from an input device directly provided or connected to the electronic device 100 .
  • the processor 120 may store data input by the user through the touch screen or the keypad in the memory 110 and then encrypt it. have.
  • the generated homomorphic ciphertext is decrypted, it may be restored as a result value obtained by adding an error to a value reflecting the scaling factor in the message.
  • the scaling factor may be input and set in advance to be used as it is.
  • the processor 120 may directly encrypt the message using the public key while multiplying the message and the scaling factor.
  • an error calculated in the encryption process may be added to a result value obtained by multiplying the message and the scaling factor.
  • the processor 120 may generate the length of the ciphertext to correspond to the size of the scaling factor.
  • the processor 120 may control the communication device 130 to store the homomorphic ciphertext in the memory 110 or transmit the homomorphic ciphertext to another device according to a user request or a preset default command when the homomorphic ciphertext is generated.
  • packing may be performed. If 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 an operation between each ciphertext, as a result, the operation is processed in parallel for a plurality of messages, thereby greatly reducing the operation burden.
  • the processor 120 converts the plurality of message vectors into a polynomial in a form that can be encrypted in parallel, then multiplies the polynomial by a scaling factor and generates a public key. It can also be used for homomorphic encryption. Accordingly, the processor 120 may generate a ciphertext in which a plurality of message vectors are packed.
  • the processor 120 may generate an isomorphic ciphertext including variable information in a plurality of slots in the ciphertext in the process of generating the homomorphic ciphertext. Also, in the process of generating the homomorphic ciphertext, the processor 120 may generate an empty mask for the corresponding homomorphic ciphertext. A detailed blank mask generating operation will be described later with reference to FIG. 3 .
  • the processor 120 may apply a secret key to the homomorphic ciphertext to generate a polynomial-type decrypted text, and decode the polynomial-type decrypted text to generate a message.
  • the generated message may include an error as described in Equation 1 described above.
  • the processor 120 may perform an operation on the ciphertext.
  • the processor 120 performs various statistical operations such as an average and frequency distribution for a plurality of pieces of information as well as operations such as addition, subtraction, or multiplication while maintaining an encrypted state for the homomorphic ciphertext.
  • various statistical operations such as an average and frequency distribution for a plurality of pieces of information as well as operations such as addition, subtraction, or multiplication while maintaining an encrypted state for the homomorphic ciphertext. can A detailed statistical calculation method will be described later with reference to FIG. 3 .
  • the electronic device 100 may detect data of the effective area from the operation result data. For example, the electronic device 100 may detect data of an effective area by performing a rounding process on the operation result data.
  • the rounding process refers to performing round-off of a message in an encrypted state, and may alternatively be referred to as rescaling.
  • the electronic device 100 may remove the noise region by multiplying each component of the ciphertext by ⁇ 1, which is the reciprocal of the scaling factor, and rounding it.
  • the noise region may be determined to correspond to the size of the scaling factor. As a result, it is possible to detect a message in the effective region from which the noise region is excluded. Since it proceeds in the encrypted state, an additional error occurs, but the size is small enough and can be ignored.
  • the electronic device 100 may expand the plaintext space of the ciphertext as a result of the operation. For example, if q is less than M in Equation 1, M+e (mod q) has a different value from M+e, and thus decoding becomes impossible. Therefore, the value of q should always be kept greater than M. However, as the operation proceeds, the value of q gradually decreases. Expansion of the plaintext space means changing the ciphertext ct into a ciphertext having a larger modulus.
  • the operation of extending the plaintext space may be referred to as rebooting otherwise. As the reboot is performed, the ciphertext may be in a state where computation is possible again.
  • the electronic device 100 can efficiently perform a complex statistical operation as well as an operation operation on the homomorphic ciphertext.
  • the electronic device 100 can manage the same type ciphertext provided by a plurality of devices as one DB.
  • homomorphic ciphertext is generated to have the following data structure.
  • a plurality of slots may be included, and a plurality of pieces of information may be stored in each slot in each slot. Therefore, using this point, values for one feature (ie, information about the same column in a table) can be stored in each of a plurality of slots.
  • table data can be stored and managed in the following format.
  • the encryption table including encrypted data may include the following contents.
  • ciphertext is the (j-1)th ciphertext containing the i+1th feature, and the number of ciphertexts is ego,
  • the homomorphic ciphertext can be operated in an encrypted state, but since the operation in the encryption process takes a lot of time, an efficient calculation method is required.
  • the bin count operation is an operation that counts the number of cases for combinations of values of each variable in the data by inputting data of two or more bin variables.
  • blank data 310 blank data 310 , intermediate data 320 , and result data 330 are shown.
  • the blank values in each of the three variables (A, B, C) are ⁇ 1, 2, 3, 4 ⁇ (A), ⁇ 1, 2, 3, 4 ⁇ (B), respectively.
  • ⁇ 1, 2 ⁇ (C) intermediate data according to the combination of three variables may be generated.
  • result data 330 indicating possible combinations of three variables and the number of the corresponding combinations may be generated using the intermediate data having a count value.
  • FIG. 4 first, it is a process of calculating an empty count when the values of variables A, B, and C are 1, respectively.
  • Each variable 410 , 420 , 430 includes a plurality of slots. Although the illustrated example is illustrated as having eight slots, implementations may have more or fewer than nine slots.
  • each variable you can create an empty mask for each variable value. For example, since the variable A 410 has four values, it is possible to create an empty mask 420 corresponding to each of the four values. And in the case of the variable B (430), since it has four values, an empty mask 420 for each of the four values can be made, and in the case of the variable C (45), since it has two values, the two values are applied to each of the two values. An empty mask 460 may be created for
  • Such an empty mask can be created at the time of encryption or calculated after encryption using a table lookup table function to create an empty mask. A more detailed operation of generating an empty mask will be described with reference to FIGS. 9 to 12 .
  • the bin mask corresponding to the corresponding combination is selected, and the result can be confirmed by multiplying the selected bin masks. For example, if it is necessary to check the combination of 1, 1, 1, the empty mask 471 of the empty mask for the variable A 420 and the empty mask 471 with the value of 1 among the empty masks for the variable B 430 An operation of multiplying 472 and an empty mask 473 having a value of 1 among the empty masks for the variable C 4500 may be performed.
  • the output mask 480 generated by such an operation has a value of 1 at a position corresponding to the corresponding combination. Through this, the position in each variable constituting the corresponding combination and the number of the corresponding combinations can be checked.
  • Bin average is an operation that obtains the average of another variable of data having a specific combination of bin variables.
  • empty variance is an operation to obtain variance for data.
  • the method of performing the operation is to multiply the bin mask value for the intermediate data 320 of FIG. 3 by the value of another variable for which we want to obtain an average, and extract only the values for the row having the desired combination of bin values. You can add them all up. Then, the average can be obtained by adding all the blank mask values and dividing these two values by the previous value to the last value.
  • a variance calculation can be performed using this method. A more detailed statistical calculation operation will be described with reference to FIGS. 26 to 30 .
  • Such a bin count may be used in a classification process, and may be used in a method such as association rule mining.
  • association rule mining a method such as association rule mining.
  • the number of cases of classification must be large, and the data analyst may want to calculate the bin count by combining many variables having a wider range of bin values.
  • 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.
  • the number of possible cases is quite large.
  • the total number of operations is (here, the number of n variables, w is the number of combinations, the number of slots in M ciphertext, u the length of the entire data row).
  • n is less than 10
  • M is in tens of thousands of units, the required number of multiplications becomes billions of times. do.
  • the bin mask is expressed in an encoded form of the bin value.
  • the empty value can be expressed by 10 bytes. If you want to express the empty value i( ⁇ [1,10]), you can set the i-th byte among 10 bytes to 1 and set the rest to 0.
  • Blank masks set in this way can be added to each other. This will be described with reference to FIG. 5 .
  • FIG. 5 is a diagram for explaining an extended bin count operation operation according to an embodiment of the present disclosure.
  • one power bin mask 502 and 512 may include a plurality of slots, and each of the plurality of slots may include a plurality of sub-slots. Since the first variable 501 has four different variable values, the first power bin mask 502 may include four sub-slots, and each sub-slot includes information on whether a specific variable value exists. may include An operation of generating such a power bin mask will be described later.
  • the calculation method is the same as that of the bin mask method, and when a specific combination is required, the output data 520 may be generated by using a sub-slot of the power bin mask corresponding to the corresponding combination. And by decoding the output data 520, it is possible to calculate a value of each combination (530).
  • the scheme of FIG. 5 combines a plurality of bin masks into one using sub-slots in which the slots are subdivided as shown in FIGS. 3 and 4 . it can be said
  • a bin operation is performed on two variables 601 and 604 having bin values of 1 to 4, and 16 multiplications are required when an existing bin mask is used. Accordingly, the final result can be known only when decryption of 16 ciphertexts is performed.
  • the extended bin mask 602 when the extended bin mask 602 is used, a result can be obtained only by multiplying 4 times and decoding 4 times. This is because, in the multiplication result, all location information for variables 1 to 4 is included.
  • Different DBs may store homomorphic encrypted data in different ways. However, if each of the different DBs is divided by characteristics and stored separately according to the characteristics of the table, it is possible to easily combine the two tables.
  • the encrypted table is owned by different first electronic devices 100 - 1 and 100 - 2 , and that key information for binding is shared with each other. If there is a third electronic device 100 - 3 that honestly performs the protocol, two encrypted tables can be combined with the help of the third electronic device 100 - 3 .
  • Such a method can be efficiently performed in that data can be combined without an additional homomorphic encryption operation except for table encryption. Also, in terms of security, in the process of combining multiple tables, there is no information except for the number of common data (Inner-Join) or the number of data that the other party does not own (Outer-join). It also has the advantage of not being exposed.
  • one-way encryption that cannot be decrypted can be performed using a separate HMAC function instead of homomorphic encryption for column values corresponding to the key for combination.
  • HMAC performance results for the same key value are the same.
  • HMAC result also depends on the shared key value, even if the same key value is used, different HMAC values will be obtained if different HMAC keys are used.
  • a pair of data is created by tying the row position values in the table of the HMAC value and the original combination key used to create the HMAC value, and after sorting the set of these data using the HMAC key value, the third electronic device It can be sent to (100-3).
  • the position value means the row number of the combination key value and other data connected thereto.
  • the binding organization identifies matching keys using the HMAC value, and when each electronic device sends row value information attached together, the first and second electronic devices transmit the data obtained by encrypting the rows to the third electronic device (100- 3), and the third electronic device combines the metadata of the data sent from the two devices to create one combined table metadata, thereby performing the combination.
  • FIG. 7 is a diagram for explaining a method of combining a plurality of encryption tables.
  • the two electronic devices 100-1 and 100-3 each own tables having different row and column values, and a join key close to 1:1 join capable of combining the two tables (eg, For example, in the case of two tables containing human-related information, if resident registration numbers, etc.) exist in both tables, it means a protocol for creating an encryption table of the form 1) for a combined table that combines two tables.
  • D 1 and D 2 may be the electronic device or server illustrated in FIG. 1 .
  • the data combiner may be the electronic device or server shown in FIG. 1 .
  • Data-owning organizations D 1 and D 2 have the same homomorphic encryption key instance ( ), and also have the same MAC key (symmetric key : 256 bit random bits).
  • Data Analytics Agency Z A calculation key that can perform calculations on data encrypted with has a
  • Homomorphic encryption-related parameters and algorithms are shared by D 1 , D 2 , and Z, and the MAC algorithm ( ) is shared by A and B.
  • Data owned by data-owning organizations D 1 , D 2 can be described as follows.
  • Data-owning organizations D 1 and D 2 are each There is data of size, the first feature represents the ID of the owner of each data (used as a binding key) can be expressed as
  • the data tuple for can be defined as
  • Each institution ( ) adds a new column to that column is performed for all i and X. that value It can be added to the line represented by . that value described as
  • Each institution Is can be passed to F in order by l.
  • Permutation seed a random number to use to create using this , by doing , shuffle the values of here silver the order of the values of It means safe permutation in which the order is mixed using the randomness provided by If you don't know, the original ordered data can't find information about Also if you know can be performed.
  • F is to UID 1 , pass UID 2 to .
  • F is to
  • Received UID X arranges the data according to the order of the values in the corresponding sequence. in other words, In case, (( Data is arranged in order. here means
  • X is Encryption table object by encrypting column by column using the method of 1) After creating , it is transmitted to F along with meta information.
  • F is each , delivered from cast to restore the order.
  • role is It receives the order of each element of , and sends the entire encoded element to the line position corresponding to the result number.
  • the ciphertexts for the data attached in step g) do not go through this process.
  • Inner-Join is similar to Outer-Join above, but only the processes a), b), d) are different as follows. Also, process f) is not performed.
  • F is to UID 1 , pass UID 2 to .
  • FIG. 8 is a diagram for explaining a statistical calculation method using a bin mask according to an embodiment of the present disclosure.
  • raw data and numerical data for the corresponding raw data are displayed.
  • the operation of converting the numerical data with respect to the raw data is general, and thus a detailed description thereof will be omitted. Meanwhile, in the illustrated example, numerical data is displayed in plain text for ease of explanation, but actual data is in the isomorphic encrypted cipher text state.
  • counting may be performed using an empty mask having 3 for age and 2 for region.
  • categorical variables are called 'empty variables' (or empty features), and for convenience of operation, empty features are represented by continuous positive integers from 1. For example, an empty variable column with 3 categories would have a value of 1 or 2 or 3 in each row.
  • a system according to the present disclosure may provide statistical calculations for data in which a certain bin variable has a specific value, ie, belongs to a specific category. This is because the above average, variance, and standard deviation calculations are for all data, so statistical characteristics may differ from data in a specific category.
  • Bin Count A function that counts the number of cases in a data table that satisfy a condition
  • the comparison results can be stored in an empty mask in advance and used for the operation.
  • any blank features is the largest empty variable has i.e. one column of data each row of It can have one of the values.
  • the blank mask created at this time is with two encrypted columns, can be expressed as here, is one encrypted column, each row is an empty feature the corresponding row of If it is, it is displayed as 1, otherwise it is displayed as 0. and Is of means the second block.
  • the empty mask may be generated in the encryption step or may be generated after the encryption step.
  • an operation of generating an empty mask in the encryption step will be described with reference to FIG. 9 .
  • FIGS. 9 and 10 are diagrams for explaining a process of generating an empty mask using plain text according to an embodiment of the present disclosure. Specifically, it is a diagram to explain a process of generating an empty mask by referring to data in a plaintext state when encryption is performed on the data owner side. Specifically, FIG. 9 shows a case in which a v-bit table is used, and FIG. 10 shows a case in which a v-bit table is not used.
  • the indices of the bin features for which the bin mask is to be made are vector , the maximum bin value of each bin feature is indicated as
  • the data table in plaintext is , the v-bit table is indicated as output value b to be.
  • the generation of the empty mask after the encryption operation can be used when the data in the plaintext state cannot be accessed, or when the empty mask is created using the isomorphism operation in the encrypted state.
  • the sinc function can be changed to the following Equation 13.
  • Is Primary Chevyshev is a polynomial.
  • the polynomial generated according to this approximation method is is a quadratic polynomial.
  • FIG. 11 is a diagram illustrating an approximation algorithm according to an embodiment of the present disclosure. Specifically, in FIG. 11 Algorithm using the above method Represents a function approximation algorithm.
  • Each slot of is a value in the range, is the degree of the approximate polynomial, which is even.
  • M of the process is the number of slots in one ciphertext.
  • the multiplication operation is it's burn
  • FIG. 12 is a diagram for explaining an operation of generating an empty mask using a homomorphic ciphertext according to an embodiment of the present disclosure.
  • the indices of the bin features for which the bin mask is to be created are vector , the maximum bin value of each bin feature is indicated as
  • the output value is b to be. If the values of all slots are valid in the encrypted state, one multiplication operation can be reduced in lines 8 and 9 of FIG. 12 .
  • FIG. 13 is a diagram for describing an operation of a bin count operation according to an embodiment of the present disclosure.
  • the bin count operation is a function of counting the number of rows that satisfy conditions for various bin features.
  • the empty count operation is the second feature value , ... the second feature value is to count the number of valid data satisfying m conditions of
  • the empty count operation is performed by adding the values of all slots of this multiplication result.
  • FIG. 13 which is a set of bin masks that are output values in the previous bin count generation process.
  • the modified bin count method calculates the number of all cases made by various bin features of certain data and displays the results in a table format.
  • FIG. 14 is a diagram for explaining original data and a goal of a large bin count operation according to an embodiment of the present disclosure.
  • the bin count method uses a pre-made bin mask as described above.
  • blank mask is any empty feature It is an encrypted column indicating whether the value of each row of is equal to i (i is a positive integer) or not. (1 if it matches i, 0 otherwise.)
  • a method for counting the number of cases in which all five features have a value of 1 is as follows. The method will be described with reference to FIG. 15 .
  • 15 is a diagram for explaining a method of calculating the number of numbers in a specific case using an empty mask.
  • each column is has blocks. So the total multiplication is required.
  • a power bin mask may be used instead of the bin mask.
  • Each row of the power bin mask is defined when the value of the corresponding bin feature is i. has a value of i.e. for each empty value It will give you enough leeway.
  • 16 is a diagram for explaining a bin count operation using a power bin mask according to an embodiment of the present disclosure.
  • each row of the multiplication result will be 0 when features B, C, D, and E are not all 1. And add the values of all rows.
  • the number of rows to be added is If less than is guaranteed, the result of the addition is each It is stored in an area corresponding to bits.
  • FIG. 16 is a result of adding only the six columns 1640 presented. At this time, the value in the lowest 3 bits shows the number of cases where all features are 1, and the value stored in the highest 3 bits shows the number of cases where feature A is 5 and the rest are 1.
  • each row of the bin mask is set to 0 or 1 instead of 0 or 1 in consideration of the error term of the homomorphic encryption method. (here must be expressed as a positive integer).
  • the total bin count operation in consideration of such an error term is shown in FIG. 17 .
  • 17 is a diagram for explaining a bin count operation in consideration of an error term according to an embodiment of the present disclosure.
  • four bin features 1740 and 1750 B, C, D, and E are made into two new bin features and a new big bin mask is raised.
  • the big bin mask is generated as described above, the previously generated power big mask 1730 may be multiplied by this to obtain the number of cases.
  • a power bin mask and a big bin mask can be generated in advance.
  • Such an empty mask process may be performed during an encryption process. Alternatively, it may be performed after the encryption process.
  • a multiplication operation between the corresponding masks may be performed.
  • a decoding process for confirming the operation result may be performed.
  • an extended bin mask may be generated with one feature (f 0 ).
  • the generated expanded empty mask, big empty mask 1, and big empty mask 2 are each , , is indicated by ( , , is equal to one column, each encrypted. So, the number of blocks per column ( ) is composed of as many ciphertexts. )
  • FIG. 18 is a diagram for describing an operation of generating a power bin mask according to an embodiment of the present disclosure.
  • the extended empty mask indicates that the value of each slot is , is expressed as
  • the lower value of each slot of the power bin mask is bit offset.
  • the data table in the plaintext state is the data table in the plaintext state, the v-bit table in the plaintext state, and the index of the bin feature for which the power bin mask is to be created, respectively.
  • n is the number of data rows
  • M is the number of slots in one ciphertext.
  • 19 is a diagram for explaining an operation of generating a power bin mask according to another embodiment of the present disclosure.
  • a typical blank mask indicates whether a specific value corresponds to 0 or 1, but in this case 0 or is indicated by
  • Each characteristic index is , and the maximum bin value of each feature is , the two new variables are each is the largest empty variable.
  • the two new variables are each is the largest empty variable.
  • This process is to ensure that the value stored in each slot does not exceed the modulus bit during the multiplication process of the large bin count.
  • a multiplication operation may be performed.
  • all , ( , ) can be calculated.
  • a GPU is used for the homogeneous multiplication operation, and each GPU can perform the multiplication operation in block units. A detailed operation will be described below with reference to FIG. 20 .
  • FIG. 20 is a diagram for explaining a multiplication operation between a plurality of bin masks according to an embodiment of the present disclosure.
  • FIG. 21 is a diagram for explaining a multiplication operation using a plurality of GPUs.
  • each GPU 2010 , 2020 , 2030 , and 2040 may operate in parallel. So the number of GPUs is For dogs, 1 block each Blocks can be processed simultaneously. GPUs (2010, 2020, 2030, 2040) are the first You are assigned a work block of blocks, and when you finish work, the next Work can be done in such a way that each block of work is assigned one after the other. And the number of ciphertexts to be loaded into the GPU at one time can be limited according to the memory capacity of the GPU.
  • the number of blocks is the number of GPUs ( ), it is possible to retrieve the result ciphertext of the previously processed block, add it to the new result ciphertext, and store it. Therefore, the maximum number of stored ciphertexts is can be limited to
  • c is a positive integer and is determined according to the memory size of the GPU to be used.
  • 22 is a diagram for explaining a decoding operation after a multiplication operation according to an embodiment of the present disclosure.
  • the output value of the previous operation is Looking at the elements of , the value of BigBin1 , the value of BigBin2 About The number of cases of to be.
  • BigBin1 and BigBin2 represent m-1 features as two features, each pair It is mapped to one of the combinations of Gavin features.
  • the value of BigBin1 is
  • the value of BigBin2 is
  • the ciphertext is there is a dog
  • the value of each slot is cut into bits of Bin features that create an extended bin mask by adding only the values of bits The number of cases where the value is l can be found.
  • FIG. 23 is a diagram illustrating a data structure of an empty mask according to an embodiment of the present disclosure. Specifically, FIG. 23 is a diagram illustrating regions occupied by values in respective slots when the power bin mask 2310 and the big bin masks 2320 and 2330 are generated.
  • the feature is the value of the maximum bin of So
  • the power bin mask is has one of the values.
  • Big Bean Mask Is or 0. thus It is equivalent to displaying only one bit as 0 or 1.
  • FIG. 24 is a diagram illustrating a data structure of a result of a multiplication operation according to an embodiment of the present disclosure. Specifically, FIG. 24 shows the use of the modulus bit of an arbitrary slot obtained as a result of the multiplication operation process.
  • Equation 17 The multiplication result of an arbitrary slot can be expressed as Equation 17 below.
  • the error of the multiplication result must not exceed the lower bit of the desired value, and the upper bit of the value must not exceed the modulus bit. That is, the error term of the multiplication result Is cannot be violated, and the maximum bit It cannot be larger than the modulus bit used in the flexible encryption system.
  • Equation 18 Equation 18 below is an equation for an error term
  • Equation 19 is an equation for a modulus bit.
  • 25 is a diagram for explaining a comparison operation according to the present disclosure.
  • Comparison of values within isomorphic ciphertext is required to produce statistical calculations. That is, it is necessary to check whether the ciphertext value in the homomorphic ciphertext corresponds to a specific variable value. 25 is a comparison algorithm for this purpose.
  • a comparison result may be calculated by calculating the two variables.
  • a comparison result can be calculated using an approximation function for the sinc function as described above.
  • 26 to 28 are diagrams for explaining various statistical calculation methods according to an embodiment of the present disclosure.
  • FIG. 26 is an algorithm 2600 for an average calculation method.
  • the index vector of the bin feature and the vector representing the conditional blank value when there is the second feature value ... the second feature value Characteristics of rows that satisfy m conditions of can calculate the average value of this is data Average ( ) is equivalent to taking the process.
  • the temporary feature about the data column and v-bit columns go through the process of determining
  • BinMask represents the condition for the bin variable, is the index of the column to be averaged, is an index of a column temporarily created in the process of finding the average.
  • the average operation is the number of iterations of
  • the above process is an average process It is equivalent to adding one multiplication. thus multiplication of and Rotation processing is required. ( is the number of blocks in a row, k is the number of iterations in the inverse process of average operation, and M is the number of slots per ciphertext. )
  • FIG. 27 is a diagram for explaining an algorithm 2700 for a method of calculating variance.
  • a temporary data column and v-bit columns can take the preceding variance operation by creating The process is as follows.
  • X and Y are data table and v-bit table, respectively, and b is a set of BinMask. represents the condition for the bin variable, is the index of the column to be averaged, is the index of a column temporarily created in the process of finding the average.
  • k is the averaging is the number of iterations of
  • 28 is a diagram for explaining an algorithm 2800 for a method of calculating a correlation coefficient.
  • the difficult part of the above task is finding the reciprocal of the number associated with the task.
  • the reason it is difficult to find the reciprocal is that the inverse calculation is to set the range of values that need to be calculated, and to set the parameters so that the result does not diverge within the range, and the approximation algorithm is mainly composed of iterative algorithms. Therefore, it is necessary to increase the number of iterations for the sake of accuracy of the results.
  • the computation cost increases when the number of iterations increases, an appropriate number of iterations must be performed.
  • the homomorphic cipher text contains errors, a reboot operation must be performed after a certain number of calculations.
  • 29 is a diagram for explaining an operation of calculating a maximum value in a slot according to the present disclosure.
  • the algorithm 2900 may store the value of one slot in the isomorphic ciphertext, and may calculate the maximum value by sequentially comparing the stored value with the value of another slot.
  • the comparison algorithm shown above may be used.
  • FIG. 30 is a diagram for explaining an operation of calculating a maximum value in several columns in a plurality of blocks.
  • the corresponding algorithm 3000 first calculates the maximum value having the highest value for each block using the algorithm shown in FIG. 29 , and compares the calculated maximum values to the maximum value within a plurality of blocks. value can be calculated.
  • 31 is a diagram illustrating a method of calculating a value of a specific rank according to an embodiment of the present disclosure.
  • the percentile algorithm 3100 is similar to a method of sorting data in ascending order. A sorting process is performed preferentially, and a value corresponding to the requested percentile can be calculated accordingly.
  • 32 is a flowchart illustrating a cipher text processing method according to an embodiment of the present disclosure.
  • a statistical calculation command for a plurality of homomorphic cipher texts is received ( S3210 ).
  • Such a statistical calculation command may include calculating the number of variables having a specific value, an average of values satisfying a specific condition, a variance, and the like.
  • the plurality of homomorphic ciphertexts may store the encrypted state of the plurality of variable information.
  • an empty mask having different variable information is generated for each homomorphic ciphertext (S3220).
  • Such empty mask generation may be generated in the process of generating a homomorphic ciphertext as described above, or may be generated in a homomorphic ciphertext state.
  • the bin mask may be an bin mask having only one variable information per slot, and may be an extended bin mask including the presence or absence of a plurality of variable values, or the power bin mask or big bin mask described above.
  • number information corresponding to the variable combination is generated using the blank mask (S3230). Specifically, a count value that satisfies a specific condition may be calculated by using the product of the generated empty mask.
  • Such output may be performed in an encrypted state, a process of decrypting the corresponding information may be performed, and may also be output as a decrypted result.
  • the encryption processing method according to the present embodiment enables efficient statistical calculation on homomorphic ciphertext.
  • the cipher text processing method shown in FIG. 32 may be executed on the electronic device having the configuration of FIG. 2 and may also be executed on the electronic device having other configurations.
  • the cipher text processing method as described above may be implemented as a program including an executable algorithm that can be executed on a computer, and the above-described program is stored in a non-transitory computer readable medium.
  • the non-transitory readable medium refers to a medium that stores data semi-permanently, rather than a medium that stores data for a short moment, such as a register, cache, memory, and the like, and can be read by a device.
  • programs for performing the above-described various methods may be provided by being stored in a non-transitory readable medium such as a CD, DVD, hard disk, Blu-ray disk, USB, memory card, ROM, and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Storage Device Security (AREA)

Abstract

전자 장치가 개시된다. 본 전자 장치는 적어도 하나의 인스트럭션(instruction)을 저장하고, 복수의 변수 정보를 암호화된 상태를 저장하는 동형 암호문을 복수개 저장하는 메모리, 및 적어도 하나의 인스트럭션을 실행하는 프로세서를 포함하고, 프로세서는 적어도 하나의 인스트럭션을 실행함으로써, 복수의 동형 암호문에 대한 연산 명령이 수신되면 동형 암호문 각각에 대해서 서로 다른 변수 정보 구분하여 갖는 빈 마스크를 이용하여 변수 조합에 대응되는 개수 정보를 생성한다.

Description

동형 암호문에 대한 통계 연산 수행하는 장치 및 방법
본 개시는 동형 암호문에 대한 통계 연산 수행하는 장치 및 방법에 관한 것으로, 구체적으로, 동형 암호문에 대해서 통계 연산이 효율적으로 수행할 수 있는 전자 장치 및 방법에 관한 것이다.
전자 및 통신 기술의 발달에 힘입어 다양한 장치들 간에 데이터를 송수신하여 활용하는 다양한 서비스가 지원되고 있다. 그 중 일 예로, 사용자가 자신의 개인 정보 등을 서버에 저장하여 두고, 서버의 정보를 이용하는 클라우드 컴퓨팅 서비스도 활발하게 사용되고 있다.
이러한 환경에서는 데이터 유출을 방지하기 위한 보안 기술의 사용이 필수적이다. 따라서, 서버는 암호화된 데이터를 저장하게 된다. 이 경우, 서버는 저장된 데이터를 검색하거나 그 데이터에 기초한 일련의 작업을 할 때마다, 암호화된 데이터를 복호화하여야 하므로, 자원 및 시간 낭비가 발생하게 된다.
또한, 서버에서 연산을 위해 일시적으로 복호화한 상태에서 제3자의 해킹이 이루어지는 경우, 개인 정보가 제3자에게 손쉽게 유출될 수 있다는 문제점도 있었다.
이러한 문제를 해결하기 위하여 동형 암호화 방법이 연구되고 있다. 동형 암호화 방식을 이용하면, 암호화된 정보를 복호화하지 않고 암호문 자체에서 연산을 하더라도, 평문에 대해 연산한 후 암호화한 값과 동일한 결과를 얻을 수 있다. 따라서, 암호문을 복호화하지 않은 상태에서 각종 연산을 수행할 수 있다.
다만, 동형 암호문 상태에서의 연산은 평문 상태에서의 연산보다 많은 연산량이 요구된다는 점에서, 처리 시간이 기존의 평문 연산 방식보다 느리다. 특히, 데이터에 대한 통계적 연산은 평문 상태에서도 많은 연산량이 요구된다는 점에서, 동형 암호문에 대한 통계적 연산을 보다 효율적으로 수행할 수 있는 방법이 요구되었다.
따라서 본 개시는 상술한 바와 같은 문제점을 해결하기 위한 고안된 것으로, 동형 암호문에 대해서 통계 연산이 효율적으로 수행할 수 있는 전자 장치 및 방법을 제공하는 데 있다.
이상과 같은 목적을 달성하기 위하여, 본 개시의 일 실시 예에 따른 전자 장치는 적어도 하나의 인스트럭션(instruction)을 저장하고, 복수의 변수 정보를 암호화된 상태를 저장하는 동형 암호문을 복수개 저장하는 메모리, 및 상기 적어도 하나의 인스트럭션을 실행하는 프로세서를 포함하고, 상기 프로세서는 상기 적어도 하나의 인스트럭션을 실행함으로써, 상기 복수의 동형 암호문에 대한 연산 명령이 수신되면 상기 동형 암호문 각각에 대해서 서로 다른 변수 정보 구분하여 갖는 빈 마스크를 이용하여 변수 조합에 대응되는 개수 정보를 생성할 수 있다.
이 경우, 상기 동형 암호문은 복수의 슬롯을 포함하며, 상기 복수의 슬롯 각각에 하나의 변수 정보를 가질 수 있다.
한편, 상기 빈 마스크는 복수의 슬롯을 포함하며, 상기 복수의 슬롯 각각은 하나의 변수 값의 존재 여부에 대한 정보를 포함하며, 상기 프로세서는 동형 암호문 각각에 대해서 상기 동형 암호문에 포함된 변수 정보별 복수의 빈 마스크를 생성하고, 생성된 복수의 빈 마스크 중 상기 변수 조합에 대응되는 빈 마스크를 선별하고, 상기 선별된 빈 마스크 간의 곱을 이용하여 상기 변수 조합을 갖는 개수 정보를 생성할 수 있다.
한편, 상기 빈 마스크는 복수의 슬롯을 포함하며, 상기 복수의 슬롯 각각은 하나의 변수 값의 존재 여부에 대한 정보를 포함하는 복수의 서브 슬롯을 포함하고, 상기 프로세서는 동형 암호문 각각에 대해서 하나의 빈 마스크를 생성하고, 상기 복수의 빈 마스크 중 상기 변수 조합에 대응되는 상기 빈 마스크 내의 서브 슬롯을 이용하여 상기 변수 조합을 갖는 개수 정보를 생성할 수 있다.
이 경우, 상기 복수의 서브 슬롯은, 기설정된 비트 간격을 갖고 하나의 슬롯 내에 배치될 수 있다.
한편, 상기 프로세서는 동일한 특징에 대한 복수의 정보를 포함하는 제1 동형 암호문 및 제2 동형 암호문를 하나의 동형 암호문으로 결합할 수 있다.
이 경우, 상기 프로세서는 상기 제1 동형 암호문과 상기 제2 동형 암호문 내의 공통된 정보에 대한 제1 도형 암호문 내의 제1 위치 정보와 상기 제2 동형 암호문 내의 제2 위치 정보를 이용하여, 상기 제1 동형 암호문과 제2 동형 암호문을 하나로 결합할 수 있다.
이 경우, 상기 프로세서는 제1 및 제2 동형 암호문 내에 포함된 복수의 정보 각각에 대해서 기설정된 공통된 키로 한 방향 암호화 방식으로 암호화된 데이터와 상기 암호화된 데이터에 대한 동형 암호문 내의 위치 정보가 입력되면, 상기 제1 동형 암호문에 대한 암호화된 데이터와 상기 제2 동형 암호문에 대한 암호화된 데이터를 비교하여, 두 동형 암호문 간에 공통된 정보를 갖는 상기 제1 위치 정보와 상기 제2 위치 정보를 확인할 수 있다.
한편, 본 개시의 일 실시 예에 따른 동형 암호문에 대한 암호문 처리 방법은 복수의 변수 정보를 암호화된 상태를 저장하는 동형 암호문을 복수개 저장하고, 상기 복수의 동형 암호문에 대한 연산 명령을 수신하는 단계, 상기 복수의 동형 암호문 각각에 대해서 서로 다른 변수 정보 구분하여 갖는 빈 마스크를 생성하는 단계, 상기 빈 마스크를 이용하여 변수 조합에 대응되는 개수 정보를 생성하는 단계, 및 상기 생성된 개수 정보를 출력하는 단계를 포함한다.
이 경우, 상기 동형 암호문은 복수의 슬롯을 포함하며 상기 복수의 슬롯 각각에 하나의 변수 정보를 가질 수 있다.
한편, 상기 빈 마스크는 복수의 슬롯을 포함하며, 상기 복수의 슬롯 각각은 하나의 변수 값의 존재 여부에 대한 정보를 포함하며, 상기 빈 마스크를 생성하는 단계는, 동형 암호문 각각에 대해서 상기 동형 암호문에 포함된 변수 정보별 복수의 빈 마스크를 생성하고, 상기 개수 정보를 생성하는 단계는 생성된 복수의 빈 마스크 중 상기 변수 조합에 대응되는 빈 마스크를 선별하고, 상기 선별된 빈 마스크 간의 곱을 이용하여 상기 변수 조합을 갖는 개수 정보를 생성할 수 있다.
한편, 상기 빈 마스크는, 복수의 슬롯을 포함하며 상기 복수의 슬롯 각각은 하나의 변수 값의 존재 여부에 대한 정보를 포함하는 복수의 서브 슬롯을 포함하고, 상기 빈 마스크를 생성하는 단계는 동형 암호문 각각에 대해서 하나의 빈 마스크를 생성하고, 상기 개수 정보를 생성하는 단계는 상기 복수의 빈 마스크 중 상기 변수 조합에 대응되는 상기 빈 마스크 내의 서브 슬롯을 이용하여 상기 변수 조합을 갖는 개수 정보를 생성할 수 있다.
이 경우, 상기 복수의 서브 슬롯은, 기설정된 비트 간격을 갖고 하나의 슬롯 내에 배치될 수 있다.
한편, 본 암호화 처리 방법은 동일한 특징에 대한 복수의 정보를 포함하는 제1 동형 암호문 및 제2 동형 암호문을 하나의 동형 암호문으로 결합하는 단계를 더 포함할 수 있다.
이 경우, 상기 결합하는 단계는 상기 제1 동형 암호문과 상기 제2 동형 암호문 내의 공통된 정보에 대한 제1 도형 암호문 내의 제1 위치 정보와 상기 제2 동형 암호문 내의 제2 위치 정보를 이용하여, 상기 제1 동형 암호문과 제2 동형 암호문을 하나로 결합할 수 있다.
이 경우, 상기 결합하는 단계는 제1 및 제2 동형 암호문 내에 포함된 복수의 정보 각각에 대해서 기설정된 공통된 키로 일방향 암호화 방식으로 암호화된 데이터와 상기 암호화된 데이터에 대한 동형 암호문 내의 위치 정보가 입력되면, 상기 제1 동형 암호문에 대한 암호화된 데이터와 상기 제2 동형 암호문에 대한 암호화된 데이터를 비교하여, 두 동형 암호문 간에 공통된 정보를 갖는 상기 제1 위치 정보와 상기 제2 위치 정보를 확인할 수 있다.
한편, 본 개시의 일 실시 예에 따른 암호문 처리 방법을 실행하기 위한 프로그램을 포함하는 컴퓨터 판독가능 기록매체에 있어서, 상기 암호문 처리 방법은 복수의 변수 정보를 암호화된 상태를 저장하는 동형 암호문을 복수개 저장하고, 상기 복수의 동형 암호문에 대한 연산 명령을 수신하는 단계, 상기 복수의 동형 암호문 각각에 대해서 서로 다른 변수 정보 구분하여 갖는 빈 마스크를 생성하는 단계, 상기 빈 마스크를 이용하여 변수 조합에 대응되는 개수 정보를 생성하는 단계, 및 상기 생성된 개수 정보를 출력하는 단계를 포함한다.
이상과 같은 본 개시의 다양한 실시 예들에 따르면, 동형 암호문을 이용하여 다양한 통계 처리가 가능하며, 서로 다른 방식의 데이터 구조를 갖는 동형 암호문에 대해서도 병합하여 통계 처리가 가능하다.
도 1은 본 개시의 일 실시 예에 따른 네트워크 시스템의 구조를 설명하기 위한 도면,
도 2는 본 개시의 일 실시 예에 따른 전자 장치의 간단한 구성을 도시한 블록도,
도 3 및 도 4는 본 개시의 일 실시예에 따른 빈 카운트 연산 방법을 설명하기 위한 도면,
도 5 및 도 6은 본 개시의 일 실시 예에 따른 확장된 빈 카운트 연산 동작을 설명하기 위한 도면,
도 7은 복수의 암호화 테이블에 대한 결합 방법을 설명하기 위한 도면,
도 8은 본 개시의 일 실시 예에 따른 빈 마스크를 이용한 통계 계산 방법을 설명하기 위한 도면,
도 9 및 도 10은 본 개시의 일 실시 예에 따란 평문을 이용하여 빈 마스크를 생성하는 과정을 설명하기 위한 도면,
도 11은 본 개시의 일실시 예에 따른 근사 알고리즘을 도시한 도면,
도 12는 본 개시의 일 실시 예에 따른 동형 암호문을 이용한 빈 마스크 생성 동작을 설명하기 위한 도면,
도 13은 본 개시의 일 실시 예에 따른 빈 카운트 연산의 동작을 설명하기 위한 도면,
도 14는 원본 데이터와 본 개시의 일 실시 예에 따른 라지 빈 카운트 동작의 목표를 설명하기 위한 도면,
도 15는 빈 마스크를 이용하여 특정 경우의 수의 개수를 산출하는 방법을 설명하기 위한 도면,
도 16은 본 개시의 일 실시 예에 따른 파워 빈 마스크를 이용한 빈 카운트 연산 동작을 설명하기 위한 도면,
도 17은 본 개시의 일 실시 예에 따른 에러 항을 고려한 빈 카운트 동작을 설명하기 위한 도면,
도 18은 본 개시의 일 실시 예에 따른 파워 빈 마스크의 생성 동작을 설명하기 위한 도면,
도 19는 본 개시의 다른 실시 예에 따른 파워 빈 마스크의 생성 동작을 설명하기 위한 도면,
도 20은 본 개시의 일 실시 예에 따른 복수의 빈 마스크 간의 곱 연산 동작을 설명하기 위한 도면,
도 21은 복수의 GPU를 이용한 곱 연산 동작을 설명하기 위한 도면,
도 22는 본 개시의 일 실시 예에 따른 곱 연산 이후의 복호화 동작을 설명하기 위한 도면,
도 23은 본 개시의 일 실시 예에 따른 빈 마스크의 데이터 구조를 도시한 도면,
도 24는 본 개시의 일 실시 예에 따른 곱 연산의 결과의 데이터 구조를 도시한 도면,
도 25는 본 개시에 따른 비교 동작을 설명하기 위한 도면,
도 26 내지 도 28은 본 개시의 일 실시 예에 따른 다양한 통계 산출 방법을 설명하기 위한 도면,
도 29는 본 개시에 따른 슬롯 내의 최대 값을 계산하는 동작을 설명하기 위한 도면,
도 30은 복수의 블록 내의 여러 칼럼 내의 최대 값을 산출하는 동작을 설명하기 위한 도면,
도 31은 본 개시의 일 실시 예에 따른 특정 순위의 값을 산출하는 방법을 도시한 도면, 그리고
도 32는 본 개시의 일 실시 예에 따른 암호문 처리 방법을 설명하기 위한 흐름도이다.
-
이하에서는 첨부 도면을 참조하여 본 개시에 대해서 자세하게 설명한다. 본 개시에서 수행되는 정보(데이터) 전송 과정은 필요에 따라서 암호화/복호화가 적용될 수 있으며, 본 개시 및 특허청구범위에서 정보(데이터) 전송 과정을 설명하는 표현은 별도로 언급되지 않더라도 모두 암호화/복호화하는 경우도 포함하는 것으로 해석되어야 한다. 본 개시에서 "A로부터 B로 전송(전달)" 또는 "A가 B로부터 수신"과 같은 형태의 표현은 중간에 다른 매개체가 포함되어 전송(전달) 또는 수신되는 것도 포함하며, 반드시 A로부터 B까지 직접 전송(전달) 또는 수신되는 것만을 표현하는 것은 아니다.
본 개시의 설명에 있어서 각 단계의 순서는 선행 단계가 논리적 및 시간적으로 반드시 후행 단계에 앞서서 수행되어야 하는 경우가 아니라면 각 단계의 순서는 비제한적으로 이해되어야 한다. 즉, 위와 같은 예외적인 경우를 제외하고는 후행 단계로 설명된 과정이 선행단계로 설명된 과정보다 앞서서 수행되더라도 개시의 본질에는 영향이 없으며 권리범위 역시 단계의 순서에 관계없이 정의되어야 한다. 그리고 본 명세서에서 "A 또는 B"라고 기재한 것은 A와 B 중 어느 하나를 선택적으로 가리키는 것뿐만 아니라 A와 B 모두를 포함하는 것도 의미하는 것으로 정의된다. 또한, 본 개시에서 "포함"이라는 용어는 포함하는 것으로 나열된 요소 이외에 추가로 다른 구성요소를 더 포함하는 것도 포괄하는 의미를 가진다.
본 개시에서는 본 개시의 설명에 필요한 필수적인 구성요소만을 설명하며, 본 개시의 본질과 관계가 없는 구성요소는 언급하지 아니한다. 그리고 언급되는 구성요소만을 포함하는 배타적인 의미로 해석되어서는 안 되며 다른 구성요소도 포함할 수 있는 비배타적인 의미로 해석되어야 한다.
그리고 본 개시에서 "값"이라 함은 스칼라값뿐만 아니라 벡터, 다항식 형태도 포함하는 개념으로 정의된다.
후술하는 본 개시의 각 단계의 수학적 연산 및 산출은 해당 연산 또는 산출을 하기 위해 공지되어 있는 코딩 방법 및/또는 본 개시에 적합하게 고안된 코딩에 의해서 컴퓨터 연산으로 구현될 수 있다.
이하에서 설명하는 구체적인 수학식은 가능한 여러 대안 중에서 예시적으로 설명되는 것이며, 본 개시의 권리 범위가 본 개시에 언급된 수학식에 제한되는 것으로 해석되어서는 아니된다.
설명의 편의를 위해서, 본 개시에서는 다음과 같이 표기를 정하기로 한다.
a ← D : 분포(D)에 따라서 원소(a)를 선택함
s1, s2 ∈ R : S1, S2 각각은 R 집합에 속하는 원소이다.
mod(q) : q 원소로 모듈(modular) 연산
Figure PCTKR2021007517-appb-I000001
: 내부 값을 반올림함
이하에서는 첨부된 도면을 이용하여 본 개시의 다양한 실시 예들에 대하여 구체적으로 설명한다.
도 1은 본 개시의 일 실시 예에 따른 네트워크 시스템의 구조를 설명하기 위한 도면이다.
도 1을 참조하면, 네트워크 시스템은 복수의 전자 장치(100-1 ~ 100-n), 제1 서버 장치(200), 제2 서버 장치(300)를 포함할 수 있으며, 각 구성들은 네트워크(10)를 통해 서로 연결될 수 있다.
네트워크(10)는 다양한 형태의 유무선 통신 네트워크, 방송 통신 네트워크, 광통신 네트워크, 클라우드 네트워크 등으로 구현될 수 있으며, 각 장치들은 별도의 매개체 없이 와이파이, 블루투스, NFC(Near Field Communication) 등과 같은 방식으로 연결될 수도 있다.
도 1에서는 전자 장치가 복수개(100-1 ~ 100-n)인 것으로 도시하였으나, 반드시 복수개의 전자 장치가 사용되어야 하는 것은 아니며 하나의 장치가 사용될 수도 있다. 일 예로, 전자 장치(100-1 ~ 100-n)는 스마트폰, 태블릿, 게임 플레이어, PC, 랩톱 PC, 홈서버, 키오스크 등과 같은 다양한 형태의 장치로 구현될 수 있으며, 이밖에 IoT 기능이 적용된 가전 제품 형태로도 구현될 수 있다.
사용자는 자신이 사용하는 전자 장치(100-1 ~ 100-n)를 통해서 다양한 정보를 입력할 수 있다. 입력된 정보는 전자 장치(100-1 ~ 100-n) 자체에 저장될 수도 있지만, 저장 용량 및 보안 등을 이유로 외부 장치로 전송되어 저장될 수도 있다. 도 1에서 제1 서버 장치(200)는 이러한 정보들을 저장하는 역할을 수행하고, 제2 서버 장치(300)는 제1 서버 장치(200)에 저장된 정보의 일부 또는 전부를 이용하는 역할을 수행할 수 있다.
각 전자 장치(100-1 ~ 100-n)는 입력된 정보를 동형 암호화하여, 동형 암호문을 제1 서버 장치(200)로 전송할 수 있다.
각 전자 장치(100-1 ~ 100-n)는 동형 암호화를 수행하는 과정에서 산출되는 암호화 노이즈, 즉, 에러를 암호문에 포함시킬 수 있다. 예를 들어, 각 전자 장치(100-1 ~ 100-n)에서 생성하는 동형 암호문은, 추후에 비밀 키를 이용하여 복호화하였을 때 메시지 및 에러 값을 포함하는 결과 값이 복원되는 형태로 생성될 수 있다.
일 예로, 전자 장치(100-1 ~ 100-n)에서 생성하는 동형 암호문은 비밀 키를 이용하여 복호화 하였을 때 다음과 같은 성질을 만족하는 형태로 생성될 수 있다.
[수학식 1]
Dec(ct, sk) = <ct, sk> = M+e(mod q)
여기서 < , >는 내적 연산(usual inner product), ct는 암호문, sk는 비밀 키, M은 평문 메시지, e는 암호화 에러 값, mod q는 암호문의 모듈러스(Modulus)를 의미한다. q는 스케일링 팩터(scaling factor)(Δ)가 메시지에 곱해진 결과 값 M보다 크게 선택되어야 한다. 에러 값 e의 절대값이 M에 비해서 충분히 작다면, 암호문의 복호화 값 M+e 는 유효숫자연산에서 원래의 메시지를 동일한 정밀도로 대체할 수 있는 값이다. 복호화된 데이터 중에서 에러는 최하위 비트(LSB) 측에 배치되고, M은 차하위 비트 측에 배치될 수 있다.
메시지의 크기가 너무 작거나 너무 큰 경우, 스케일링 팩터를 이용하여 그 크기를 조절할 수도 있다. 스케일링 팩터를 사용하게 되면, 정수 형태의 메시지뿐만 아니라 실수 형태의 메시지까지도 암호화할 수 있게 되므로, 활용성이 크게 증대할 수 있다. 또한, 스케일링 팩터를 이용하여 메시지의 크기를 조절함으로써, 연산이 이루어지고 난 이후의 암호문에서 메시지들이 존재하는 영역, 즉, 유효 영역의 크기도 조절될 수 있다.
실시 예에 따라, 암호문 모듈러스 q는 다양한 형태로 설정되어 사용될 수 있다. 일 예로, 암호문의 모듈러스는 스케일링 팩터 Δ의 지수승 q=ΔL 형태로 설정될 수 있다. Δ가 2라면, q=210 과 같은 값으로 설정될 수 있다.
또 다른 예로, 암호문 모듈러스는 복수의 서로 다른 스케일링 팩터들을 곱한 값으로 설정될 수도 있다. 각 팩터들은 유사 범위 이내의 값, 즉, 서로 비슷한 크기의 값으로 설정될 수 있다. 예를 들어, q=q1 q2 q3…qx로 설정될 수 있으며, q1, q2, q3 ,…, qx 각각은 스케일링 인수 Δ와 비슷한 크기이며 서로 소 관계의 값으로 설정될 수 있다.
스케일링 팩터를 이와 같은 방식으로 설정하게 되면, CRT(Chinese Remainder Theorem)에 따라 전체 연산을 복수개의 모듈러스 연산으로 분리하여 진행할 수 있게 되므로, 연산 부담을 경감시킬 수 있다.
또한, 서로 비슷한 크기의 팩터를 사용함에 따라, 후술하는 단계에서 라운딩 처리를 수행하였을 때, 앞선 예에서의 결과값과 거의 같은 결과를 얻을 수 있다.
제1 서버 장치(200)는 수신된 동형 암호문을 복호화하지 않고, 암호문 상태로 저장할 수 있다.
제2 서버 장치(300)는 동형 암호문에 대한 특정 처리 결과를 제1 서버 장치(200)로 요청할 수 있다. 제1 서버 장치(200)는 제2 서버 장치(300)의 요청에 따라 특정 연산을 수행한 후, 그 결과를 제2 서버 장치(300)로 전송할 수 있다. 여기서 특정 연산은 복수의 동형 암호문에 대한 덧셈, 동형 곱 등과 같은 일반적인 연산뿐만 아니라, 통계적 연산 예를 들어, 평균, 빈도 분포, 선형 회귀(linear Regression), 공분산(covariance)등 과 같은 연산일 수도 있다.
이때, 제2 서버 장치(300)는 복수의 동형 암호문에 대한 결합 동작을 수행할 수 있다.
일 예로, 두 개의 전자 장치(100-1, 100-2)가 전송한 암호문 ct1, ct2가 제1 서버 장치(200)에 저장된 경우, 제2 서버 장치(300)는 두 전자 장치(100-1, 100-2)로부터 제공된 정보들을 합산한 값을 제1 서버 장치(200)로 요청할 수 있다. 제1 서버 장치(200)는 요청에 따라 두 암호문을 합산하는 연산을 수행한 후, 그 결과 값(ct1 + ct2)을 제2 서버 장치(300)로 전송할 수 있다.
동형 암호문의 성질상, 제1 서버 장치(200)는 복호화를 하지 않은 상태에서 연산을 수행할 수 있고, 그 결과 값도 암호문 형태가 될 수 있다. 이때, 제1 서버 장치(200)는 연산 결과에 대한 부트 스트래핑을 수행할 수 있다.
제1 서버 장치(200)는 연산 결과 암호문을 제2 서버 장치(300)로 전송할 수 있다. 제2 서버 장치(300)는 수신된 연산 결과 암호문을 복호화하여, 각 동형 암호문들에 포함된 데이터들의 연산 결과값을 획득할 수 있다. 그리고 제1 서버 장치(200)는 사용자 요청에 따라 연산을 수차례 수행할 수 있다.
한편, 도 1에서는 제1 전자 장치 및 제2 전자 장치에서 암호화를 수행하고, 제2 서버 장치가 복호화를 수행하는 경우를 도시하였으나, 이에 한정되는 것은 아니다.
도 2는 본 개시의 일 실시 예에 따른 전자 장치의 구성을 나타낸 블럭도이다.
도 2를 참조하면, 전자 장치(100)는 메모리(110), 프로세서(120), 통신 장치(130), 디스플레이(140), 및 조작 입력 장치(150)를 포함할 수 있다. 이러한 전자 장치는 PC(Personal computer), 노트북, 스마트폰, 태블릿, 서버 등 다양한 장치일 수 있다.
메모리(110)에는 전자 장치(100)에 관한 적어도 하나의 인스트럭션(instruction)이 저장될 수 있다. 예를 들어, 메모리(110)에는 본 개시의 다양한 실시 예에 따라 전자 장치(100)가 동작하기 위한 각종 프로그램(또는 소프트웨어)이 저장될 수 있다.
이러한 메모리(110)는 RAM 이나 ROM, Buffer, 캐쉬(Cache), 플래시 메모리, HDD, 외장 메모리, 메모리 카드 등과 같은 다양한 형태로 구현될 수 있으며, 어느 하나로 한정되는 것은 아니다.
메모리(110)는 암호화할 메시지를 저장할 수 있다. 여기서 메시지는 사용자가 각종 인용한 각종 신용 정보, 개인 정보 등일 수 있으며, 전자 장치(100)에서 사용되는 위치 정보, 인터넷 사용 시간 정보 등 사용 이력 등과 관련된 정보일 수도 있다.
그리고 메모리(110)는 공개 키를 저장할 수 있으며, 전자 장치(100)가 직접 공개 키를 생성한 경우, 비밀 키뿐만 아니라, 공개 키 및 비밀 키 생성에 필요한 각종 파라미터를 저장할 수 있다.
그리고 메모리(110)는 후술한 과정에서 생성된 동형 암호문을 저장할 수 있다. 그리고 메모리(110)는 외부 장치에서 전송한 동형 암호문을 저장할 수도 있다. 또한, 메모리(110)는 후술하는 연산 과정에서의 결과물인 연산 결과 암호문을 저장할 수도 있다.
통신 장치(130)는 전자 장치(100)를 외부 장치(미도시)와 연결하기 위해 형성되고, 근거리 통신망(LAN: Local Area Network) 및 인터넷망을 통해 외부 장치에 접속되는 형태뿐만 아니라, USB(Universal Serial Bus) 포트 또는 무선 통신(예를 들어, WiFi 802.11a/b/g/n, NFC, Bluetooth) 포트를 통하여 접속되는 형태도 가능하다. 이러한 통신 장치(130)는 송수신부(transceiver)로 지칭될 수도 있다.
통신 장치(130)는 공개 키를 외부 장치로부터 수신할 수 있으며, 전자 장치(100) 자체적으로 생성한 공개 키를 외부 장치로 전송할 수 있다.
그리고 통신 장치(130)는 외부 장치로부터 메시지를 수신할 수 있으며, 생성한 동형 암호문 또는 연산 결과를 외부 장치로 송신할 수 있다.
또한, 통신 장치(130)는 암호문 생성에 필요한 각종 파라미터를 외부 장치로부터 수신할 수 있다. 한편, 구현시에 각종 파라미터는 후술하는 조작 입력 장치(150)를 통하여 사용자로부터 직접 입력받을 수 있다.
또한, 통신 장치(130)는 외부 장치로부터 동형 암호문에 대한 연산을 요청받을 수 있으며, 그에 따라 계산된 결과를 외부 장치에 전송할 수 있다. 여기서 요청받은 연산은 덧셈, 뺄셈, 곱셈(예를 들어, 모듈러 곱셈 연산)과 같은 연산일 수 있으며, 통계적 연산일 수도 있다. 여기서 모듈러 곱셈 연산이란 q 원소로 모듈(modular) 연산하는 것을 의미한다.
디스플레이(140)는 전자 장치(100)가 지원하는 기능을 선택받기 위한 사용자 인터페이스 창을 표시한다. 예를 들어, 디스플레이(140)는 전자 장치(100)가 제공하는 각종 기능을 선택받기 위한 사용자 인터페이스 창을 표시할 수 있다. 이러한 디스플레이(140)는 LCD(liquid crystal display), OLED(Organic Light Emitting Diodes) 등과 같은 모니터일 수 있으며, 후술할 조작 입력 장치(150)의 기능을 동시에 수행할 수 있는 터치 스크린으로 구현될 수도 있다.
디스플레이(140)는 비밀 키 및 공개 키 생성에 필요한 파라미터의 입력을 요청하는 메시지를 표시할 수 있다. 그리고 디스플레이(140)는 암호화 대상이 메시지를 선택하는 메시지를 표시할 수 있다. 한편, 구현시에 암호화 대상은 사용자가 직접 선택할 수도 있고, 자동으로 선택될 수 있다. 즉, 암호화가 필요한 개인 정보 등은 사용자가 직접 메시지를 선택하지 않더라도 자동으로 설정될 수 있다.
조작 입력 장치(150)는 사용자로부터 전자 장치(100)의 기능 선택 및 해당 기능에 대한 제어 명령을 입력받을 수 있다. 예를 들어, 조작 입력 장치(150)는 사용자로부터 비밀 키 및 공개 키 생성에 필요한 파라미터를 입력받을 수 있다. 또한, 조작 입력 장치(150)는 사용자로부터 암호화될 메시지를 설정받을 수 있다.
프로세서(120)는 전자 장치(100)의 전반적인 동작을 제어한다. 예를 들어, 프로세서(120)는 메모리(110)에 저장된 적어도 하나의 인스트럭션을 실행함으로써 전자 장치(100)의 동작을 전반적으로 제어할 수 있다. 이러한 프로세서(120)는 CPU(central processing unit), ASIC(application-specific integrated circuit)과 같은 단일 장치로 구성될 수 있으며, CPU, GPU(Graphics Processing Unit) 등의 복수의 구성으로 구성될 수도 있다.
프로세서(120)는 전송하고자 하는 메시지가 입력되면 메모리(110)에 저장할 수 있다. 그리고 프로세서(120)는 메모리(110)에 저장된 각종 설정 값 및 프로그램을 이용하여, 메시지를 동형 암호화할 수 있다. 이 경우, 공개 키가 사용될 수 있다.
프로세서(120)는 암호화를 수행하는데 필요한 공개 키를 자체적으로 생성하여 사용할 수도 있고, 외부 장치로부터 수신하여 사용할 수도 있다. 일 예로, 복호화를 수행하는 제2 서버 장치(300)가 공개 키를 다른 장치들에게 배포할 수 있다.
자체적으로 키를 생성하는 경우, 프로세서(120)는 Ring-LWE 기법을 이용하여 공개 키를 생성할 수 있다. 예를 들면, 프로세서(120)는 먼저 각종 파라미터 및 링을 설정하여, 메모리(110)에 저장할 수 있다. 파라미터의 예로는 평문 메시지 비트의 길이, 공개 키 및 비밀 키의 크기 등이 있을 수 있다.
링은 다음과 같은 수학식 2로 표현될 수 있다.
[수학식 2]
Figure PCTKR2021007517-appb-I000002
여기서 R은 링, Zq는 계수, f(x)는 n차 다항식이다.
링(Ring)이란 기설정된 계수를 가지는 다항식의 집합으로, 원소들 사이에 덧셈과 곱셈이 정의되어 있으며 덧셈과 곱셈에 대해서 닫혀 있는 집합을 의미한다. 이러한 링은 환으로 지칭될 수 있다.
일 예로, 링은 계수가 Zq인 n차 다항식의 집합을 의미한다. 예를 들어, n이 Φ(N)일 때, N차 사이클로토믹 다항식 (N-th cyclotomic polynomial)을 의미할 수 있다. (f(x))란 f(x)로 생성되는 Zq[x]의 이데알(ideal)을 나타낸다. Euler totient 함수 Φ(N)이란 N과 서로 소이고 N보다 작은 자연수의 개수를 의미한다. ΦN(x)를 N차 사이클로토믹 다항식으로 정의하면, 링은 다음과 같은 수학식 3으로도 표현될 수 있다. 여기서 N은 217이 이용될 수 있다.
[수학식 3]
Figure PCTKR2021007517-appb-I000003
비밀 키(sk)는 다음과 같이 표현될 수 있다.
한편, 상술한 수학식 3의 링은 평문 공간에서 복소수를 갖는다. 한편, 동형 암호문에 대한 연산 속도를 향상하기 위하여, 상술한 링의 집합 중 평문 공간이 실수인 집합만을 이용할 수도 있다.
이와 같은 링이 설정되면, 프로세서(120)는 링으로부터 비밀 키(sk)를 산출할 수 있다.
[수학식 4]
sk ← (1, s(x)), s(x) ∈ R
여기서, s(x)는 작은 계수로 랜덤하게 생성한 다항식을 의미한다.
그리고 프로세서(120)는 링으로부터 제1 랜덤 다항식(a(x))을 산출할 수 있다. 제1 랜덤 다항식은 다음과 같이 표현될 수 있다.
[수학식 5]
a(x) ← R
또한, 프로세서(120)는 에러를 산출할 수 있다. 예를 들어, 프로세서(120)는 이산 가우시안 분포 또는 그와 통계적 거리가 가까운 분포로부터 에러를 추출할 수 있다. 이러한 에러는 다음과 같이 표현될 수 있다.
[수학식 6]
e(x) ←Dn αq
에러까지 산출되면, 프로세서(120)는 제1 랜덤 다항식 및 비밀 키에 에러를 모듈러 연산하여 제2 랜덤 다항식을 산출할 수 있다. 제2 랜덤 다항식은 다음과 같이 표현될 수 있다.
[수학식 7]
b(x) = -a(x)s(x) + e(x)(mod q)
최종적으로 공개 키(pk)는 제1 랜덤 다항식 및 제2 랜덤 다항식을 포함하는 형태로 다음과 같이 설정된다.
[수학식 8]
pk = (b(x), a(x))
상술한 키 생성 방법은 일 예에 불과하므로, 반드시 이에 한정되는 것은 아니며, 이 밖에 다른 방법으로 공개 키 및 비밀 키를 생성할 수도 있음은 물론이다.
한편, 프로세서(120)는 공개 키가 생성되면, 다른 장치들에 전송되도록 통신 장치(130)를 제어할 수 있다.
그리고 프로세서(120)는 메시지에 대한 동형 암호문을 생성할 수 있다. 예를 들어, 프로세서(120)는 메시지에 대해서 앞서 생성된 공개 키를 적용하여 동형 암호문을 생성할 수 있다.
복호화할 메시지는 외부 소스로부터 수신할 수도 있고, 전자 장치(100)에 직접 구비 또는 연결된 입력 장치로부터 입력될 수도 있다. 예를 들어, 전자 장치(100)가 터치 스크린이나 키 패드를 포함하는 경우, 프로세서(120)는 사용자가 터치 스크린이나 키 패드를 통해 입력하는 데이터를 메모리(110)에 저장한 후, 암호화할 수 있다. 생성된 동형 암호문은 복호화하였을 때 메시지에 스케일링 팩터를 반영한 값에 에러를 더한 결과값으로 복원되는 형태가 될 수 있다. 스케일링 팩터는 사전에 입력되어 설정된 값을 그대로 사용할 수도 있다.
또는, 프로세서(120)는 메시지 및 스케일링 팩터를 승산한 상태에서 바로 공개 키를 이용하여 암호화할 수도 있다. 이 경우, 암호화 과정에서 산출되는 에러가 메시지 및 스케일링 팩터를 승산한 결과값에 가산될 수 있다.
또한, 프로세서(120)는 암호문의 길이를 스케일링 팩터의 크기에 대응되도록 생성할 수 있다.
그리고 프로세서(120)는 동형 암호문이 생성되면 메모리(110)에 저장하거나, 사용자 요청 또는 기설정된 디폴트 명령에 따라 동형 암호문을 다른 장치에 전송하도록 통신 장치(130)를 제어할 수 있다.
한편, 본 개시의 일 실시 예에 따르면, 패킹(packing)이 이루어질 수도 있다. 동형 암호화에서 패킹을 이용하게 되면, 다수의 메시지를 하나의 암호문으로 암호화하는 것이 가능해진다. 이 경우, 전자 장치(100)에서 각 암호문들 간의 연산을 수행하게 되면, 결과적으로 다수의 메시지에 대해 연산이 병렬적으로 처리되므로 연산 부담이 크게 줄어들게 된다.
예를 들어, 프로세서(120)는 메시지가 복수의 메시지 벡터로 이루어지는 경우, 복수의 메시지 벡터를 병렬적으로 암호화할 수 있는 형태의 다항식으로 변환한 후, 그 다항식에 스케일링 팩터를 승산하고 공개 키를 이용하여 동형 암호화할 수도 있다. 이에 따라, 프로세서(120)는 복수의 메시지 벡터를 패킹한 암호문을 생성할 수 있다.
한편, 전자 장치(100)가 저장하는 데이터가 통계 테이블인 경우, 프로세서(120)는 동형 암호문의 생성과정에서, 암호문 내의 복수의 슬롯 내에 변수 정보가 포함하는 동형 암호문을 생성할 수 있다. 또한, 프로세서(120)는 동형 암호문의 생성 과정에서, 해당 동형 암호문에 대한 빈 마스크를 생성할 수 있다. 구체적인 빈 마스크 생성동작에 대해서는 도 3과 관련하여 후술한다.
그리고 프로세서(120)는 동형 암호문에 대한 복호가 필요한 경우, 동형 암호문에 비밀 키를 적용하여 다항식 형태의 복호문을 생성하고, 다항식 형태의 복호문을 디코딩하여 메시지를 생성할 수 있다. 이때 생성한 메시지는 앞서 설명한 수학식 1에서 언급한 바와 같이 에러를 포함할 수 있다.
그리고 프로세서(120)는 암호문에 대해 연산을 수행할 수 있다. 예를 들어, 프로세서(120)는 동형 암호문에 대해서 암호화된 상태를 유지한 상태에서 덧셈, 뺄셈, 또는 곱셈 등의 연산뿐만 아니라, 복수의 정보에 대한 평균, 빈도 분포 등과 같은 다양한 통계 연산을 수행할 수 있다. 구체적인 통계 연산 방법에 대해서는 도 3을 참조하여 후술한다.
한편, 전자 장치(100)는 연산이 완료되면, 연산 결과 데이터로부터 유효 영역의 데이터를 검출할 수 있다. 예를 들어, 전자 장치(100)는 연산 결과 데이터를 라운딩 처리를 수행하여 유효 영역의 데이터를 검출할 수 있다.
여기서, 라운딩 처리란 암호화된 상태에서 메시지의 반올림(round-off)을 진행하는 것을 의미하며, 다르게는 리스케일링(rescaling)이라고 할 수도 있다. 예를 들어, 전자 장치(100)는 암호문 각각의 성분에 스케일링 인수의 역수인 Δ-1을 곱하고 반올림하여, 노이즈 영역을 제거할 수 있다. 노이즈 영역은 스케일링 팩터의 크기에 대응되도록 결정될 수 있다. 결과적으로 노이즈 영역이 제외된 유효 영역의 메시지를 검출할 수 있다. 암호화 상태에서 진행되므로 추가적인 에러가 발생하지만 크기는 충분히 작으므로 무시할 수 있다.
그리고 상술한 라운딩 처리는 상술한 바와 같은 모듈러 곱셈 연산이 이용될 수 있다.
또한, 전자 장치(100)는 연산 결과 암호문 내의 근사 메시지 비중이 임계치를 초과하면, 연산 결과 암호문의 평문 공간을 확장할 수 있다. 예를 들어, 상술한 수학식 1에서 q가 M보다 작다면 M+e(mod q)는 M+e와 다른 값을 가지므로 복호화가 불가능해진다. 따라서, q 값은 항상 M보다 크게 유지되어야 한다. 하지만, 연산이 진행됨에 따라 q 값은 점차 감소하게 된다. 평문 공간의 확장이란 암호문 ct를 더 큰 모듈러스(modulus)를 가지는 암호문으로 변화시키는 것을 의미한다. 평문 공간을 확장하는 동작은 다르게는 재부팅(rebooting)이라 할 수도 있다. 재부팅을 수행함에 따라, 암호문은 다시 연산이 가능한 상태가 될 수 있다.
이상과 같이 본 개시에 따른 전자 장치(100)는 동형 암호문에 대한 연산 동작뿐만 아니라, 복잡한 통계 연산에 대해서도 효율적으로 수행할 수 있다. 또한, 전자 장치(100)는 다수의 장치에서 제공하는 동형 암호문을 하나의 DB로 관리하는 것이 가능하다.
이하에서는 동형 암호문에 대한 구체적인 통계 연산 동작을 설명한다.
우선적으로 동형 암호문에 대한 효율적인 통계 연산을 위하여, 본 개시에서는 동형 암호문을 다음과 같은 데이터 구조를 갖도록 생성한다.
평문의 테이블 데이터, 즉 여러 개의 특징으로 이루어진 다수의 기록 데이터를 어떠한 방식으로 SIMD(Singel Instruction Multiple Data) 기능을 제공하는 동형 암호에 저장할지에 대한 내용이다. 이를 위하여, 각 특징별로 데이터를 모아서 암호문에 저장할 수 있다. 즉, 하나의 암호문은 하나의 특징에 속하는 데이터만을 저장할 수 있다. 여기서 하나의 암호문이 하나의 정보만을 포함한다는 것이 아니라, 하나의 암호문이 하나의 특징에 대한 복수의 변수 값을 저장할 수 있다는 의미이다.
동형 암호문에서는 다수의 슬롯을 포함할 수 있으며, 각 슬롯에 다수의 정보를 각 슬롯에 저장 가능하다. 따라서, 이 점을 이용하여, 다수의 슬롯 각각에 하나의 특징(즉, 테이블 내의 같은 컬럼 정보)에 대한 값들을 저장할 수 있다.
구체적으로, 테이블 데이터를 다음과 같은 형식으로 저장, 관리할 수 있다. 예를 들어, 평문 테이블의 크기가 n, m (여기서 n은 데이터 행의 길이, m은 데이터 열의 길이 (=feature의 개수))이고, 완전동형암호문이 포함할 수 있는 데이터의 개수를 M(=
Figure PCTKR2021007517-appb-I000004
) 라고 하면, 암호화된 데이터를 포함하는 암호화 테이블은 다음과 같은 내용을 포함할 수 있다.
1. 암호문
Figure PCTKR2021007517-appb-I000005
(여기서 암호문
Figure PCTKR2021007517-appb-I000006
는 i+1번째 특징을 담고 있는 (j-1)번째 암호문이고, 암호문의 개수는 각 feature 별로
Figure PCTKR2021007517-appb-I000007
이고,
2. 전체 특징의 개수 m, 데이터 행 n
3. 그 외의 부가적인 메타데이터(예를 들어, 각 특징의 이름들, 암호문 1개 (1 Block 이라고도 부른다.) 에 들어가는 데이터 개수, 테이블 이름)
이와 같은 방식을 이용하는 경우, 암호화된 테이블 데이터에서 소수의 특징별 통계 값을 계산할 때, 더욱 효율적인 계산이 가능하다. 또한, 서로 다른 방식의 암호화 테이블에 대해서 복호화 없이 테이블 결합을 효율적으로 수행할 수 있다. 테이블 결합 동작에 대해서는 도 7과 관련하여 후술한다.
이하에서는 각 동형 암호문이 하나의 특징에 대한 정보를 포함하는 경우를 가정하여, 동형 암호문에 대한 통계 연산 동작을 설명한다.
우선적으로, 동형 암호문은 암호화된 상태에서 연산을 수행할 수 있으나, 암호화 과정에서의 연산은 많은 시간이 소요되기 때문에, 효율적인 연산 방식이 필요하다.
그리고 통계 처리에 있어서는 특정 조건에 부합하는 변수를 찾고, 찾은 변수에 대한 평균, 분산 등의 처리가 수행된다는 점에서 우선적으로 특정 조건에 부합되는 변수를 찾는 것이 우선적으로 필요한다.
이러한 점에서, 이하에서는 특정 조건을 만족하는 변수를 찾기 위한 빈 카운트 연산을 도 3 및 도 4를 참조하여 먼저 설명한다.
도 3 및 도 4는 본 개시의 일 실시예에 따른 빈 카운트 연산 방법을 설명하기 위한 도면이다. 여기서, 빈 카운트 연산은 두 개 이상의 빈(bin) 변수들의 데이터를 입력으로 하여 데이터 내의 각 변수 값들의 조합에 대한 경우의 수를 세는 역할을 하는 연산이다.
도 3을 참조하면, 빈 데이터(310), 중간 데이터(320) 및 결과 데이터(330)가 도시된다. 예를 들어, 도 3과 같이 세 개의 변수(A, B, C) 각각에서의 빈 값들이 각각 {1, 2, 3, 4}(A), {1, 2, 3, 4}(B), {1, 2}(C)인 경우, 세 변수의 조합에 따른 중간 데이터를 생성할 수 있다.
이와 같이 중간 데이터를 생성한 이후에, 카운트 값이 있는 중간 데이터를 이용하여 세 변수의 가능한 조합 및 해당 조합에 대한 개수를 나타내는 결과 데이터(330)를 생성할 수 있다.
이하에서는 도 4를 참조하여, 상술한 중간 데이터를 생성하는 구체적인 동작을 설명한다.
도 4를 참조하면, 먼저 변수, A, B, C의 값이 각 1인 경우의 빈 카운트를 계산하는 과정이다.
각 변수(410, 420, 430)는 복수의 슬롯을 포함한다. 도시된 예에서는 8개의 슬롯을 갖는 것으로 도시하였지만, 구현시에는 9개보다 많거나 적은 수의 슬롯을 가질 수 있다.
각 변수들에 대해서 각 변수 값에 대한 빈 마스크를 생성할 수 있다. 예를 들어, 변수 A(410)의 경우, 4개의 값을 갖기 때문에, 4개의 값 각각에 대응되는 빈 마스크(420)를 만들 수 있다. 그리고 변수 B(430)의 경우, 4개의 값을 갖기 때문에, 4개의 값 각각에 대한 빈 마스크(420)를 만들 수 있으며, 변수 C(45)의 경우 2개의 값을 갖기 때문에 2개의 값 각각에 대한 빈 마스크(460)를 만들 수 있다.
이와 같은 빈 마스크는 암호화 시점에 만들어지거나 테이블 룩업 테이블 기능을 이용하여 암호화된 후에 계산하여 빈 마스크를 만들 수 있다. 빈 마스크를 생성하는 보다 구체적인 동작은 도 9 내지 도 12에서 설명한다.
이후에, 특정 조합에 해당하는 빈 카운트를 확인시에는 해당 조합에 대응되는 빈 마스크를 선택하고, 선택된 빈 마스크 들의 곱을 통하여 결과를 확인할 수 있다. 예를 들어, 1, 1, 1 조합의 확인이 필요한 경우, 변수 A(420)에 대한 빈 마스크 중 1 값의 빈 마스크(471)와 변수 B(430)에 대한 빈 마스크 중 1 값의 빈 마스크(472)와 변수 C(4500)에 대한 빈 마스크 중 1 값의 빈 마스크(473)를 서로 곱하는 연산을 수행할 수 있다.
이와 같은 연산에 의해 생성된 출력 마스크(480)는 해당 조합에 해당하는 위치에 1의 값을 갖게 된다. 이를 통하여 해당 조합을 구성하는 각 변수 내의 위치 및 해당 조합의 개수를 확인할 수 있다.
이와 같은 동작을 확장하면 빈 평균, 빈 분산도 계산할 수 있다. 빈 평균은 특정 빈 변수의 조합을 갖는 데이터들의 또 다른 변수에 대한 평균을 얻는 연산이다. 그리고 빈 분산은 데이터들에 대한 분산을 얻는 연산이다. 해당 연산을 수행하는 방법은 도 3의 중간 데이터(320)에 대한 빈 마스크 값을 우리가 평균을 얻고자 하는 다른 변수의 값과 곱하여 원하는 빈 값의 조합을 갖고 있는 행에 대한 값들만 뽑아내도 이들을 모두 더할 수 있다. 그리고 빈 마스크 값을 모두 더하고, 이 두 값을 앞의 값에서 뒤의 값으로 나누어 평균을 구할 수 있다. 이와 같은 방식을 활용하여 분산도 계산을 수행할 수 있다. 더욱 자세한 통계 연산 동작에 대해서는 도 26 내지 도 30에서 설명한다.
이와 같은 빈 카운트는 분류 과정에서 이용될 수 있으며, Association rule mining 등의 방법으로 이용할 수 있다. 그러나 분류의 정확도를 높이기 위해서는 분류의 경우의 수가 많아야 하며, 데이터 분석자는 더 만은 빈 값의 범위를 갖는 변수를 많이 조합하여 빈 카운트를 연산하고자 할 수 있다.
한편, 다양한 연속 값의 데이터는 분석의 편의상 분위 데이터로 표현 가능한데, 예를 들어, 하나에 대해서 50개의 변수 값이 있을 수 있다.
만약, 하나의 변수에 대해서 50개의 변수 값이 있는 경우, 가능한 경우의 수는 상당히 크다. 경우의 수가 상당히 많아지는 경우, 각 변수 값별로 빈 마스크를 생성하여 빈 카운트를 수행한다면, 총 연산 수는
Figure PCTKR2021007517-appb-I000008
(여기서, n 변수 개수, w는 조합의 개수, M 암호문의 슬롯의 개수, u 전체 데이터의 행의 길이)가 된다. 여기서, w, u가 수백만 단위고, n이 10 이하, M이 수만 단위인 경우, 필요한 곱셈의 횟수는 수입 억 번이 되면, 곱셈 수행 시간을 수 밀리 초로 잡아도 필요한 소요 시간은 수십일 이상 소요가 된다.
따라서, 이하에서는 변수의 종류가 다양한 경우의 변형된 빈 카운트 방법에 대해서 설명한다.
이하에서의 빈 마스크는 빈 값을 인코딩된 형태로 표현된다. 예를 들어, [1,10]의 빈 값의 범위를 갖는 데이터가 있을 때, 빈 값을 10개의 바이트로 표현할 수 있다. 빈 값 i(∈[1,10])를 표현하고 싶다면 10개의 바이트 중 i 번째 바이트를 1로 설정하고 나머지는 0으로 설정하는 방식을 사용할 수 있다.
이와 같은 방식으로 설정된 빈 마스크 들끼리는 덧셈할 수 있다. 이에 대해서는 도 5를 참조하여 설명한다.
도 5는 본 개시의 일 실시 예에 따른 확장된 빈 카운트 연산 동작을 설명하기 위한 도면이다.
도 5를 참조하면, 하나의 파워 빈 마스크(502, 512)는 복수의 슬롯을 포함하며, 복수의 슬롯 각각은 복수의 서브 슬롯을 포함할 수 있다. 제1 변수(501)의 경우 4개의 서로 다른 변수 값을 갖는바, 제1 파워 빈 마스크(502)는 4개의 서브 슬롯을 포함할 수 있으며, 각 서브 슬롯은 특정 변수 값의 존재 여부에 대한 정보를 포함할 수 있다. 이러한 파워 빈 마스크의 생성 동작에 대해서는 후술한다.
이와 같이 파워 빈 마스크를 활용하는 경우, 앞선 과정에서는 변수 종류별로 개별적인 빈 마스크를 생성하였었어 하나, 파워 빈 마스크는 변수 종류 별로 한 개로 족하다.
그리고 연산 방식은 빈 마스크 방식과 동일하며, 특정 조합이 필요한 경우, 해당 조합에 대응되는 파워 빈 마스크의 서브 슬롯을 이용하여 출력 데이터(520)를 생성할 수 있다. 그리고 출력 데이터(520)를 디코딩하여, 각 조합의 값을 산출할 수 있다(530).
도 3 및 도 4와 같은 방식은 변수 값별로 개별적인 빈 마스크를 생성한 것이라면, 도 5의 방식은 도 3 및 도 4와 같은 슬롯을 세분화한 서브 슬롯을 활용하여, 복수의 빈 마스크를 하나로 합친 형태라고 할 수 있다.
이와 같은 파워 빈 마스크를 활용하는 경우의 이점에 대해서는 도 6을 참조하여 설명한다.
도 6을 참조하면, 1~4의 빈 값을 갖는 두 변수(601, 604)에 대해 빈 연산을 수행하며, 기존의 빈 마스크를 이용하는 경우 16번의 곱셈이 필요하다. 그에 따라 16개의 암호문에 대한 복호화를 수행하여야 최종 결과를 알 수 있다. 반면에 확장된 빈 마스크(602)를 사용하는 경우, 4번의 곱셈과 4번의 복호화만으로 결과를 얻어낼 수 있다. 왜냐하면, 곱셈 결과에 변수가 1~4인 경우의 모든 위치 정보가 들어가 있기 때문이다.
제안 방법의 특성상 확장된 빈 마스크 간의 곱셈은 동작하지 않기 때문에, 한개의 확장된 빈 마스크만 빈 카운트의 계산에 참여할 수 있다. 또한, 1개의 빈 마스크에 들어갈 수 있는 빈의 개수는 최대 50이므로, 제안 방식을 이용하여 개선할 수 있는 곱셈 횟수의 감소는 1/50이다. 또한, 확장된 빈 마스크를 이용하는 곱셈은 다수개의 빈 정보를 하나의 슬롯에 넣어야 하며, 이는 슬롯당 관리해야 할 비트 길이의 증가를 가져오므로, 이는 곱셈 시간에도 영향을 줄 수 있다. 한편, 상술한 빈의 개수 및 감소 횟수는 예시에 불가하고, 적용되는 동형 암호화 방식에 따라 수치 값은 변경될 수 있다.
한편, 통계 연산을 위해서는 하나의 소유자의 테이블뿐만 아니라, 서로 다른 소유자의 테이블을 이용할 필요가 있다.
따라서, 이하에서는 서로 다른 장치에서 소유한 테이블을 하나로 결합하는 방법에 대해서 설명한다.
서로 다른 DB는 동형 암호화된 데이터를 서로 다른 방식으로 저장하고 있을 수 있다. 그러나 서로 다른 DB 각각이 특징별로 구분하여 테이블의 특징별로 구분하여 저장하는 경우, 손쉽게 두 테이블을 결합하는 것이 가능하다.
구체적으로, 암호화된 테이블에 대해서 상이한 제1 전자 장치(100-1), 제2 전자 장치(100-2)가 소유하고 있고, 결합을 위한 키 정보를 서로 공유하고 있다고 가정한다. 만약, 프로토콜을 정직하게 수행하는 제3 전자 장치(100-3)가 있는 경우, 제3 전자 장치(100-3)의 도움으로 두 암호화된 테이블을 결합할 수 있다. 이와 같은 방식은 테이블 암호화를 제외한 추가적인 동형 암호 연산 없이 데이터 결합이 가능하다는 점에서, 효율적으로 수행될 수 있다. 또한, 보안 측면에서도 복수의 테이블의 결합을 수행하는 과정에서 공통된 데이터의 개수(Inner-Join) 또는 상대방이 소유한 데이터 중 자신이 소유하지 않는 데이터의 개수(Outer-join)를 제외하고는 어떠한 정보도 노출되지 않는 장점이 있다.
이를 위하여, 결합을 위한 키에 해당하는 칼럼 값들은 동형 암호 대신에 별도의 HMAC 함수를 이용하여 복호화 불가능한 일방향 암호화를 수행할 수 있다. 이때, 각 전자 장치(100-1, 100-2)는 동일한 HMAC 키를 공유하고 있기 때문에, 동일한 키 값에 대한 HMAC 수행 결과는 동일하다. 단 HMAC 결과는 공유키 값에도 의존하기 때문에, 동일한 키 값이더라도 다른 HMAC 키를 사용할 경우 다른 HMAC 값이 나오게 된다.
이러한 HMAC 값과 해당 HMAC 값을 만들이 위해 사용된 원래의 결합키의 테이블 내의 행의 위치 값을 묶어서 한 쌍의 데이터를 만들고, 이러한 데이터의 집합을 HMAC 키값을 이용하여 정렬한 후 제3 전자 장치(100-3)에 전송할 수 있다. 여기서 위치 값은 결합키 값 및 그와 연결된 다른 데이터들의 행 번호를 의미한다.
결합 기관은 HMAC 값을 이용하여 매칭되는 키들을 파악하고, 같이 붙여 있는 행값 정보들을 각 전자 장치가 보내면, 해당 제1, 제2 전자 장치는 해당 행들을 암호화한 데이터를 제3 전자 장치(100-3)에 전달하고, 제3 전자 장치는 두 장치에서 보내온 데이터들의 메타 데이터를 조합하여 하나의 결합된 테이블의 메타 데이터를 만듦으로써, 결합을 수행할 수 있다.
보다 자세한 결합 동작은 도 7을 참조하여 이하에서 설명한다.
도 7은 복수의 암호화 테이블에 대한 결합 방법을 설명하기 위한 도면이다.
도 7을 참조하면, 두 전자 장치(100-1, 100-3)가 행과 열의 값이 다른 테이블을 각각 소유하고 있고, 두 테이블을 결합시킬 수 있는 1:1 join에 가까운 결합키(예를 들어, 인명 관련 정보를 담은 두 테이블인 경우 주민등록번호 등)가 양 테이블에 존재할 경우, 두 테이블을 결합한 결합 테이블에 대한 1) 형식의 암호화 테이블을 만드는 프로토콜을 의미한다.
프로토콜의 참여자는 다음과 같다. 데이터 소유 기관 D1, D2 가 존재하고, 데이터 결합자 F와 최종적으로 암호화된 결합 테이블을 소유할 Z가 존재한다. 여기서, D1, D2 는 도 1의 도시한 전자 장치 또는 서버가 될 수 있다. 또한, 데이터 결합자도 도 1에 도시한 전자 장치 또는 서버가 될 수 있다.
데이터 소유 기관 D1, D2 는 동일한 동형암호 암호화키 인스턴스 (
Figure PCTKR2021007517-appb-I000009
)를 갖고 있고, 또한 동일한 MAC 키 (대칭키
Figure PCTKR2021007517-appb-I000010
: 256 bit random 비트)를 공유하고 있다. 데이터 분석 기관 Z는
Figure PCTKR2021007517-appb-I000011
로 암호화된 데이터에 대한 계산을 수행할 수 있는 계산키
Figure PCTKR2021007517-appb-I000012
를 갖고 있다.
동형암호 관련 파라미터 및 알고리즘은 D1, D2, Z가 공유하고 있고, MAC 알고리즘 (
Figure PCTKR2021007517-appb-I000013
) 은 A, B가 공유하고 있다.
데이터 소유 기관 D1, D2 이 소유한 데이터는 다음과 같이 기술될 수 있다.
데이터 소유 기관 D1, D2 은 각각
Figure PCTKR2021007517-appb-I000014
크기의 데이터가 있으며, 첫 번째 feature 는 각 데이터의 소유자의 ID (결합키로 사용)를 나타내며
Figure PCTKR2021007517-appb-I000015
로 나타내어질 수 있다.
나머지 열에 있는 특징들은
Figure PCTKR2021007517-appb-I000016
로 나타낼 수 있다.
또한
Figure PCTKR2021007517-appb-I000017
(
Figure PCTKR2021007517-appb-I000018
) 는 기관 X가 소유한
Figure PCTKR2021007517-appb-I000019
사용자에 대한
Figure PCTKR2021007517-appb-I000020
특징의 값을 의미한다. (여기서, [a, b] 는 a 보다 크거나 같고 b보다 작거나 같은 모든 정수의 집합이다.)
따라서 D1 기관이 소유한 임의의 사용자
Figure PCTKR2021007517-appb-I000021
에 대한 데이터 튜플은
Figure PCTKR2021007517-appb-I000022
로 정의가 될 수 있다.
데이터 소유 기관 D1, D2 이 공통으로 존재하는 키에 대해서는 결합을 수행하는 Inner-Join 과 두 기관에 있는 모든 데이터에 대해서 결합을 수행하는 Outer-Join으로 나뉘어질 수 있다. 자세한 동작은 아래와 같다.
(초기 환경) 기관 D1, D2, F, Z가 존재하며, 각각이 소유한 정보는 위의 기술과 동일하다.
1. 각 기관
Figure PCTKR2021007517-appb-I000023
(
Figure PCTKR2021007517-appb-I000024
) 는 새로운 열을 추가하여 해당 열에
Figure PCTKR2021007517-appb-I000025
를 모든 i, X에 대해 수행한다. 해당 값을
Figure PCTKR2021007517-appb-I000026
로 대표되는 행에 추가할 수 있다. 해당 값을
Figure PCTKR2021007517-appb-I000027
라 기술한다.
2. 모든 데이터를
Figure PCTKR2021007517-appb-I000028
값을 기준으로 행 단위로 정렬할 수 있다. 정렬된 MAC 값을
Figure PCTKR2021007517-appb-I000029
로 기술하며 해당 위치에 있는 ID 값을
Figure PCTKR2021007517-appb-I000030
라고 기술한다. 즉, 정렬 후 데이터는 (
Figure PCTKR2021007517-appb-I000031
) (
Figure PCTKR2021007517-appb-I000032
) 형식으로 차례로 저장될 수 있다. 즉
Figure PCTKR2021007517-appb-I000033
가 포함된 행은 입력 테이블의 i번째 행에 기록되게 된다. 이 테이블을
Figure PCTKR2021007517-appb-I000034
라 한다.
Figure PCTKR2021007517-appb-I000035
Figure PCTKR2021007517-appb-I000036
가 소유하고 있다.
3. 각 기관
Figure PCTKR2021007517-appb-I000037
Figure PCTKR2021007517-appb-I000038
=
Figure PCTKR2021007517-appb-I000039
를 l이 순서를 맞추어 F에게 전달할 수 있다.
4. F는 전달받은
Figure PCTKR2021007517-appb-I000040
를 이용하여
Figure PCTKR2021007517-appb-I000041
,
Figure PCTKR2021007517-appb-I000042
를 계산한 후,
Figure PCTKR2021007517-appb-I000043
=
Figure PCTKR2021007517-appb-I000044
|
Figure PCTKR2021007517-appb-I000045
Figure PCTKR2021007517-appb-I000046
and
Figure PCTKR2021007517-appb-I000047
such that
Figure PCTKR2021007517-appb-I000048
로 정의한다. 또한
Figure PCTKR2021007517-appb-I000049
,
Figure PCTKR2021007517-appb-I000050
로 정의한다. 만약 함수
Figure PCTKR2021007517-appb-I000051
를 정의하여
Figure PCTKR2021007517-appb-I000052
에 대해서
Figure PCTKR2021007517-appb-I000053
if
Figure PCTKR2021007517-appb-I000054
otherwise
Figure PCTKR2021007517-appb-I000055
로 정의한다. 만약
Figure PCTKR2021007517-appb-I000056
Figure PCTKR2021007517-appb-I000057
의 모든 원소에 대해 각각
Figure PCTKR2021007517-appb-I000058
함수를 수행하여 그 결과를 순서가 있는 데이터 형태로 반환하는 것으로 정의한다.
먼저, Outer-Join 경우부터 기술한다.
a) 순서가 있는 데이터
Figure PCTKR2021007517-appb-I000059
,
Figure PCTKR2021007517-appb-I000060
를 만들어 낸다.
b)
Figure PCTKR2021007517-appb-I000061
,
Figure PCTKR2021007517-appb-I000062
를 수행한다.
c) Permutation
Figure PCTKR2021007517-appb-I000063
를 이용하기 위해 난수 seed
Figure PCTKR2021007517-appb-I000064
를 생성한다. 이를 이용하여
Figure PCTKR2021007517-appb-I000065
,
Figure PCTKR2021007517-appb-I000066
를 수행하여
Figure PCTKR2021007517-appb-I000067
,
Figure PCTKR2021007517-appb-I000068
의 값을 섞는다. 여기서
Figure PCTKR2021007517-appb-I000069
Figure PCTKR2021007517-appb-I000070
의 값의 순서를
Figure PCTKR2021007517-appb-I000071
가 제공하는 난수성을 이용하여 순서를 섞은 안전한 permutation을 의미하며,
Figure PCTKR2021007517-appb-I000072
를 모르면 원래의 순서가 있는 데이터
Figure PCTKR2021007517-appb-I000073
에 대한 정보를 알아낼 수 없다. 또한
Figure PCTKR2021007517-appb-I000074
를 알고 있으면
Figure PCTKR2021007517-appb-I000075
를 수행할 수 있다.
d) F는
Figure PCTKR2021007517-appb-I000076
에게 UID1,
Figure PCTKR2021007517-appb-I000077
에게 UID2를 전달한다. 추가하여 F는
Figure PCTKR2021007517-appb-I000078
에게 |
Figure PCTKR2021007517-appb-I000079
|, D2에게
Figure PCTKR2021007517-appb-I000080
를 전달한다.
e) UIDX를 전달받은
Figure PCTKR2021007517-appb-I000081
는 해당 수열에 있는 값의 순서에 맞추어 데이터를 배열한다. 즉,
Figure PCTKR2021007517-appb-I000082
일 경우,
Figure PCTKR2021007517-appb-I000083
((
Figure PCTKR2021007517-appb-I000084
Figure PCTKR2021007517-appb-I000085
순서로 데이터가 배열된다. 여기서
Figure PCTKR2021007517-appb-I000086
를 의미한다.
f) 이후
Figure PCTKR2021007517-appb-I000087
으로 이루어진 길이
Figure PCTKR2021007517-appb-I000088
Figure PCTKR2021007517-appb-I000089
의 수열을
Figure PCTKR2021007517-appb-I000090
개 만큼
Figure PCTKR2021007517-appb-I000091
에 붙인다.
g) X는
Figure PCTKR2021007517-appb-I000092
를 1)의 방법을 이용하여 열별로 암호화하여 암호화 테이블 객체
Figure PCTKR2021007517-appb-I000093
를 만든 후, 메타 정보와 함께 F에게 전달한다.
h) F는 각각
Figure PCTKR2021007517-appb-I000094
,
Figure PCTKR2021007517-appb-I000095
로부터 전달받은
Figure PCTKR2021007517-appb-I000096
Figure PCTKR2021007517-appb-I000097
를 이용하여 순서를 복구시킨다. 여기서
Figure PCTKR2021007517-appb-I000098
역할은
Figure PCTKR2021007517-appb-I000099
의 각 원소들의 순서를 입력으로 받아, 결과인 숫자에 해당되는 줄 위치에 암호화된 원소 전체를 보내는 역할을 수행한다. 이때 g) 단계에서 붙여진 데이터에 대한 암호문들은 본 과정을 거치지 않는다.
i) h) 의 결과를 각각
Figure PCTKR2021007517-appb-I000100
라고 하면, 두 테이블을 붙여서 하나의 암호화된 테이블
Figure PCTKR2021007517-appb-I000101
을 만든다. 이때 결합된 암호화 테이블의 메타데이터는
Figure PCTKR2021007517-appb-I000102
각각의 메타정보를 결합하여 생성해 낸다.
j) F는 결합된 암호화 테이블
Figure PCTKR2021007517-appb-I000103
Figure PCTKR2021007517-appb-I000104
에게 전달한다.
Inner-Join 은 위의 Outer-Join 과 유사하나, a), b), d) 과정만 아래와 같이 다르다. 또한 f) 과정은 수행되지 않는다.
a) 순서가 있는 데이터
Figure PCTKR2021007517-appb-I000105
를 만들어 낸다.
b)
Figure PCTKR2021007517-appb-I000106
,
Figure PCTKR2021007517-appb-I000107
를 수행한다.
d) F는
Figure PCTKR2021007517-appb-I000108
에게 UID1,
Figure PCTKR2021007517-appb-I000109
에게 UID2를 전달한다.
이하에서는 앞서 설명한 빈 마스크를 이용한 실제 통계 동작에 대해서 설명한다.
도 8은 본 개시의 일 실시 예에 따른 빈 마스크를 이용한 통계 계산 방법을 설명하기 위한 도면이다.
도 8을 참조하면, 로우 데이터와 해당 로우 데이터에 대한 수치 데이터가 표시된다. 로우 데이터에 대해서 수치 데이터를 변환하는 동작은 일반적인바 구체적인 설명은 생략한다. 한편, 도시된 예에서는 설명을 용이하게 하기 위하여, 수치 데이터를 평문 상태로 표시하였지만, 실제 데이터는 동형 암호화된 암호문 상태이다.
만약, 상술한 바와 같은 데이터에서 60대 이상의 광역시인 사람의 수를 확인하고자 하는 경우에는 나이에 대해서 3 및 지역에 대해서 2를 갖는 빈 마스크를 이용하여 카운트를 할 수 있다.
또한, 서울 사람의 신용 등급 평균을 구해야 하는 경우, 지역에 대해서 1 빈 마스크를 이용하여 해당하는 슬롯을 검출하고, 검출된 슬롯에 대응되는 암호화된 신용 등급의 정보를 동형 덧셈을 수행하여 평균을 산출할 수 있다. 보다 자세한 조건부 통계 동작에 대해서는 이하에서 설명한다.
이하에서는 상술한 바와 같은 통계적 계산을 앞서 설명한 빈 마스크 및 확장된 빈 마스크를 이용하여 산출하는 보다 자세한 동작을 설명한다.
설명을 용이하게 하기 위하여, 범주형 변수를 ‘빈 변수’ (또는 빈 특징)이라 부르고, 연산의 편의를 위해 빈 특징은 1부터 연속된 양의 정수로 나타낸다. 예를 들어, 카테고리가 3개 있는 빈 변수 한 열은 각 행의 값이 1 또는 2 또는 3이 된다.
본 개시에 따른 시스템은 어떤 빈 변수가 특정 값을 갖는, 즉 특정 카테고리에 속하는 데이터에 대한 통계 연산을 제공할 수 있다. 위의 평균, 분산, 표준편차 연산은 모든 데이터에 대한 연산이기 때문에 특정 카테고리에 있는 데이터와 통계적 특성이 다를 수 있기 때문이다.
또한, 하나의 빈 변수에 대한 조건뿐 아니라 임의의 수의 여러 빈 변수에 대한 조건을 가진 데이터들에 대해서도 통계적 연산이 가능하다.
이상과 같은 통계적 연산은 다음과 같은 연산식을 암호화된 상태에서 구현한 것과 같다.
평균:
Figure PCTKR2021007517-appb-I000110
분산:
Figure PCTKR2021007517-appb-I000111
상관 계수:
Figure PCTKR2021007517-appb-I000112
빈 특징들의 인덱스
Figure PCTKR2021007517-appb-I000113
가 있고, 정수
Figure PCTKR2021007517-appb-I000114
이 있다고 하자. 아래 연산은
Figure PCTKR2021007517-appb-I000115
의 빈에 대한 조건을 가지고 통계적 연산을 수행할 수 있다.
[수학식 9]
Figure PCTKR2021007517-appb-I000116
Bin Count:
Figure PCTKR2021007517-appb-I000117
데이터 테이블에서 조건을 만족하는 경우의 수를 세는 함수
평균:
Figure PCTKR2021007517-appb-I000118
조건을 만족하는
Figure PCTKR2021007517-appb-I000119
열의 값들의 합
빈 평균 :
Figure PCTKR2021007517-appb-I000120
빈 분산:
Figure PCTKR2021007517-appb-I000121
보다 구체적인 통계 연산 방법에 대해서는 도 25 내지 도 31에서 설명한다.
상술한 과정을 위해서는 빈 변수 열과 특정 정수 값 사이의 비교 연산이 필요하다.
하지만, 동형 연산을 이용한 비교 연산은 비용이 크기 때문에, 미리 빈 마스크에 비교 결과들을 저장해두고 연산에 활용할 수 있다.
어떤 빈 특징
Figure PCTKR2021007517-appb-I000122
가 최대 빈 변수로
Figure PCTKR2021007517-appb-I000123
를 갖는다. 즉 데이터의 한 열
Figure PCTKR2021007517-appb-I000124
의 각 row는
Figure PCTKR2021007517-appb-I000125
중 한 값을 가질 수 있다. 이때 생성되는 빈 마스크는 총
Figure PCTKR2021007517-appb-I000126
개의 암호화된 열로,
Figure PCTKR2021007517-appb-I000127
로 표현할 수 있다. 여기서,
Figure PCTKR2021007517-appb-I000128
는 암호화된 한 열로, 각 row는 빈 특징
Figure PCTKR2021007517-appb-I000129
의 대응되는 row가
Figure PCTKR2021007517-appb-I000130
면 1, 아니면 0으로 표시한다. 그리고
Figure PCTKR2021007517-appb-I000131
Figure PCTKR2021007517-appb-I000132
Figure PCTKR2021007517-appb-I000133
번째 블록을 의미한다.
이하에서는 통계적 연산에 이용되는 빈 마스크의 생성 동작을 보다 자세히 설명한다.
먼저, 빈 마스크는 암호화 단계에서 생성할 수도 있으며, 암호화 단계 이후에서도 생성될 수 있다. 먼저, 이하에서는 암호화 단계에서 빈 마스크를 생성하는 동작을 도 9를 참조하여 설명한다.
도 9 및 도 10은 본 개시의 일 실시 예에 따란 평문을 이용하여 빈 마스크를 생성하는 과정을 설명하기 위한 도면이다. 구체적으로, 데이터 소유자 측에서 암호화를 진행할 때 평문 상태의 데이터를 참조해 빈 마스크를 생성하는 과정을 설명하기 위한 도면이다. 구체적으로, 도 9는 v-비트 테이블을 이용하는 경우이고, 도 10은 v 비트 테이블을 이용하지 않는 경우이다.
도 9 및 도 10을 참조하면, 빈 마스크를 만들고자 하는 빈 특징들의 인덱스는 벡터
Figure PCTKR2021007517-appb-I000134
로, 각 빈 특징의 최대 빈 값은
Figure PCTKR2021007517-appb-I000135
로 나타냈다.
평문 상태의 데이터 테이블은
Figure PCTKR2021007517-appb-I000136
, v-bit 테이블은
Figure PCTKR2021007517-appb-I000137
로 나타내었다. 출력 값 b
Figure PCTKR2021007517-appb-I000138
이다.
이하에서는 암호화 동작 이후에 빈 마스크의 생성 동작을 설명한다.
암호화 동작 이후의 빈 마스크의 생성은 평문 상태의 데이터에 접근할 수 없을 때, 암호화된 상태에서 동형 연산을 이용해 빈 마스크를 생성할 때 사용할 수 있다.
먼저, 빈 마스크 생성을 위해 암호화된 상태에서 다음과 같은 정수 비교 연산의 구현이 필요하다.
[수학식 10]
Figure PCTKR2021007517-appb-I000139
이 연산은 아래와 같은 수학식 11과 같은 함수에 대해서
Figure PCTKR2021007517-appb-I000140
와 같이 표현할 수 있다.
[수학식 11]
Figure PCTKR2021007517-appb-I000141
범주형 변수는 모두 정수 값을 가지므로, 정수 값 입력에 대하여
Figure PCTKR2021007517-appb-I000142
함수를 만족해야 한다. 동형 암호화 시스템에서는 덧셈과 곱셈을 제공하므로, 어떤 다항식으로
Figure PCTKR2021007517-appb-I000143
함수를 근사하여 정수 범위에서 이를 만족하도록 한다.
이때, 근사 함수로 아래와 같은 sinc 함수를 사용할 수 있다.
[수학식 12]
Figure PCTKR2021007517-appb-I000144
이는 모든 정수 값에서
Figure PCTKR2021007517-appb-I000145
와 같은 값을 가지고, 다항식 근사가 가능하다. 하지만, 넓은 범위에서 근사할 경우 근사식의 차수가 커져 계산량이 증가할 수 있다. 이러한 경우, 삼각함수의 배각 공식을 이용해 좁은 범위의 근사로도 넓은 범위에서의 근사할 수 있도록 한다.
먼저
Figure PCTKR2021007517-appb-I000146
식을 이용해 sinc 함수를 다음과 같은 수학식 13과 같이 바꿀 수 있다.
[수학식 13]
Figure PCTKR2021007517-appb-I000147
Figure PCTKR2021007517-appb-I000148
값을 알 때,
Figure PCTKR2021007517-appb-I000149
식을 이용하면
Figure PCTKR2021007517-appb-I000150
의 값을 모두 알 수 있으므로,
Figure PCTKR2021007517-appb-I000151
Figure PCTKR2021007517-appb-I000152
값을 알면
Figure PCTKR2021007517-appb-I000153
값을 구할 수 있다. 따라서
Figure PCTKR2021007517-appb-I000154
의 범위에서의
Figure PCTKR2021007517-appb-I000155
Figure PCTKR2021007517-appb-I000156
를 근사하는 것으로도
Figure PCTKR2021007517-appb-I000157
에서
Figure PCTKR2021007517-appb-I000158
값을 알 수 있다.
Figure PCTKR2021007517-appb-I000159
또는
Figure PCTKR2021007517-appb-I000160
함수 근사에는 아래와 같은 Chevyshev 근사를 사용할 수 있다. 하지만, 구현 시에는 다른 근사 방식이 이용될 수 있다.
[수학식 14]
Figure PCTKR2021007517-appb-I000161
여기에서
Figure PCTKR2021007517-appb-I000162
는 수학식 15와 같다.
[수학식 15]
Figure PCTKR2021007517-appb-I000163
여기서,
Figure PCTKR2021007517-appb-I000164
Figure PCTKR2021007517-appb-I000165
차 Chevyshev 다항식이다.
이와 같은 근사 방식에 따라 생성된 다항식은
Figure PCTKR2021007517-appb-I000166
차 다항식이다.
이와 같은 방식을 이용하면,
Figure PCTKR2021007517-appb-I000167
범위에서 적은 오차로 근사를 할 수 있고,
Figure PCTKR2021007517-appb-I000168
가 짝수이면
Figure PCTKR2021007517-appb-I000169
일 때 근사식이 정확히 1의 값을 갖는다.
여기에 오차가 있다면 배각 공식을 사용해
Figure PCTKR2021007517-appb-I000170
를 계산할 때 오차가 계속 증폭되어 빈 마스크의 값이 정확히 1을 갖지 못하므로,
Figure PCTKR2021007517-appb-I000171
를 짝수로 설정할 수 있다.
도 11은 본 개시의 일실시 예에 따른 근사 알고리즘을 도시한 도면이다. 구체적으로, 도 11의
Figure PCTKR2021007517-appb-I000172
알고리즘은 상술한 방식을 이용한
Figure PCTKR2021007517-appb-I000173
함수의 근사 알고리즘을 나타낸다.
도 11을 참조하면, 각 슬롯이 정수 값인 암호문
Figure PCTKR2021007517-appb-I000174
를 입력으로 받아, 그 대응되는 슬롯의 값이 0일 슬롯은 1, 나머지 슬롯은 0인 암호문을 반환할 수 있다. 위의 근사식을 이용해,
Figure PCTKR2021007517-appb-I000175
,
Figure PCTKR2021007517-appb-I000176
의 계수
Figure PCTKR2021007517-appb-I000177
를 미리 계산했다고 가정한다.
입력의
Figure PCTKR2021007517-appb-I000178
에 대해
Figure PCTKR2021007517-appb-I000179
의 각 슬롯은
Figure PCTKR2021007517-appb-I000180
범위의 값이고,
Figure PCTKR2021007517-appb-I000181
는 근사 다항식의 차수로, 짝수이다. 과정의 M은 한 암호문의 슬롯 개수이다.
이때 곱셈 연산은
Figure PCTKR2021007517-appb-I000182
번이다.
상술한 방식을 이용하여 생성한 정수 비교 연산을 이용한 빈 마스크 생성 동작은 도 12를 참조하면 설명한다.
도 12는 본 개시의 일 실시 예에 따른 동형 암호문을 이용한 빈 마스크 생성 동작을 설명하기 위한 도면이다.
도 12를 참조하면, 빈 마스크를 만들고자 하는 빈 특징들의 인덱스는 벡터
Figure PCTKR2021007517-appb-I000183
로, 각 빈 특징의 최대 빈 값은
Figure PCTKR2021007517-appb-I000184
로 나타냈다.
암호화된 데이터 테이블 X, 암호화된 v-bit 테이블 V를 입력으로 받을 수 있다.
출력 값은 b
Figure PCTKR2021007517-appb-I000185
이다. 만약 암호화된 상태에서 모든 슬롯의 값이 유효하다면, 도 12의 8, 9번 줄에서 한 번의 곱셈 연산을 줄일 수 있다.
이하에서는 생성한 빈 마스크를 이용하여 빈 카운트를 산출하는 구체적인 방법을 설명한다.
도 13은 본 개시의 일 실시 예에 따른 빈 카운트 연산의 동작을 설명하기 위한 도면이다.
여기서, 빈 카운트 연산은 여러 빈 특징들에 대한 조건을 만족하는 행의 개수를 세는 기능이다.
입력으로 빈 특징의 벡터
Figure PCTKR2021007517-appb-I000186
와 정수 값으로 이루어진 벡터
Figure PCTKR2021007517-appb-I000187
을 받을 때, 빈 카운트 연산은
Figure PCTKR2021007517-appb-I000188
번째 특징 값이
Figure PCTKR2021007517-appb-I000189
, ...
Figure PCTKR2021007517-appb-I000190
번째 특징 값이
Figure PCTKR2021007517-appb-I000191
의 m 가지 조건을 만족하는 유효한 데이터의 개수를 세는 것이다.
이때 앞서 생성한 빈 마스크를 사용하는데, 앞선 빈 마스크 과정에서 v-bit을 참조했기 때문에, v-bit에 대한 별도의 고려는 필요하지 않다.
조건에 상응하는 빈 마스크 들을 모두 row-wise하게 곱했을 때 모든 조건을 만족한다면 값이 1이고 아닌 경우 0이 된다.
따라서 빈 카운트 연산은 이 곱셈 결과의 모든 슬롯의 값을 더하면 된다.
도 13에서 빈 카운트 연산의 입력의 b
Figure PCTKR2021007517-appb-I000192
로, 앞선 빈 카운트 생성 과정에서의 출력 값인 빈 마스크들의 집합이다.
그리고
Figure PCTKR2021007517-appb-I000193
는 한 열의 블록의 개수, m은 조건의 개수이며,
Figure PCTKR2021007517-appb-I000194
은 한 암호문의 슬롯 수 일 때, 위 과정은
Figure PCTKR2021007517-appb-I000195
번의 곱셈과
Figure PCTKR2021007517-appb-I000196
의 회전 연산을 한다.
이하에서는 상술한 빈 카운트 연산 동작의 변형을 설명한다.
먼저, 변형된 빈 카운트 방법(이하에서는 라지 빈 카운트라고 지칭함)은 어떤 데이터의 여러 빈 특징이 만드는 모든 경우의 수를 구해 그 결과를 테이블 형태로 나타내는 것이다.
구체적인 동작은 도 14를 참조하여 설명한다.
도 14는 원본 데이터와 본 개시의 일 실시 예에 따른 라지 빈 카운트 동작의 목표를 설명하기 위한 도면이다.
도 14를 참조하면, 최대 빈 변수가 5개의 빈 특징 A, B, C, D, E에 대해 구하고자 하는 결과 테이블을 보여준다.
만약 각각 최대 빈 값으로
Figure PCTKR2021007517-appb-I000197
을 갖는 m 개의 빈 특징에 대해 라지 빈 카운트를 수행하면 모든
Figure PCTKR2021007517-appb-I000198
가지 경우의 수를 나타내는 결과 테이블을 얻을 수 있다.
빈 카운트 방법은 상술한 바와 같이 미리 만들어진 빈 마스크를 이용한다. 빈 마스크
Figure PCTKR2021007517-appb-I000199
는 어떤 빈 특징
Figure PCTKR2021007517-appb-I000200
의 각 행의 값이 i와 일치하는지 (i는 양의 정수) 여부를 1 또는 0으로 나타낸 암호화된 열이다. (i와 일치한다면 1, 아니라면 0으로 나타낸다.)
도 14에 도시된 바와 같이 5개의 특징이 모두 1이라는 값을 갖는 경우에서의 경우의 수를 세는 방법은 다음과 같다. 그 방법에 대해서는 도 15와 참조하여 설명한다.
도 15는 빈 마스크를 이용하여 특정 경우의 수의 개수를 산출하는 방법을 설명하기 위한 도면이다.
도 15를 참조하면, 빈 마스크
Figure PCTKR2021007517-appb-I000201
를 모두 곱하면, 모든 특징이 1인 경우의 s 행에만 1의 값이 남고, 나머지 경우는 모두 0이 된다.
따라서 이 곱셈 결과의 모든 행의 값을 더하면 구하고자 하는 경우의 수를 얻을 수 있다.
하지만, 이처럼 빈 마스크들을 곱하고 더하는 과정으로는 모든 조합 중 한 경우의 수만 구할 수 있다.
따라서 m 개의 빈 특징
Figure PCTKR2021007517-appb-I000202
이 최대 빈 값으로
Figure PCTKR2021007517-appb-I000203
을 가질 때, 특징들이 이루는 모든 조합의 경우의 수를 구하려면 위의 과정을
Figure PCTKR2021007517-appb-I000204
번 반복해야 한다.
데이터 테이블이 n개의 행을 가지고, 각 암호문은 M개의 슬롯을 가질 때, 각 열은
Figure PCTKR2021007517-appb-I000205
개의 블록을 가진다. 따라서 총
Figure PCTKR2021007517-appb-I000206
번의 곱셈이 필요하다.
경우의 수를 구하고자 하는 빈 특징의 수나, 각각의 최대 빈 값이 커질수록 필요한 곱셈 연산의 수도 많아진다.
따라서 이하에서는 적은 수의 곱셈으로 경우의 수를 산출하기 위한 방법을 설명한다.
이와 같은 목적을 수행하기 위하여, 빈 마스크 대신에 파워 빈 마스크(power bin Mask)를 이용할 수 있다.
파워 빈 마스크의 각 행은 대응되는 빈 특징의 값이 i일 때
Figure PCTKR2021007517-appb-I000207
의 값을 갖는다. 즉 각 빈 값마다
Figure PCTKR2021007517-appb-I000208
만큼씩의 여유를 주는 것이다.
도 16은 본 개시의 일 실시 예에 따른 파워 빈 마스크를 이용한 빈 카운트 연산 동작을 설명하기 위한 도면이다.
도 16을 참조하면,
Figure PCTKR2021007517-appb-I000209
으로 설정하고, 특징 A(1610)를 이용해 파워 빈 마스크(1620)를 만든 예시 상황이다. 각 행은 2진법으로 표현하였다.
이와 같이 파워 빈 마스크(1620)가 생성되면, 기존 방법처럼
Figure PCTKR2021007517-appb-I000210
(1630)를 곱할 수 있다.
곱셈 결과의 각 행의 값은 특징 B, C, D, E가 모두 1이 아닐 때는 0이 될 것이다. 그리고 모든 행의 값을 더한다. 이때 더하는 행의 개수가
Figure PCTKR2021007517-appb-I000211
보다 작음이 보장되면, 덧셈 결과는 각각
Figure PCTKR2021007517-appb-I000212
bit 만큼의 영역 안에 저장된다.
도 16의 예시는 제시된 6개의 열(1640)만 더한 결과이다. 이때 가장 하위 3 비트 안의 값은 모든 특징이 1인 경우의 수, 가장 상위 3 비트에 저장된 값은 특징 A가 5이고 나머지는 1인 경우의 수를 보여준다.
이 결과 값은 B,C,D,E 는 모두 1 이고, A = 1 ~ 5 일때, 5가지 경우의 수를 모두 담고 있다. 따라서 이 방법은 기존 빈 카운트 방법과 같은 수의 곱셈 연산을 수행했지만, 5배 많은 경우의 수를 구한 것과 같다.
따라서 m 개의 빈 특징
Figure PCTKR2021007517-appb-I000213
이 최대 빈 값으로
Figure PCTKR2021007517-appb-I000214
을 가지고,
Figure PCTKR2021007517-appb-I000215
으로 이들의 모든 조합의 경우의 수를 구하고자 할 때,
Figure PCTKR2021007517-appb-I000216
으로 확장된 빈 마스크를 생성하면, 이론적으로 곱셈의 횟수를
Figure PCTKR2021007517-appb-I000217
배로 줄일 수 있다.
한편, 상술한 바와 같은 파워 빈 마스크 방법을 적용하려면 동형 암호 방식의 에러 항(error term)을 고려하여 빈 마스크의 각 행을 0 또는 1 대신 0 또는
Figure PCTKR2021007517-appb-I000218
(여기서
Figure PCTKR2021007517-appb-I000219
는 양의 정수)로 표현해야 한다.
빈 마스크를
Figure PCTKR2021007517-appb-I000220
개 곱하면 각 행의 값은 최대
Figure PCTKR2021007517-appb-I000221
까지 커지는데, 이 값이 동형 암호문의 모듈러스 비트를 넘어서는 안 된다.
이를 위하여,
Figure PCTKR2021007517-appb-I000222
개의 빈 특징을 k개의 새로운 빈 특징으로 표현하는 과정을 포함한다(
Figure PCTKR2021007517-appb-I000223
).
이 새로운
Figure PCTKR2021007517-appb-I000224
개의 빈 특징에 대해 위의 방법대로 빈 마스크를 만들고 서로 곱하면 각 행의 최대 값을
Figure PCTKR2021007517-appb-I000225
로 줄일 수 있기 때문이다.
이와 같은 에러 항을 고려한 전체 빈 카운트 동작은 도 17과 같다.
도 17은 본 개시의 일 실시 예에 따른 에러 항을 고려한 빈 카운트 동작을 설명하기 위한 도면이다.
도 17을 참조하면, B, C, D, E 4개의 빈 특징(1740, 1750)을 2개의 새로운 빈 특징으로 만들고 새로운 빅 빈 마스크를 든다. 이와 같이 빅 빈 마스크가 생성되면, 경우의 수를 구하기 위하여, 앞서 생성한 파워 빅 마스크(1730)에 이를 곱할 수 있다.
이상과 같은 빈 카운트 연산 동작을 정리하면, 먼저 선행적으로 파워 빈 마스크와 빅 빈 마스크를 생성할 수 있다. 이와 같은 빈 마스크 과정은 암호화 과정에서 수행될 수 있다. 또는 암호화 과정 이후에 수행될 수 있다.
파워 빈 마스크와 빅 빔 마스크가 생성되면, 해당 마스크 간의 곱셈 동작을 수행할 수 있다. 그리고 연산 결과를 확인하기 위한 복호화 과정을 수행할 수 있다.
구체적으로, 라지 빈 카운트 연산을 위해 한 개의 특징 (f0)로는 확장된 빈 마스크를 생성할 수 있다.
그리고 나머지
Figure PCTKR2021007517-appb-I000226
개 (
Figure PCTKR2021007517-appb-I000227
)로는
Figure PCTKR2021007517-appb-I000228
개의 빅 빈 마스크를 생성할 수 있다. (
Figure PCTKR2021007517-appb-I000229
) 이는 m-1개의 열을 더 적은 수인
Figure PCTKR2021007517-appb-I000230
개의 열로 나타내고, 이 새로운 열의 빈 마스크를 만드는 과정이다. 아래에는 설명의 편의를 위해
Figure PCTKR2021007517-appb-I000231
인 경우를 다룬다. 이렇게 생성한 박 빈 마스크를 각각 빅 빈 마스크 1과 빅 빈 마스크 2라고 한다.
이때, 생성된 확장된 빈 마스크, 빅 빈 마스크 1, 빅 빈 마스크 2는 각각
Figure PCTKR2021007517-appb-I000232
,
Figure PCTKR2021007517-appb-I000233
,
Figure PCTKR2021007517-appb-I000234
Figure PCTKR2021007517-appb-I000235
로 나타낸다. (
Figure PCTKR2021007517-appb-I000236
,
Figure PCTKR2021007517-appb-I000237
,
Figure PCTKR2021007517-appb-I000238
Figure PCTKR2021007517-appb-I000239
는 각각 암호화된 한 개의 열과 같다. 따라서 각각 한 열 당 블록 개수 (
Figure PCTKR2021007517-appb-I000240
) 만큼의 암호문으로 구성된다. )
[수학식 16]
Figure PCTKR2021007517-appb-I000241
,
Figure PCTKR2021007517-appb-I000242
Figure PCTKR2021007517-appb-I000243
,
Figure PCTKR2021007517-appb-I000244
,
Figure PCTKR2021007517-appb-I000245
: 각 마스크의
Figure PCTKR2021007517-appb-I000246
번째 암호문의
Figure PCTKR2021007517-appb-I000247
번째 슬롯에 해당 하는 값 (
Figure PCTKR2021007517-appb-I000248
,
Figure PCTKR2021007517-appb-I000249
,
Figure PCTKR2021007517-appb-I000250
)
도 18은 본 개시의 일 실시 예에 따른 파워 빈 마스크의 생성 동작을 설명하기 위한 도면이다.
도 18을 참조하면, 확장된 빈 마스크는 각 슬롯의 값은
Figure PCTKR2021007517-appb-I000251
,
Figure PCTKR2021007517-appb-I000252
으로 표현된다.
한편, 특정 동형 암호화 시스템에서는 에러가 하위 bit에 발생하므로, 파워 빈 마스크의 각 슬롯의 값에 하위
Figure PCTKR2021007517-appb-I000253
bit 의 오프셋을 주었다.
입력의
Figure PCTKR2021007517-appb-I000254
는 각각 평문 상태의 데이터 테이블, 평문 상태의 v-bit table, 파워 빈 마스크를 만들고자 하는 빈 특징의 인덱스이다.
그리고 n은 데이터 행의 개수, M은 한 암호문의 슬롯 개수이다.
도 19는 본 개시의 다른 실시 예에 따른 파워 빈 마스크의 생성 동작을 설명하기 위한 도면이다.
도 19를 참조하면, 파워 빈 마스크를 만드는데 사용한 1개를 제외한
Figure PCTKR2021007517-appb-I000255
개의 빈 변수들을 2개의 새로운 빈 특징으로 나타냈다고 가정하고, 이 새로운 빈 특징들에 대한 마스크를 생성하는 과정이다.
일반적인 빈 마스크는 특정값에 해당 여부를 0 또는 1로 나타내었으나, 이 경우에는 0 또는
Figure PCTKR2021007517-appb-I000256
로 나타낸다.
Figure PCTKR2021007517-appb-I000257
개 특징의 인덱스가 각각
Figure PCTKR2021007517-appb-I000258
이고, 각 특징의 최대 빈 값을
Figure PCTKR2021007517-appb-I000259
이라고 할 때, 새로운 두 변수는 각각
Figure PCTKR2021007517-appb-I000260
를 최대 빈 변수로 갖는다. 여기서,
Figure PCTKR2021007517-appb-I000261
는 각각 평문 상태의 data table, 평문 상태의 v-bit table 이다.
이 과정의 결과로, 가정한 새로운 두 칼럼(column)에 대한 빈 마스크들이 생성될 수 있다. 즉, 행의 개수가 n인
Figure PCTKR2021007517-appb-I000262
개의 열이 생성되는 것과 같다.
이 과정은 라지 빈 카운트의 곱 과정에서 각 슬롯에 저장된 값이 모듈러스 비트 이상이 되지 않도록 하기 위함이다.
이와 같이 라지 빈 카운트와 빅 빈 카운트가 준비되면 곱셈 동작을 수행할 수 있다.
구체적으로, 모든
Figure PCTKR2021007517-appb-I000263
, (
Figure PCTKR2021007517-appb-I000264
,
Figure PCTKR2021007517-appb-I000265
)를 계산할 수 있다. 이 과정의 동형 곱셈 연산에는 GPU를 사용하고 각 GPU는 블록 단위로 곱셈 연산을 수행할 수 있다. 구체적인 동작은 도 20을 참조하여 이하에서 설명한다.
도 20은 본 개시의 일 실시 예에 따른 복수의 빈 마스크 간의 곱 연산 동작을 설명하기 위한 도면이다. 그리고 도 21은 복수의 GPU를 이용한 곱 연산 동작을 설명하기 위한 도면이다.
도 20을 참조하면, 각 GPU(2010, 2020, 2030, 2040)는 병렬화되어 작동할 수 있다. 따라서 GPU의 개수가
Figure PCTKR2021007517-appb-I000266
개라고 할 때, 각각 1개의 블록씩 총
Figure PCTKR2021007517-appb-I000267
개의 블록이 동시에 처리될 수 있다. GPU(2010, 2020, 2030, 2040)들은 처음
Figure PCTKR2021007517-appb-I000268
개의 블록의 일을 할당받고, 일을 마치면 그 다음
Figure PCTKR2021007517-appb-I000269
개 블록의 일을 차례대로 할당받는 식으로 일을 처리할 수 있다. 그리고 한 번에 GPU에 load 하는 암호문의 개수는 GPU의 메모리 용량에 따라 제한할 수 있다.
한 블록을 처리하고 나면 결과 암호문이
Figure PCTKR2021007517-appb-I000270
개가 생성된다.
모든 블록에 대해 이를 저장하면
Figure PCTKR2021007517-appb-I000271
개가 되는데 이는 블록 개수가 많아질수록 많은 저장 공간을 요구한다. 따라서 블록 개수가 GPU의 개수(
Figure PCTKR2021007517-appb-I000272
)보다 많은 경우, 이전에 처리한 블록의 결과 암호문을 불러와 새로운 결과 암호문들과 더한 후 저장할 수 있다. 따라서 저장되는 암호문의 개수는 최대
Figure PCTKR2021007517-appb-I000273
로 제한할 수 있다.
연산 과정에서 GPU가 한 번에 1개의 확장된 빈 마스크, c개의 빅 빈 마스크 1, c개의 빅 빈 마스크2를 load 할 수 있을 때, 알고리즘은 도 21과 같다.
도 21에서 c는 어떤 양의 정수로, 사용하는 GPU의 메모리 크기에 따라 결정된다. 앞의 과정에서 생성한 마스크 칼럼(column)들 (
Figure PCTKR2021007517-appb-I000274
)과, 연산을 수행하고자 하는 GPU 의 개수를 입력으로 받을 수 있다.
이와 같은 과정을 통하여 생성된 마스크는 암호화된 상태이므로, 이 정보를 그대로 활용하는 것이 어렵다. 따라서 이하에서는 곱 연산 동작 이후의 복호화 동작을 설명한다.
도 22는 본 개시의 일 실시 예에 따른 곱 연산 이후의 복호화 동작을 설명하기 위한 도면이다.
도 22를 참조하면, 먼저 앞선 동작의 출력 값인
Figure PCTKR2021007517-appb-I000275
의 원소를 살펴보면, BigBin1의 값
Figure PCTKR2021007517-appb-I000276
, BigBin2의 값
Figure PCTKR2021007517-appb-I000277
에 대해
Figure PCTKR2021007517-appb-I000278
의 경우의 수는 총
Figure PCTKR2021007517-appb-I000279
이다.
BigBin1, BigBin2는 m-1개의 특징을 2개의 특징으로 나타낸 것이므로,
Figure PCTKR2021007517-appb-I000280
쌍은 각각
Figure PCTKR2021007517-appb-I000281
개 빈 특징들의 조합 중 한 경우로 매핑 된다. BigBin1의 값이
Figure PCTKR2021007517-appb-I000282
, BigBin2 의 값이
Figure PCTKR2021007517-appb-I000283
인 암호문은
Figure PCTKR2021007517-appb-I000284
개가 있다.
따라서 Ng개의 암호문들을 모두 복호화한 후, 각 슬롯의 값을 bit 단위로 잘라
Figure PCTKR2021007517-appb-I000285
Figure PCTKR2021007517-appb-I000286
Figure PCTKR2021007517-appb-I000287
Figure PCTKR2021007517-appb-I000288
bit 들의 값만 더하면 확장된 빈 마스크를 만든 빈 특징
Figure PCTKR2021007517-appb-I000289
값이 l인 경우의 수를 구할 수 있다.
도시된 바와 같이 해당 알고리즘의 입력값으로는 앞의 빈 마스크의 곱 과정의 결과가 필요하다. 이 과정의 결과로는 모든 경우의 수를 담고 있는
Figure PCTKR2021007517-appb-I000290
크기의 표를 얻게 된다.
도 23은 본 개시의 일 실시 예에 따른 빈 마스크의 데이터 구조를 도시한 도면이다. 구체적으로, 도 23은 파워 빈 마스크(2310), 빅 빈 마스크(2320, 2330)를 생성하였을 때, 각각의 슬롯에 값이 차지하는 영역을 표시한 도면이다.
도 23을 참조하면, 특징
Figure PCTKR2021007517-appb-I000291
의 최대 빈의 값이
Figure PCTKR2021007517-appb-I000292
이므로, 파워 빈 마스크는
Figure PCTKR2021007517-appb-I000293
중 한 값을 갖는다. 그리고 빅 빈 마스크
Figure PCTKR2021007517-appb-I000294
Figure PCTKR2021007517-appb-I000295
또는 0의 값을 갖는다. 따라서
Figure PCTKR2021007517-appb-I000296
번째 bit 한 bit만 0 또는 1로 표시하는 것과 같다.
도 24는 본 개시의 일 실시 예에 따른 곱 연산의 결과의 데이터 구조를 도시한 도면이다. 구체적으로, 도 24는 곱 연산 과정의 결과로 얻은 임의의 슬롯의 모듈러스 비트를 사용을 나타낸 것이다.
도 24를 참조하면, 같은 GPU에서 처리한 결과들을 더하면 아래의 그림과 같이
Figure PCTKR2021007517-appb-I000297
bit 만큼의 영역이 모두 파워 빈 마스크를 생성한 빈 특징의 값이
Figure PCTKR2021007517-appb-I000298
인 경우의 수를 표현한다고 할 수 있다. 이 값이 커져서 빈 특징의 값이
Figure PCTKR2021007517-appb-I000299
인 경우를 나타내는 영역을 침범해서는 안 되므로, 한 GPU가 처리하는 최대 블록 개수인
Figure PCTKR2021007517-appb-I000300
Figure PCTKR2021007517-appb-I000301
을 넘지 않아야 한다.
도 24에 도시된 내용을 수식으로 표현하면 파워 빈 마스크의 한 슬롯은
Figure PCTKR2021007517-appb-I000302
,
Figure PCTKR2021007517-appb-I000303
이고, 빅 빈 마스크 들은
Figure PCTKR2021007517-appb-I000304
,
Figure PCTKR2021007517-appb-I000305
이다.
이 연산을 통해 얻고 싶은 것은 특정 Bin 값에 해당하는지로, 곱셈 결과의 임의의 슬롯의 하위
Figure PCTKR2021007517-appb-I000306
번째 bit부터
Figure PCTKR2021007517-appb-I000307
bit까지의 값을 통해 알 수 있다.
임의의 슬롯의 곱셈 결과는 다음과 같은 수학식 17과 같이 표현할 수 있다.
[수학식 17]
Figure PCTKR2021007517-appb-I000308
Figure PCTKR2021007517-appb-I000309
이때, 곱셈 결과의 에러가 원하는 값의 하위 비트를 넘지 않아야 하고, 값의 상위 비트는 모듈러스 비트를 넘어서는 안 된다. 즉, 곱셈 결과의 에러 항
Figure PCTKR2021007517-appb-I000310
Figure PCTKR2021007517-appb-I000311
를 침범할 수 없고, 최대 비트인
Figure PCTKR2021007517-appb-I000312
가 동형 암호화 시스템에서 사용하는 모듈러스 비트보다 커질 수 없다.
여기에 곱셈 이후 다른 블록에서 생성된 결과와 더한다는 점까지 고려하면, 위의 조건에서
Figure PCTKR2021007517-appb-I000313
bit 만큼씩의 여유가 있도록 식을 조정해야 한다. 그 결과는 다음과 같다.
Figure PCTKR2021007517-appb-I000314
은 모듈러스 비트이고, error term의 log upper bound를
Figure PCTKR2021007517-appb-I000315
라 하자. (
Figure PCTKR2021007517-appb-I000316
,
Figure PCTKR2021007517-appb-I000317
) 아래의 수학식 18은 에러 항에 대한 수학식이고, 수학식 19는 모듈러스 비트에 대한 수학식이다.
[수학식 18]
Figure PCTKR2021007517-appb-I000318
.
[수학식 19]
Figure PCTKR2021007517-appb-I000319
따라서
Figure PCTKR2021007517-appb-I000320
<
Figure PCTKR2021007517-appb-I000321
의 조건과 위의 두 부등식을 만족하도록
Figure PCTKR2021007517-appb-I000322
을 설정할 수 있다.
한편, 상술한 과정에서 m-1개의 특징을 두 개의 열로 표현하여 빅 빈 마스크를 만들었지만, 임의의 자연수 k개의 열로 표현하는 것 또한 가능하다.
k 개의 열로 표현하는 경우에
Figure PCTKR2021007517-appb-I000323
로 설정하고, 빅 빈 마스크 생성 과정에서 Q로 k번 반복적으로 나누며 그 나머지를 새로운 열의 빈 값으로 설정할 수 있다.
이 경우 곱셈의 결과는
Figure PCTKR2021007517-appb-I000324
이 되고, 위의 에러 항과 모듈러스 비트에 대한 제한 식을 다음과 같이 다시 쓸 수 있다.
[수학식 20]
Figure PCTKR2021007517-appb-I000325
이와 같은 라지 빈 카운트 과정에서는
Figure PCTKR2021007517-appb-I000326
번의 동형 곱셈 연산을 사용한다.
도 25는 본 개시에 따른 비교 동작을 설명하기 위한 도면이다.
통계 계산을 산출하기 위해서는 동형 암호문 내의 값 비교가 필요하다. 즉, 동형 암호문 내의 암호문 값이 특정 변수 값에 해당하는지를 확인하는 것이 필요하다. 도 25는 이를 위한 비교 알고리즘이다.
도 25를 참조하면, 두 개의 변수를 입력받고, 두 변수가 연산을 통한 비교 결과를 산출할 수 있다. 한편, 동형 암호문 상태에서는 앞서 설명한 바와 같은 sinc 함수에 대한 근사 함수를 이용하여 비교 결과를 산출할 수 있다.
도 26 내지 도 28은 본 개시의 일 실시 예에 따른 다양한 통계 산출 방법을 설명하기 위한 도면이다.
구체적으로, 도 26은 평균 산출 방법에 대한 알고리즘(2600)이다.
도 26을 참조하면, 빈 특징의 인덱스 벡터
Figure PCTKR2021007517-appb-I000327
와 조건 빈 값을 나타내는 벡터
Figure PCTKR2021007517-appb-I000328
가 있을 때,
Figure PCTKR2021007517-appb-I000329
번째 특징 값이
Figure PCTKR2021007517-appb-I000330
, ...
Figure PCTKR2021007517-appb-I000331
번째 특징 값이
Figure PCTKR2021007517-appb-I000332
의 m 개 조건을 만족하는 행들의 특징
Figure PCTKR2021007517-appb-I000333
의 평균 값을 계산할 수있다. 이는 데이터로
Figure PCTKR2021007517-appb-I000334
열을 갖고, v-bit로 조건에 맞는 빈 마스크들의 곱을 갖는 열에 대해 앞에서의 average (
Figure PCTKR2021007517-appb-I000335
) 과정을 취하는 것과 같다. 이를 위해 임시의 특징
Figure PCTKR2021007517-appb-I000336
에 대해 데이터 열
Figure PCTKR2021007517-appb-I000337
과 v-bit 열
Figure PCTKR2021007517-appb-I000338
를 정하는 과정을 거친다.
전체 과정은 다음과 같다.
Figure PCTKR2021007517-appb-I000339
는 각각 암호화된 데이터 테이블과 v-bit 테이블, b는 BinMask의 집합이다.
Figure PCTKR2021007517-appb-I000340
는 bin 변수에 대한 조건을 표현하고,
Figure PCTKR2021007517-appb-I000341
는 평균을 구하고자 하는 열의 index,
Figure PCTKR2021007517-appb-I000342
는 평균을 구하는 과정에서 임시로 생성하는 열의 인덱스이다.
Figure PCTKR2021007517-appb-I000343
는 평균 연산의
Figure PCTKR2021007517-appb-I000344
의 iteration 수이다.
위 과정은 Average 과정에
Figure PCTKR2021007517-appb-I000345
번의 곱셈이 추가되는 것과 같다. 따라서
Figure PCTKR2021007517-appb-I000346
의 곱셈과
Figure PCTKR2021007517-appb-I000347
번의 회전 처리가 필요하다. (
Figure PCTKR2021007517-appb-I000348
는 한 열의 block 개수, k는 average 연산의 inverse 과정에서의 iteration 수, M은 한 암호문당 슬롯의 개수이다. )
그리고 도 27은 분산을 산출하는 방법에 대한 알고리즘(2700)을 설명하기 위한 도면이다.
도 27을 참조하면, 위의 bin average 과정과 마찬가지로, 이번에는 평균이 아닌 분산을 구한다. 역시 동일하게 임시의 데이터 열
Figure PCTKR2021007517-appb-I000349
과 v-bit 열
Figure PCTKR2021007517-appb-I000350
을 생성해 앞의 분산 연산을 취할 수 있다. 과정은 다음과 같다. X, Y는 각각 데이터 테이블과 v-bit 테이블, b는 BinMask의 집합이다.
Figure PCTKR2021007517-appb-I000351
는 bin 변수에 대한 조건을 표현하고,
Figure PCTKR2021007517-appb-I000352
는 평균을 구하고자 하는 열의 index,
Figure PCTKR2021007517-appb-I000353
는 평균을 구하는 과정에서 임시로 생성하는 열의 index이다. k는 평균 연산의
Figure PCTKR2021007517-appb-I000354
의 iteration 수이다.
위 과정은 앞의 Variance 과정에 약
Figure PCTKR2021007517-appb-I000355
의 곱셈 과정이 추가된 것과 같다. 따라서
Figure PCTKR2021007517-appb-I000356
의 곱셈과
Figure PCTKR2021007517-appb-I000357
의 회전 연산이 필요하다. (
Figure PCTKR2021007517-appb-I000358
는 한 열의 block 개수, k는 average 연산의 inverse 과정에서의 iteration 수, M은 한 암호문당 slot의 개수이다. )
도 28은 상관 계수를 산출하는 방법에 대한 알고리즘(2800)을 설명하기 위한 도면이다.
데이터 테이블의 두 feature
Figure PCTKR2021007517-appb-I000359
사이의 피어슨 상관계수를 연산한다. 이때 v-bit 테이블을 참조해 두 특징의 값이 모두 유효한 행에 대해서만 연산을 시행한다. 두 변수 X, Y에 대한 상관계수 공식
Figure PCTKR2021007517-appb-I000360
를 이용한다. 본 동형 암호 방식으로 암호화된 데이터 테이블, 암호화된 V비트 테이블의 두 특징인
Figure PCTKR2021007517-appb-I000361
의 상관계수를 구하는 알고리즘은 다음과 같다. 연산 과정의
Figure PCTKR2021007517-appb-I000362
의 iteration 수가 k2이고,
Figure PCTKR2021007517-appb-I000363
의 iteration 수가 k1이다. 마찬가지로 모든 슬롯의 값이 유효하다고 보장될 때, v-bit을 사용하지 않는 연산도 가능하다.
상술한 작업에서의 어려운 부분은 작업과 관련된 수의 역수를 찾아내는 것이다. 역수를 찾아내기 어려운 이유는 역계산이 필요한 값의 범위를 설정하고, 그 결과가 범위 내에서 발산하지 않도록 매개 변수를 설정하는 것이고, 근사 알고리즘은 주로 반복 알고리즘으로 구성된다는 점이다. 따라서 결과의 정확도를 위해서 반복 횟수를 증가해야 하나, 반복 횟수가 증가하면 계산 비용이 증가된다는 점에서, 적절한 횟수의 반복을 수행하여야 한다. 한편, 동형 암호문은 에러가 포함된다는 점에서, 일정 횟수의 연산 이후에는 재부팅 동작을 수행하여야 한다.
도 29는 본 개시에 따른 슬롯 내의 최대 값을 계산하는 동작을 설명하기 위한 도면이다.
도 29를 참고하면, 해당 알고리즘(2900)은 동형 암호문 내의 하나의 슬롯의 값을 저장하고, 저장된 값과 다른 슬롯의 값을 순차적으로 비교하여 최대 값을 산출할 수 있다. 비교 동작은 앞서 도시한 비교 알고리즘이 이용될 수 있다.
도 30은 복수의 블록 내의 여러 칼럼 내의 최대 값을 산출하는 동작을 설명하기 위한 도면이다.
도 30을 참조하면, 해당 알고리즘(3000)은 먼저, 도 29와 같은 알고리즘을 이용하여 블록별로 가장 높은 값을 갖는 최대 값을 산출하고, 산출된 최대 값 간의 비교를 통하여 복수의 블록 내에서의 최대 값을 산출할 수 있다.
이상에서는 최대 값 산출 동작만을 설명하였지만, 비교 과정에서 작은 값을 산출하는 동작을 통하여 최소 값을 산출하는 것도 가능하다.
도 31은 본 개시의 일 실시 예에 따른 특정 순위의 값을 산출하는 방법을 도시한 도면이다.
도 31을 참조하면, 백분위 수 알고리즘(3100)은 오름차순으로 데이터를 정렬하는 방식과 유사하다. 우선적으로 정렬 과정을 수행하고, 그에 따라 요청된 백분위 수에 대응되는 값을 산출할 수 있다.
도 32는 본 개시의 일 실시 예에 따른 암호문 처리 방법을 설명하기 위한 흐름도이다.
도 32를 참조하면, 먼저, 복수의 동형 암호문에 대한 통계 계산 명령을 수신한다(S3210). 이와 같은 통계 계산 명령을 특정 값을 갖는 변수의 개수 산출, 특정 조건을 만족하는 값의 평균, 분산 등을 포함할 수 있다.
그리고 복수의 동형 암호문은 복수의 변수 정보를 암호화된 상태를 저장하고 있을 수 있다.
그리고 동형 암호문 각각에 대해서 서로 다른 변수 정보 구분하여 갖는 빈 마스크를 생성한다(S3220). 이와 같은 빈 마스크 생성은 앞서 설명한 바와 같이 동형 암호문의 생성 과정에서 생성될 수 있으며, 동형 암호문 상태에서 생성될 수도 있다. 그리고 빈 마스크는 슬롯당 하나의 변수 정보만을 갖는 빈 마스크일 수 있으며, 복수의 변수 값의 존재 여부를 포함하는 확장된 빈 마스크 또는 앞서 설명한 파워 빈 마스크, 빅 빈 마스크 등일 수 있다.
그리고 빈 마스크를 이용하여 변수 조합에 대응되는 개수 정보를 생성한다(S3230). 구체적으로, 생성된 빈 마스크의 곱을 이용하여 특정 조건에 맞는 카운트 값을 산출할 수 있다.
그리고 산출된 개수 정보를 출력할 수 있다. 이와 같은 출력은 암호화 상태에서 수행될 수 있으며, 해당 정보를 복호화하는 과정을 수행하고, 복호화된 결과로서도 출력될 수 있다.
따라서, 본 실시 예에 따른 암호화 처리 방법은 동형 암호문에 대한 효율적인 통계 연산이 가능하다. 도 32과 같은 암호문 처리 방법은 도 2의 구성을 가지는 전자 장치상에서 실행될 수 있으며, 그 밖의 다른 구성을 가지는 전자 장치상에서도 실행될 수 있다.
또한, 상술한 바와 같은 암호문 처리방법은 컴퓨터에서 실행될 수 있는 실행 가능한 알고리즘을 포함하는 프로그램으로 구현될 수 있고, 상술한 프로그램은 비일시적 판독 가능 매체(non-transitory computer readable medium)에 저장되어 제공될 수 있다.
비일시적 판독 가능 매체란 레지스터, 캐쉬, 메모리 등과 같이 짧은 순간 동안 데이터를 저장하는 매체가 아니라 반영구적으로 데이터를 저장하며, 기기에 의해 판독(reading)이 가능한 매체를 의미한다. 구체적으로는, 상술한 다양한 방법을 수행하기 위한 프로그램들은 CD, DVD, 하드 디스크, 블루레이 디스크, USB, 메모리카드, ROM 등과 같은 비일시적 판독 가능 매체에 저장되어 제공될 수 있다.
또한, 이상에서는 본 개시의 바람직한 실시 예에 대하여 도시하고 설명하였지만, 본 개시는 상술한 특정의 실시 예에 한정되지 아니하며, 청구범위에서 청구하는 본 개시의 요지를 벗어남이 없이 당해 개시가 속하는 기술분야에서 통상의 지식을 가진자에 의해 다양한 변형실시가 가능한 것은 물론이고, 이러한 변형실시들은 본 개시의 기술적 사상이나 전망으로부터 개별적으로 이해되어서는 안 될 것이다.

Claims (17)

  1. 전자 장치에 있어서,
    적어도 하나의 인스트럭션(instruction)을 저장하고, 복수의 변수 정보를 암호화된 상태를 저장하는 동형 암호문을 복수개 저장하는 메모리; 및
    상기 적어도 하나의 인스트럭션을 실행하는 프로세서;를 포함하고,
    상기 프로세서는,
    상기 적어도 하나의 인스트럭션을 실행함으로써, 상기 복수의 동형 암호문에 대한 연산 명령이 수신되면 상기 동형 암호문 각각에 대해서 서로 다른 변수 정보 구분하여 갖는 빈 마스크를 이용하여 변수 조합에 대응되는 개수 정보를 생성하는 전자 장치.
  2. 제1항에 있어서,
    상기 동형 암호문은 복수의 슬롯을 포함하며,
    상기 복수의 슬롯 각각에 하나의 변수 정보를 갖는 전자 장치.
  3. 제1항에 있어서,
    상기 빈 마스크는,
    복수의 슬롯을 포함하며,
    상기 복수의 슬롯 각각은 하나의 변수 값의 존재 여부에 대한 정보를 포함하며,
    상기 프로세서는,
    동형 암호문 각각에 대해서 상기 동형 암호문에 포함된 변수 정보별 복수의 빈 마스크를 생성하고, 생성된 복수의 빈 마스크 중 상기 변수 조합에 대응되는 빈 마스크를 선별하고, 상기 선별된 빈 마스크 간의 곱을 이용하여 상기 변수 조합을 갖는 개수 정보를 생성하는 전자 장치.
  4. 제1항에 있어서,
    상기 빈 마스크는,
    복수의 슬롯을 포함하며,
    상기 복수의 슬롯 각각은 하나의 변수 값의 존재 여부에 대한 정보를 포함하는 복수의 서브 슬롯을 포함하고,
    상기 프로세서는,
    동형 암호문 각각에 대해서 하나의 빈 마스크를 생성하고, 상기 복수의 빈 마스크 중 상기 변수 조합에 대응되는 상기 빈 마스크 내의 서브 슬롯을 이용하여 상기 변수 조합을 갖는 개수 정보를 생성하는 전자 장치.
  5. 제4항에 있어서,
    상기 복수의 서브 슬롯은, 기설정된 비트 간격을 갖고 하나의 슬롯 내에 배치되는 전자 장치.
  6. 제1항에 있어서,
    상기 프로세서는,
    동일한 특징에 대한 복수의 정보를 포함하는 제1 동형 암호문 및 제2 동형 암호문를 하나의 동형 암호문으로 결합하는 전자 장치.
  7. 제6항에 있어서,
    상기 프로세서는,
    상기 제1 동형 암호문과 상기 제2 동형 암호문 내의 공통된 정보에 대한 제1 도형 암호문 내의 제1 위치 정보와 상기 제2 동형 암호문 내의 제2 위치 정보를 이용하여, 상기 제1 동형 암호문과 제2 동형 암호문을 하나로 결합하는 전자 장치.
  8. 제7항에 있어서,
    상기 프로세서는,
    제1 및 제2 동형 암호문 내에 포함된 복수의 정보 각각에 대해서 기설정된 공통된 키로 일방향 암호화 방식으로 암호화된 데이터와 상기 암호화된 데이터에 대한 동형 암호문 내의 위치 정보가 입력되면, 상기 제1 동형 암호문에 대한 암호화된 데이터와 상기 제2 동형 암호문에 대한 암호화된 데이터를 비교하여, 두 동형 암호문 간에 공통된 정보를 갖는 상기 제1 위치 정보와 상기 제2 위치 정보를 확인하는 전자 장치.
  9. 동형 암호문에 대한 암호문 처리 방법에 있어서,
    복수의 변수 정보를 암호화된 상태를 저장하는 동형 암호문을 복수개 저장하고, 상기 복수의 동형 암호문에 대한 연산 명령을 수신하는 단계;
    상기 복수의 동형 암호문 각각에 대해서 서로 다른 변수 정보 구분하여 갖는 빈 마스크를 생성하는 단계;
    상기 빈 마스크를 이용하여 변수 조합에 대응되는 개수 정보를 생성하는 단계; 및
    상기 생성된 개수 정보를 출력하는 단계;를 포함하는 암호문 처리 방법.
  10. 제9항에 있어서,
    상기 동형 암호문은 복수의 슬롯을 포함하며,
    상기 복수의 슬롯 각각에 하나의 변수 정보를 갖는 암호문 처리 방법.
  11. 제9항에 있어서,
    상기 빈 마스크는,
    복수의 슬롯을 포함하며,
    상기 복수의 슬롯 각각은 하나의 변수 값의 존재 여부에 대한 정보를 포함하며,
    상기 빈 마스크를 생성하는 단계는,
    동형 암호문 각각에 대해서 상기 동형 암호문에 포함된 변수 정보별 복수의 빈 마스크를 생성하고,
    상기 개수 정보를 생성하는 단계는,
    생성된 복수의 빈 마스크 중 상기 변수 조합에 대응되는 빈 마스크를 선별하고, 상기 선별된 빈 마스크 간의 곱을 이용하여 상기 변수 조합을 갖는 개수 정보를 생성하는 암호문 처리 방법.
  12. 제9항에 있어서,
    상기 빈 마스크는,
    복수의 슬롯을 포함하며,
    상기 복수의 슬롯 각각은 하나의 변수 값의 존재 여부에 대한 정보를 포함하는 복수의 서브 슬롯을 포함하고,
    상기 빈 마스크를 생성하는 단계는,
    동형 암호문 각각에 대해서 하나의 빈 마스크를 생성하고,
    상기 개수 정보를 생성하는 단계는,
    상기 복수의 빈 마스크 중 상기 변수 조합에 대응되는 상기 빈 마스크 내의 서브 슬롯을 이용하여 상기 변수 조합을 갖는 개수 정보를 생성하는 암호문 처리 방법.
  13. 제12항에 있어서,
    상기 복수의 서브 슬롯은, 기설정된 비트 간격을 갖고 하나의 슬롯 내에 배치되는 암호문 처리 방법.
  14. 제9항에 있어서,
    동일한 특징에 대한 복수의 정보를 포함하는 제1 동형 암호문 및 제2 동형 암호문을 하나의 동형 암호문으로 결합하는 단계;를 더 포함하는 암호문 처리 방법.
  15. 제14항에 있어서,
    상기 결합하는 단계는,
    상기 제1 동형 암호문과 상기 제2 동형 암호문 내의 공통된 정보에 대한 제1 도형 암호문 내의 제1 위치 정보와 상기 제2 동형 암호문 내의 제2 위치 정보를 이용하여, 상기 제1 동형 암호문과 제2 동형 암호문을 하나로 결합하는 암호문 처리 방법.
  16. 제15항에 있어서,
    상기 결합하는 단계는,
    제1 및 제2 동형 암호문 내에 포함된 복수의 정보 각각에 대해서 기설정된 공통된 키로 일방향 암호화 방식으로 암호화된 데이터와 상기 암호화된 데이터에 대한 동형 암호문 내의 위치 정보가 입력되면, 상기 제1 동형 암호문에 대한 암호화된 데이터와 상기 제2 동형 암호문에 대한 암호화된 데이터를 비교하여, 두 동형 암호문 간에 공통된 정보를 갖는 상기 제1 위치 정보와 상기 제2 위치 정보를 확인하는 암호문 처리 방법.
  17. 암호문 처리 방법을 실행하기 위한 프로그램을 포함하는 컴퓨터 판독가능 기록매체에 있어서,
    상기 암호문 처리 방법은,
    복수의 변수 정보를 암호화된 상태를 저장하는 동형 암호문을 복수개 저장하고, 상기 복수의 동형 암호문에 대한 연산 명령을 수신하는 단계;
    상기 복수의 동형 암호문 각각에 대해서 서로 다른 변수 정보 구분하여 갖는 빈 마스크를 생성하는 단계;
    상기 빈 마스크를 이용하여 변수 조합에 대응되는 개수 정보를 생성하는 단계; 및
    상기 생성된 개수 정보를 출력하는 단계;를 포함하는 컴퓨터 판독가능 기록매체.
PCT/KR2021/007517 2020-06-15 2021-06-15 동형 암호문에 대한 통계 연산 수행하는 장치 및 방법 WO2021256843A1 (ko)

Priority Applications (5)

Application Number Priority Date Filing Date Title
US17/999,389 US20230208611A1 (en) 2020-06-15 2021-06-15 Device and method for performing statistical calculation on homomorphic ciphertext
CN202180042724.0A CN115918028A (zh) 2020-06-15 2021-06-15 对同态密文执行统计操作的装置及其方法
EP21826346.5A EP4149045A4 (en) 2020-06-15 2021-06-15 DEVICE AND METHOD FOR PERFORMING STATISTICAL CALCULATIONS ON HOMOMORPHEUS CIPHERTEXT
KR1020227040329A KR102522708B1 (ko) 2020-06-15 2021-06-15 동형 암호문에 대한 통계 연산 수행하는 장치 및 방법
JP2022575885A JP2023529690A (ja) 2020-06-15 2021-06-15 同型暗号文に対する統計演算を行う装置及び方法

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US202063039086P 2020-06-15 2020-06-15
US63/039,086 2020-06-15

Publications (1)

Publication Number Publication Date
WO2021256843A1 true WO2021256843A1 (ko) 2021-12-23

Family

ID=79268138

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2021/007517 WO2021256843A1 (ko) 2020-06-15 2021-06-15 동형 암호문에 대한 통계 연산 수행하는 장치 및 방법

Country Status (6)

Country Link
US (1) US20230208611A1 (ko)
EP (1) EP4149045A4 (ko)
JP (1) JP2023529690A (ko)
KR (1) KR102522708B1 (ko)
CN (1) CN115918028A (ko)
WO (1) WO2021256843A1 (ko)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114978603A (zh) * 2022-04-25 2022-08-30 福建师范大学 一种具有接收判定能力的数据合并传输方法及其系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150122494A (ko) * 2014-04-23 2015-11-02 삼성전자주식회사 암호화 장치, 암호화 방법, 복호화 방법 및 컴퓨터 판독가능 기록매체
US20170180115A1 (en) * 2015-12-18 2017-06-22 Microsoft Technology Licensing, Llc Homomorphic Encryption with Optimized Homomorphic Operations
KR101965628B1 (ko) * 2017-12-15 2019-04-04 서울대학교산학협력단 동형 암호화를 수행하는 단말 장치와 그 암호문을 처리하는 서버 장치 및 그 방법들
KR20190117286A (ko) * 2018-04-06 2019-10-16 서울대학교산학협력단 블록체인 및 동형암호 기술을 이용하여 데이터를 공유하는 사용자 장치와 전자장치 및 그 방법들

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108140334B (zh) * 2015-10-09 2021-03-23 三菱电机株式会社 隐匿检索系统、管理装置、隐匿检索方法和记录介质
US10015007B2 (en) * 2015-11-25 2018-07-03 International Business Machines Corporation Performing efficient comparison operations on encrypted data
US10812252B2 (en) * 2017-01-09 2020-10-20 Microsoft Technology Licensing, Llc String matching in encrypted data
WO2018136804A1 (en) * 2017-01-20 2018-07-26 Enveil, Inc. End-to-end secure operations from a natural language expression
WO2019172837A1 (en) * 2018-03-05 2019-09-12 Agency For Science, Technology And Research Method and system for deriving statistical information from encrypted data
KR102040120B1 (ko) * 2018-07-27 2019-11-05 주식회사 크립토랩 근사 암호화된 암호문에 대한 연산을 수행하는 장치 및 방법

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150122494A (ko) * 2014-04-23 2015-11-02 삼성전자주식회사 암호화 장치, 암호화 방법, 복호화 방법 및 컴퓨터 판독가능 기록매체
US20170180115A1 (en) * 2015-12-18 2017-06-22 Microsoft Technology Licensing, Llc Homomorphic Encryption with Optimized Homomorphic Operations
KR101965628B1 (ko) * 2017-12-15 2019-04-04 서울대학교산학협력단 동형 암호화를 수행하는 단말 장치와 그 암호문을 처리하는 서버 장치 및 그 방법들
KR20190117286A (ko) * 2018-04-06 2019-10-16 서울대학교산학협력단 블록체인 및 동형암호 기술을 이용하여 데이터를 공유하는 사용자 장치와 전자장치 및 그 방법들

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
See also references of EP4149045A4 *
SEO KYONGJIN, PYONG KIM, YOUNHO LEE: "Implementation and Performance Enhancement of Arithmetic Adder for Fully Homomorphic Encrypted Data.", JOURNAL OF THE KOREA INSTITUTE OF INFORMATION SECURITY AND CRYPTOLOGY, vol. 27, no. 3, 30 June 2017 (2017-06-30), pages 413 - 426, XP055881582, ISSN: 1598-3986, DOI: 10.13089/JKIISC.2017.27.3.413 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114978603A (zh) * 2022-04-25 2022-08-30 福建师范大学 一种具有接收判定能力的数据合并传输方法及其系统
CN114978603B (zh) * 2022-04-25 2023-12-29 福建师范大学 一种具有接收判定能力的数据合并传输方法及其系统

Also Published As

Publication number Publication date
EP4149045A1 (en) 2023-03-15
JP2023529690A (ja) 2023-07-11
KR20220163493A (ko) 2022-12-09
US20230208611A1 (en) 2023-06-29
CN115918028A (zh) 2023-04-04
EP4149045A4 (en) 2024-04-24
KR102522708B1 (ko) 2023-04-18

Similar Documents

Publication Publication Date Title
WO2019117694A1 (ko) 동형 암호화를 수행하는 단말 장치와 그 암호문을 처리하는 서버 장치 및 그 방법들
WO2009157715A2 (en) Codebook design method for multiple input multiple output system and method for using the codebook
WO2020145503A1 (en) Apparatus for processing approximately encrypted messages and methods thereof
WO2014035146A2 (ko) 환 동형 사상을 이용한 동형 암호화 방법과 복호화 방법 및 이를 이용한 장치
WO2017222140A1 (ko) Cnn 기반 인루프 필터를 포함하는 부호화 방법과 장치 및 복호화 방법과 장치
WO2020235797A1 (en) Apparatus for processing modular multiply operation and methods thereof
WO2020117015A1 (ko) 다변수 패킹을 이용하는 연산 장치 및 방법
WO2014137159A1 (en) Method and apparatus for applying secondary transforms on enhancement-layer residuals
WO2016186241A1 (ko) 데이터 암호화 장치 및 방법과 및 데이터 복호화 장치 및 방법
WO2018199443A1 (en) Apparatus and method for performing operation being secure against side channel attack
WO2011136627A2 (en) Multiple input multiple output communication system using codebook corresponding to each reporting mode
WO2011147116A1 (zh) 一种复合型usub设备及其实现方法
WO2020166879A1 (en) Apparatus for performing threshold design on secret key and method thereof
EP3909193A1 (en) Apparatus for processing approximately encrypted messages and methods thereof
WO2020145759A1 (ko) 근사 계산에 대한 계산 검증
WO2021256843A1 (ko) 동형 암호문에 대한 통계 연산 수행하는 장치 및 방법
WO2017028597A1 (zh) 一种虚拟资源的数据处理方法及装置
WO2020242260A1 (ko) 전역적 문맥을 이용하는 기계 학습 기반의 이미지 압축을 위한 방법 및 장치
WO2017111362A1 (ko) 임의의 길이를 가지는 폴라 코드를 이용한 harq 수행 방법
WO2011021917A2 (en) Method and system for handling security synchronization for prolonged periods of no-reception of voice frames
WO2020116807A1 (ko) 암호문에 대한 비다항식 연산을 수행하는 장치 및 방법
WO2017071352A1 (zh) 密码的推送方法、推送系统及终端设备
WO2020246848A1 (ko) 근사 암호화된 암호문에 대한 정렬 장치 및 방법
WO2022158686A1 (ko) 암호화된 정보에 기초하여, 인공지능 모델을 이용한 추론을 수행하는 전자 장치 및 그 동작 방법
WO2017188497A1 (ko) 무결성 및 보안성이 강화된 사용자 인증방법

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21826346

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 20227040329

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2022575885

Country of ref document: JP

Kind code of ref document: A

Ref document number: 2021826346

Country of ref document: EP

Effective date: 20221206

NENP Non-entry into the national phase

Ref country code: DE