KR102491902B1 - Device and method for operation of encrypted data using fully homomorphic encryption - Google Patents

Device and method for operation of encrypted data using fully homomorphic encryption Download PDF

Info

Publication number
KR102491902B1
KR102491902B1 KR1020200164231A KR20200164231A KR102491902B1 KR 102491902 B1 KR102491902 B1 KR 102491902B1 KR 1020200164231 A KR1020200164231 A KR 1020200164231A KR 20200164231 A KR20200164231 A KR 20200164231A KR 102491902 B1 KR102491902 B1 KR 102491902B1
Authority
KR
South Korea
Prior art keywords
logic
value
homomorphic encryption
encryption data
output
Prior art date
Application number
KR1020200164231A
Other languages
Korean (ko)
Other versions
KR20210067961A (en
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 고려대학교 산학협력단
Publication of KR20210067961A publication Critical patent/KR20210067961A/en
Application granted granted Critical
Publication of KR102491902B1 publication Critical patent/KR102491902B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/11Complex mathematical operations for solving equations, e.g. nonlinear equations, general mathematical optimization problems
    • 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/544Methods 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 for evaluating functions by calculation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • 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

Abstract

본 발명은 완전동형암호기법으로 암호화된 데이터의 연산 장치에 대한 것으로, 암호화된 데이터를 송수신하는 통신 모듈; 연산 프로그램이 저장된 메모리; 및 상기 연산 프로그램을 실행하는 프로세서를 포함한다. 연산 프로그램은 제 1 동형암호 데이터와 제 2 동형암호 데이터를 비트별로 연산하는 XOR연산 로직, XNOR연산 로직, AND연산 로직 및 OR 연산 로직을 각각 포함하고, 동형암호 데이터에 대한 보수를 반환하는 보수 연산 로직, 동형암호 데이터에 대한 절댓값을 반환하는 절댓값 연산 로직, 동형암호 데이터를 오른쪽으로 이동시킨 결괏값을 반환하는 오른쪽 이동 연산 로직, 동형암호 데이터를 왼쪽으로 이동시킨 결괏값을 반환하는 왼쪽 이동 연산 로직 및 입력된 복수의 동형암호 데이터 중 어느 하나를 출력하는 MUX연산 로직을 포함하고, 입력된 제 1 동형암호 데이터와 제 2 동형암호 데이터 중 먼저 입력한 값이 큰 값이면 ‘1’ 비트를 암호화한 제 1 암호화 값을 출력하는 제 1 대소 비교 연산 로직과 입력된 제 1 동형암호 데이터와 제 2 동형암호 데이터 중 먼저 입력한 값이 작은 값이면 상기 제 1 암호화 값을 출력하는 제 2 대소 비교 연산 로직을 포함한다.The present invention relates to a device for computing data encrypted by a fully homomorphic encryption method, comprising: a communication module for transmitting and receiving encrypted data; a memory in which an arithmetic program is stored; and a processor executing the calculation program. The operation program includes an XOR operation logic, an XNOR operation logic, an AND operation logic, and an OR operation logic for performing bit-by-bit operation on the first homomorphic encryption data and the second homomorphic encryption data, and a complement operation for returning a complement to the homomorphic encryption data. Logic, absolute value calculation logic that returns the absolute value of homomorphic encryption data, right-shift calculation logic that returns the result of shifting homomorphic data to the right, left-shift calculation logic that returns the result of shifting homomorphic data to the left and a MUX operation logic for outputting any one of a plurality of input homomorphic encryption data, and if a value input first between the input first homomorphic encryption data and the input second homomorphic encryption data is a larger value, '1' bit is encrypted. A first case comparison operation logic for outputting a first encryption value and a second case comparison operation logic for outputting the first encryption value when the value input first between the input first homomorphic encryption data and the input second homomorphic encryption data is a smaller value includes

Description

완전동형암호 기법으로 암호화된 데이터의 연산을 위한 장치 및 방법{DEVICE AND METHOD FOR OPERATION OF ENCRYPTED DATA USING FULLY HOMOMORPHIC ENCRYPTION}DEVICE AND METHOD FOR OPERATION OF ENCRYPTED DATA USING FULLY HOMOMORPHIC ENCRYPTION}

본 발명은 완전동형암호(Fully Homomorphic Encryption)를 이용해 암호화된 데이터에 대해 별도의 복호화 없이 비교 연산, 사칙 연산 등 각종 연산을 수행하는 장치 및 방법에 대한 관한 것이다.The present invention relates to an apparatus and method for performing various operations such as comparison operations and four arithmetic operations on data encrypted using fully homomorphic encryption without separate decryption.

기존 사용자-클라우드 모델에서는 사용자와 서버 간에 키를 공유하여 이 키를 바탕으로 암호화된 사용자의 데이터가 서버에 보내지게 되고, 서버는 이 키를 통해 사용자의 파일을 복호화하여 해당 사용자가 원하는 서비스를 처리한다. In the existing user-cloud model, a key is shared between the user and the server, and the user's data encrypted based on this key is sent to the server, and the server decrypts the user's file through this key to process the service the user wants. do.

다만, 사용자와 서버가 키를 공유하므로, 사용자의 개인정보가 유출될 수 있는 문제가 있다. 일례로 문서를 PDF로 변환해주는 웹서버의 경우 사용자가 보낸 파일들을 지속적으로 수집하고, 이를 악의적인 용도로 사용할 가능성이 있다. 마찬가지로 백신 프로그램들도 이러한 경로로 기밀문서 또는 개인정보 등이 포함된 파일들에 대한 접근 권한을 갖게 된다.However, since the user and the server share a key, there is a problem that the user's personal information may be leaked. For example, in the case of a web server that converts documents into PDFs, there is a possibility of continuously collecting files sent by users and using them for malicious purposes. Likewise, anti-virus programs also gain access to files containing confidential documents or personal information through this path.

동형암호는 이를 방지하기 위한 좋은 수단으로 암호화된 사용자 데이터를 서버가 복호화를 거치지 않고 처리할 수 있게 한다. 이처럼 동형암호를 이용하면 클라우드 환경에서 발생할 수 있는 개인 데이터 프라이버시 문제를 해결할 수 있다.Homomorphic encryption is a good means to prevent this and allows the server to process encrypted user data without decryption. In this way, using homomorphic encryption can solve the personal data privacy problem that can occur in a cloud environment.

도 1은 종래 기술에 따른 동형암호가 사용되는 메커니즘을 도시한 것이다.1 illustrates a mechanism in which homomorphic encryption according to the prior art is used.

도시된 바와 같이, 메시지를 평문 상에서 연산한 결괏값과 암호화된 메시지에 대해서 동형암호 연산을 한 후 복호화한 결괏값이 같다는 것을 나타낸다. As shown, it indicates that the resultant value obtained by calculating the message on the plaintext and the resultant value obtained by decryption after performing the homomorphic encryption operation on the encrypted message are the same.

즉, 본 발명에서는 이와 같은 동형암호 메커니즘을 이용하여, 암호화된 상태의 데이터에 대해 각종 연산을 수행하는 기능을 개발하고자 한다. That is, the present invention intends to develop functions that perform various operations on data in an encrypted state using such a homomorphic encryption mechanism.

현재 비트 단위를 기반으로 암호화하는 동형암호의 경우 기초 연산이 부족한 실정이다. 이에 따라, 본 발명에서는 동형암호를 기반으로 하는 기초 연산들을 구축하고, 이를 기반으로 추가적인 응용 연산들을 만들어 나가는데 기여하고자 한다.Currently, in the case of homomorphic encryption that encrypts based on bit units, basic operations are insufficient. Accordingly, the present invention intends to contribute to constructing basic operations based on homomorphic encryption and creating additional application operations based thereon.

대한민국 공개특허 제10-2020-0054119호(발명의 명칭: 동형암호 기법으로 암호화된 데이터의 지수 함수 연산 서버 및 방법)Republic of Korea Patent Publication No. 10-2020-0054119 (Title of Invention: Exponential Function Calculation Server and Method of Data Encrypted with Homomorphic Encryption Technique)

본 발명에서는 동형암호 기법으로 암호화된 데이터에 대한 비교 연산과 사칙 연산을 수행할 수 있도록 하는 암호화된 데이터의 연산 장치 및 방법을 제공하는데 그 목적이 있다.An object of the present invention is to provide an apparatus and method for computing encrypted data that can perform comparison operations and four arithmetic operations on data encrypted using a homomorphic encryption technique.

다만, 본 실시예가 이루고자 하는 기술적 과제는 상기된 바와 같은 기술적 과제들로 한정되지 않으며, 또 다른 기술적 과제들이 존재할 수 있다.However, the technical problem to be achieved by the present embodiment is not limited to the technical problems described above, and other technical problems may exist.

전술한 기술적 과제를 해결하기 위한 본 발명의 일 실시예에 따른 완전동형암호기법으로 암호화된 데이터의 연산 장치는 암호화된 데이터를 송수신하는 통신 모듈; 연산 프로그램이 저장된 메모리; 및 상기 연산 프로그램을 실행하는 프로세서를 포함한다.An apparatus for computing data encrypted by a fully homomorphic encryption method according to an embodiment of the present invention for solving the above technical problem includes a communication module for transmitting and receiving encrypted data; a memory in which an arithmetic program is stored; and a processor executing the calculation program.

이때, 연산 프로그램은 제 1 동형암호 데이터와 제 2 동형암호 데이터를 비트별로 연산하는 XOR연산 로직, XNOR연산 로직, AND연산 로직 및 OR 연산 로직을 각각 포함하고, 동형암호 데이터에 대한 보수를 반환하는 보수 연산 로직, 동형암호 데이터에 대한 절댓값을 반환하는 절댓값 연산 로직, 동형암호 데이터를 오른쪽으로 이동시킨 결괏값을 반환하는 오른쪽 이동 연산 로직, 동형암호 데이터를 왼쪽으로 이동시킨 결괏값을 반환하는 왼쪽 이동 연산 로직 및 입력된 복수의 동형암호 데이터 중 어느 하나를 출력하는 MUX연산 로직을 포함하고, 입력된 제 1 동형암호 데이터와 제 2 동형암호 데이터 중 먼저 입력한 값이 큰 값이면 '1' 비트를 암호화한 제 1 암호화 값을 출력하는 제 1 대소 비교 연산 로직과 입력된 제 1 동형암호 데이터와 제 2 동형암호 데이터 중 먼저 입력한 값이 작은 값이면 상기 제 1 암호화 값을 출력하는 제 2 대소 비교 연산 로직을 포함하되, 상기 제 1 대소 비교 연산 로직은 상기 입력된 제 1 동형암호 데이터와 제 2 동형암호 데이터를 상기 XNOR 연산 로직에 입력하여 제 1 출력값을 구하고, MUX 연산 로직을 통해 상기 제 1 출력값에 따라 '0' 비트를 암호화한 제 2 암호화 값 또는 제 1 동형암호 데이터를 출력하고, 상기 제 2 대소 비교 연산 로직은 상기 입력된 제 1 동형암호 데이터와 제 2 동형암호 데이터를 상기 XNOR 연산 로직에 입력하여 제 1 출력값을 구하고, MUX 연산 로직을 통해 상기 제 1 출력값에 따라 '0' 비트를 암호화한 제 2 암호화 값 또는 상기 제 2 동형암호 데이터를 출력한다.At this time, the operation program includes an XOR operation logic, an XNOR operation logic, an AND operation logic, and an OR operation logic for performing bit-by-bit operation on the first homomorphic encryption data and the second homomorphic encryption data, and returns a complement for the homomorphic encryption data. Complement arithmetic logic, absolute value arithmetic logic that returns the absolute value of homomorphic data, right shift arithmetic logic that returns the result of shifting homomorphic data to the right, left shift that returns the result of shifting homomorphic data to the left It includes an operation logic and a MUX operation logic that outputs any one of a plurality of input homomorphic encryption data, and if a value input first among the input first homomorphic encryption data and the input second homomorphic encryption data is a larger value, '1' bit is output. A first case comparison operation logic for outputting an encrypted first encryption value and a second case comparison for outputting the first encryption value if the value input first between the input first homomorphic encryption data and the input second homomorphic encryption data is a smaller value An operation logic, wherein the first size comparison operation logic calculates a first output value by inputting the input first homomorphic encryption data and second homomorphic encryption data to the XNOR operation logic, and calculates the first output value through MUX operation logic. According to the output value, a second encryption value or first homomorphic encryption data obtained by encrypting '0' bit is output, and the second size comparison operation logic performs the XNOR operation on the inputted first homomorphic encryption data and second homomorphic encryption data. A first output value is obtained by inputting to a logic, and a second encryption value obtained by encrypting a '0' bit or the second homomorphic encryption data is output according to the first output value through the MUX operation logic.

본 발명의 다른 실시예에 따른 완전동형암호기법으로 암호화된 데이터의 연산 장치를 이용한 암호화된 데이터의 연산 방법은 상기 암호화된 데이터의 연산 장치는 제 1 동형암호 데이터와 제 2 동형암호 데이터를 비트별로 연산하는 XOR연산 로직, XNOR연산 로직, AND연산 로직 및 OR 연산 로직을 각각 포함하고, 동형암호 데이터에 대한 보수를 반환하는 보수 연산 로직, 동형암호 데이터에 대한 절댓값을 반환하는 절댓값 연산 로직, 동형암호 데이터를 오른쪽으로 이동시킨 결괏값을 반환하는 오른쪽 이동 연산 로직, 동형암호 데이터를 왼쪽으로 이동시킨 결괏값을 반환하는 왼쪽 이동 연산 로직 및 입력된 복수의 동형암호 데이터 중 어느 하나를 출력하는 MUX연산 로직을 포함하는 연산 프로그램이 설치된 것이고, 입력된 제 1 동형암호 데이터와 제 2 동형암호 데이터를 제 1 대소 비교 연산 로직에 입력하여 대소 비교를 수행하는 단계 및 입력된 제 1 동형암호 데이터와 제 2 동형암호 데이터를 제 2 대소 비교 연산 로직에 입력하여 대소 비교를 수행하는 단계를 포함한다.According to another embodiment of the present invention, a method for calculating encrypted data using a device for calculating data encrypted by a fully homomorphic encryption method comprises bit-by-bit first homomorphic encryption data and second homomorphic encryption data. Includes XOR operation logic, XNOR operation logic, AND operation logic, and OR operation logic, respectively, and complement operation logic that returns the complement of homomorphic encryption data, absolute value operation logic that returns the absolute value of homomorphic encryption data, and homomorphic encryption Right-shift operation logic that returns the result value of moving data to the right, left-shift operation logic that returns the result value of moving homomorphic data to the left, and MUX operation logic that outputs any one of a plurality of input homomorphic encryption data An operation program including is installed, and the step of inputting the input first homomorphic encryption data and the second homomorphic encryption data to a first case comparison operation logic to perform case comparison and inputting the input first homomorphic encryption data and the second homomorphic encryption data and performing case comparison by inputting the encryption data to a second case comparison operation logic.

이때, 제 1 대소 비교 연산 로직은 먼저 입력한 값이 큰 값이면 ‘1’ 비트를 암호화한 제 1 암호화 값을 출력하는 것이고, 상기 입력된 제 1 동형암호 데이터와 제 2 동형암호 데이터를 상기 XNOR 연산 로직에 입력하여 제 1 출력값을 구하고, MUX 연산 로직을 통해 상기 제 1 출력값에 따라 ‘0’ 비트를 암호화한 제 2 암호화 값 또는 제 1 동형암호 데이터를 출력하는 것이고, 상기 제 2 대소 비교 연산 로직은 먼저 입력한 값이 작은 값이면 상기 제 1 암호화 값을 출력하는 것이고, 상기 입력된 제 1 동형암호 데이터와 제 2 동형암호 데이터를 상기 XNOR 연산 로직에 입력하여 제 1 출력값을 구하고, MUX 연산 로직을 통해 상기 제 1 출력값에 따라 ‘0’ 비트를 암호화한 제 2 암호화 값 또는 상기 제 2 동형암호 데이터를 출력하는 것이다.At this time, the first size comparison operation logic outputs a first encryption value obtained by encrypting '1' bit if the first input value is a large value, and converts the inputted first homomorphic encryption data and second homomorphic encryption data into the XNOR A first output value is obtained by inputting it to an operation logic, and a second encryption value or first homomorphic encryption data obtained by encrypting '0' bits according to the first output value is output through the MUX operation logic, and the second size comparison operation The logic outputs the first encryption value if the first input value is a small value, inputs the input first homomorphic encryption data and the second homomorphic encryption data to the XNOR operation logic to obtain a first output value, and performs a MUX operation. A second encryption value obtained by encrypting '0' bit or the second homomorphic encryption data is outputted through logic according to the first output value.

전술한 본 발명의 과제 해결 수단에 따르면, 완전동형암호기법으로 암호화된 데이터를 암호화된 상태에서, 비교 연산이나 각종 사칙 연산에 입력할 수 있고, 암호화된 상태에서 그 결과를 출력할 수 있다. According to the problem solving means of the present invention described above, data encrypted by the fully homomorphic encryption method can be input to comparison calculations or various arithmetic operations in an encrypted state, and the results can be output in an encrypted state.

이를 통해, 각종 클라우드 서비스, 개인 PC의 바이러스 검사, 인간 유전자 게놈(Genome) 데이터 분석과 같이개인의 프라이버시 보존이 높게 요구되는 산업에서, 데이터 보안 특성을 크게 향상시킬 수 있다.Through this, data security characteristics can be greatly improved in industries where personal privacy is highly required, such as various cloud services, virus inspection of personal PCs, and human genome data analysis.

또한, 본 발명은 다양한 수학·통계 분야에서 활용될 수 있으며, 가장 근본적인 연산들(비교 및 사칙 연산)을 구축함으로써 이를 활용하여 수학적 또는 통계적인 분야에서 다방면으로 활용될 수 있다.In addition, the present invention can be utilized in various fields of mathematics and statistics, and by constructing the most fundamental operations (comparison and arithmetic operations), it can be utilized in various fields in mathematical or statistical fields.

도 1은 종래 기술에 따른 동형암호가 사용되는 메커니즘을 도시한 것이다.
도 2는 본 발명의 일 실시예에 따른 암호화된 데이터의 연산 장치의 구성을 도시한 것이다.
도 3은 본 발명의 일 실시예에 따른 동형암호화된 데이터를 사용하는 과정을 도시한 개념도이다.
도 4는 본 발명의 일 실시예에 따른 암호화된 데이터의 실수 표현 기술을 설명하기 위한 도면이다.
도 5는 본 발명의 일 실시예에 따른 덧셈 로직의 구성을 도시한 논리 회로도이다.
도 6은 본 발명의 일 실시예에 따른 뺄셈 로직의 구성을 도시한 논리 회로도이다.
도 7은 본 발명에서 사용하는 이진 곱셈 과정을 도시한 것이다.
도 8은 본 발명의 일 실시예에 따른 곱셈 로직의 구성을 도시한 블록도이다.
도 9는 본 발명에서 사용하는 이진 나눗셈 과정을 도시한 것이다.
도 10은 본 발명의 일 실시예에 따른 나눗셈 로직의 구성을 도시한 블록도이다.
1 illustrates a mechanism in which homomorphic encryption according to the prior art is used.
2 illustrates the configuration of an apparatus for computing encrypted data according to an embodiment of the present invention.
3 is a conceptual diagram illustrating a process of using homomorphically encrypted data according to an embodiment of the present invention.
4 is a diagram for explaining a real number representation technique of encrypted data according to an embodiment of the present invention.
5 is a logic circuit diagram showing the configuration of an addition logic according to an embodiment of the present invention.
6 is a logic circuit diagram showing the configuration of subtraction logic according to an embodiment of the present invention.
7 shows a binary multiplication process used in the present invention.
8 is a block diagram showing the configuration of multiplication logic according to an embodiment of the present invention.
9 illustrates a binary division process used in the present invention.
10 is a block diagram showing the configuration of division logic according to an embodiment of the present invention.

아래에서는 첨부한 도면을 참조하여, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 본 발명의 실시예를 상세히 설명한다. 그러나, 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고, 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.Hereinafter, with reference to the accompanying drawings, embodiments of the present invention will be described in detail so that those skilled in the art can easily practice it. However, the present invention may be embodied in many different forms and is not limited to the embodiments set forth herein. And, in order to clearly explain the present invention in the drawings, parts irrelevant to the description are omitted, and similar reference numerals are attached to similar parts throughout the specification.

명세서 전체에서, 어떤 부분이 다른 부분과 "연결"되어 있다고 할 때, 이는 "직접적으로 연결"되어 있는 경우뿐만 아니라, 그 중간에 다른 소자를 사이에 두고 "전기적으로 연결"되어 있는 경우도 포함한다. 또한, 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다.Throughout the specification, when a part is said to be "connected" to another part, this includes not only the case of being "directly connected" but also the case of being "electrically connected" with another element in between. . In addition, when a part "includes" a certain component, it means that it may further include other components without excluding other components unless otherwise stated.

이하에서는, 첨부된 도면을 참조하여 완전동형암호 기법으로 암호화된 데이터의 연산 장치 및 방법에 대하여 설명하기로 한다.Hereinafter, an apparatus and method for calculating data encrypted by a fully homomorphic encryption technique will be described with reference to the accompanying drawings.

도 2는 본 발명의 일 실시예에 따른 암호화된 데이터의 연산 장치의 구성을 도시한 것이다.2 illustrates the configuration of an apparatus for computing encrypted data according to an embodiment of the present invention.

연산장치(100)는 메모리(110), 프로세서(120), 통신모듈(130) 및 데이터베이스(140)를 포함한다. 연산장치(100)는 하나 이상의 사용자 단말(200)로부터 수신되는 각종 암호화된 데이터를 수신하며, 암호화된 데이터에 대하여 각종 연산 처리를 수행한다.The arithmetic device 100 includes a memory 110, a processor 120, a communication module 130 and a database 140. The arithmetic device 100 receives various encrypted data received from one or more user terminals 200 and performs various arithmetic processes on the encrypted data.

메모리(110)는 동형암호 데이터에 대하여 각종 연산 처리를 수행하는 연산 프로그램이 저장된다. The memory 110 stores an arithmetic program for performing various arithmetic processes on homomorphic encryption data.

이때, 연산 프로그램은 연산 프로그램은 제 1 동형암호 데이터와 제 2 동형암호 데이터를 비트별로 연산하는 XOR연산 로직, XNOR연산 로직, AND연산 로직 및 OR 연산 로직을 각각 포함한다. 또한, 연산 프로그램은 동형암호 데이터에 대한 보수를 반환하는 보수 연산 로직, 동형암호 데이터에 대한 절댓값을 반환하는 절댓값 연산 로직, 동형암호 데이터를 오른쪽으로 이동시킨 결괏값을 반환하는 오른쪽 이동 연산 로직, 동형암호 데이터를 왼쪽으로 이동시킨 결괏값을 반환하는 왼쪽 이동 연산 로직 및 입력된 복수의 동형암호 데이터 중 어느 하나를 출력하는 MUX연산 로직을 포함한다.At this time, the calculation program includes an XOR operation logic, an XNOR operation logic, an AND operation logic, and an OR operation logic that respectively operate the first homomorphic encryption data and the second homomorphic encryption data bit by bit. In addition, the operation program includes a complement operation logic that returns the complement of homomorphic encryption data, an absolute value operation logic that returns the absolute value of homomorphic encryption data, a right-shift operation logic that returns the result of shifting homomorphic encryption data to the right, and an isomorphic It includes a left shift operation logic that returns a result value of shifting cryptographic data to the left and a MUX operation logic that outputs any one of a plurality of input homomorphic encryption data.

또한, 연산 프로그램은 제 1 대소 비교 연산 로직, 제 2 대소 비교 연산 로직, 덧셈 로직, 뺄셈 로직, 절댓값 로직, 곱셈 로직, 나눗셈 로직, 지수함수 로직을 포함한다. 각각의 연산 로직의 구체적인 구성에 대해서는 추후 설명하기로 한다.In addition, the operation program includes first size comparison operation logic, second size comparison operation logic, addition logic, subtraction logic, absolute value logic, multiplication logic, division logic, and exponential function logic. A detailed configuration of each operation logic will be described later.

또한, 연산 프로그램은 시그모이드 함수 연산을 수행하는 시그모이드 함수 로직을 포함하며, 이를 기반으로 로지스틱 회귀분석을 수행하는 회귀분석 로직을 포함한다.In addition, the calculation program includes sigmoid function logic for performing sigmoid function calculation, and includes regression analysis logic for performing logistic regression analysis based on the sigmoid function logic.

또한, 메모리(110)는 프로세서(120)가 처리하는 데이터를 일시적 또는 영구적으로 저장하는 기능을 수행한다. 여기서, 메모리(110)는 휘발성 저장 매체(volatile storage media) 또는 비휘발성 저장 매체(non-volatile storage media)를 포함할 수 있으나, 본 발명의 범위가 이에 한정되는 것은 아니다. 메모리(110)는 프로세서(120)의 처리 및 제어를 위한 운영체제 등 별도의 프로그램이 저장될 수도 있고, 입력되거나 출력되는 데이터들의 임시 저장을 위한 기능을 수행할 수도 있다.In addition, the memory 110 performs a function of temporarily or permanently storing data processed by the processor 120 . Here, the memory 110 may include volatile storage media or non-volatile storage media, but the scope of the present invention is not limited thereto. The memory 110 may store a separate program such as an operating system for processing and controlling the processor 120, or may perform a function for temporarily storing input or output data.

프로세서(120)는 메모리(110)에 저장된 연산 프로그램을 실행하여, 동형암호 기법으로 암호화된 데이터에 대하여 각종 연산 처리를 수행한다.The processor 120 executes an arithmetic program stored in the memory 110 to perform various arithmetic processes on data encrypted using a homomorphic encryption technique.

여기서, 프로세서(120)는 프로세서(processor)와 같이 데이터를 처리할 수 있는 모든 종류의 장치를 포함할 수 있다. 여기서, '프로세서(processor)'는, 예를 들어 프로그램 내에 포함된 코드 또는 명령으로 표현된 기능을 수행하기 위해 물리적으로 구조화된 회로를 갖는, 하드웨어에 내장된 데이터 처리 장치를 의미할 수 있다. 이와 같이 하드웨어에 내장된 데이터 처리 장치의 일 예로써, 마이크로프로세서(microprocessor), 중앙처리장치(central processing unit: CPU), 프로세서 코어(processor core), 멀티프로세서(multiprocessor), ASIC(application-specific integrated circuit), FPGA(field programmable gate array) 등의 처리 장치를 망라할 수 있으나, 본 발명의 범위가 이에 한정되는 것은 아니다.Here, the processor 120 may include all types of devices capable of processing data, such as a processor. Here, a 'processor' may refer to a data processing device embedded in hardware having a physically structured circuit to perform functions expressed by codes or instructions included in a program, for example. As an example of such a data processing device built into hardware, a microprocessor, a central processing unit (CPU), a processor core, a multiprocessor, an application-specific integrated (ASIC) circuit), field programmable gate array (FPGA), etc., but the scope of the present invention is not limited thereto.

통신모듈(130)은 통신망과 연동하여 사용자 단말(200)로 송수신되는 동형암호화된 데이터를 처리하는 데 필요한 통신 인터페이스를 제공한다. 여기서, 통신 모듈(130)은 다른 네트워크 장치와 유무선 연결을 통해 제어 신호 또는 데이터 신호와 같은 신호를 송수신하기 위해 필요한 하드웨어 및 소프트웨어를 포함하는 장치일 수 있다.The communication module 130 provides a communication interface necessary for processing homomorphic encrypted data transmitted and received to and from the user terminal 200 in conjunction with a communication network. Here, the communication module 130 may be a device including hardware and software necessary for transmitting/receiving a signal such as a control signal or a data signal through a wired/wireless connection with another network device.

데이터베이스(140)는 암호화된 데이터와 이를 기반으로 생성된 연산 결과들을 저장한다. 이와 같은 연산 결과들은 서버에서 제공하는 각종 응용 서비스에 활용될 수 있다.The database 140 stores encrypted data and calculation results generated based thereon. These calculation results can be used for various application services provided by the server.

도 3은 본 발명의 일 실시예에 따른 동형암호화된 데이터를 사용하는 과정을 도시한 개념도이다.3 is a conceptual diagram illustrating a process of using homomorphically encrypted data according to an embodiment of the present invention.

도시된 바와 같이, 사용자 단말에서 전송되는 데이터는 동형암호화 처리된 후 클라우드 서버등에서 수신한다. 본 발명에 다른 연산 장치(100)는 이를 복호화하지 않은 상태에서 본 발명이 제공하는 각종 연산을 처리하고, 이에 기반한 결괏값이 복호화되어 사용자 단말에 제공된다.As shown, the data transmitted from the user terminal is subjected to homomorphic encryption and then received from a cloud server or the like. The calculation device 100 according to the present invention processes various calculations provided by the present invention without decrypting them, and decodes the resulting values based on them and provides them to the user terminal.

본 발명에서 사용되는 기호는 다음과 같이 정의된다.Symbols used in the present invention are defined as follows.

배열(벡터)은 알파벳 기호

Figure 112020129083627-pat00001
,
Figure 112020129083627-pat00002
은 배열의 길이(length)로 나타내며, 각각의 인덱스에 해당하는 요소들은
Figure 112020129083627-pat00003
Figure 112020129083627-pat00004
Figure 112020129083627-pat00005
부터
Figure 112020129083627-pat00006
사이의 값을 갖는다. 또한, 'Enc'는 암호화를 의미하고 'Dec'는 복호화를 의미한다.Array(Vector) is an alphabetic symbol
Figure 112020129083627-pat00001
,
Figure 112020129083627-pat00002
is represented by the length of the array, and the elements corresponding to each index are
Figure 112020129083627-pat00003
as
Figure 112020129083627-pat00004
Is
Figure 112020129083627-pat00005
from
Figure 112020129083627-pat00006
has a value between Also, 'Enc' means encryption and 'Dec' means decryption.

'bitwise'는 특정 연산을 각 배열의 요소들 모두에게 각각 적용하는 것을 의미하고, 'sc'는 배열(벡터)을 스칼라값으로 바꾸는 것을 의미한다.'bitwise' means to apply a specific operation to each element of each array, and 'sc' means to convert an array (vector) into a scalar value.

'boots'는 동형암호 게이트들과 일반 게이트들과의 차이를 나타내기 위해 표시한다. 일반적으로 완전동형암호 게이트는 연산 이후 노이즈를 제거하기 위한 부트스트래핑(bootstrapping)이 필요하다. 예컨대,

Figure 112020129083627-pat00007
Figure 112020129083627-pat00008
boots.XOR
Figure 112020129083627-pat00009
가 의미하는 것은 두 입력 암호비트
Figure 112020129083627-pat00010
에 대해서 XOR 연산을 수행하고, 연산 도중 발생하는 노이즈가 부트스트래핑에 의해 감소되어 반환되는 암호비트 값을
Figure 112020129083627-pat00011
배열의 0번째 요소에 저장하는 것을 의미한다.'boots' is displayed to indicate the difference between homomorphic gates and normal gates. In general, fully homomorphic encryption gates require bootstrapping to remove noise after operation. for example,
Figure 112020129083627-pat00007
Figure 112020129083627-pat00008
boots.XOR
Figure 112020129083627-pat00009
means that the two input cipher bits
Figure 112020129083627-pat00010
The XOR operation is performed on , and the noise generated during the operation is reduced by bootstrapping,
Figure 112020129083627-pat00011
It means to store it in the 0th element of the array.

본 발명서에서 등장하는 동형암호 함수들 중 기초적인 것들을 언급하면 다음과 같다. 먼저, HE.TwosComplement(

Figure 112020129083627-pat00012
) 함수는 동형암호 2의 보수 연산으로 입력값
Figure 112020129083627-pat00013
에 대해 2의 보수를 취한 값을 반환하는 알고리즘이다. 다음으로, HE.AbsoluteValue(
Figure 112020129083627-pat00014
) 연산은 암호문
Figure 112020129083627-pat00015
를 받아 이에 대해 절댓값을 결괏값으로 반환하는 함수이다. 다음으로, HE.RightShift(
Figure 112020129083627-pat00016
,
Figure 112020129083627-pat00017
)는 입력 암호문
Figure 112020129083627-pat00018
에 대해서 오른쪽으로
Figure 112020129083627-pat00019
만큼 이동연산을 수행한 결괏값을 반환해주는 함수이다. 또한, HE.LeftShift(
Figure 112020129083627-pat00020
,
Figure 112020129083627-pat00021
)는 왼쪽으로
Figure 112020129083627-pat00022
만큼 이동연산을 수행한 결괏값을 반환해주는 함수이다. The basic ones among the homomorphic encryption functions appearing in the present invention are as follows. First, HE.TwosComplement(
Figure 112020129083627-pat00012
) function is the input value as a homomorphic two's complement operation
Figure 112020129083627-pat00013
It is an algorithm that returns a value obtained by taking the 2's complement of . Next, HE.AbsoluteValue(
Figure 112020129083627-pat00014
) operation is the ciphertext
Figure 112020129083627-pat00015
It is a function that receives and returns the absolute value as the result. Next, HE. RightShift(
Figure 112020129083627-pat00016
,
Figure 112020129083627-pat00017
) is the input ciphertext
Figure 112020129083627-pat00018
to the right about
Figure 112020129083627-pat00019
This function returns the result of performing the shift operation as much as possible. Also, HE. LeftShift(
Figure 112020129083627-pat00020
,
Figure 112020129083627-pat00021
) to the left
Figure 112020129083627-pat00022
This function returns the result of performing the shift operation as much as possible.

도 4은 본 발명의 일 실시예에 따른 암호화된 데이터의 실수 표현 기술을 설명하기 위한 도면이다.4 is a diagram for explaining a real number representation technique of encrypted data according to an embodiment of the present invention.

본 발명에서는 비트 단위 기반 동형암호 스키마를 사용하여, 실수 유효 숫자 범위를 도 4와 같이 정하고 이를 통해 암호화된 실수 데이터를 표현한다.In the present invention, by using a bit-based homomorphic encryption scheme, a range of real valid digits is determined as shown in FIG. 4, and encrypted real data is expressed through this.

먼저 암호문 배열의 인덱스를 일반적인 표현과 반대로 설정한다. 즉, 맨 오른쪽이 최상위 비트가 되게 한다. 일반적으로 입력한 비트의 길이를

Figure 112020129083627-pat00023
, 암호문의 배열을
Figure 112020129083627-pat00024
,
Figure 112020129083627-pat00025
번째 배열의 성분을
Figure 112020129083627-pat00026
라고 두면, 인덱스
Figure 112020129083627-pat00027
부터
Figure 112020129083627-pat00028
까지의 (
Figure 112020129083627-pat00029
)만큼을 실수 데이터의 소수 부분으로 두고, 인덱스
Figure 112020129083627-pat00030
부터
Figure 112020129083627-pat00031
까지
Figure 112020129083627-pat00032
만큼을 실수 데이터의 정수 부분으로 둔다. 마지막, 최상위 비트,
Figure 112020129083627-pat00033
번째 비트를 부호 비트로 두고 실수를 표현한다.First, the index of the ciphertext array is set opposite to the general expression. That is, the rightmost bit becomes the most significant bit. In general, the length of the input bits
Figure 112020129083627-pat00023
, an array of ciphertext
Figure 112020129083627-pat00024
,
Figure 112020129083627-pat00025
element of array
Figure 112020129083627-pat00026
Let's say, the index
Figure 112020129083627-pat00027
from
Figure 112020129083627-pat00028
until (
Figure 112020129083627-pat00029
) as the fractional part of the real data, and the index
Figure 112020129083627-pat00030
from
Figure 112020129083627-pat00031
Till
Figure 112020129083627-pat00032
Let as much as the integer part of the real data. last, most significant bit,
Figure 112020129083627-pat00033
A real number is expressed with the first bit as the sign bit.

먼저, 본 발명의 일 실시예에 따른 대소 비교 로직을 살펴보기로 한다.First, a size comparison logic according to an embodiment of the present invention will be described.

본 발명의 연산 프로그램은 입력된 제 1 동형암호 데이터와 제 2 동형암호 데이터 중 먼저 입력한 값이 큰 값이면 ‘1’ 비트를 암호화한 제 1 암호화 값(Enc(1))을 출력하는 제 1 대소 비교 연산 로직과 입력된 제 1 동형암호 데이터와 제 2 동형암호 데이터 중 먼저 입력한 값이 작은 값이면 상기 제 1 암호화 값을 출력하는 제 2 대소 비교 연산 로직을 포함한다. The operation program of the present invention is a first method for outputting a first encryption value (Enc(1)) obtained by encrypting '1' bit when the first input value is a larger value among the input first homomorphic encryption data and the second homomorphic encryption data. and a case comparison operation logic and a second case comparison operation logic that outputs the first encryption value when a first input value of the input first homomorphic encryption data and the input second homomorphic encryption data is a smaller value.

제 1 대소 비교 연산 로직(HE.CompareLarge(a.b))은 아래에 도시된 바와 같이, 입력된 제 1 동형암호 데이터(

Figure 112020129083627-pat00034
)와 제 2 동형암호 데이터(
Figure 112020129083627-pat00035
)를 XNOR 연산 로직에 입력하여 제 1 출력값(t2)을 구하고, MUX 연산 로직을 통해 제 1 출력값(t2)에 따라 ‘0’ 비트를 암호화한 제 2 암호화 값(t1, Enc(0)) 또는 제 1 동형암호 데이터를 출력하는 동작을 수행한다.As shown below, the first size comparison operation logic HE.CompareLarge(ab) is input first homomorphic encryption data (
Figure 112020129083627-pat00034
) and the second homomorphic encryption data (
Figure 112020129083627-pat00035
) is input into the XNOR operation logic to obtain the first output value (t2), and the second encryption value (t1, Enc(0)) obtained by encrypting the '0' bit according to the first output value (t2) through the MUX operation logic, or An operation of outputting first homomorphic encryption data is performed.

Figure 112020129083627-pat00036
Figure 112020129083627-pat00036

이때, MUX 연산 게이트는 평문에서의 MUX 게이트와 같은 역할을 수행하는 것으로, a의 값에 따라 b또는 c를 출력한다.At this time, the MUX operation gate performs the same role as the MUX gate in the plain text, and outputs b or c according to the value of a.

Figure 112020129083627-pat00037
Figure 112020129083627-pat00037

이러한 구성에 따라, 제 1 대소 비교 연산 로직은 제 1 동형암호 데이터(

Figure 112020129083627-pat00038
)가 제 2 동형암호 데이터(
Figure 112020129083627-pat00039
) 보다 크면 Enc(1)을 출력하고, 반대의 경우에는 Enc(0)을 출력한다.According to this configuration, the first case comparison operation logic is the first homomorphic encryption data (
Figure 112020129083627-pat00038
) is the second homomorphic encryption data (
Figure 112020129083627-pat00039
), Enc(1) is output, and in the opposite case, Enc(0) is output.

또한, 제 2 대소 비교 연산 로직(HE.CompareSmall(a.b))은 입력된 제 1 동형암호 데이터(

Figure 112020129083627-pat00040
)와 제 2 동형암호 데이터(
Figure 112020129083627-pat00041
)를 XNOR 연산 로직에 입력하여 제 1 출력값(t2)을 구하고, MUX 연산 로직을 통해 제 1 출력값(t2)에 따라 ‘0’ 비트를 암호화한 제 2 암호화 값(t1, Enc(0)) 또는 제 2 동형암호 데이터(
Figure 112020129083627-pat00042
)를 출력하는 동작을 수행한다.In addition, the second size comparison operation logic HE.CompareSmall(ab) is input first homomorphic encryption data (
Figure 112020129083627-pat00040
) and the second homomorphic encryption data (
Figure 112020129083627-pat00041
) is input into the XNOR operation logic to obtain the first output value (t2), and the second encryption value (t1, Enc(0)) obtained by encrypting the '0' bit according to the first output value (t2) through the MUX operation logic, or The second homomorphic encryption data (
Figure 112020129083627-pat00042
) is output.

Figure 112020129083627-pat00043
Figure 112020129083627-pat00043

이러한 구성에 따라, 제 2 대소 비교 연산 로직은 제 1 동형암호 데이터(

Figure 112020129083627-pat00044
)가 제 2 동형암호 데이터(
Figure 112020129083627-pat00045
) 보다 작으면 Enc(1)을 출력하고, 반대의 경우에는 Enc(0)을 출력한다.According to this configuration, the second case comparison operation logic is the first homomorphic encryption data (
Figure 112020129083627-pat00044
) is the second homomorphic encryption data (
Figure 112020129083627-pat00045
), Enc(1) is output, and in the opposite case, Enc(0) is output.

다음으로, 본 발명의 일 실시예에 따른 덧셈 로직을 살펴보기로 한다.Next, an addition logic according to an embodiment of the present invention will be reviewed.

도 5는 본 발명의 일 실시예에 따른 덧셈 로직의 구성을 도시한 논리 회로도이다.5 is a logic circuit diagram showing the configuration of an addition logic according to an embodiment of the present invention.

연산 프로그램은 제 1 동형암호 데이터와 제 2 동형암호 데이터를 암호화된 상태에서 덧셈하는 덧셈 로직을 포함할 수 있다.The operation program may include an addition logic for adding the first homomorphic encryption data and the second homomorphic encryption data in an encrypted state.

덧셈 로직은 제 1 동형암호 데이터(

Figure 112020129083627-pat00046
)와 제 2 동형암호 데이터(
Figure 112020129083627-pat00047
)가 입력되어 제 1 출력값(t1)을 출력하는 제1 XOR 연산 로직(510, 3번째 줄), 제 1 출력값(t1)과 제 1 캐리 값(
Figure 112020129083627-pat00048
)이 입력되어 결괏값(
Figure 112020129083627-pat00049
)을 출력하는 제 2 XOR 연산 로직(512, 4번째 줄), 제 1 출력값(t1)과 제 1 캐리 값(
Figure 112020129083627-pat00050
)이 입력되어 제 2 출력값(t2)을 출력하는 제1 AND 연산 로직(514, 5번째 줄), 제 1 동형암호 데이터(
Figure 112020129083627-pat00051
)와 제 2 동형암호 데이터(
Figure 112020129083627-pat00052
)가 입력되어 제 3 출력값(t3)을 출력하는 제2 AND 연산 로직(516, 6번째 줄) 및 제 2 출력값(t2)과 제 3 출력값(t3)이 입력되어 제 2 캐리값(
Figure 112020129083627-pat00053
)을 출력하는 OR 연산 로직(518, 7번째 줄)을 포함한다.The addition logic is the first homomorphic encryption data (
Figure 112020129083627-pat00046
) and the second homomorphic encryption data (
Figure 112020129083627-pat00047
) is input and the first XOR operation logic (510, line 3) outputs the first output value t1, the first output value t1 and the first carry value (
Figure 112020129083627-pat00048
) is entered and the resulting value (
Figure 112020129083627-pat00049
), the second XOR operation logic (512, line 4) outputting the first output value (t1) and the first carry value (
Figure 112020129083627-pat00050
) is input and the first AND operation logic (514, line 5) outputs the second output value t2, the first homomorphic encryption data (
Figure 112020129083627-pat00051
) and the second homomorphic encryption data (
Figure 112020129083627-pat00052
) is input and the third output value (t3) is output, and the second AND operation logic (516, line 6) and the second output value (t2) and the third output value (t3) are input and the second carry value (
Figure 112020129083627-pat00053
) and OR operation logic (518, line 7) that outputs.

각각의 연산 로직에 대한 알고리즘은 아래와 같이 표현할 수 있다.The algorithm for each operation logic can be expressed as follows.

Figure 112020129083627-pat00054
Figure 112020129083627-pat00054

최하위 비트부터 순차적으로 덧셈 알고리즘이 수행되며, 각 루프에서 ai, bi, ci 값이 각각 입력되고, 결괏값(ri)과 다음 루프에 사용되는 캐리 값(ci+1)이 반환된다. 마지막 루프에서는 캐리 값을 산출할 필요가 없으므로, 9~10번째 줄에 기재된 바와 같이, 결괏값을 출력하는 XOR 연산 로직 게이트만 사용한다.The addition algorithm is performed sequentially from the least significant bit, and a i , b i , and c i values are input in each loop, and the result value (r i ) and the carry value (c i+1 ) used in the next loop are returned. do. Since there is no need to calculate the carry value in the last loop, only the XOR operation logic gate that outputs the result value is used, as described in lines 9 to 10.

한편, boots.AND, boots.OR, boots.XOR 게이트 들은 두 입력값에 대해서 연산 도중 발생한 잡음을 감소시키는 부트스트래핑 과정을 포함하는 것들이다.On the other hand, boots.AND, boots.OR, and boots.XOR gates include a bootstrapping process that reduces noise generated during operation for two input values.

다음으로, 본 발명의 일 실시예에 따른 뺄셈 로직을 살펴보기로 한다.Next, subtraction logic according to an embodiment of the present invention will be described.

도 6은 본 발명의 일 실시예에 따른 뺄셈 로직의 구성을 도시한 논리 회로도이다.6 is a logic circuit diagram showing the configuration of subtraction logic according to an embodiment of the present invention.

연산 프로그램은 제 1 동형암호 데이터와 제 2 동형암호 데이터를 암호화된 상태에서 뺄셈하는 뺄셈 로직을 포함할 수 있다.The operation program may include subtraction logic for subtracting the first homomorphic encryption data and the second homomorphic encryption data in an encrypted state.

뺄셈 로직은 제 1 동형암호 데이터(

Figure 112020129083627-pat00055
)와 제 2 동형암호 데이터(
Figure 112020129083627-pat00056
)가 입력되어 제 1 출력값(t1)을 출력하는 제1 XOR 연산 로직(610, 3번째 줄), 제 1 출력값(t1)과 제 1 캐리 값(
Figure 112020129083627-pat00057
)이 입력되어 결괏값(
Figure 112020129083627-pat00058
)을 출력하는 제 2 XOR 연산 로직(614, 4번째 줄), 제 1 동형암호 데이터를 반전시킨 값과 제 2 동형 암호 데이터가 입력되어 제 2 출력값(t2)을 출력하는 제1 AND 연산 로직(612, 6번째 줄), 제 1 출력값(t1)을 반전시킨 값과 제 1 캐리 값이 입력되어 제 3 출력값(t3)을 출력하는 제 2 AND 연산 로직(616, 8번째 줄), 제 2 출력값과 제 3 출력값이 입력되어 제 2 캐리값(
Figure 112020129083627-pat00059
)을 출력하는 OR 연산 로직(618, 9번째 줄)을 포함한다.The subtraction logic is the first homomorphic encryption data (
Figure 112020129083627-pat00055
) and the second homomorphic encryption data (
Figure 112020129083627-pat00056
) is input and the first XOR operation logic (610, line 3) outputs the first output value t1, the first output value t1 and the first carry value (
Figure 112020129083627-pat00057
) is entered and the resulting value (
Figure 112020129083627-pat00058
), a second XOR operation logic (614, line 4) outputting a second output value (t2) by inputting a value obtained by inverting the first homomorphic encryption data and second homomorphic encryption data, and outputting a second output value (t2). 612, line 6), a second AND operation logic (616, line 8) outputting a third output value (t3) by inputting the inverted value of the first output value (t1) and the first carry value, the second output value and the third output value are input to obtain a second carry value (
Figure 112020129083627-pat00059
) and OR operation logic (618, line 9) that outputs.

Figure 112020129083627-pat00060
Figure 112020129083627-pat00060

최하위 비트부터 순차적으로 뺄셈 알고리즘이 수행되며, 각 루프에서 ai, bi, ci 값이 각각 입력되고, 결괏값(ri)과 다음 루프에 사용되는 캐리 값(ci+1)이 반환된다. 마지막 루프에서는 캐리 값을 산출할 필요가 없으므로, 11~12번째 줄에 기재된 바와 같이, 결괏값을 출력하는 XOR 연산 로직 게이트만 사용한다.The subtraction algorithm is performed sequentially from the least significant bit, and a i , b i , and c i values are input in each loop, and the result value (r i ) and the carry value (c i+1 ) used in the next loop are returned. do. Since there is no need to calculate the carry value in the last loop, as described in lines 11 and 12, only the XOR operation logic gate that outputs the result value is used.

다음으로, 본 발명의 일 실시예에 따른 절댓값 로직을 살펴보기로 한다.Next, the absolute value logic according to an embodiment of the present invention will be reviewed.

연산 프로그램은 입력된 동형암호 데이터가 암호화된 상태에서 절댓값을 산출하는 절댓값 로직을 포함할 수 있다.The calculation program may include an absolute value logic for calculating an absolute value in an encrypted state of the inputted homomorphic encryption data.

절댓값 로직은 입력된 동형 암호데이터의 최상위 비트의 암호문에 따라 입력된 동형암호데이터에 대한 2의 보수(t) 및 입력된 동형 암호데이터 중 어느 하나를 출력하는 MUX연산 로직을 포함하며, 구체적인 알고리즘 구성은 아래와 같다.The absolute value logic includes a MUX operation logic that outputs either 2's complement (t) of the input homomorphic encryption data or the input homomorphic encryption data according to the ciphertext of the most significant bit of the input homomorphic encryption data, and a detailed algorithm configuration is as follows

Figure 112020129083627-pat00061
Figure 112020129083627-pat00061

다음으로, 본 발명의 일 실시예에 따른 곱셈 로직을 살펴보기로 한다.Next, multiplication logic according to an embodiment of the present invention will be reviewed.

도 7은 본 발명에서 사용하는 이진 곱셈 과정을 도시한 것이고, 도 8은 본 발명의 일 실시예에 따른 곱셈 로직의 구성을 도시한 블록도이다.7 shows a binary multiplication process used in the present invention, and FIG. 8 is a block diagram showing the configuration of a multiplication logic according to an embodiment of the present invention.

도 7에 도시된 바와 같이, 위 숫자 7(=0111(2))과 아래 숫자 5(0101(2))의 곱 결과로 35(=100011(2)) 가 출력됨을 확인할 수 있다. 위의 이진 숫자가 아래의 이진 숫자의 한 비트마다 곱해지면서 나오는 결과들(r1, r2, r3)합이 최종 결과가 된다.As shown in FIG. 7 , it can be confirmed that 35 (= 100011 (2) ) is output as a result of multiplying the upper number 7 (=0111 (2) ) and the lower number 5 (0101 (2) ). The sum of the results (r1, r2, r3) that comes out when the upper binary number is multiplied for each bit of the lower binary number is the final result.

본 발명에서는 이와 같은 이진 곱셈 방식과 곱셈을 하는 두 입력값의 부호를 고려하는 과정, 한정된 비트 수만을 추출해서 결괏값으로 반환하는 과정을 추가한다. In the present invention, the binary multiplication method, the process of considering the sign of two input values for multiplication, and the process of extracting only a limited number of bits and returning them as a result value are added.

연산 프로그램은 제 1 동형암호 데이터와 제 2 동형암호 데이터를 암호화된 상태에서 곱셈하는 곱셈 로직을 포함할 수 있다.The operation program may include multiplication logic for multiplying the first homomorphic encryption data and the second homomorphic encryption data in an encrypted state.

곱셈 로직은 제 1 동형 암호 데이터의 부호 비트(sign(a))와 상기 제 2 동형 암호 데이터의 부호 비트(sign(b))가 입력되어 제 1 부호 비트(s1)를 출력하는 XOR 연산 로직(820, 1번째 줄), 제 1 부호 비트를 반전 시켜 제 2 부호 비트(s2)를 출력하는 NOT 연산 로직(2번째 줄), 제 1 동형 암호 데이터의 절댓값을 구하는 제 1 절댓값 로직(810, 3번째 줄), 제 2 동형 암호 데이터의 절댓값을 구하는 제 2 절댓값 로직(820, 4번째 줄), 제 1 절댓값 로직의 출력에 대하여 제 2 절댓값 로직의 출력을 비트별로 곱셈하는 절댓값 이진 곱셈 로직(814, 5~10 번째 줄), 절댓값 이진 곱셈 로직의 출력에 대하여 2의 보수를 구하는 보수 출력 로직(816, 11번째 줄), 절댓값 이진 곱셈 로직의 출력에 대하여 제 2 부호 비트를 비트별로 곱하여 제 1 결괏값을 출력하는 제 1 AND 연산 로직(12번째 줄), 상기 보수 출력 로직의 출력에 대하여 상기 제 1 부호 비트를 비트별로 곱하여 제 2 결괏값을 출력하는 제 2 AND 연산 로직(13번째 줄), 제 1 결괏값과 제 2 결괏값이 입력되어 최종 결괏값을 출력하는 덧셈 로직(14번째 줄)을 포함한다.The multiplication logic is an XOR operation logic for outputting a first sign bit (s 1 ) by inputting the sign bit (sign(a)) of the first homomorphic encryption data and the sign bit (sign(b)) of the second homomorphic encryption data. (820, 1st line), NOT operation logic (2nd line) for inverting the 1st sign bit to output the 2nd sign bit (s 2 ), 1st absolute value logic for obtaining the absolute value of the first homomorphic encryption data (810 , line 3), the second absolute value logic (820, line 4) for obtaining the absolute value of the second homomorphic encryption data, the absolute value binary multiplication logic for multiplying the output of the second absolute value logic bit by bit with respect to the output of the first absolute value logic (814, lines 5 to 10), complement output logic (816, line 11) that obtains the 2's complement for the output of the absolute value binary multiplication logic, and multiplying the second sign bit bit by bit for the output of the absolute value binary multiplication logic 1st AND operation logic (12th line) for outputting a 1st result value, 2nd AND operation logic (13th line) for outputting a 2nd resultant value by multiplying the first sign bit by bit with respect to the output of the complement output logic line), and an addition logic (line 14) inputting the first and second result values and outputting the final result value.

Figure 112020129083627-pat00062
Figure 112020129083627-pat00062

위에서, 1, 2, 11,12, 13, 14 번째 줄의 알고리즘은 암호 데이터의 부호를 모르기 때문에 이를 처리하기 위한 과정을 나타낸다. 이를 위해, 두 암호문

Figure 112020129083627-pat00063
,
Figure 112020129083627-pat00064
의 부호 비트
Figure 112020129083627-pat00065
번째 비트들 간에 boots.XOR 연산을 수행한다. 두 입력값이 같은 부호라면, boots.XOR 결과로 Enc(0) 이 출력되고, 반대부호라면 Enc(1)이 출력된다. 이를 활용하여, 두 부호가 만약 같은 부호라면 Enc(0)이 출력되므로, boot.NOT을 취하게 되면 Enc(1)이 되고(2번째 줄), 이에 대해 양의 곱셉 결과 과정(3, 4, 6~10 번째 줄)에 의해
Figure 112020129083627-pat00066
에 대해 비트마다 boot.AND를 적용해주면(12번째 줄), 양의 곱셈 결과가 출력된다. Above, the algorithms in lines 1, 2, 11, 12, 13, and 14 show the process for processing them because the code of the encryption data is not known. For this, the two ciphertext
Figure 112020129083627-pat00063
,
Figure 112020129083627-pat00064
sign bit of
Figure 112020129083627-pat00065
Boots.XOR operation is performed between the th bits. If the two input values have the same sign, Enc(0) is output as the result of boots.XOR, and Enc(1) is output if the two input values have the opposite sign. Using this, if the two codes are the same, Enc(0) is output, so if boot.NOT is taken, Enc(1) becomes (2nd line), and the positive multiplication result process (3, 4, lines 6 to 10)
Figure 112020129083627-pat00066
If boot.AND is applied for each bit (line 12), a positive multiplication result is output.

마찬가지로, 부호가 반대일 경우는 각 부호 비트의 boots.XOR 결과가 Enc(1)이 된다(1번째 줄). 양의 곱셈 결과값(9번째 줄)에 반대 부호를 취해 나온 결괏값(11 번째 줄), 즉, 음의 값에 대해 비트마다 boot.AND 를 적용해주게 되면 음의 결과값이 나오게 된다(13번째 줄). 이 두 가지 결과에 대해서 더해주면(14번째 줄) 최종적으로 부호를 고려한 암호문 간 곱셈이 된다.Similarly, if the signs are reversed, the boots.XOR result of each sign bit becomes Enc(1) (line 1). If boot.AND is applied for each bit to the resultant value (line 11), that is, the negative value obtained by taking the opposite sign to the positive multiplication result value (line 9), a negative result value is obtained (line 13). line). If these two results are added (line 14), the final multiplication between the cipher texts considering the sign is obtained.

다음으로, 본 발명의 일 실시예에 따른 나눗셈 로직을 살펴보기로 한다.Next, a division logic according to an embodiment of the present invention will be described.

도 9는 본 발명에서 사용하는 이진 나눗셈 과정을 도시한 것이고, 도 10은 본 발명의 일 실시예에 따른 나눗셈 로직의 구성을 도시한 블록도이다.9 illustrates a binary division process used in the present invention, and FIG. 10 is a block diagram showing the configuration of a division logic according to an embodiment of the present invention.

먼저, Q와 M을 각각 배열의 길이가 l인 피제수와 제수, 즉 Q를 M으로 나눈다고 가정하자. 또한, A라는 길이가 l이고 모든 요소가 0인 벡터를 만든다. l이 0이 될 때까지 다음을 반복한다. First, assume that Q and M are divided by a dividend and a divisor of length l, that is, Q by M, respectively. Also, create a vector called A with length l and all elements are 0. Repeat the following until l becomes 0.

다음으로 두 배열, Q와 A를 합치고(Q|A), 1비트 오른쪽으로 이동연산을 진행한다.Next, the two arrays, Q and A are combined (Q|A), and the shift operation is performed to the right by 1 bit.

다음으로 길이가 2l인 Q|A에서 왼쪽 l비트를 Q라 하고, 오른쪽 l비트만큼을 A라 저장한다. Next, in Q|A of length 2l, the left l bit is called Q, and the right l bit is stored as A.

다음으로 A를 M과 대소비교를 하여, A가 M보다 작으면 Q[0]에 0을, 반대의 경우는 1을 저장하고 A 배열에 A-M의 값을 저장한다.Next, A is compared with M, and if A is less than M, 0 is stored in Q[0], and in the opposite case, 1 is stored, and the values of A-M are stored in the A array.

다음으로 l의 값을 1만큼 빼준다.Next, the value of l is subtracted by 1.

마지막으로, Q에 저장된 값이 Q를 M으로 나눈 몫이고 이를 반환한다.Finally, the value stored in Q is the quotient of Q divided by M, and returns it.

연산 프로그램은 피제수(Q)인 제 1 동형암호 데이터로 제수(M)인 제 2 동형암호 데이터를 암호화된 상태에서 나눗셈하는 나눗셈 로직을 포함할 수 있다.The operation program may include division logic for dividing second homomorphic encryption data, which is a divisor (M), by first homomorphic encryption data, which is a dividend (Q), in an encrypted state.

나눗셈 로직은 제 1 동형 암호 데이터의 부호 비트와 제 2 동형 암호 데이터의 부호 비트가 입력되어 제 1 부호 비트를 출력하는 XOR 연산 로직(1020, 1번째 줄), 제 1 동형 암호 데이터의 절댓값을 구하는 제 1 절댓값 로직(1010, 2번째 줄), 제 2 동형 암호 데이터의 절댓값을 구하는 제 2 절댓값 로직(1012, 3번째 줄), 제 1 절댓값 로직의 출력을 제 2 절댓값 로직의 출력으로 비트별로 나눗셈하는 절댓값 이진 나눗셈 로직(1014, 4~16번째줄), 절댓값 이진 나눗셈 로직(1014)의 출력에 대하여 2의 보수를 구하는 보수 출력 로직(1016, 17번째 줄), 절댓값 이진 나눗셈 로직의 출력(1016)에 대하여 제 1 부호 비트를 반전시킨 제 2 부호 비트를 비트별로 곱하여 제 1 결괏값(qL)을 출력하는 제 1 AND 연산 로직(18번째 줄), 보수 출력 로직의 출력(1016)에 대하여 제 1 부호 비트를 비트별로 곱하여 제 2 결괏값(qR)을 출력하는 제 2 AND 연산 로직(19번째 줄), 제 1 결괏값과 제 2 결괏값이 입력되어 최종 결괏값을 출력하는 덧셈 로직(20번째 줄)을 포함한다.The division logic is an XOR operation logic (1020, line 1) in which the sign bit of the first homomorphic encryption data and the sign bit of the second homomorphic encryption data are input and the first sign bit is output, and the absolute value of the first homomorphic encryption data is obtained. The first absolute value logic (1010, line 2), the second absolute value logic (1012, line 3) that obtains the absolute value of the second homomorphic encryption data, and the output of the first absolute value logic is divided bit by bit by the output of the second absolute value logic absolute value binary division logic (1014, lines 4 to 16), complement output logic (1016, line 17) for obtaining 2's complement for the output of absolute value binary division logic (1014), output of absolute value binary division logic (1016 ), the first AND operation logic (line 18) that multiplies the second sign bit obtained by inverting the first sign bit bit by bit and outputs the first resultant value (q L ), and the output 1016 of the complement output logic 2nd AND operation logic (line 19) that multiplies the 1st sign bit by bit and outputs the 2nd resultant value (q R ), addition logic that outputs the final resultant value by inputting the 1st resultant value and the 2nd resultant value (line 20).

동형 암호 내에서암호문은 값을 알 수 없어서 평문에서처럼 단순 비교 또는 if 가정을 진행할 수 없다. In homomorphic ciphers, the ciphertext is unknown, so simple comparisons or if assumptions cannot be made as in the plaintext.

우선, 도 9에서 A와 M을 비교하는 단순 비교 과정은 위에서 언급한 동형암호 대소비교 함수를 통해 해결할 수 있다(위 알고리즘의 9번째 줄).First of all, the simple comparison process of comparing A and M in FIG. 9 can be solved through the above-mentioned homomorphic encryption comparison function (9th line of the above algorithm).

또한, 도 9에서 두 번째 if 가정은 HE.CompareSmall(

Figure 112020129083627-pat00067
)의 값의 반환이 Enc(0) 또는 Enc(1)인 것에 착안하여,
Figure 112020129083627-pat00068
이면 Enc(1)이고, 이 값에 boots.NOT을 취한 값(d)은 Q[0] 값이 된다. 마찬가지로,
Figure 112020129083627-pat00069
이면 HE.CompareSmall(
Figure 112020129083627-pat00070
)의 값은 Enc(0) 이고, Q[0]값이 된다. In addition, the second if assumption in FIG. 9 is HE.CompareSmall(
Figure 112020129083627-pat00067
) is Enc (0) or Enc (1),
Figure 112020129083627-pat00068
If it is Enc(1), the value (d) obtained by taking boots.NOT from this value becomes the Q[0] value. Likewise,
Figure 112020129083627-pat00069
if HE.CompareSmall(
Figure 112020129083627-pat00070
) is Enc(0) and becomes the Q[0] value.

Figure 112020129083627-pat00071
인 상황에서 Enc(0) 에 boots.NOT을 취한 값, 즉 Enc(1)과
Figure 112020129083627-pat00072
을 비트별로 boots.AND 연산을 적용하면,
Figure 112020129083627-pat00073
값이 나오게 되고, 반대의 상황(
Figure 112020129083627-pat00074
)에서는 Enc(1)이므로 boots.NOT을 취한 값, Enc(0)과
Figure 112020129083627-pat00075
을 비트별로 boots.AND 연산을 적용하면 Enc(0)이 나오게 된다.
Figure 112020129083627-pat00071
In the situation of Enc(0), the value of taking boots.NOT, i.e. Enc(1) and
Figure 112020129083627-pat00072
Applying the boots.AND operation bit by bit,
Figure 112020129083627-pat00073
The value comes out, and the opposite situation (
Figure 112020129083627-pat00074
) is Enc(1), so the value taken from boots.NOT, Enc(0) and
Figure 112020129083627-pat00075
By applying the boots.AND operation bit by bit, Enc(0) is obtained.

이를 통해 암호문

Figure 112020129083627-pat00076
의 값이 정해지고, 이를
Figure 112020129083627-pat00077
만큼 반복해주면, 몫을 실수 범위까지 확장하여 구할 수 있다.Through this, the ciphertext
Figure 112020129083627-pat00076
is set, and
Figure 112020129083627-pat00077
By repeating as many times as possible, the quotient can be extended to the range of real numbers.

또한, 암호문에서는 평문에서와 달리 부호를 알 수 없어 추가적인 연산을 진행해주어야 한다. 1번째 줄에서 제수(

Figure 112020129083627-pat00078
)와 피제수(
Figure 112020129083627-pat00079
)의 부호비트 간에 boots.XOR 연산을 해주어 같은 부호면 Enc(0), 반대 부호면 Enc(1)을
Figure 112020129083627-pat00080
에 저장한다. 2, 3번째 줄에서는 제수와 피제수 모두 양으로 전환하여, 양의 값을 갖는 상황에서 나눗셈을 쭉 진행하여,
Figure 112020129083627-pat00081
값을 얻는다. 이 값에 대해 2의 보수를 취해주어
Figure 112020129083627-pat00082
값을 저장하고, 앞서 말한것처럼 두 입력값의 부호가 같은 경우
Figure 112020129083627-pat00083
= Enc(0) 이기 때문에, 이를 boots.NOT 취한 Enc(1)와
Figure 112020129083627-pat00084
의 비트단위 별로 boots.AND를 취해
Figure 112020129083627-pat00085
을 얻는다. In addition, in the ciphertext, unlike in the plaintext, the sign cannot be known, so an additional operation must be performed. Divisor in line 1 (
Figure 112020129083627-pat00078
) and the dividend (
Figure 112020129083627-pat00079
), boots.XOR operation is performed between the code bits of Enc(0) for the same sign and Enc(1) for the opposite sign.
Figure 112020129083627-pat00080
save to In the 2nd and 3rd lines, both the divisor and the dividend are converted to positive, and the division proceeds continuously in the situation of having a positive value,
Figure 112020129083627-pat00081
get value Take the 2's complement of this value
Figure 112020129083627-pat00082
Save the value and, as mentioned above, if both inputs have the same sign
Figure 112020129083627-pat00083
= Enc(0) , so Enc(1) taking boots.NOT and
Figure 112020129083627-pat00084
Take boots.AND by bitwise of
Figure 112020129083627-pat00085
get

마찬가지로, 반대 부호를 갖는 경우 Enc(1)이

Figure 112020129083627-pat00086
의 비트별로 boots.AND를 취해
Figure 112020129083627-pat00087
을 얻는다. 마지막으로, 이 두 값을 더하게 되면 최종적으로 결괏값
Figure 112020129083627-pat00088
가 된다.Similarly, Enc(1) with the opposite sign
Figure 112020129083627-pat00086
take boots.AND bit by bit of
Figure 112020129083627-pat00087
get Finally, when these two values are added, the final result is
Figure 112020129083627-pat00088
becomes

본 발명의 일 실시예는 컴퓨터에 의해 실행되는 프로그램 모듈과 같은 컴퓨터에 의해 실행가능한 명령어를 포함하는 기록 매체의 형태로도 구현될 수 있다. 컴퓨터 판독 가능 매체는 컴퓨터에 의해 액세스될 수 있는 임의의 가용 매체일 수 있고, 휘발성 및 비휘발성 매체, 분리형 및 비분리형 매체를 모두 포함한다. 또한, 컴퓨터 판독가능 매체는 컴퓨터 저장 매체를 포함할 수 있다. 컴퓨터 저장 매체는 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈 또는 기타 데이터와 같은 정보의 저장을 위한 임의의 방법 또는 기술로 구현된 휘발성 및 비휘발성, 분리형 및 비분리형 매체를 모두 포함한다. 본 발명의 방법 및 시스템은 특정 실시예와 관련하여 설명되었지만, 그것들의 구성 요소 또는 동작의 일부 또는 전부는 범용 하드웨어 아키텍쳐를 갖는 컴퓨터 시스템을 사용하여 구현될 수 있다.An embodiment of the present invention may be implemented in the form of a recording medium including instructions executable by a computer, such as program modules executed by a computer. Computer readable media can be any available media that can be accessed by a computer and includes both volatile and nonvolatile media, removable and non-removable media. Also, computer readable media may include computer storage media. Computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Although the methods and systems of the present invention have been described with reference to specific embodiments, some or all of their components or operations may be implemented using a computer system having a general-purpose hardware architecture.

전술한 본 발명의 설명은 예시를 위한 것이며, 본 발명이 속하는 기술분야의 통상의 지식을 가진 자는 본 발명의 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 쉽게 변형이 가능하다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다. 예를 들어, 단일형으로 설명되어 있는 각 구성 요소는 분산되어 실시될 수도 있으며, 마찬가지로 분산된 것으로 설명되어 있는 구성 요소들도 결합된 형태로 실시될 수 있다.The above description of the present invention is for illustrative purposes, and those skilled in the art can understand that it can be easily modified into other specific forms without changing the technical spirit or essential features of the present invention. will be. Therefore, the embodiments described above should be understood as illustrative in all respects and not limiting. For example, each component described as a single type may be implemented in a distributed manner, and similarly, components described as distributed may be implemented in a combined form.

본 발명의 범위는 상기 상세한 설명보다는 후술하는 특허청구범위에 의하여 나타내어지며, 특허청구범위의 의미 및 범위 그리고 그 균등 개념으로부터 도출되는 모든 변경 또는 변형된 형태가 본 발명의 범위에 포함되는 것으로 해석되어야 한다.The scope of the present invention is indicated by the following claims rather than the detailed description above, and all changes or modifications derived from the meaning and scope of the claims and equivalent concepts should be construed as being included in the scope of the present invention. do.

100: 연산 장치
110: 메모리
120: 프로세서
130: 통신모듈
140: DB
200: 사용자 단말
100: arithmetic unit
110: memory
120: processor
130: communication module
140 DB
200: user terminal

Claims (12)

완전동형암호기법으로 암호화된 데이터의 연산 장치에 있어서,
암호화된 데이터를 송수신하는 통신 모듈;
연산 프로그램이 저장된 메모리; 및
상기 연산 프로그램을 실행하는 프로세서를 포함하되,
상기 연산 프로그램은 제 1 동형암호 데이터와 제 2 동형암호 데이터를 비트별로 연산하는 XOR연산 로직, XNOR연산 로직, AND연산 로직 및 OR 연산 로직을 각각 포함하고, 동형암호 데이터에 대한 보수를 반환하는 보수 연산 로직, 동형암호 데이터에 대한 절댓값을 반환하는 절댓값 연산 로직, 동형암호 데이터를 오른쪽으로 이동시킨 결괏값을 반환하는 오른쪽 이동 연산 로직, 동형암호 데이터를 왼쪽으로 이동시킨 결괏값을 반환하는 왼쪽 이동 연산 로직 및 입력된 복수의 동형암호 데이터 중 어느 하나를 출력하는 MUX연산 로직을 포함하고,
입력된 제 1 동형암호 데이터와 제 2 동형암호 데이터 중 먼저 입력한 값이 큰 값이면 '1' 비트를 암호화한 제 1 암호화 값을 출력하는 제 1 대소 비교 연산 로직과 입력된 제 1 동형암호 데이터와 제 2 동형암호 데이터 중 먼저 입력한 값이 작은 값이면 상기 제 1 암호화 값을 출력하는 제 2 대소 비교 연산 로직을 포함하되,
상기 제 1 대소 비교 연산 로직은 상기 입력된 제 1 동형암호 데이터와 제 2 동형암호 데이터를 상기 XNOR 연산 로직에 입력하여 제 1 출력값을 구하고, MUX 연산 로직을 통해 상기 제 1 출력값에 따라 '0' 비트를 암호화한 제 2 암호화 값 또는 제 1 동형암호 데이터를 출력하고,
상기 제 2 대소 비교 연산 로직은 상기 입력된 제 1 동형암호 데이터와 제 2 동형암호 데이터를 상기 XNOR 연산 로직에 입력하여 제 1 출력값을 구하고, MUX 연산 로직을 통해 상기 제 1 출력값에 따라 '0' 비트를 암호화한 제 2 암호화 값 또는 상기 제 2 동형암호 데이터를 출력하는, 완전동형암호기법으로 암호화된 데이터의 연산 장치.
In the calculation device of data encrypted by the fully homomorphic encryption method,
A communication module for transmitting and receiving encrypted data;
a memory in which an arithmetic program is stored; and
Including a processor that executes the calculation program,
The operation program includes an XOR operation logic, an XNOR operation logic, an AND operation logic, and an OR operation logic for bit-by-bit operation of the first homomorphic encryption data and the second homomorphic encryption data, and a complement for returning a complement to the homomorphic encryption data. Operation logic, absolute value operation logic that returns the absolute value of homomorphic encryption data, right shift operation logic that returns the result of shifting homomorphic data to the right, left shift operation that returns the result of shifting homomorphic data to the left Including logic and MUX operation logic for outputting any one of a plurality of input homomorphic encryption data,
If the first input value of the input first homomorphic encryption data and the second homomorphic encryption data is a larger value, a first size comparison operation logic for outputting a first encryption value obtained by encrypting '1' bit and the input first homomorphic encryption data And a second case comparison operation logic for outputting the first encryption value when a first input value of the second homomorphic encryption data is a smaller value,
The first size comparison operation logic obtains a first output value by inputting the inputted first homomorphic encryption data and second homomorphic encryption data to the XNOR operation logic, and obtains '0' according to the first output value through the MUX operation logic. Outputting a second encryption value obtained by encrypting bits or first homomorphic encryption data;
The second size comparison operation logic obtains a first output value by inputting the inputted first homomorphic encryption data and second homomorphic encryption data to the XNOR operation logic, and obtains '0' according to the first output value through MUX operation logic. An apparatus for calculating data encrypted by a fully homomorphic encryption method, outputting a second encryption value obtained by encrypting bits or the second homomorphic encryption data.
제1항에 있어서,
상기 연산 프로그램은 상기 제 1 동형암호 데이터와 제 2 동형암호 데이터를 암호화된 상태에서 덧셈하는 덧셈 로직을 더 포함하되,
상기 덧셈 로직은
상기 제 1 동형암호 데이터와 제 2 동형암호 데이터가 입력되어 제 1 출력값을 출력하는 제1 XOR 연산 로직, 상기 제 1 출력값과 제 1 캐리 값이 입력되어 결과값을 출력하는 제 2 XOR 연산 로직, 상기 제 1 출력값과 상기 제 1 캐리 값이 입력되어 제 2 출력값을 출력하는 제1 AND 연산 로직, 상기 제 1 동형암호 데이터와 제 2 동형암호 데이터가 입력되어 제 3 출력값을 출력하는 제2 AND 연산 로직 및 상기 제 2 출력값과 제 3 출력값이 입력되어 제 2 캐리값을 출력하는 OR 연산 로직을 포함하는, 완전동형암호기법으로 암호화된 데이터의 연산 장치.
According to claim 1,
The operation program further includes an addition logic for adding the first homomorphic encryption data and the second homomorphic encryption data in an encrypted state,
The addition logic is
A first XOR operation logic inputting the first homomorphic encryption data and second homomorphic encryption data and outputting a first output value, a second XOR operation logic inputting the first output value and a first carry value and outputting a result value; A first AND operation logic for outputting a second output value by inputting the first output value and the first carry value, and a second AND operation logic inputting the first homomorphic encryption data and second homomorphic encryption data and outputting a third output value. Logic and an OR operation logic for inputting the second output value and the third output value and outputting a second carry value.
제2항에 있어서,
상기 연산 프로그램은 상기 제 1 동형암호 데이터와 제 2 동형암호 데이터를 암호화된 상태에서 뺄셈하는 뺄셈 로직을 더 포함하되,
상기 뺄셈 로직은
상기 제 1 동형암호 데이터와 제 2 동형암호 데이터가 입력되어 제 1 출력값을 출력하는 제1 XOR 연산 로직, 상기 제 1 출력값과 제 1 캐리 값이 입력되어 결과값을 출력하는 제 2 XOR 연산 로직, 상기 제 1 동형암호 데이터를 반전시킨 값과 제 2 동형 암호 데이터가 입력되어 제 2 출력값을 출력하는 제1 AND 연산 로직, 상기 제 1 출력값을 반전시킨 값과 제 1 캐리 값이 입력되어 제 3 출력값을 출력하는 제 2 AND 연산 로직, 상기 제 2 출력값과 제 3 출력값이 입력되어 제 2 캐리값을 출력하는 OR 연산 로직을 포함하는, 완전동형암호기법으로 암호화된 데이터의 연산 장치.
According to claim 2,
The operation program further includes subtraction logic for subtracting the first homomorphic encryption data and the second homomorphic encryption data in an encrypted state,
The subtraction logic is
A first XOR operation logic inputting the first homomorphic encryption data and second homomorphic encryption data and outputting a first output value, a second XOR operation logic inputting the first output value and a first carry value and outputting a result value; A first AND operation logic for outputting a second output value by inputting a value obtained by inverting the first homomorphic encryption data and second homomorphic encryption data, and a third output value by inputting a value obtained by inverting the first output value and a first carry value. A second AND operation logic for outputting, and an OR operation logic for outputting a second carry value by inputting the second output value and the third output value.
제3항에 있어서,
상기 연산 프로그램은 입력된 동형암호 데이터가 암호화된 상태에서 절댓값을 산출하는 절댓값 로직을 더 포함하되,
상기 절댓값 로직은 입력된 동형 암호데이터의 최상위 비트의 암호문에 따라 입력된 동형암호데이터에 대한 2의 보수 및 입력된 동형 암호데이터 중 어느 하나를 출력하는 MUX연산 로직을 포함하는, 완전동형암호기법으로 암호화된 데이터의 연산 장치.
According to claim 3,
The calculation program further includes an absolute value logic for calculating an absolute value in a state in which the input homomorphic encryption data is encrypted,
The absolute value logic is a fully homomorphic encryption technique that includes a MUX operation logic that outputs one of 2's complement for the input homomorphic encryption data and input homomorphic encryption data according to the ciphertext of the most significant bit of the input homomorphic encryption data. A computing device for encrypted data.
제4항에 있어서,
상기 연산 프로그램은 상기 제 1 동형암호 데이터와 제 2 동형암호 데이터를 암호화된 상태에서 곱셈하는 곱셈 로직을 더 포함하되,
상기 곱셈 로직은
상기 제 1 동형 암호 데이터의 부호 비트와 상기 제 2 동형 암호 데이터의 부호 비트가 입력되어 제 1 부호 비트를 출력하는 XOR 연산 로직, 상기 제 1 부호 비트를 반전 시켜 제 2 부호 비트를 출력하는 NOT 연산 로직, 상기 제 1 동형 암호 데이터의 절댓값을 구하는 제 1 절댓값 로직, 상기 제 2 동형 암호 데이터의 절댓값을 구하는 제 2 절댓값 로직, 상기 제 1 절댓값 로직의 출력에 대하여 제 2 절댓값 로직의 출력을 비트별로 곱셈하는 절댓값 이진 곱셈 로직, 상기 절댓값 이진 곱셈 로직의 출력에 대하여 2의 보수를 구하는 보수 출력 로직, 상기 절댓값 이진 곱셈 로직의 출력에 대하여 상기 제 2 부호 비트를 비트별로 곱하여 제 1 결괏값을 출력하는 제 1 AND 연산 로직, 상기 보수 출력 로직의 출력에 대하여 상기 제 1 부호 비트를 비트별로 곱하여 제 2 결괏값을 출력하는 제 2 AND 연산 로직, 상기 제 1 결괏값과 제 2 결괏값이 입력되어 최종 결괏값을 출력하는 상기 덧셈 로직을 포함하는, 완전동형암호기법으로 암호화된 데이터의 연산 장치.
According to claim 4,
The operation program further includes multiplication logic for multiplying the first homomorphic encryption data and the second homomorphic encryption data in an encrypted state,
The multiplication logic is
An XOR operation logic for outputting a first sign bit by inputting the sign bit of the first homomorphic encryption data and the sign bit of the second homomorphic encryption data, and a NOT operation for outputting a second sign bit by inverting the first sign bit. logic, a first absolute value logic for obtaining an absolute value of the first homomorphic encryption data, a second absolute value logic for obtaining an absolute value of the second homomorphic encryption data, and an output of the second absolute value logic for each bit of the output of the first absolute value logic Absolute value binary multiplication logic for multiplication, complement output logic for obtaining 2's complement for the output of the absolute value binary multiplication logic, bit by bit multiplication of the second sign bit with respect to the output of the absolute value binary multiplication logic to output a first resultant value A first AND operation logic, a second AND operation logic for multiplying the output of the complement output logic by bit by bit by the first sign bit and outputting a second resultant value, the first resultant value and the second resultant value are input and finalized An apparatus for calculating data encrypted by a fully homomorphic encryption method, including the addition logic for outputting a resultant value.
제5항에 있어서,
상기 연산 프로그램은 피제수(Q)인 제 1 동형암호 데이터로 제수(M)인 제 2 동형암호 데이터를 암호화된 상태에서 나눗셈하는 나눗셈 로직을 더 포함하되,
상기 나눗셈 로직은
상기 제 1 동형 암호 데이터의 부호 비트와 상기 제 2 동형 암호 데이터의 부호 비트가 입력되어 제 1 부호 비트를 출력하는 XOR 연산 로직, 상기 제 1 동형 암호 데이터의 절댓값을 구하는 제 1 절댓값 로직, 상기 제 2 동형 암호 데이터의 절댓값을 구하는 제 2 절댓값 로직, 상기 제 1 절댓값 로직의 출력을 제 2 절댓값 로직의 출력으로 비트별로 나눗셈하는 절댓값 이진 나눗셈 로직, 상기 절댓값 이진 나눗셈 로직의 출력에 대하여 2의 보수를 구하는 보수 출력 로직, 상기 절댓값 이진 나눗셈 로직의 출력에 대하여 상기 제 1 부호 비트를 반전시킨 제 2 부호 비트를 비트별로 곱하여 제 1 결괏값을 출력하는 제 1 AND 연산 로직, 상기 보수 출력 로직의 출력에 대하여 상기 제 1 부호 비트를 비트별로 곱하여 제 2 결괏값을 출력하는 제 2 AND 연산 로직, 상기 제 1 결괏값과 제 2 결괏값이 입력되어 최종 결괏값을 출력하는 상기 덧셈 로직을 포함하되, 완전동형암호기법으로 암호화된 데이터의 연산 장치.
According to claim 5,
The operation program further includes division logic for dividing second homomorphic encryption data, which is a divisor (M), by first homomorphic encryption data, which is a dividend (Q), in an encrypted state;
The division logic is
XOR operation logic inputting the sign bit of the first homomorphic encryption data and the sign bit of the second homomorphic encryption data and outputting a first sign bit; a first absolute value logic calculating an absolute value of the first homomorphic encryption data; The second absolute value logic for obtaining the absolute value of 2 homomorphic encryption data, the absolute value binary division logic for dividing the output of the first absolute value logic bitwise by the output of the second absolute value logic, and the two's complement for the output of the absolute value binary division logic Complement output logic to obtain, a first AND operation logic for outputting a first resultant value by bitwise multiplying a second code bit obtained by inverting the first code bit with respect to an output of the absolute value binary division logic, and an output of the complement output logic A second AND operation logic for multiplying the first sign bit bit by bit and outputting a second resultant value, and the addition logic for inputting the first resultant value and the second resultant value and outputting a final resultant value, A device for calculating data encrypted by homomorphic encryption.
완전동형암호기법으로 암호화된 데이터의 연산 장치를 이용한 암호화된 데이터의 연산 방법에 있어서,
상기 암호화된 데이터의 연산 장치는 제 1 동형암호 데이터와 제 2 동형암호 데이터를 비트별로 연산하는 XOR연산 로직, XNOR연산 로직, AND연산 로직 및 OR 연산 로직을 각각 포함하고, 동형암호 데이터에 대한 보수를 반환하는 보수 연산 로직, 동형암호 데이터에 대한 절댓값을 반환하는 절댓값 연산 로직, 동형암호 데이터를 오른쪽으로 이동시킨 결괏값을 반환하는 오른쪽 이동 연산 로직, 동형암호 데이터를 왼쪽으로 이동시킨 결괏값을 반환하는 왼쪽 이동 연산 로직 및 입력된 복수의 동형암호 데이터 중 어느 하나를 출력하는 MUX연산 로직을 포함하는 연산 프로그램이 설치된 것이고,
입력된 제 1 동형암호 데이터와 제 2 동형암호 데이터를 제 1 대소 비교 연산 로직에 입력하여 대소 비교를 수행하는 단계 및
입력된 제 1 동형암호 데이터와 제 2 동형암호 데이터를 제 2 대소 비교 연산 로직에 입력하여 대소 비교를 수행하는 단계를 포함하되,
상기 제 1 대소 비교 연산 로직은 먼저 입력한 값이 큰 값이면 '1' 비트를 암호화한 제 1 암호화 값을 출력하는 것이고, 상기 입력된 제 1 동형암호 데이터와 제 2 동형암호 데이터를 상기 XNOR 연산 로직에 입력하여 제 1 출력값을 구하고, MUX 연산 로직을 통해 상기 제 1 출력값에 따라 '0' 비트를 암호화한 제 2 암호화 값 또는 제 1 동형암호 데이터를 출력하는 것이고,
상기 제 2 대소 비교 연산 로직은 먼저 입력한 값이 작은 값이면 상기 제 1 암호화 값을 출력하는 것이고, 상기 입력된 제 1 동형암호 데이터와 제 2 동형암호 데이터를 상기 XNOR 연산 로직에 입력하여 제 1 출력값을 구하고, MUX 연산 로직을 통해 상기 제 1 출력값에 따라 '0' 비트를 암호화한 제 2 암호화 값 또는 상기 제 2 동형암호 데이터를 출력하는 것인, 암호화된 데이터의 연산 방법.
In the method of calculating encrypted data using a calculation device for data encrypted by a fully homomorphic encryption method,
The encrypted data processing unit includes an XOR operation logic, an XNOR operation logic, an AND operation logic, and an OR operation logic for performing bit-by-bit operation on the first homomorphic encryption data and the second homomorphic encryption data, respectively, and repairing the homomorphic encryption data. Complement arithmetic logic that returns , absolute value arithmetic logic that returns the absolute value of homomorphic encryption data, right shift arithmetic logic that returns the result value shifted to the right of homomorphic encryption data, return result value that shifted homomorphic data to the left An operation program including a left shift operation logic to perform and a MUX operation logic to output any one of a plurality of input homomorphic encryption data is installed,
performing case comparison by inputting the input first homomorphic encryption data and the second homomorphic encryption data into a first case comparison operation logic; and
Including inputting the input first homomorphic encryption data and the second homomorphic encryption data to a second case comparison operation logic to perform case comparison;
The first size comparison operation logic outputs a first encryption value obtained by encrypting '1' bit if the first input value is a large value, and performs the XNOR operation on the inputted first homomorphic encryption data and second homomorphic encryption data. Logic input to obtain a first output value, and outputting a second encryption value or first homomorphic encryption data obtained by encrypting '0' bits according to the first output value through MUX operation logic,
The second size comparison operation logic outputs the first encryption value if the first input value is a small value, and inputs the input first homomorphic encryption data and second homomorphic encryption data to the XNOR operation logic to obtain the first Calculating an output value and outputting a second encryption value obtained by encrypting '0' bit or the second homomorphic encryption data according to the first output value through a MUX operation logic.
제7항에 있어서,
상기 제 1 동형암호 데이터와 제 2 동형암호 데이터를 덧셈로직에 입력하여 암호화된 상태에서 덧셈하는 단계를 더 포함하되,
상기 덧셈 로직은
상기 제 1 동형암호 데이터와 제 2 동형암호 데이터가 입력되어 제 1 출력값을 출력하는 제1 XOR 연산 로직, 상기 제 1 출력값과 제 1 캐리 값이 입력되어 결과값을 출력하는 제 2 XOR 연산 로직, 상기 제 1 출력값과 상기 제 1 캐리 값이 입력되어 제 2 출력값을 출력하는 제1 AND 연산 로직, 상기 제 1 동형암호 데이터와 제 2 동형암호 데이터가 입력되어 제 3 출력값을 출력하는 제2 AND 연산 로직 및 상기 제 2 출력값과 제 3 출력값이 입력되어 제 2 캐리값을 출력하는 OR 연산 로직을 포함하는 것인, 완전동형암호기법으로 암호화된 데이터의 연산 방법.
According to claim 7,
The step of adding the first homomorphic encryption data and the second homomorphic encryption data in an encrypted state by inputting them to an addition logic;
The addition logic is
A first XOR operation logic inputting the first homomorphic encryption data and second homomorphic encryption data and outputting a first output value, a second XOR operation logic inputting the first output value and a first carry value and outputting a result value; A first AND operation logic for outputting a second output value by inputting the first output value and the first carry value, and a second AND operation logic inputting the first homomorphic encryption data and second homomorphic encryption data and outputting a third output value. Logic and an OR operation logic for inputting the second output value and the third output value and outputting a second carry value.
제8항에 있어서,
상기 제 1 동형암호 데이터와 제 2 동형암호 데이터를 뺄셈로직에 입력하여 암호화된 상태에서 뺄셈하는 단계를 더 포함하되,
상기 뺄셈 로직은
상기 제 1 동형암호 데이터와 제 2 동형암호 데이터가 입력되어 제 1 출력값을 출력하는 제1 XOR 연산 로직, 상기 제 1 출력값과 제 1 캐리 값이 입력되어 결과값을 출력하는 제 2 XOR 연산 로직, 상기 제 1 동형암호 데이터를 반전시킨 값과 제 2 동형 암호 데이터가 입력되어 제 2 출력값을 출력하는 제1 AND 연산 로직, 상기 제 1 출력값을 반전시킨 값과 제 1 캐리 값이 입력되어 제 3 출력값을 출력하는 제 2 AND 연산 로직, 상기 제 2 출력값과 제 3 출력값이 입력되어 제 2 캐리값을 출력하는 OR 연산 로직을 포함하는, 완전동형암호기법으로 암호화된 데이터의 연산 방법.
According to claim 8,
Further comprising inputting the first homomorphic encryption data and the second homomorphic encryption data to a subtraction logic and subtracting them in an encrypted state;
The subtraction logic is
A first XOR operation logic inputting the first homomorphic encryption data and second homomorphic encryption data and outputting a first output value, a second XOR operation logic inputting the first output value and a first carry value and outputting a result value; A first AND operation logic for outputting a second output value by inputting a value obtained by inverting the first homomorphic encryption data and second homomorphic encryption data, and a third output value by inputting a value obtained by inverting the first output value and a first carry value. A method for calculating data encrypted by a fully homomorphic encryption method, comprising: a second AND operation logic for outputting ; and an OR operation logic for outputting a second carry value by inputting the second output value and the third output value.
제9항에 있어서,
입력된 동형암호 데이터를 절댓값 로직에 입력하여 암호화된 상태에서 절댓값을 산출하는 단계를 더 포함하되,
상기 절댓값 로직은 입력된 동형 암호데이터의 최상위 비트의 암호문에 따라 입력된 동형암호데이터에 대한 2의 보수 및 입력된 동형 암호데이터 중 어느 하나를 출력하는 MUX연산 로직을 포함하는, 완전동형암호기법으로 암호화된 데이터의 연산 방법.
According to claim 9,
Further comprising calculating an absolute value in an encrypted state by inputting the input homomorphic encryption data into an absolute value logic,
The absolute value logic is a fully homomorphic encryption technique that includes a MUX operation logic that outputs one of 2's complement for the input homomorphic encryption data and input homomorphic encryption data according to the ciphertext of the most significant bit of the input homomorphic encryption data. How to calculate encrypted data.
제10항에 있어서,
상기 제 1 동형암호 데이터와 제 2 동형암호 데이터를 곱셈로직에 입력하여 암호화된 상태에서 곱셈하는 단계를 더 포함하되,
상기 곱셈 로직은
상기 제 1 동형 암호 데이터의 부호 비트와 상기 제 2 동형 암호 데이터의 부호 비트가 입력되어 제 1 부호 비트를 출력하는 XOR 연산 로직, 상기 제 1 부호 비트를 반전 시켜 제 2 부호 비트를 출력하는 NOT 연산 로직, 상기 제 1 동형 암호 데이터의 절댓값을 구하는 제 1 절댓값 로직, 상기 제 2 동형 암호 데이터의 절댓값을 구하는 제 2 절댓값 로직, 상기 제 1 절댓값 로직의 출력에 대하여 제 2 절댓값 로직의 출력을 비트별로 곱셈하는 절댓값 이진 곱셈 로직, 상기 절댓값 이진 곱셈 로직의 출력에 대하여 2의 보수를 구하는 보수 출력 로직, 상기 절댓값 이진 곱셈 로직의 출력에 대하여 상기 제 2 부호 비트를 비트별로 곱하여 제 1 결괏값을 출력하는 제 1 AND 연산 로직, 상기 보수 출력 로직의 출력에 대하여 상기 제 1 부호 비트를 비트별로 곱하여 제 2 결괏값을 출력하는 제 2 AND 연산 로직, 상기 제 1 결괏값과 제 2 결괏값이 입력되어 최종 결괏값을 출력하는 상기 덧셈 로직을 포함하는, 완전동형암호기법으로 암호화된 데이터의 연산 방법.
According to claim 10,
Further comprising inputting the first homomorphic encryption data and the second homomorphic encryption data into a multiplication logic and multiplying them in an encrypted state;
The multiplication logic is
An XOR operation logic for outputting a first sign bit by inputting the sign bit of the first homomorphic encryption data and the sign bit of the second homomorphic encryption data, and a NOT operation for outputting a second sign bit by inverting the first sign bit. logic, a first absolute value logic for obtaining an absolute value of the first homomorphic encryption data, a second absolute value logic for obtaining an absolute value of the second homomorphic encryption data, and an output of the second absolute value logic for each bit of the output of the first absolute value logic Absolute value binary multiplication logic for multiplication, complement output logic for obtaining 2's complement for the output of the absolute value binary multiplication logic, bit by bit multiplication of the second sign bit with respect to the output of the absolute value binary multiplication logic to output a first resultant value A first AND operation logic, a second AND operation logic for multiplying the output of the complement output logic by bit by bit by the first sign bit and outputting a second resultant value, the first resultant value and the second resultant value being input to obtain a final A method of calculating data encrypted by a fully homomorphic encryption method, comprising the addition logic for outputting a resultant value.
제11항에 있어서,
나눗셈 로직을 이용하여 피제수(Q)인 제 1 동형암호 데이터로 제수(M)인 제 2 동형암호 데이터를 암호화된 상태에서 나눗셈하는 단계를 더 포함하되,
상기 나눗셈 로직은
상기 제 1 동형 암호 데이터의 부호 비트와 상기 제 2 동형 암호 데이터의 부호 비트가 입력되어 제 1 부호 비트를 출력하는 XOR 연산 로직, 상기 제 1 동형 암호 데이터의 절댓값을 구하는 제 1 절댓값 로직, 상기 제 2 동형 암호 데이터의 절댓값을 구하는 제 2 절댓값 로직, 상기 제 1 절댓값 로직의 출력을 제 2 절댓값 로직의 출력으로 비트별로 나눗셈하는 절댓값 이진 나눗셈 로직, 상기 절댓값 이진 나눗셈 로직의 출력에 대하여 2의 보수를 구하는 보수 출력 로직, 상기 절댓값 이진 나눗셈 로직의 출력에 대하여 상기 제 1 부호 비트를 반전시킨 제 2 부호 비트를 비트별로 곱하여 제 1 결괏값을 출력하는 제 1 AND 연산 로직, 상기 보수 출력 로직의 출력에 대하여 상기 제 1 부호 비트를 비트별로 곱하여 제 2 결괏값을 출력하는 제 2 AND 연산 로직, 상기 제 1 결괏값과 제 2 결괏값이 입력되어 최종 결괏값을 출력하는 상기 덧셈 로직을 포함하되, 완전동형암호기법으로 암호화된 데이터의 연산 방법.
According to claim 11,
Further comprising dividing second homomorphic encryption data, which is a divisor (M), by first homomorphic encryption data, which is a dividend (Q), by using division logic in an encrypted state,
The division logic is
XOR operation logic inputting the sign bit of the first homomorphic encryption data and the sign bit of the second homomorphic encryption data and outputting a first sign bit; a first absolute value logic calculating an absolute value of the first homomorphic encryption data; The second absolute value logic for obtaining the absolute value of 2 homomorphic encryption data, the absolute value binary division logic for dividing the output of the first absolute value logic bitwise by the output of the second absolute value logic, and the two's complement for the output of the absolute value binary division logic Complement output logic to obtain, a first AND operation logic for outputting a first resultant value by bitwise multiplying a second code bit obtained by inverting the first code bit with respect to an output of the absolute value binary division logic, and an output of the complement output logic A second AND operation logic for multiplying the first sign bit bit by bit and outputting a second resultant value, and the addition logic for inputting the first resultant value and the second resultant value and outputting a final resultant value, Operation method of data encrypted by homomorphic encryption method.
KR1020200164231A 2019-11-29 2020-11-30 Device and method for operation of encrypted data using fully homomorphic encryption KR102491902B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20190156446 2019-11-29
KR1020190156446 2019-11-29

Publications (2)

Publication Number Publication Date
KR20210067961A KR20210067961A (en) 2021-06-08
KR102491902B1 true KR102491902B1 (en) 2023-01-27

Family

ID=76399934

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200164231A KR102491902B1 (en) 2019-11-29 2020-11-30 Device and method for operation of encrypted data using fully homomorphic encryption

Country Status (1)

Country Link
KR (1) KR102491902B1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160350648A1 (en) * 2014-11-07 2016-12-01 Microsoft Technology Licensing, Llc. Neural networks for encrypted data
US20170149557A1 (en) * 2015-11-25 2017-05-25 International Business Machines Corporation Performing efficient comparison operations on encrypted data
KR101923293B1 (en) * 2017-01-13 2018-11-28 서울과학기술대학교 산학협력단 Apparatus and method for adding data

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3816558B2 (en) * 1995-10-23 2006-08-30 株式会社東芝 Cryptosystem
KR102213835B1 (en) 2018-11-09 2021-02-09 고려대학교 산학협력단 Server and method for exponential function calculation of data encrypted with homomorphic encryption technique

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160350648A1 (en) * 2014-11-07 2016-12-01 Microsoft Technology Licensing, Llc. Neural networks for encrypted data
US20170149557A1 (en) * 2015-11-25 2017-05-25 International Business Machines Corporation Performing efficient comparison operations on encrypted data
KR101923293B1 (en) * 2017-01-13 2018-11-28 서울과학기술대학교 산학협력단 Apparatus and method for adding data

Also Published As

Publication number Publication date
KR20210067961A (en) 2021-06-08

Similar Documents

Publication Publication Date Title
Wang et al. FPGA-based Niederreiter cryptosystem using binary Goppa codes
Todo et al. Fast correlation attack revisited: cryptanalysis on full grain-128a, grain-128, and grain-v1
CN108463968B (en) Fast format-preserving encryption of variable length data
JP2006003905A (en) Method and apparatus for multiplication in galois field for preventing information leakage attack, inverse transformation device, and apparatus for aes byte substitution operation
Liu et al. A new color image encryption algorithm based on DNA and spatial chaotic map
JP2005529364A (en) How to improve the unpredictability of pseudorandom number generator output
US11121868B2 (en) Secure computation system, secure computation device, secure computation method, and program
Lambić et al. Security analysis of the efficient chaos pseudo-random number generator applied to video encryption
Das et al. g-EoN: A Non-salient Approach Towards Encryption Using Gamma Function Γ (-α β)=-β α Γ (β-α β)
Wang et al. Inner product masking for bitslice ciphers and security order amplification for linear leakages
CN111444518A (en) Secure processor, method of operating the same, and method of encrypting or decrypting data
Zijlstra et al. FPGA implementation and comparison of protections against SCAs for RLWE
EP3483867B1 (en) System, device, method, and program for indexing a secret-shared array with secure multiparty computations
EP3891925B1 (en) A computation device using shared shares
Mante et al. A symmetrical encryption technique for text encryption using randomized matrix based key generation
Liu et al. A tolerant algebraic side-channel attack on AES using CP
Dunkelman et al. Full round zero-sum distinguishers on TinyJAMBU-128 and TinyJAMBU-192 Keyed-permutation in the known-key setting
Beighton et al. Algebraic attacks on Grain-like keystream generators
Zajac Upper bounds on the complexity of algebraic cryptanalysis of ciphers with a low multiplicative complexity
KR102491902B1 (en) Device and method for operation of encrypted data using fully homomorphic encryption
Greconici Kyber on RISC-V
Cahyono et al. A cryptographic algorithm using wavelet transforms over max-plus algebra
KR102491894B1 (en) Device and method for logistic regression analysis operation of encrypted data using fully homomorphic encryption
KR100564599B1 (en) Inverse calculation circuit, inverse calculation method, and storage medium encoded with computer-readable computer program code
CN115918028A (en) Device and method for performing statistical operation on homomorphic ciphertext

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right