KR102452181B1 - Apparatus for sorting of approximate encrypted messages and method thereof - Google Patents

Apparatus for sorting of approximate encrypted messages and method thereof Download PDF

Info

Publication number
KR102452181B1
KR102452181B1 KR1020200036119A KR20200036119A KR102452181B1 KR 102452181 B1 KR102452181 B1 KR 102452181B1 KR 1020200036119 A KR1020200036119 A KR 1020200036119A KR 20200036119 A KR20200036119 A KR 20200036119A KR 102452181 B1 KR102452181 B1 KR 102452181B1
Authority
KR
South Korea
Prior art keywords
value
ciphertext
homomorphic
function
isomorphic
Prior art date
Application number
KR1020200036119A
Other languages
Korean (ko)
Other versions
KR20200140182A (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 서울대학교산학협력단
Priority to PCT/KR2020/007350 priority Critical patent/WO2020246848A1/en
Priority to EP20818508.2A priority patent/EP3982586A4/en
Priority to US17/616,349 priority patent/US20220255722A1/en
Publication of KR20200140182A publication Critical patent/KR20200140182A/en
Application granted granted Critical
Publication of KR102452181B1 publication Critical patent/KR102452181B1/en

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
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • 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/04Masking or blinding
    • H04L2209/046Masking or blinding of operations, operands or results of the operations

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Mathematical Optimization (AREA)
  • Algebra (AREA)
  • Pure & Applied Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computational Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Analysis (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Character Discrimination (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

연산 장치가 개시된다. 본 연산 장치는 에러를 포함하는 근사 메시지에 대한 동형 암호문을 복수개 저장하는 메모리, 및 복수개의 동형 암호문을 정렬하는 프로세서를 포함하며, 상기 프로세서는, 5개의 동형 암호문을 한 번의 스테이지에서 정렬 가능한 5-way 정렬기를 이용하여 복수의 동형 암호문을 정렬한다. A computing device is disclosed. The arithmetic unit includes a memory for storing a plurality of homomorphic ciphertexts for an approximate message including an error, and a processor for aligning a plurality of homomorphic ciphertexts, wherein the processor is capable of aligning five homomorphic ciphertexts in one stage. Sort multiple homomorphic ciphertexts using a way sorter.

Description

근사 암호화된 암호문에 대한 정렬 장치 및 방법{APPARATUS FOR SORTING OF APPROXIMATE ENCRYPTED MESSAGES AND METHOD THEREOF}Sorting apparatus and method for approximate encrypted ciphertext

본 개시는 근사 암호화된 암호문에 대한 정렬 장치 및 방법에 관한 것으로, 구체적으로, 근사 암호화된 암호문에 대한 정렬을 효율적으로 수행하기 위한 장치 및 방법에 관한 것이다. The present disclosure relates to an apparatus and method for sorting approximate encrypted cipher text, and more particularly, to an apparatus and method for efficiently performing sorting on approximate encrypted cipher text.

통신 기술이 발달하고, 전자 장치의 보급이 활발해짐에 따라, 전자 장치 간의 통신 보안을 유지하기 위한 노력이 지속적으로 이루어지고 있다. 이에 따라, 대부분의 통신 환경에서는 암호화/복호화 기술이 사용되고 있다. As communication technology develops and electronic devices become more popular, efforts to maintain communication security between electronic devices are continuously being made. Accordingly, encryption/decryption technology is used in most communication environments.

암호화 기술에 의해 암호화된 메시지가 상대방에게 전달되면, 상대방은 메시지를 이용하기 위해서는 복호화를 수행하여야 한다. 이 경우, 상대방은 암호화된 데이터를 복호화하는 과정에서 자원 및 시간 낭비가 발생하게 된다. 또한, 상대방이 연산을 위해 일시적으로 메시지를 복호화한 상태에서 제3자의 해킹이 이루어지는 경우, 그 메시지가 제3자에게 손쉽게 유출될 수 있다는 문제점도 있었다. When a message encrypted by encryption technology is delivered to the other party, the other party must perform decryption in order to use the message. In this case, the counterpart wastes resources and time in the process of decrypting the encrypted data. In addition, when a third party hacks while the other party temporarily decrypts the message for operation, there is a problem that the message can be easily leaked to the third party.

이러한 문제를 해결하기 위하여 동형 암호화 방법이 연구되고 있다. 동형 암호화 방식을 이용하면 암호화된 정보를 복호화하지 않고 암호문 자체에서 연산을 하더라도, 평문에 대해 연산한 후 암호화한 값과 동일한 결과를 얻을 수 있다. 따라서, 암호문을 복호화하지 않은 상태에서 각종 연산을 수행할 수 있다. To solve this problem, 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.

K-평균 군집화(k-means clustering), 탑-K 데이터 연산(top-k data operations), 비닝(binning), 통계 분석 등과 같은 동작을 위하여 정렬이 필요하다는 점에서, 최근에는 동형 암호문에 정렬 처리가 요구되고 있다. In the sense that sorting is required for operations such as k-means clustering, top-k data operations, binning, and statistical analysis, sorting has recently been processed for homomorphic ciphertext. is being requested

그러나 동형 암호문의 연산은 덧셈, 곱셈 등 제한된 기본 연산만을 지원하며, 종래 널리 사용되는 퀵 정렬(Quick sort), 병합 정렬(Merge Sort) 등은 이전 단계의 비교 결과와 비교할 다음 대상을 결정하는 과정을 반복하는 것으로 구성되기 때문에, 동형 암호문에 적합한 정렬 알고리즘이 요구되었다. However, the operation of homomorphic cipher text supports only limited basic operations such as addition and multiplication, and the conventionally widely used Quick sort and Merge Sort, etc. Since it consists of repetition, a sorting algorithm suitable for isomorphic ciphertext was required.

따라서 본 개시는 상술한 바와 같은 문제점을 해결하기 위한 고안된 것으로, 근사 암호화된 암호문에 대한 정렬을 효율적으로 수행하기 위한 장치 및 방법을 제공하는 데 있다. Accordingly, the present disclosure is designed to solve the above-described problems, and an object of the present disclosure is to provide an apparatus and method for efficiently performing alignment on approximate encrypted ciphertext.

본 개시는 이상과 같은 목적을 달성하기 위한 것으로, 본 개시의 일 실시 예에 따른 동형 암호문 처리 방법은, 복수의 동형 암호문에 대한 정렬 명령을 입력받는 단계, 5개의 동형 암호문을 한 번의 스테이지에서 정렬 가능한 5-way 정렬기를 이용하여 상기 복수의 동형 암호문을 정렬하는 단계, 및 정렬 결과를 출력하는 단계를 포함한다. The present disclosure is to achieve the above object, and the homomorphic ciphertext processing method according to an embodiment of the present disclosure includes the steps of receiving an alignment command for a plurality of homomorphic ciphertexts, and aligning five homomorphic ciphertexts in one stage sorting the plurality of isomorphic ciphertexts using a possible 5-way sorter, and outputting a sorting result.

이 경우, 상기 정렬하는 단계는, 복수의 5-way 정렬기를 이용하여 병렬 정렬 처리를 수행할 수 있다. In this case, in the aligning step, a parallel sorting process may be performed using a plurality of 5-way sorters.

한편, 상기 5-way 정렬기는, 입력된 두 값 중 큰 값 또는 작은 값을 선택적으로 출력하는 비교 함수를 이용하여 정렬를 수행할 수 있다. Meanwhile, the 5-way sorter may perform sorting using a comparison function that selectively outputs a larger value or a smaller value among two input values.

이 경우, 상기 비교 함수는, 크기 비교에 따라 기설정된 값을 출력하는 근사 부호 함수와 입력 값의 곱의 연산으로 산출될 수 있다. In this case, the comparison function may be calculated by calculating a product of an approximate sign function that outputs a preset value according to magnitude comparison and an input value.

이 경우, 상기 근사 부호 함수는, 0보다 큰 입력 값에 대해서는 출력값이 1에 가까워지고, 0보다 작은 입력 값에 대해서는 출력 값이 -1에 가까워지도록 하는 합성 함수를 기설정된 횟수만큼 반복 연산한 함수일 수 있다. In this case, the approximation sign function is a function obtained by repeating a composition function that makes an output value close to 1 for an input value greater than 0 and an output value close to -1 for an input value less than 0 is repeated a predetermined number of times. can

이 경우, 상기 근사 부호 함수는, 서로 다른 두 합성 함수 각각을 3회 반복 연산한 함수일 수 있다. In this case, the approximate sign function may be a function obtained by repeatedly calculating two different synthesis functions three times.

한편, 상기 5-way 정렬기는, 제1 동형 암호문, 제2 동형 암호문 및 제3 동형 암호문이 입력되면, 상기 비교 함수를 이용하여 상기 제1 동형 암호문과 상기 제2 동형 암호문 중 큰 값 및 작은 값을 산출하고, 상기 비교 함수에 상기 산출된 큰 값과 상기 제3 동형 암호문을 입력하여 제1 출력 값을 출력하고, 상기 비교 함수에 상기 산출된 작은 값과 상기 제3 동형 암호문을 입력하여 제3 출력 값을 출력하고, 상기 제1 내지 제3 동형 암호문에 대한 합산 값에 상기 제1 출력 값 및 상기 제3 출력 값을 감산하여 제2 출력 값을 산출하여 출력할 수 있다. On the other hand, the 5-way sorter, when the first isomorphic ciphertext, the second isomorphic ciphertext and the third isomorphic ciphertext are input, using the comparison function, a larger value and a smaller value among the first isomorphic ciphertext and the second isomorphic ciphertext , output a first output value by inputting the calculated large value and the third isomorphic ciphertext to the comparison function, and inputting the calculated small value and the third isomorphic ciphertext to the comparison function to obtain a third An output value may be output, and a second output value may be calculated and output by subtracting the first output value and the third output value from the sum of the first to third homomorphic ciphertexts.

한편, 상기 5-way 정렬기는 정렬된 5개의 동형 암호문 각각의 평문 공간을 확장할 수 있다. On the other hand, the 5-way sorter can expand the plaintext space of each of the five aligned homomorphic ciphertexts.

한편, 본 개시의 일 실시 예에 따른 연산 장치는 에러를 포함하는 근사 메시지에 대한 동형 암호문을 복수개 저장하는 메모리, 및 상기 복수개의 동형 암호문을 정렬하는 프로세서를 포함하며, 상기 프로세서는 5개의 동형 암호문을 한 번의 스테이지에서 정렬 가능한 5-way 정렬기를 이용하여 상기 복수의 동형 암호문을 정렬할 수 있다. On the other hand, the computing device according to an embodiment of the present disclosure includes a memory for storing a plurality of homomorphic ciphertexts for an approximate message including an error, and a processor for arranging the plurality of homomorphic ciphertexts, wherein the processor includes five homomorphic ciphertexts. It is possible to sort the plurality of homomorphic ciphertexts using a 5-way sorter that can be sorted in one stage.

이 경우, 상기 프로세서는, 복수의 5-way 정렬기를 이용하여 병렬 정렬 처리를 수행할 수 있다. In this case, the processor may perform parallel alignment processing using a plurality of 5-way sorters.

한편, 상기 5-way 정렬기는, 입력된 두 값 중 큰 값 또는 작은 값을 선택적으로 출력하는 비교 함수를 이용하여 정렬를 수행할 수 있다. Meanwhile, the 5-way sorter may perform sorting using a comparison function that selectively outputs a larger value or a smaller value among two input values.

이 경우 상기 비교 함수는, 크기 비교에 따라 기설정된 값을 출력하는 근사 부호 함수와 입력 값의 곱의 연산으로 산출될 수 있다. In this case, the comparison function may be calculated by calculating a product of an approximate sign function that outputs a preset value according to magnitude comparison and an input value.

이 경우, 상기 근사 부호 함수는, 0보다 큰 입력 값에 대해서는 출력값이 1에 가까워지고, 0보다 작은 입력 값에 대해서는 출력 값이 -1에 가까워지도록 하는 합성 함수를 기설정된 횟수만큼 반복 연산한 함수일 수 있다. In this case, the approximation sign function is a function obtained by repeating a composition function that makes an output value close to 1 for an input value greater than 0 and an output value close to -1 for an input value less than 0 is repeated a predetermined number of times. can

이 경우, 상기 근사 부호 함수는, 서로 다른 두 합성 함수 각각을 3회 반복 연산한 함수일 수 있다. In this case, the approximate sign function may be a function obtained by repeatedly calculating two different synthesis functions three times.

한편, 상기 5-way 정렬기는, 제1 동형 암호문, 제2 동형 암호문 및 제3 동형 암호문이 입력되면, 상기 비교 함수를 이용하여 상기 제1 동형 암호문과 상기 제2 동형 암호문 중 큰 값 및 작은 값을 산출하고, 상기 비교 함수에 상기 산출된 큰 값과 상기 제3 동형 암호문을 입력하여 제1 출력 값을 출력하고, 상기 비교 함수에 상기 산출된 작은 값과 상기 제3 동형 암호문을 입력하여 제3 출력 값을 출력하고, 상기 제1 내지 제3 동형 암호문에 대한 합산 값에 상기 제1 출력 값 및 상기 제3 출력 값을 감산하여 제2 출력 값을 산출하여 출력할 수 있다. On the other hand, the 5-way sorter, when the first isomorphic ciphertext, the second isomorphic ciphertext and the third isomorphic ciphertext are input, using the comparison function, a larger value and a smaller value among the first isomorphic ciphertext and the second isomorphic ciphertext , output a first output value by inputting the calculated large value and the third isomorphic ciphertext to the comparison function, and inputting the calculated small value and the third isomorphic ciphertext to the comparison function to obtain a third An output value may be output, and a second output value may be calculated and output by subtracting the first output value and the third output value from the sum of the first to third homomorphic ciphertexts.

한편, 상기 5-way 정렬기는 정렬된 5개의 동형 암호문 각각의 평문 공간을 확장할 수 있다. On the other hand, the 5-way sorter can expand the plaintext space of each of the five aligned homomorphic ciphertexts.

한편, 본 개시의 일 실시 예에 따른 동형 암호문의 처리 방법을 실행하기 위한 프로그램을 포함하는 컴퓨터 판독가능 기록 매체에 있어서, 상기 동형 암호문의 처리 방법은, 복수의 동형 암호문에 대한 정렬 명령을 입력받는 단계, 및 5개의 동형 암호문을 한 번의 스테이지에서 정렬 가능한 5-way 정렬기를 이용하여 상기 복수의 동형 암호문을 정렬하는 단계를 포함한다. On the other hand, in a computer-readable recording medium including a program for executing a method for processing a homomorphic ciphertext according to an embodiment of the present disclosure, the processing method for a homomorphic ciphertext receives an alignment command for a plurality of isomorphic ciphertexts and aligning the plurality of homomorphic ciphertexts using a 5-way sorter capable of sorting five homomorphic ciphertexts in one stage.

이상과 같은 본 개시의 다양한 실시 예들에 따르면, 대량의 동형 암호문에 대해서 정렬을 수행할 수 있으며, 한 스테이지에서 5개의 동형 암호문을 비교하는 5-way 정렬기를 이용한다는 점에서, 낮은 스테이지 횟수로 정렬을 수행할 수 있어보다 빠른 정렬이 가능하다. According to various embodiments of the present disclosure as described above, sorting can be performed on a large amount of homomorphic ciphertexts, and in that a 5-way sorter that compares five homomorphic ciphertexts in one stage is used, sorting with a low number of stages can perform faster sorting.

도 1은 본 개시의 일 실시 예에 따른 네트워크 시스템의 구조를 설명하기 위한 도면,
도 2는 본 개시의 일 실시 예에 따른 연산 장치의 구성을 나타낸 블럭도,
도 3은 본 개시의 연산 장치의 정렬 동작을 설명하기 위한 도면,
도 4 및 도 5는 부호 함수와 관련된 다양한 합성 함수의 형태를 도시한 도면,
도 6은 대량의 동형 암호문에 대한 정렬 동작을 설명하기 위한 도면,
도 7은 3개의 동형 암호문에 대한 정렬 동작을 설명하기 위한 도면,
도 8은 4개의 동형 암호문에 대한 정렬 동작을 설명하기 위한 도면,
도 9는 5개의 동형 암호문에 대한 정렬 동작을 설명하기 위한 도면, 그리고,
도 10은 본 개시의 일 실시 예에 따른 암호문 연산 방법을 설명하기 위한 흐름도이다.
1 is a diagram for explaining the structure of a network system according to an embodiment of the present disclosure;
2 is a block diagram showing the configuration of a computing device according to an embodiment of the present disclosure;
3 is a view for explaining the alignment operation of the computing device of the present disclosure;
4 and 5 are diagrams showing the form of various synthesis functions related to a sign function;
6 is a diagram for explaining the sorting operation for a large amount of homomorphic ciphertext;
7 is a diagram for explaining the sorting operation for three homomorphic ciphertexts;
8 is a diagram for explaining the sorting operation for four homomorphic ciphertexts;
9 is a diagram for explaining the sorting operation for five homomorphic ciphertexts, and,
10 is a flowchart illustrating a ciphertext calculation method according to an embodiment of the present disclosure.

이하에서는 첨부 도면을 참조하여 본 개시에 대해서 자세하게 설명한다. 본 개시에서 수행되는 정보(데이터) 전송 과정은 필요에 따라서 암호화/복호화가 적용될 수 있으며, 본 개시 및 특허청구범위에서 정보(데이터) 전송 과정을 설명하는 표현은 별도로 언급되지 않더라도 모두 암호화/복호화하는 경우도 포함하는 것으로 해석되어야 한다. 본 개시에서 "A로부터 B로 전송(전달)" 또는 "A가 B로부터 수신"과 같은 형태의 표현은 중간에 다른 매개체가 포함되어 전송(전달) 또는 수신되는 것도 포함하며, 반드시 A로부터 B까지 직접 전송(전달) 또는 수신되는 것만을 표현하는 것은 아니다. Hereinafter, the present disclosure will be described in detail with reference to the accompanying drawings. Encryption/decryption may be applied as necessary 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. In the present disclosure, an expression of a form such as "transfer from A to B (transfer)" or "A receives from B" includes 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.

본 개시의 설명에 있어서 각 단계의 순서는 선행 단계가 논리적 및 시간적으로 반드시 후행 단계에 앞서서 수행되어야 하는 경우가 아니라면 각 단계의 순서는 비제한적으로 이해되어야 한다. 즉, 위와 같은 예외적인 경우를 제외하고는 후행 단계로 설명된 과정이 선행단계로 설명된 과정보다 앞서서 수행되더라도 개시의 본질에는 영향이 없으며 권리범위 역시 단계의 순서에 관계없이 정의되어야 한다. 그리고 본 명세서에서 "A 또는 B"라고 기재한 것은 A와 B 중 어느 하나를 선택적으로 가리키는 것뿐만 아니라 A와 B 모두를 포함하는 것도 의미하는 것으로 정의된다. 또한, 본 개시에서 "포함"이라는 용어는 포함하는 것으로 나열된 요소 이외에 추가로 다른 구성요소를 더 포함하는 것도 포괄하는 의미를 가진다.In the description of the present disclosure, the order of each step should be understood as non-limiting unless the preceding step must be logically and temporally performed before the subsequent step. That is, except for the above exceptional cases, even if the process described as the subsequent step is performed before the process described as the preceding step, the essence of the disclosure is not affected, and the scope of rights should also be defined regardless of the order of the steps. And, in the present specification, "A or B" is defined as meaning not only selectively pointing to any one of A and B, but also including both A and B. In addition, in the present disclosure, the term “comprising” has the meaning of encompassing the inclusion of other components in addition to the elements listed as being included.

본 개시에서는 본 개시의 설명에 필요한 필수적인 구성요소만을 설명하며, 본 개시의 본질과 관계가 없는 구성요소는 언급하지 아니한다. 그리고 언급되는 구성요소만을 포함하는 배타적인 의미로 해석되어서는 안 되며 다른 구성요소도 포함할 수 있는 비배타적인 의미로 해석되어야 한다.In the present disclosure, only essential components necessary for the description of the present disclosure are described, and components not related to the essence of the present disclosure are not mentioned. And it should not be construed as an exclusive meaning including only the mentioned components, but should be construed as a non-exclusive meaning that may also include other components.

그리고 본 개시에서 "값"이라 함은 스칼라값뿐만 아니라 벡터도 포함하는 개념으로 정의된다. And, in the present disclosure, "value" is defined as a concept including a vector as well as a scalar value.

후술하는 본 개시의 각 단계의 수학적 연산 및 산출은 해당 연산 또는 산출을 하기 위해 공지되어 있는 코딩 방법 및/또는 본 개시에 적합하게 고안된 코딩에 의해서 컴퓨터 연산으로 구현될 수 있다.The mathematical operation and calculation of each step of the present disclosure to be described later may be implemented as a computer operation by a known coding method for performing the corresponding operation or calculation and/or coding suitable for the present disclosure.

이하에서 설명하는 구체적인 수학식은 가능한 여러 대안 중에서 예시적으로 설명되는 것이며, 본 개시의 권리 범위가 본 개시에 언급된 수학식에 제한되는 것으로 해석되어서는 아니된다.The specific equations described below are illustratively described among possible alternatives, and the scope of the present disclosure should not be construed as being limited to the equations mentioned in the present disclosure.

설명의 편의를 위해서, 본 개시에서는 다음과 같이 표기를 정하기로 한다.For convenience of description, in the present disclosure, the notation is determined as follows.

a ← D : 분포(D)에 따라서 원소(a)를 선택함a ← D : Select element (a) according to distribution (D)

s1, s2 ∈ R : S1, S2 각각은 R 집합에 속하는 원소이다. s1, s2 ∈ R : Each of S1 and S2 is an element belonging to the set R.

mod(q) : q 원소로 모듈(modular) 연산mod(q) : Modular operation with q elements

Figure 112020031178455-pat00001
: 내부 값을 반올림함
Figure 112020031178455-pat00001
: rounds the internal value

이하에서는 첨부된 도면을 이용하여 본 개시의 다양한 실시 예들에 대하여 구체적으로 설명한다. Hereinafter, various embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.

도 1은 본 개시의 일 실시 예에 따른 네트워크 시스템의 구성을 나타내는 도면이다. 1 is a diagram illustrating a configuration of a network system according to an embodiment of the present disclosure.

도 1을 참조하면, 네트워크 시스템은 복수의 전자 장치(100-1 ~ 100-n), 제1 서버 장치(200), 제2 서버 장치(300)를 포함할 수 있으며, 각 구성들은 네트워크(10)를 통해 서로 연결될 수 있다. Referring to FIG. 1 , 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.

네트워크(10)는 다양한 형태의 유무선 통신 네트워크, 방송 통신 네트워크, 광통신 네트워크, 클라우드 네트워크 등으로 구현될 수 있으며, 각 장치들은 별도의 매개체 없이 와이파이, 블루투스, NFC(Near Field Communication) 등과 같은 방식으로 연결될 수도 있다. 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

도 1에서는 전자 장치가 복수 개(100-1 ~ 100-n)인 것으로 도시하였으나, 반드시 복수 개의 전자 장치가 사용되어야 하는 것은 아니며 하나의 장치가 사용될 수도 있다. 일 예로, 전자 장치(100-1 ~ 100-n)는 스마트폰, 태블릿, 게임 플레이어, PC, 랩톱 PC, 홈서버, 키오스크 등과 같은 다양한 형태의 장치로 구현될 수 있으며, 이밖에 IoT 기능이 적용된 가전 제품 형태로도 구현될 수 있다.Although FIG. 1 illustrates 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. For example, 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.

사용자는 자신이 사용하는 전자 장치(100-1 ~ 100-n)를 통해서 다양한 정보를 입력할 수 있다. 입력된 정보는 전자 장치(100-1 ~ 100-n) 자체에 저장될 수도 있지만, 저장 용량 및 보안 등을 이유로 외부 장치로 전송되어 저장될 수도 있다. 도 1에서 제1 서버 장치(200)는 이러한 정보들을 저장하는 역할을 수행하고, 제2 서버 장치(300)는 제1 서버 장치(200)에 저장된 정보의 일부 또는 전부를 이용하는 역할을 수행할 수 있다. 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. In FIG. 1 , the first server device 200 serves to store such information, and the second server device 300 may serve to use some or all of the information stored in the first server device 200 . have.

각 전자 장치(100-1 ~ 100-n)는 입력된 정보를 동형 암호화하여, 동형 암호문을 제1 서버 장치(200)로 전송할 수 있다. 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 .

각 전자 장치(100-1 ~ 100-n)는 동형 암호화를 수행하는 과정에서 산출되는 암호화 노이즈, 즉, 에러를 암호문에 포함시킬 수 있다. 구체적으로는, 각 전자 장치(100-1 ~ 100-n)에서 생성하는 동형 암호문은, 추후에 비밀키를 이용하여 복호화하였을 때 메시지 및 에러 값을 포함하는 결과 값이 복원되는 형태로 생성될 수 있다. 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. Specifically, 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.

일 예로, 전자 장치(100-1 ~ 100-n)에서 생성하는 동형 암호문은 비밀키를 이용하여 복호화 하였을 때 다음과 같은 성질을 만족하는 형태로 생성될 수 있다. For example, 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.

[수학식 1][Equation 1]

Dec(ct, sk) = <ct, sk> = M+e(mod q)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은 차하위 비트 측에 배치될 수 있다. Here, < , > denotes a normal inner product, ct denotes a ciphertext, sk denotes a private key, M denotes a plaintext message, e denotes an encryption error value, and mod q denotes the modulus of the ciphertext. q should be chosen to be greater than the value M of the message multiplied by the scaling factor (Δ). 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 the significant-digit operation. Among the decoded data, an error may be disposed on the least significant bit (LSB) side, and M may be disposed on the least significant bit side.

메시지의 크기가 너무 작거나 너무 큰 경우, 스케일링 팩터를 이용하여 그 크기를 조절할 수도 있다. 스케일링 팩터를 사용하게 되면, 정수 형태의 메시지뿐만 아니라 실수 형태의 메시지까지도 암호화할 수 있게 되므로, 활용성이 크게 증대할 수 있다. 또한, 스케일링 팩터를 이용하여 메시지의 크기를 조절함으로써, 연산이 이루어지고 난 이후의 암호문에서 메시지들이 존재하는 영역, 즉, 유효 영역의 크기도 조절될 수 있다.If the size of the message is too small or too large, the size may be adjusted using a scaling factor. When the scaling factor is used, not only integer messages but also real number messages can be encrypted, so that usability can be greatly increased. In addition, by adjusting the size of the message by 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.

실시 예에 따라, 암호문 모듈러스 q는 다양한 형태로 설정되어 사용될 수 있다. 일 예로, 암호문의 모듈러스는 스케일링 팩터 Δ의 지수승 q=ΔL 형태로 설정될 수 있다. Δ가 2라면, q=210 과 같은 값으로 설정될 수 있다. According to an embodiment, the ciphertext modulus q may be set and used in various forms. As an example, the modulus of the ciphertext may be set in the form of an exponential power q= ΔL of the scaling factor Δ. If Δ is 2, it may be set to a value such as q=2 10 .

제1 서버 장치(200)는 수신된 동형 암호문을 복호화하지 않고, 암호문 상태로 저장할 수 있다. The first server device 200 may store the received homomorphic ciphertext as an ciphertext without decrypting it.

제2 서버 장치(300)는 동형 암호문에 대한 특정 처리 결과를 제1 서버 장치(200)로 요청할 수 있다. 제1 서버 장치(200)는 제2 서버 장치(300)의 요청에 따라 특정 연산을 수행한 후, 그 결과를 제2 서버 장치(300)로 전송할 수 있다. 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 .

일 예로, 두 개의 전자 장치(100-1, 100-2)가 전송한 암호문 ct1, ct2가 제1 서버 장치(200)에 저장된 경우, 제2 서버 장치(300)는 두 전자 장치(100-1, 100-2)로부터 제공된 정보들을 합산한 값을 제1 서버 장치(200)로 요청할 수 있다. 제1 서버 장치(200)는 요청에 따라 두 암호문을 합산하는 연산을 수행한 후, 그 결과 값(ct1 + ct2)을 제2 서버 장치(300)로 전송할 수 있다. For example, when the cipher texts ct1 and ct2 transmitted by the two electronic devices 100 - 1 and 100 - 2 are stored in the first server device 200 , the second server device 300 transmits the two electronic devices 100 - 1 , 100-2) may request a value obtained by adding up information provided from the first server device 200 . The first server device 200 may perform an operation for summing two ciphertexts according to a request, and then transmit the result value (ct1 + ct2) to the second server device 300 .

동형 암호문의 성질상, 제1 서버 장치(200)는 복호화를 하지 않은 상태에서 연산을 수행할 수 있고, 그 결과 값도 암호문 형태가 된다. 본 개시에서는 연산에 의해 획득된 결과값을 연산 결과 암호문이라 지칭한다. Due to the nature of the homomorphic ciphertext, the first server device 200 may perform the operation without decryption, and the result value is also in the form of the ciphertext. In the present disclosure, a result value obtained by an operation is referred to as an operation result ciphertext.

제1 서버 장치(200)는 연산 결과 암호문을 제2 서버 장치(300)로 전송할 수 있다. 제2 서버 장치(300)는 수신된 연산 결과 암호문을 복호화하여, 각 동형 암호문들에 포함된 데이터들의 연산 결과값을 획득할 수 있다. 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.

이와 같은 동형 암호문에 대한 연산은 덧셈, 뺄셈 및 곱셈으로 구성되는 연산식 뿐만 아니라, 최대값 산출, 최소값 산출 및 크기 비교와 같은 비교 연산일 수 있다. 또한, 비교 연산을 이용한 복수의 동형 암호문에 대한 정렬일 수도 있다. 이와 같이 제1 서버 장치(200)는 연산 동작을 수행할 수 있다는 점에서, 연산 장치라 지칭될 수도 있다. 구체적인 정렬 방법에 대해서는 도 3을 참조하여 후술한다. The operation on the homomorphic ciphertext may be a comparison operation such as calculating a maximum value, calculating a minimum value, and comparing a size, as well as an expression consisting of addition, subtraction, and multiplication. Also, it may be an alignment for a plurality of homomorphic ciphertexts using a comparison operation. As described above, the first server device 200 may be referred to as a computing device in that it can perform a calculation operation. A specific alignment method will be described later with reference to FIG. 3 .

그리고 제1 서버 장치(200)는 근사 메시지 비중이 임계치를 초과하면, 재부팅(Bootstrapping) 동작을 수행할 수 있다. 재부팅 동작에 대해서는 도 3을 참조하여 후술한다. And, when the weight of the approximate message exceeds the threshold, the first server device 200 may perform a rebooting operation. The reboot operation will be described later with reference to FIG. 3 .

한편, 도 1에서는 제1 전자 장치 및 제2 전자 장치에서 암호화를 수행하고, 제2 서버 장치가 복호화를 수행하는 경우를 도시하였으나, 이에 한정되는 것은 아니다. Meanwhile, although 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.

도 2는 본 개시의 일 실시 예에 따른 연산 장치의 구성을 나타낸 블럭도이다. 2 is a block diagram illustrating a configuration of a computing device according to an embodiment of the present disclosure.

구체적으로, 도 1의 시스템에서 제1 전자 장치, 제2 전자 장치 등과 같이 동형 암호화를 수행하는 장치, 제1 서버 장치 등과 같이 동형 암호문을 연산하는 장치, 제2 서버 장치 등과 같이 동형 암호문을 복호하는 장치 등을 연산 장치라고 지칭할 수 있다. 이러한 연산 장치는 PC(Personal computer), 노트북, 스마트폰, 태블릿, 서버 등 다양한 장치일 수 있다. Specifically, in the system of FIG. 1, a device for performing homomorphic encryption such as a first electronic device and a second electronic device, a device for calculating an isomorphic ciphertext such as a first server device, etc. A device or the like may be referred to as a computing device. The computing device may be various devices such as a personal computer (PC), a notebook computer, a smart phone, a tablet, and a server.

도 2를 참조하면, 연산 장치(400)는 통신 장치(410), 메모리(420), 디스플레이(430), 조작 입력 장치(440) 및 프로세서(450)를 포함할 수 있다. Referring to FIG. 2 , the computing device 400 may include a communication device 410 , a memory 420 , a display 430 , a manipulation input device 440 , and a processor 450 .

통신 장치(410)는 연산 장치(400)를 외부 장치(미도시)와 연결하기 위해 형성되고, 근거리 통신망(LAN: Local Area Network) 및 인터넷망을 통해 외부 장치에 접속되는 형태뿐만 아니라, USB(Universal Serial Bus) 포트 또는 무선 통신(예를 들어, WiFi 802.11a/b/g/n, NFC, Bluetooth) 포트를 통하여 접속되는 형태도 가능하다. 이러한 통신 장치(410)는 송수신부(transceiver)로 지칭될 수도 있다. The communication device 410 is formed to connect the computing device 400 with an external device (not shown), and is connected to an external device through a local area network (LAN) and an Internet network, as well as a USB ( Universal Serial Bus) port or wireless communication (eg, WiFi 802.11a/b/g/n, NFC, Bluetooth) port may be connected through the port. Such a communication device 410 may also be referred to as a transceiver.

통신 장치(410)는 공개키를 외부 장치로부터 수신할 수 있으며, 연산 장치(400) 자체적으로 생성한 공개키를 외부 장치로 전송할 수 있다. The communication device 410 may receive the public key from the external device, and may transmit the public key generated by the computing device 400 itself to the external device.

그리고 통신 장치(410)는 외부 장치로부터 메시지를 수신할 수 있으며, 생성한 동형 암호문을 외부 장치로 송신할 수 있다. 또한, 통신 장치(410)는 외부 장치로부터 동형 암호문을 수신할 수도 있다. In addition, the communication device 410 may receive a message from the external device and transmit the generated homomorphic cipher text to the external device. Also, the communication device 410 may receive a homomorphic ciphertext from an external device.

또한, 통신 장치(410)는 암호문 생성에 필요한 각종 파라미터를 외부 장치로부터 수신할 수 있다. 한편, 구현시에 각종 파라미터는 후술하는 조작 입력 장치(440)를 통하여 사용자로부터 직접 입력받을 수 있다. In addition, the communication device 410 may receive various parameters necessary for generating a ciphertext from an external device. Meanwhile, in implementation, various parameters may be directly input from the user through the manipulation input device 440 to be described later.

또한, 통신 장치(410)는 외부 장치로부터 동형 암호문에 대한 연산을 요청받을 수 있으며, 그에 따라 계산된 결과를 외부 장치에 전송할 수 있다. 여기서 요청받은 연산은 덧셈, 뺄셈, 곱셈과 같은 연산일 수 있으며, 비다항식 연산인 비교 연산이거나, 정렬 처리일 수도 있다. Also, the communication device 410 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. Here, the requested operation may be an operation such as addition, subtraction, and multiplication, a comparison operation that is a non-polynomial operation, or an alignment processing.

메모리(420)에는 연산 장치(400)에 관한 적어도 하나의 인스트럭션(instruction)이 저장될 수 있다. 구체적으로, 메모리(420)에는 본 개시의 다양한 실시 예에 따라 연산 장치(400)가 동작하기 위한 각종 프로그램(또는 소프트웨어)이 저장될 수 있다. At least one instruction related to the computing device 400 may be stored in the memory 420 . Specifically, various programs (or software) for operating the computing device 400 according to various embodiments of the present disclosure may be stored in the memory 420 .

이러한 메모리(420)는 RAM이나 ROM, 플래시 메모리, HDD, 외장 메모리, 메모리 카드 등과 같은 다양한 형태로 구현될 수 있으며, 어느 하나로 한정되는 것은 아니다. The memory 420 may be implemented in various forms such as RAM, ROM, flash memory, HDD, external memory, memory card, and the like, but is not limited thereto.

메모리(420)는 암호화할 메시지를 저장할 수 있다. 여기서 메시지는 사용자가 각종 인용한 각종 신용 정보, 개인 정보 등일 수 있으며, 연산 장치(400)에서 사용되는 위치 정보, 인터넷 사용 시간 정보 등 사용 이력 등과 관련된 정보일 수도 있다. The memory 420 may store a message to be encrypted. Here, the message may be various types of credit information and personal information cited by the user, and may be information related to a usage history, such as location information used in the computing device 400 , Internet use time information, and the like.

그리고 메모리(420)는 공개키를 저장할 수 있으며, 연산 장치(400)가 직접 공개키를 생성한 장치인 경우, 비밀키뿐만 아니라, 공개키 및 비밀키 생성에 필요한 각종 파라미터를 저장할 수 있다. In addition, the memory 420 may store the public key, and when the computing device 400 is a device that directly generates the public key, it may store not only the private key but also the public key and various parameters necessary for generating the private key.

그리고 메모리(420)는 후술한 과정에서 생성된 동형 암호문을 저장할 수 있다. 그리고 메모리(420)는 외부 장치에서 전송한 동형 암호문을 저장할 수도 있다. 또한, 메모리(420)는 후술하는 연산 과정에서의 결과물인 연산 결과 암호문을 저장할 수도 있다. In addition, the memory 420 may store the isomorphic ciphertext generated in the process described below. In addition, the memory 420 may store the same type cipher text transmitted from the external device. Also, the memory 420 may store an operation result ciphertext that is a result of an operation process to be described later.

디스플레이(430)는 연산 장치(400)가 지원하는 기능을 선택받기 위한 사용자 인터페이스 창을 표시한다. 구체적으로, 디스플레이(430)는 연산 장치(400)가 제공하는 각종 기능을 선택받기 위한 사용자 인터페이스 창을 표시할 수 있다. 이러한 디스플레이(430)는 LCD(liquid crystal display), OLED(Organic Light Emitting Diodes) 등과 같은 모니터일 수 있으며, 후술할 조작 입력 장치(440)의 기능을 동시에 수행할 수 있는 터치 스크린으로 구현될 수도 있다. The display 430 displays a user interface window for receiving a selection of a function supported by the computing device 400 . Specifically, the display 430 may display a user interface window for selecting various functions provided by the computing device 400 . The display 430 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 440 to be described later. .

디스플레이(430)는 비밀키 및 공개키 생성에 필요한 파라미터의 입력을 요청하는 메시지를 표시할 수 있다. 그리고 디스플레이(430)는 암호화 대상이 메시지를 선택하는 메시지를 표시할 수 있다. 한편, 구현시에 암호화 대상은 사용자가 직접 선택할 수도 있고, 자동으로 선택될 수 있다. 즉, 암호화가 필요한 개인 정보 등은 사용자가 직접 메시지를 선택하지 않더라도 자동으로 설정될 수 있다. The display 430 may display a message requesting input of parameters necessary for generating a private key and a public key. In addition, the display 430 may display a message in which the encryption target selects a message. Meanwhile, in implementation, 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.

조작 입력 장치(440)는 사용자로부터 연산 장치(400)의 기능 선택 및 해당 기능에 대한 제어 명령을 입력받을 수 있다. 구체적으로, 조작 입력 장치(440)는 사용자로부터 비밀키 및 공개키 생성에 필요한 파라미터를 입력받을 수 있다. 또한, 조작 입력 장치(440)는 사용자로부터 암호화될 메시지를 설정받을 수 있다. The manipulation input device 440 may receive a function selection of the arithmetic device 400 and a control command for the corresponding function input from the user. Specifically, the manipulation input device 440 may receive parameters necessary for generating a private key and a public key from a user. Also, the manipulation input device 440 may receive a message to be encrypted from the user.

그리고 조작 입력 장치(440)는 정렬 명령을 입력받거나, 정렬 대상인 동형 암호문을 선택받을 수 있다. In addition, the manipulation input device 440 may receive an alignment command or select a homomorphic ciphertext to be aligned.

프로세서(450)는 연산 장치(400)의 전반적인 동작을 제어한다. 구체적으로, 프로세서(450)는 메모리(420)에 저장된 적어도 하나의 인스트럭션을 실행함으로써 연산 장치(400)의 동작을 전반적으로 제어할 수 있다. 이러한 프로세서(450)는 CPU(central processing unit), ASIC(application-specific integrated circuit)과 같은 단일 장치로 구성될 수 있으며, CPU, GPU(Graphics Processing Unit) 등의 복수의 장치로 구성될 수도 있다. The processor 450 controls the overall operation of the computing device 400 . Specifically, the processor 450 may control the overall operation of the computing device 400 by executing at least one instruction stored in the memory 420 . The processor 450 may be configured as a single device such as a central processing unit (CPU) and an application-specific integrated circuit (ASIC), or may include a plurality of devices such as a CPU and a graphics processing unit (GPU).

프로세서(450)는 전송하고자 하는 메시지가 입력되면 메모리(420)에 저장할 수 있다. 그리고 프로세서(450)는 메모리(420)에 저장된 각종 설정 값 및 프로그램을 이용하여, 메시지를 동형 암호화할 수 있다. 이 경우, 공개키가 사용될 수 있다. When a message to be transmitted is input, the processor 450 may store it in the memory 420 . In addition, the processor 450 may homogeneously encrypt the message by using various setting values and programs stored in the memory 420 . In this case, a public key may be used.

프로세서(450)는 암호화를 수행하는데 필요한 공개키를 자체적으로 생성하여 사용할 수도 있고, 외부 장치로부터 수신하여 사용할 수도 있다. 일 예로, 복호화를 수행하는 제2 서버 장치(300)가 공개키를 다른 장치들에게 배포할 수 있다. The processor 450 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. For example, the second server device 300 performing decryption may distribute the public key to other devices.

자체적으로 키를 생성하는 경우, 프로세서(450)는 Ring-LWE 기법을 이용하여 공개키를 생성할 수 있다. 구체적으로 설명하면, 프로세서(450)는 먼저 각종 파라미터 및 링을 설정하여, 메모리(420)에 저장할 수 있다. 파라미터의 예로는 평문 메시지 비트의 길이, 공개키 및 비밀키의 크기 등이 있을 수 있다. When generating a key by itself, the processor 450 may generate a public key using the Ring-LWE technique. More specifically, the processor 450 may first set various parameters and rings and store them in the memory 420 . 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 may be expressed by the following equation.

[수학식 2][Equation 2]

Figure 112020031178455-pat00002
Figure 112020031178455-pat00002

여기서 R은 링, Zq는 계수, f(x)는 n차 다항식이다. where R is a ring, Zq is a coefficient, and f(x) is an nth-order polynomial.

링(Ring)이란 기 설정된 계수를 가지는 다항식의 집합으로, 원소들 사이에 덧셈과 곱셈이 정의되어 있으며 덧셈과 곱셈에 대해서 닫혀 있는 집합을 의미한다. 이러한 링은 환으로 지칭될 수 있다. A ring is a set of polynomials having preset coefficients, and means a set in which addition and multiplication are defined between elements and closed to addition and multiplication. Such a ring may be referred to as a 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으로도 표현될 수 있다. For example, the ring means a set of nth-order polynomials having a coefficient Zq. Specifically, when n is Φ(N), it means 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 mutually prime with 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).

[수학식 3][Equation 3]

Figure 112020031178455-pat00003
Figure 112020031178455-pat00003

비밀키(sk)는 다음과 같이 표현될 수 있다. The secret key sk can be expressed as follows.

한편, 상술한 수학식 3의 링은 평문 공간에서 복소수를 갖는다. 한편, 동형 암호문에 대한 연산 속도를 향상하기 위하여, 상술한 링의 집합 중 평문 공간이 실수인 집합만을 이용할 수도 있다. On the other hand, 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 ciphertext, only a set in which the plaintext space is a real number among the set of rings described above may be used.

이와 같은 링이 설정되면, 프로세서(450)는 링으로부터 비밀키(sk)를 산출할 수 있다. When such a ring is set, the processor 450 may calculate a secret key sk from the ring.

[수학식 4][Equation 4]

Figure 112020031178455-pat00004
Figure 112020031178455-pat00004

여기서, s(x)는 작은 계수로 랜덤하게 생성한 다항식을 의미한다. Here, s(x) denotes a polynomial randomly generated with small coefficients.

그리고 프로세서(450)는 링으로부터 제1 랜덤 다항식(a(x))을 산출한다. 제1 랜덤 다항식은 다음과 같이 표현될 수 있다. Then, the processor 450 calculates a first random polynomial (a(x)) from the ring. The first random polynomial can be expressed as follows.

[수학식 5][Equation 5]

Figure 112020031178455-pat00005
Figure 112020031178455-pat00005

또한, 프로세서(450)는 에러를 산출할 수 있다. 구체적으로, 프로세서(450)는 이산 가우시안 분포 또는 그와 통계적 거리가 가까운 분포로부터 에러를 추출할 수 있다. 이러한 에러는 다음과 같이 표현될 수 있다.Also, the processor 450 may calculate an error. Specifically, the processor 450 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.

[수학식 6][Equation 6]

Figure 112020031178455-pat00006
Figure 112020031178455-pat00006

에러까지 산출되면, 프로세서(450)는 제1 랜덤 다항식 및 비밀키에 에러를 모듈러 연산하여 제2 랜덤 다항식을 산출할 수 있다. 제2 랜덤 다항식은 다음과 같이 표현될 수 있다. If the error is calculated, the processor 450 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.

[수학식 7][Equation 7]

Figure 112020031178455-pat00007
Figure 112020031178455-pat00007

최종적으로 공개키(pk)는 제1 랜덤 다항식 및 제2 랜덤 다항식을 포함하는 형태로 다음과 같이 설정된다. Finally, the public key pk is set in a form including the first random polynomial and the second random polynomial as follows.

[수학식 8][Equation 8]

Figure 112020031178455-pat00008
Figure 112020031178455-pat00008

상술한 키 생성 방법은 일 예에 불과하므로, 반드시 이에 한정되는 것은 아니며, 이 밖에 다른 방법으로 공개키 및 비밀키를 생성할 수도 있음은 물론이다. Since the above-described method for generating a key is only an example, the present invention is not necessarily limited thereto, and it goes without saying that the public key and the private key may be generated by other methods.

한편, 프로세서(450)는 공개키가 생성되면, 생성된 공개키가 다른 장치들에 전송되도록 통신 장치(410)를 제어할 수 있다. Meanwhile, when the public key is generated, the processor 450 may control the communication device 410 to transmit the generated public key to other devices.

그리고 프로세서(450)는 메시지에 대한 동형 암호문을 생성할 수 있다. 이때, 프로세서(450)는 선행적으로 메시지를 다항식으로 변환하는 인코딩 동작을 수행할 수 있다. In addition, the processor 450 may generate a homomorphic cipher text for the message. In this case, the processor 450 may perform an encoding operation of converting the message into a polynomial in advance.

그리고 프로세서(450)는 메시지 형태로 변환된 메시지에 공개키

Figure 112020031178455-pat00009
와, 다음과 같은 수학식 9를 이용하여 암호문을 생성할 수 있다. And the processor 450 is a public key in the message converted to the message form.
Figure 112020031178455-pat00009
And, it is possible to generate a ciphertext using Equation 9 as follows.

[수학식 9][Equation 9]

Figure 112020031178455-pat00010
Figure 112020031178455-pat00010

이때, 프로세서(450)는 암호문의 길이를 스케일링 팩터의 크기에 대응되도록 생성할 수 있다.In this case, the processor 450 may generate the length of the cipher text to correspond to the size of the scaling factor.

암호화할 메시지는 외부 소스로부터 수신할 수도 있고, 연산 장치(400)에 직접 구비 또는 연결된 입력 장치로부터 입력될 수도 있다. 또한, 스케일링 팩터도 사용자가 직접 입력하거나, 다른 장치를 통해 제공받을 수도 있다. 예를 들어, 연산 장치(400)가 터치 스크린이나 키 패드를 포함하는 경우, 프로세서(450)는 사용자가 터치 스크린이나 키 패드를 통해 입력하는 데이터를 메모리(420)에 저장한 후, 암호화할 수 있다. The message to be encrypted may be received from an external source or may be input from an input device directly provided or connected to the computing device 400 . Also, the scaling factor may be directly input by the user or may be provided through another device. For example, when the computing device 400 includes a touch screen or a keypad, the processor 450 stores data input by the user through the touch screen or the keypad in the memory 420 and then encrypts it. have.

한편, 본 개시의 일 실시 예에 따르면, 패킹(packing)이 이루어질 수도 있다. 동형 암호화에서 패킹을 이용하게 되면, 다수의 메시지를 하나의 암호문으로 암호화하는 것이 가능해진다. 이 경우, 연산 장치(400)에서 각 암호문들 간의 연산을 수행하게 되면, 결과적으로 다수의 메시지에 대한 연산이 병렬적으로 처리되므로 연산 부담이 크게 줄어들게 된다. Meanwhile, according to an embodiment of the present disclosure, packing may be performed. If packing is used in homomorphic encryption, it becomes possible to encrypt multiple messages with a single ciphertext. In this case, when the operation device 400 performs an operation between each ciphertext, as a result, operations on a plurality of messages are processed in parallel, thereby greatly reducing the operation burden.

구체적으로는, 프로세서(450)는 메시지가 복수의 메시지 벡터로 이루어지는 경우, 복수의 메시지 벡터를 병렬적으로 암호화할 수 있는 형태의 다항식으로 변환한 후, 그 다항식에 스케일링 팩터를 승산하고 공개키를 이용하여 동형 암호화할 수도 있다. 이에 따라, 프로세서(450)는 복수의 메시지 벡터를 패킹한 암호문을 생성할 수 있다. Specifically, when a message consists of a plurality of message vectors, the processor 450 converts the plurality of message vectors into a polynomial in a form that can be encrypted in parallel, and then multiplies the polynomial by a scaling factor and generates a public key. It can also be used for homomorphic encryption. Accordingly, the processor 450 may generate a ciphertext in which a plurality of message vectors are packed.

그리고 프로세서(450)는 동형 암호문에 대한 복호가 필요한 경우, 동형 암호문에 비밀키를 적용하여 다항식 형태의 복호문을 생성하고, 다항식 형태의 복호문을 디코딩하여 근사 메시지를 생성할 수 있다. 이때 생성한 근사 메시지는 앞서 설명한 수학식 1에서 언급한 바와 같이 에러를 포함할 수 있다. In addition, when decryption of the homomorphic ciphertext is required, the processor 450 may generate a polynomial-type decrypted text by applying a secret key to the isomorphic ciphertext, and may generate an approximate message by decoding the polynomial-type decrypted text. In this case, the generated approximation message may include an error as described in Equation 1 described above.

그리고 프로세서(450)는 암호문에 대한 연산을 수행할 수 있다. 구체적으로, 프로세서(450)는 동형 암호문에 대해서 암호화된 상태를 유지한 상태에서 덧셈, 뺄셈, 또는 곱셈 등의 연산을 수행할 수 있다. And the processor 450 may perform an operation on the ciphertext. Specifically, the processor 450 may perform an operation such as addition, subtraction, or multiplication while maintaining an encrypted state with respect to the homomorphic ciphertext.

또한, 프로세서(450)는 암호문에 대해서도 덧셈, 뺄셈 또는 곱셈 이외의 연산을 갖는 다항식에 대한 연산을 수행할 수 있다. 구체적으로, 동형 암호문은 덧셈, 뺄셈, 곱셈에 대해서는 닫혀있으나, 이외의 연산에 대해서는 닫혀있지 않다. 따라서, 덧셈, 뺄셈, 곱셈 이외의 연산에 대해서는 상술한 3개의 연산으로 표현되는 근사 연산식을 이용하여야 한다. 여기서 근사 연산식은 낮은 복잡도를 갖도록 잘 구조화된 잘 구조화된 다항식(well-structured polynomials), 즉 합성 함수를 이용할 수 있다. Also, the processor 450 may perform an operation on a polynomial having an operation other than addition, subtraction, or multiplication on the ciphertext. Specifically, the homomorphic ciphertext is closed for addition, subtraction, and multiplication, but is not closed for other operations. Therefore, for operations other than addition, subtraction, and multiplication, an approximate expression expressed by the above-described three operations should be used. Here, the approximation expression may use well-structured polynomials that are well-structured to have low complexity, that is, a synthesis function.

그리고 프로세서(450)는 복수의 동형 암호문에 대한 정렬을 수행할 수 있다. 구체적으로, 프로세서(450)는 5-way 정렬기를 이용하여 복수의 동형 암호문에 대한 정렬을 수행할 수 있다. 이때, 프로세서(450)는 복수개의 5-way 정렬기를 이용하여 상술한 정렬 동작을 병렬적으로 수행할 수 있다. 5-way 정렬기의 구체적인 동작 및 구성에 대해서는 도 3을 참조하여 이하에서 설명한다. In addition, the processor 450 may align a plurality of homomorphic ciphertexts. Specifically, the processor 450 may perform sorting on a plurality of isomorphic ciphertexts using a 5-way sorter. In this case, the processor 450 may perform the above-described sorting operation in parallel using a plurality of 5-way sorters. A detailed operation and configuration of the 5-way aligner will be described below with reference to FIG. 3 .

그리고 프로세서(450)는 연산이 완료되면, 연산 결과 데이터로부터 유효 영역의 데이터를 검출할 수 있다. 구체적으로, 프로세서(450)는 연산 결과 암호문 내의 근사 메시지 비중이 임계치를 초과하면, 암호문에 대한 재부팅 동작을 수행할 수 있다. In addition, when the operation is completed, the processor 450 may detect data of the effective area from the operation result data. Specifically, the processor 450 may perform a reboot operation on the ciphertext when the weight of the approximate message in the ciphertext exceeds the threshold as a result of the operation.

도 3은 본 개시의 연산 장치의 정렬 동작을 설명하기 위한 도면이다. 3 is a diagram for explaining an alignment operation of the arithmetic device of the present disclosure.

도 3을 참조하면, 5-way 정렬기(500)가 개시된다. 이러한 5-way 정렬기(500)는 5개의 동형 암호문을 한 번의 스테이지에서 정렬할 수 있다. Referring to FIG. 3 , a 5-way aligner 500 is disclosed. This 5-way sorter 500 can align five homomorphic ciphertexts in one stage.

이러한, 5-way 정렬기(500)는 2개 내지 4개의 동형 암호문도 한 번의 스테이지를 이용하여 정렬 가능하다. 이하에서는 설명을 용이하게 하기 위하여, 우선 2개의 동형 암호문에 대한 정렬 동작을 설명하고, 3개 내지 5개의 동형 암호문에 대한 정렬 방식은 도 7 내지 9를 참조하여 후술한다. Such a 5-way sorter 500 can align two to four homomorphic ciphertexts using one stage. Hereinafter, in order to facilitate the description, the sorting operation for two homomorphic ciphertexts will be first described, and the sorting method for 3 to 5 homomorphic ciphertexts will be described later with reference to FIGS. 7 to 9 .

먼저, 2개의 동형 암호문의 정렬 방법을 설명한다. First, an arrangement method of two homomorphic ciphertexts will be described.

5-way 정렬기(500)는 제1 동형 암호문과 제2 동형 암호문이 입력된 경우, 두 동형 암호문 중 큰 값을 갖는 동형 암호문을 제1 출력 값으로 출력하고, 작은 값을 갖는 동형 암호문을 제2 출력 값을 출력할 수 있다. When the first homomorphic ciphertext and the second homomorphic ciphertext are input, the 5-way sorter 500 outputs the isomorphic ciphertext having a larger value among the two homomorphic ciphertexts as the first output value, and removes the homomorphic ciphertext having a small value. 2 Output values can be output.

이러한 정렬을 위해서는 선행적으로 두 동형 암호문의 비교가 필요한데, 본 개시에서는 근사 부호 함수를 이용하고, 이러한 근사 부호 함수와 두 입력 값의 곱의 연산으로 비교 함수를 구현하였다. 근사 부호 함수는 수학식 10과 같이 표현되며, 비교 함수는 수학식 11과 같이 표현될 수 있다. For such alignment, it is necessary to compare two homomorphic ciphertexts in advance. In the present disclosure, an approximate sign function is used, and the comparison function is implemented by the operation of the approximate sign function and the product of two input values. The approximate sign function may be expressed as Equation 10, and the comparison function may be expressed as Equation 11.

[수학식 10][Equation 10]

Figure 112020031178455-pat00011
Figure 112020031178455-pat00011

여기서, a, b는 동형 암호문이다. Here, a and b are homomorphic ciphertexts.

[수학식 11][Equation 11]

La>b(a, b) = (a > b)·a + (a < b)·bL a>b (a, b) = (a > b) a + (a < b) b

여기서, La>b(a, b)는 입력된 두 동형 암호(a, b) 중 큰 값을 출력하는 비교 함수이다. 예를 들어, a > b이면 a를 반환하고, a < b이면 b를 반환할 수 있다. 그리고 근사 부호 함수(a > b)는 동형 암호문의 비교에 따라 수학식 10과 같은 값을 산출하는 부호 함수이다.Here, L a>b (a, b) is a comparison function that outputs the larger value among the two input homomorphic ciphers (a, b). For example, you can return a if a > b and return b if a < b. And the approximate sign function (a > b) is a sign function that calculates the same value as in Equation 10 according to the comparison of homomorphic ciphertexts.

그리고 두 값 중 큰 값과 작은 값은 max(a, b), min(a, b)으로 산출될 수 있는데, max(a, b), min(a, b) 각각은 상술한 근사 부호 함수를 이용하여 다음과 같이 나타낼 수 있다. And the larger value and the smaller value of the two values can be calculated as max(a, b) and min(a, b). Each of max(a, b) and min(a, b) uses the above-described approximate sign function It can be expressed using

[수학식 12][Equation 12]

max(a, b) = (a > b)·a + (a < b)·bmax(a, b) = (a > b) a + (a < b) b

min(a, b) = (a > b)·b + (a < b)·amin(a, b) = (a > b) b + (a < b) a

여기서, max(a, b)는 상술한 비교 함수와 동일함을 확인할 수 있다. 그리고 최소값은 비교 함수를 이용하지 않고, max(a, b)의 출력 값과 입력 값들과의 연산으로 산출될 수 있다. 이러한 동작을 통하여 두 값 중 최대 값과 최소 값을 동시에 출력하는 함수는 다음과 같이 나타낼 수 있다. Here, it can be seen that max(a, b) is the same as the above-described comparison function. In addition, the minimum value may be calculated by calculating the output value of max(a, b) and the input values without using a comparison function. A function that simultaneously outputs the maximum value and the minimum value among two values through this operation can be expressed as follows.

[수학식 13][Equation 13]

LT(a>b)(a, b) = (La>b(a, b), a + b - La>b(a, b))LT (a>b) (a, b) = (L a>b (a, b), a + b - L a>b (a, b))

여기서, LT(a>b)(a, b)는 두 값 중 최대 값과, 최소 값을 동시에 출력하는 함수이다. Here, LT (a>b) (a, b) is a function that simultaneously outputs the maximum value and the minimum value among the two values.

한편, 부호 함수는 덧셈, 뺄셈, 곱셈으로 표현할 수 없는 비다항식 연산이다. 따라서, 본 개시에서는 동형 암호문에 부호 함수를 적용하기 위하여, 근사 부호 함수를 이용한다. On the other hand, the sign function is a non-polynomial operation that cannot be expressed by addition, subtraction, and multiplication. Therefore, in the present disclosure, in order to apply the sign function to the homomorphic ciphertext, an approximate sign function is used.

예를 들어, 근사 부호 함수는 다양한 형태가 이용될 수 있는데, 본 개시에서는 낮은 복잡도를 갖도록 잘 구조화된 합성 함수를 이용한다. 여기서 이용하는 합성 함수는 0이 아닌 입력 값에서의 함수 출력 값이 수평 하도록 하는 합성 함수(f(x)) 즉, 0보다 큰 입력 값에 대해서는 출력 값이 1에 가까워지고, 0보다 작은 입력 값에 대해서는 출력 값이 -1에 가까워지도록 하는 합성 함수), 0이 아닌 입력 값에서 함수 출력 값이 수평 하도록 하는 합성 함수(g(x))일 수 있다. For example, various forms of the approximate sign function may be used. In the present disclosure, a well-structured composition function with low complexity is used. The composition function used here is a composition function (f(x)) that makes the output value of the function at a non-zero input value horizontal, that is, for an input value greater than 0, the output value approaches 1, It may be a composition function that makes the output value close to -1), or a composition function that makes the output value of the function horizontal at a non-zero input value (g(x)).

상술한 두 합성 함수(f(x), g(x)의 예는 수학식 14와 같다. Examples of the above-described two synthesis functions f(x) and g(x) are shown in Equation 14.

[수학식 14][Equation 14]

f3(x) = (35x - 35x3 + 21x5 - 5x7)/24 f 3 (x) = (35x - 35x 3 + 21x 5 - 5x 7 )/2 4

g3(x) = (4589x - 16577x3 + 25614x5 - 12860x7)/210 g 3 (x) = (4589x - 16577x 3 + 25614x 5 - 12860x 7 )/2 10

구현시에는 상술한 f(x), g(x)를 복수회 반복 적용하여 근사 부호 함수를 구현할 수 있다. 본 개시에서 사용하는 근사 부호 함수의 형태에 대해서는 도 4 및 도 5를 참조하여 후술한다. In implementation, the approximate sign function may be implemented by repeatedly applying the above-described f(x) and g(x) a plurality of times. The form of the approximate sign function used in the present disclosure will be described later with reference to FIGS. 4 and 5 .

이와 같이, 본 개시의 5-way 정렬기(500)는 상술한 합성 함수로 구현된 근사 부호 함수로 정렬을 수행할 수 있다. 3개 이상의 동형 암호문에 대한 정렬 동작에 대해서는 도 7, 8, 9를 참조하여 후술하고, 이하에서는 2-way 정렬기를 이용하지 않고, 5-way 정렬기를 이용하여 대량의 동형 암호문을 정렬하는 이유에 대해서 설명한다. As such, the 5-way sorter 500 of the present disclosure may perform sorting with an approximate sign function implemented as the above-described synthesis function. The sorting operation for three or more homomorphic ciphertexts will be described later with reference to FIGS. 7, 8, and 9. Hereinafter, not using a 2-way sorter, but using a 5-way sorter to sort a large amount of homomorphic ciphertext. explain about

본 개시의 주된 기술적 특징은 복수의 동형 암호문에 대한 정렬을 수행하는 과정에서 오버헤드를 줄이는 것이다. The main technical feature of the present disclosure is to reduce overhead in the process of performing sorting on a plurality of homomorphic ciphertexts.

우선 정렬기는 비교 대상 간의 모든 비교 동작이 수행되어야 지만, 입력 데이터에 대한 정렬이 가능하다. 예를 들어, a > b 및 a > c 인 조건에서, b와 c의 비교 조건이 없다면, a, b 및 c를 정렬할 수 없다. 따라서, k 개의 동형암호문에 대한 정렬을 위해서는

Figure 112020031178455-pat00012
번의 비교가 요구된다. First, in the sorter, all comparison operations between comparison objects must be performed, but it is possible to sort input data. For example, in the condition that a > b and a > c, if there is no comparison condition between b and c, a, b, and c cannot be sorted. Therefore, for sorting of k homomorphic ciphertexts,
Figure 112020031178455-pat00012
comparison is required.

만약, SIMD(Single Instruction, Multiple Data)을 적용한다면, k 슬롯을 갖는 비교는

Figure 112020031178455-pat00013
번 만큼이 소요된다. 즉, 비교를 병렬로 진행할 수 있는 경우에, 비교 연산에서 필요한 회수는
Figure 112020031178455-pat00014
이다. If SIMD (Single Instruction, Multiple Data) is applied, the comparison with k slots is
Figure 112020031178455-pat00013
times it takes That is, if the comparison can be performed in parallel, the number of times required in the comparison operation is
Figure 112020031178455-pat00014
to be.

한편, 동형 암호문에 대한 비교 동작시에 다양한 연산 처리가 수행되는데, 정렬 동작시에 가장 많은 시간이 소요되는 동작은 재부팅 동작이다. 따라서, 재부팅 연산을 병렬 처리할 수 있다면, 두 번의 비교 동작의 소요 시간과 한 번의 비교 동작의 소요 시간은 차이가 크지 않는다. On the other hand, various arithmetic processing is performed during the comparison operation for the homomorphic ciphertext, and the operation that takes the most time during the sort operation is the reboot operation. Therefore, if the reboot operation can be processed in parallel, the difference between the time required for two comparison operations and the time required for one comparison operation is not large.

이러한 점을 고려하여, 본 개시는 2개의 재부팅 동작이 한번에 수행될 수 있도록 하였으며, 그에 따라 상술한 비교 연산에서 필요한 회수

Figure 112020031178455-pat00015
=2인바, k는 5가 된다. 이에 따라 본 개시에서는 한 스테이지에서 5개의 동형 암호문을 비교하는 5-way 정렬기를 이용한다. In consideration of this point, the present disclosure enables two rebooting operations to be performed at once, and accordingly, the number of times required in the above-described comparison operation.
Figure 112020031178455-pat00015
= 2, so k becomes 5. Accordingly, the present disclosure uses a 5-way sorter that compares five homomorphic ciphertexts in one stage.

이하에서는 2개의 재부팅 동작을 한번에 수행할 수 있는 이유에 대해서 간단히 설명한다. Hereinafter, the reason why two rebooting operations can be performed at once will be briefly described.

두 암호문(ct1, ct2)에 대한 부트 스트래핑이 필요하면, 제2 암호문(ct2)에 i가 승산하고, 제1 암호문(ct1)에 i가 승산된 제2 암호문(ct2)이 더하여 하나의 암호문(c = c1 + ic2)을 산출할 수 있다. If bootstrapping is required for two ciphertexts (ct 1 , ct 2 ), the second ciphertext (ct 2 ) is multiplied by i, and the second ciphertext (ct 2 ) obtained by multiplying the first ciphertext (ct 1 ) by i by i In addition, one ciphertext (c = c 1 + i c 2 ) can be produced.

이후에 합산된 값(c = c1 + ic2)에 대한 재부팅 동작이 수행될 수 있으며, 상술한 수학식 15과 같은 연산을 통하여 제1 암호문에 대한 재부팅 값(c1), 제2 암호문에 대한 재부팅 값(c2)을 산출할 수 있다. Thereafter, a reboot operation may be performed for the summed value (c = c 1 + i c 2 ), and the reboot value (c 1 ) for the first ciphertext and the second ciphertext may be performed through the operation as in Equation 15 above. A reboot value (c 2 ) can be calculated for .

[수학식 15][Equation 15]

Figure 112020031178455-pat00016
Figure 112020031178455-pat00016

이와 같이 동형 암호문은 실수부와 허수부를 가지며, 실제 값은 실수부에 위치한다는 점을 착안하여 두 동형 암호문을 하나의 재부팅 동작을 통하여 수행할 수 있다. As such, the homomorphic ciphertext has a real part and an imaginary part, and the two homomorphic ciphertexts can be performed through a single reboot operation by taking the fact that the actual value is located in the real part.

그리고 이와 같이 한번에 5개의 동형 암호문을 정렬할 수 있는바, 한번에 2개의 동형 암호문을 정렬하는 경우보다 전체 스테이지 수를 줄일 수 있다. And since it is possible to sort 5 homomorphic ciphertexts at once in this way, the total number of stages can be reduced compared to the case of aligning two homomorphic ciphertexts at once.

입력 데이터가 n = km 인 경우, 정렬에 필요한 스테이지 수(Nn,k)는 다음과 같다. When the input data is n = k m , the number of stages required for sorting (N n,k ) is as follows.

[수학식 16][Equation 16]

Figure 112020031178455-pat00017
Figure 112020031178455-pat00017

예를 들어, k가 2인 경우와 5인 경우를 비교하면, 각 경우의 스테이지 비율은 다음과 같다. For example, if a case where k is 2 and a case where k is 5 is compared, the stage ratio in each case is as follows.

[수학식 17][Equation 17]

Figure 112020031178455-pat00018
Figure 112020031178455-pat00018

이와 같이 입력 데이터가 충분히 큰 경우에, 2-way 정렬기를 이용하는 것보다 5-way 정렬기를 사용함으로써 전체 스테이지 수를 44% 줄일 수 있게 된다. As such, when the input data is large enough, the total number of stages can be reduced by 44% by using a 5-way sorter rather than using a 2-way sorter.

이와 같이 본 개시의 5-way 정렬기는 상술한 합성 함수와 입력 함수 간의 다항식 연산을 통하여 정렬 동작을 수행하게 된다. As described above, the 5-way sorter of the present disclosure performs the sorting operation through the polynomial operation between the above-described synthesis function and the input function.

한편, 각 동형 암호문(10, 20, 30, 40, 50)은 근사 메시지 영역(11, 21, 31, 41, 51)을 각각 포함할 수 있다. 근사 메시지 영역(11, 21, 31, 41, 51)에는 메시지 및 에러(m1+e1, m2+e2, m3+e3, m4+e4, m5+e5)가 함께 들어가 있다.On the other hand, each homomorphic ciphertext 10, 20, 30, 40, 50 may include approximate message areas 11, 21, 31, 41, 51, respectively. Messages and errors (m1+e1, m2+e2, m3+e3, m4+e4, m5+e5) are included in the approximate message areas 11, 21, 31, 41, and 51 together.

따라서, 정렬 동작을 통하여 연산이 반복되면, 동형 암호문은 근사 메시지 영역이 커지고, 남은 평문 공간이 줄어들게 된다. Therefore, if the operation is repeated through the sorting operation, the approximate message area of the homomorphic ciphertext increases and the remaining plaintext space decreases.

정렬 이후에도 연산이 수행될 필요가 있는바, 또는 정렬을 수행하기 위한 연산 과정 중에 평문 공간이 한계치보다 작아지게 되면, 5-way 정렬기(500)는 각 동형 암호문에 대한 재부팅 동작을 수행할 수 있다. If the operation needs to be performed even after sorting, or if the plaintext space becomes smaller than the limit value during the computation process for performing the sorting, the 5-way sorter 500 may perform a reboot operation for each homomorphic ciphertext. .

한편, 도시된 예에서는 정렬 동작 이후에 재부팅 동작을 수행하는 것으로 도시하였지만, 구현시에는 5-way 정렬기 내에서 상술한 재부팅 동작이 수행될 수 있다. On the other hand, although the illustrated example shows that the rebooting operation is performed after the sorting operation, in implementation, the above-described rebooting operation may be performed in the 5-way sorter.

도 4 및 도 5는 부호 함수와 관련된 다양한 합성 함수의 형태를 도시한 도면이다. 구체적으로, 도 4는 f(x)와 g(x)를 도시한 도면이고, 도 5는 f(x)와 g(x)를 조합한 합성 함수를 도시하 도면이다. 4 and 5 are diagrams illustrating the types of various synthesis functions related to a sign function. Specifically, FIG. 4 is a diagram illustrating f(x) and g(x), and FIG. 5 is a diagram illustrating a synthesis function combining f(x) and g(x).

도 4를 참조하면, f(x)는 끝단의 오차는 작지만 작은 기울기를 가짐을 확인할 수 있다. 그리고 g(x)는 f(x)보다 큰 기울기를 갖지만, 양 끝단에서 오차가 발생함을 확인할 수 있다. 따라서, 초기에는 g(x) 합성 함수를 이용하고, 후기에는 f(x)의 합성 함수를 이용하는 경우, 즉 도 5와 같은 방식으로 이용한 조합된 합성 함수를 이용하면, 하나의 합성 함수만을 이용하는 것보다 동일한 반복횟수 대비보다 이상적인 형태를 가질 수 있다. Referring to FIG. 4 , it can be confirmed that f(x) has a small inclination although the error at the end is small. And it can be seen that g(x) has a larger slope than f(x), but an error occurs at both ends. Therefore, in the case of using the g(x) composition function in the initial stage and the composition function of f(x) in the latter stage, that is, if the combined composition function used in the same way as in FIG. 5 is used, only one composition function is used. It can have an ideal shape than a more equal number of repetitions.

한편, 상술한 g(x)와 f(x)의 차수는 n일 수 있다. 그러나 f4(= 35/128) 및 g4 (= 46623/1024)의 선행 계수가 양수이므로, 입력 x의 절대 값이 1보다 큰 경우 f4 및 g4 'S의 조성이 달라질 수 있다. 예를 들어, 입력 x가 1에 가까우면 첨부된 오류로 인해 비교 결과가 분기되어 잘못된 출력이 발생할 수 있다. Meanwhile, the above-described orders of g(x) and f(x) may be n. However, since the leading coefficients of f4 (= 35/128) and g4 (= 46623/1024) are positive, the composition of f4 and g4'S may be different if the absolute value of the input x is greater than 1. For example, if the input x is close to 1, the appended error can branch the comparison result, resulting in erroneous output.

따라서, 본 개시에서는 n을 짝수 값이 아닌 홀수 값 중 최적의 값인 3을 이용한다. (x > y)에 대한 연산은 주어진 반복 수 df, dg에 의해 다음과 같은 수학식 18로 계산될 수 있다. Accordingly, in the present disclosure, 3, which is an optimal value among odd values, not even values, is used for n. The operation for (x > y) can be calculated by the following Equation 18 by the given number of iterations df and dg.

[수학식 18][Equation 18]

Figure 112020031178455-pat00019
Figure 112020031178455-pat00019

여기서 f(d)는 f○f○f…○f D 회번 수행하는 것을 의미한다. where f (d) is f○f○f... ○f It means to perform D times.

이와 같은 합성 함수를 사용함으로써, 즉 잘 구조화된 다항식을 이용함으로써,

Figure 112020031178455-pat00020
정확도에 대응하여 비교적 낮은
Figure 112020031178455-pat00021
또는
Figure 112020031178455-pat00022
복잡도(complexity)로 부호 함수를 근사할 수 있게 된다. By using a composition function like this, i.e. a well-structured polynomial,
Figure 112020031178455-pat00020
Corresponding to the accuracy, relatively low
Figure 112020031178455-pat00021
or
Figure 112020031178455-pat00022
It is possible to approximate the sign function with complexity.

도 6은 대량의 동형 암호문에 대한 정렬 동작을 설명하기 위한 도면이다. 구체적으로, 52개의 데이터에 대한 5-way 정렬 방식을 설명하기 위한 도면이다. 6 is a diagram for explaining the sorting operation for a large amount of homomorphic ciphertext. Specifically, it is a diagram for explaining a 5-way sorting method for 5 2 pieces of data.

도 6을 참조하면, 각 줄은 5-way 정렬기를 나타내며, 각 줄의 점은 5-way 정렬기의 입력 값을 나타낸다. 좌측의 5개의 화살은 이웃하는 5개 암호문 정렬하는 메인 스테이지이고, 오른쪽 화살표는 최소부터 최대까지의 정렬 방향을 나타낸다. Referring to FIG. 6 , each line represents a 5-way sorter, and dots on each line represent input values of the 5-way sorter. The five arrows on the left are the main stage for aligning the five neighboring ciphertexts, and the arrows on the right indicate the sorting direction from minimum to maximum.

5-way 정렬 알고리즘은 5i 길이의 정렬된 어레이를 생성하기 위하여, 반복적으로 5i-1 길이의 정렬된 어레이 5개를 병합하여 동시에 적용함으로써 임의 값(m)에 대한 길이 5m 행렬을 배열할 수 있다. The 5-way sorting algorithm arranges a 5 m long matrix for a random value (m) by iteratively merging 5 sorted arrays of 5 i -1 length and simultaneously applying them to create an ordered array of length 5 i can do.

이러한 5-way 알고리즘은 5-way 정렬기뿐만 아니라, 2-way 정렬기, 3-way 정렬기 및 4-way 정렬기로도 동작할 수 있다. 2개의 동형 암호문에 대한 정렬은 이미지 도 3과 관련하여 설명하였으며, 3개 내지 5개의 동형 암호문에 대한 정렬 방식은 도 7 내지 도 9을 참조하여 후술한다. This 5-way algorithm can operate not only as a 5-way sorter, but also as a 2-way sorter, a 3-way sorter, and a 4-way sorter. Alignment of two homomorphic ciphertexts has been described with reference to FIG. 3 of the image, and an alignment method of 3 to 5 homomorphic ciphertexts will be described later with reference to FIGS. 7 to 9 .

예를 들어, m=2인 경우에 52개의 동형 암호문에 대한 정렬은 도시된 바와 같이, 5-way 정렬기 5개를 병렬적으로 이용하여, 정렬 처리를 수행할 수 있다. For example, for m=2, 5 for 2 homomorphic ciphertexts As shown in the figure, sorting can be performed by using five 5-way sorters in parallel.

도 7은 3개의 동형 암호문에 대한 정렬 동작을 설명하기 위한 도면이다. 7 is a diagram for explaining the sorting operation for three homomorphic ciphertexts.

도 7을 참조하면, 5-way 정렬기(500)는 제1 내지 제3 동형 암호문(a, b, c)이 입력된 경우에 LT 비교 함수를 이용하여 제1 동형 암호문(a)과 제2 동형 암호문(b) 중 큰 값(max) 및 작은 값(min)을 산출할 수 있다. Referring to FIG. 7 , the 5-way sorter 500 uses the LT comparison function when the first to third isomorphic ciphertexts (a, b, c) are input to the first isomorphic ciphertext (a) and the second A large value (max) and a small value (min) of the homomorphic ciphertext (b) can be calculated.

이후에, 5-way 정렬기(500)는 산출된 큰 값(max)과 제3 동형 암호문(c)을 입력하여 셋 중에 가장 큰 값(w1) 산출할 수 있다. Thereafter, the 5-way sorter 500 may input the calculated large value (max) and the third isomorphic ciphertext (c) to calculate the largest value (w1) among the three.

그리고 5-way 정렬기(500)는 산출된 작은 값(min)과 제3 동형 암호문(c)을 비교 함수에 입력하여 셋 중에 가장 작은 값(w3)을 산출할 수 있다. In addition, the 5-way sorter 500 may input the calculated small value (min) and the third isomorphic ciphertext (c) into the comparison function to calculate the smallest value (w3) among the three.

그리고 5-way 정렬기(500)는 연산(w2 = a + b + c - w1 - w3)을 통하여 중간 값(w2)을 산출할 수 있다. And the 5-way sorter 500 may calculate the intermediate value w2 through the operation (w2 = a + b + c - w1 - w3).

이러한 연산 동작을 통하여, 5-way 정렬기(500)는 입력된 세 개의 동형 암호문(a, b, c)을 정렬하여 가장 큰 값, 중간 값, 및 가장 작은 값 각각을 제1 출력값(w1), 제2 출력 값(w2), 및 제3 출력값(w3)으로 출력할 수 있다. Through this operation operation, the 5-way sorter 500 aligns the input three isomorphic ciphertexts (a, b, c) and sets each of the largest value, the median value, and the smallest value to the first output value (w1) , the second output value w2, and the third output value w3 may be output.

도 8은 4개의 동형 암호문에 대한 정렬 동작을 설명하기 위한 도면이다. 8 is a diagram for explaining an alignment operation for four homomorphic ciphertexts.

도 8을 참조하면, 5-way 정렬기(500)는 제1 내지 제4 동형 암호문(a, b, c, d)이 입력되면, 우선 4개의 암호문을 두 그룹으로 구분하고, 각 그룹 내의 비교 동작을 먼저 수행할 수 있다. Referring to Figure 8, the 5-way sorter 500, when the first to fourth homomorphic ciphertexts (a, b, c, d) are input, first divides the four ciphertexts into two groups, and compares within each group You can do the action first.

구체적으로, 5-way 정렬기(500)는 LT 비교 함수를 이용하여 A 그룹 내의 제1 동형 암호문(a)과 제2 동형 암호문(b)에 대한 큰 값(max1) 및 작은 값(min1)을 산출할 수 있다. Specifically, the 5-way sorter 500 calculates a large value (max1) and a small value (min1) for the first isomorphic ciphertext (a) and the second isomorphic ciphertext (b) in group A using the LT comparison function. can be calculated.

그리고 5-way 정렬기(500)는 LT 비교함수를 이용하여 B 그룹 내의 제3 동형 암호문(c)과 제2 동형 암호문(d) 중 큰 값(max2) 및 작은 값(min2)을 산출할 수 있다.And the 5-way sorter 500 can calculate the large value (max2) and the small value (min2) among the third isomorphic ciphertext (c) and the second isomorphic ciphertext (d) in group B using the LT comparison function. have.

그리고 5-way 정렬기(500)는 A 그룹의 큰 값(max1)과 B 그룹의 작은 값(min2) 중 작은 값(x1)을 산출하고, A 그룹의 작은 값(min1)과 B 그룹의 큰 값(max2) 중 작은 값(x2)를 산출할 수 있다. And the 5-way sorter 500 calculates the smaller value (x1) of the large value (max1) of group A and the small value (min2) of group B, and the small value (min1) of group A and the large value of group B A smaller value x2 among the values max2 may be calculated.

이후에, 5-way 정렬기(500)는 산출된 각 그룹의 큰 값(max1, max2)을 비교하여 가장 큰 값(w1)을 산출할 수 있다. Thereafter, the 5-way sorter 500 may calculate the largest value w1 by comparing the calculated large values max1 and max2 of each group.

그리고 5-way 정렬기(500)는 산출된 작은 값(x1, x2)을 비교하여 두 번째 큰 값(w2)을 산출할 수 있다. And the 5-way sorter 500 may calculate a second large value (w2) by comparing the calculated small values (x1, x2).

그리고 5-way 정렬기(500)는 산출된 각 그룹의 작은 값(min1, min2)을 비교하여 가장 작은 값(w4)을 산출할 수 있다. And the 5-way sorter 500 may calculate the smallest value (w4) by comparing the calculated small values (min1, min2) of each group.

그리고 5-way 정렬기(500)는 연산(w3 = a + b + c + d - w1 - w2 - w4)을 통하여 세번째 큰 값(w3)을 산출할 수 있다. And the 5-way sorter 500 may calculate the third large value w3 through the operation (w3 = a + b + c + d - w1 - w2 - w4).

이러한 연산 동작을 통하여, 5-way 정렬기(500)는 입력된 네 개의 동형 암호문(a, b, c, d)을 정렬하여 가장 큰 값, 두번째 값, 세번째 값 및 가장 작은 값 각각을 제1 출력값(w1), 제2 출력 값(w2), 제3 출력 값(w3) 및 제4 출력값(w4)으로 출력할 수 있다. Through this operation operation, the 5-way sorter 500 aligns the input four isomorphic ciphertexts (a, b, c, d) and sets each of the largest value, the second value, the third value, and the smallest value to the first The output may be performed as the output value w1 , the second output value w2 , the third output value w3 , and the fourth output value w4 .

도 9는 5개의 동형 암호문에 대한 정렬 동작을 설명하기 위한 도면이다. 9 is a diagram for explaining the sorting operation for five homomorphic ciphertexts.

도 9를 참조하면, 5-way 정렬기(500)는 제1 내지 제5 동형 암호문(a, b, c, d, e)이 입력된 경우에, 우선 45의 암호문을 2그룹으로 구분하고, 그룹별 비교 동작을 먼저 수행할 수 있다. Referring to FIG. 9 , the 5-way sorter 500 divides the first to fifth homomorphic ciphertexts (a, b, c, d, e) into two groups, A comparison operation for each group may be performed first.

예를 들어, 5-way 정렬기(500)는 A 그룹 내의 제1 내지 제3 동형 암호문(a, b, c)에 대해서 3-way 정렬 방식을 이용하여 큰 값(max1), 중간 값(mid1), 작은 값(min1)을 산출할 수 있다. For example, the 5-way sorter 500 uses a 3-way sorting method for the first to third homomorphic ciphertexts (a, b, c) in the group A using a large value (max1), a medium value (mid1) ), a small value (min1) can be calculated.

그리고 5-way 정렬기(500)는 제4 및 제5 동형 암호문(d, e)에 대해서 LT 비교 함수를 이용하여 큰 값(max2) 및 작은 값(min2)을 산출할 수 있다. And the 5-way sorter 500 may calculate a large value (max2) and a small value (min2) for the fourth and fifth homomorphic ciphertexts (d, e) using the LT comparison function.

그리고 5-way 정렬기(500)는 2번째 큰 수를 결정하기 위하여, A 그룹의 큰 값(max1)과 B 그룹의 작은 값(min2) 중 작은 값(x1)을 산출하고, A 그룹의 중간 값(mid1)과 B 그룹의 큰 값(max2) 중 작은 값(x2)를 산출할 수 있다. And the 5-way sorter 500 calculates the smaller value (x1) among the large value (max1) of group A and the small value (min2) of group B in order to determine the second largest number, and the middle of group A The smaller value (x2) of the value (mid1) and the larger value (max2) of group B can be calculated.

또한, 5-way 정렬기(500)는 2번째 작은 수(4번째 큰 수)를 결정하기 위하여, A 그룹의 작은 값(min1)과 B 그룹의 큰 값(max2) 중 큰 값(y1)을 산출하고, A 그룹의 중간 값(mid1)과 B 그룹의 작은값(min2) 중 큰 값(y2)를 산출할 수 있다. In addition, the 5-way sorter 500 selects the larger value (y1) of the small value (min1) of group A and the large value (max2) of group B in order to determine the second smallest number (the fourth largest number). is calculated, and a larger value (y2) of the middle value (mid1) of the group A and the small value (min2) of the group B may be calculated.

이후에, 5-way 정렬기(500)는 각 그룹의 큰 값(max1, max2)을 비교하여 가장 큰 값(w1)을 산출할 수 있다. Thereafter, the 5-way sorter 500 may calculate the largest value w1 by comparing the large values max1 and max2 of each group.

그리고 5-way 정렬기(500)는 산출된 두 작은 값(x1, x2)을 비교하여 두 번째 큰 값(w2)을 산출할 수 있다. In addition, the 5-way sorter 500 may calculate a second large value w2 by comparing the calculated two small values (x1, x2).

그리고 5-way 정렬기(500)는 산출된 두 큰 값(y1, y2)을 비교하여 두 번째 작은 값(w4)을 산출할 수 있다. In addition, the 5-way aligner 500 may calculate a second small value w4 by comparing the calculated two large values y1 and y2.

그리고 5-way 정렬기(500)는 각 그룹의 작은 값(min1, min2)을 비교하여 가장 작은 값(w5)을 산출할 수 있다. And the 5-way sorter 500 may calculate the smallest value (w5) by comparing the small values (min1, min2) of each group.

그리고 5-way 정렬기(500)는 연산(w3 = a + b + c + d + e - w1 - w2 - w4 - w5)을 통하여 제3 출력 값(w3)을 산출할 수 있다. And the 5-way sorter 500 may calculate the third output value w3 through the operation (w3 = a + b + c + d + e - w1 - w2 - w4 - w5).

이러한 연산 동작을 통하여, 5-way 정렬기(500)는 입력된 다섯 개의 동형 암호문(a, b, c, d, e)을 정렬하여 가장 큰 값, 두번째 값, 세번째 값, 네번째 값 및 가장 작은 값 각각을 제1 출력값(w1), 제2 출력 값(w2), 제3 출력 값(w3), 제4 출력 값(w4) 및 제5 출력값(w5)으로 출력할 수 있다. Through this operation operation, the 5-way sorter 500 aligns the input five isomorphic ciphertexts (a, b, c, d, e) with the largest value, the second value, the third value, the fourth value, and the smallest Each of the values may be output as a first output value w1 , a second output value w2 , a third output value w3 , a fourth output value w4 , and a fifth output value w5 .

한편, 도 7 내지 도 9에서 도시하고 설명한 정렬 알고리즘은 예시에 불가하며, 다른 방식이 이용될 수도 있다. On the other hand, the alignment algorithm shown and described in FIGS. 7 to 9 is not an example, and other methods may be used.

도 10은 본 개시의 일 실시 예에 따른 암호문 연산 방법을 설명하기 위한 흐름도이다. 10 is a flowchart illustrating a ciphertext calculation method according to an embodiment of the present disclosure.

도 10을 참조하면, 복수의 동형 암호문에 대한 정렬 명령을 입력받는다(S1010). 예를 들어, 복수의 동형 암호문은 상술한 수학식 1을 만족하는 암호문일 수 있다. Referring to FIG. 10 , an alignment command for a plurality of homomorphic cipher texts is received ( S1010 ). For example, the plurality of homomorphic ciphertexts may be ciphertexts satisfying Equation 1 described above.

그리고 5개의 동형 암호문을 한 번의 스테이지에서 정렬 가능한 5-way 정렬기를 이용하여 복수의 동형 암호문을 정렬한다(S1020). 이때, 복수의 동형 암호문이 6개 이상인 경우, 복수의 5-way 정렬기를 이용하여 병렬 정렬 처리를 수행할 수 있다. 여기서, 5-way 정렬기는 입력된 두 값 중 큰 값 또는 작은 값을 선택적으로 출력하는 비교 함수를 이용하여 정렬를 수행할 수 있다. And a plurality of homomorphic ciphertexts are aligned using a 5-way sorter capable of aligning five homomorphic ciphertexts in one stage (S1020). At this time, when there are six or more isomorphic ciphertexts, parallel sorting may be performed using a plurality of 5-way sorters. Here, the 5-way sorter may perform sorting using a comparison function that selectively outputs a larger value or a smaller value among two input values.

그리고 정렬 결과를 출력한다(S1030). 예를 들어, 외부 장치로부터 복수의 동형 암호문을 수신한 경우, 정렬된 결과를 정렬 순서대로 외부 장치에 전송할 수 있다. 반대로, 기저장된 복수의 동형 암호문에 대한 정렬인 경우, 상술한 정렬 동작을 통하여 저장 순서가 정렬될 것인바 상술한 출력 동작은 생략될 수 있다. Then, an alignment result is output (S1030). For example, when a plurality of homomorphic ciphertexts are received from the external device, the sorted results may be transmitted to the external device in the sort order. Conversely, in the case of sorting for a plurality of pre-stored homomorphic ciphertexts, the storage order will be sorted through the above-described sorting operation, and the above-described output operation may be omitted.

이상과 같이 본 실시 예에 따른 동형 암호문 처리 방법은 대량의 동형 암호문에 대한 정렬 처리가 가능할 뿐만 아니라, 적은 스테이지로 복수의 동형 암호문에 대한 정렬을 수행하는바 보다 빠르게 정렬을 수행할 수 있다. As described above, in the homomorphic ciphertext processing method according to the present embodiment, it is possible to not only sort a large amount of isomorphic ciphertexts, but also perform sorting faster than performing sorting on a plurality of homomorphic ciphertexts with fewer stages.

각 단계의 상세 동작에 대해서는 상술한 바 있으므로 자세한 설명은 생략하도록 한다.Since the detailed operation of each step has been described above, a detailed description thereof will be omitted.

한편, 상술한 본 개시의 다양한 실시 예들에 따른 방법들은, 기존 연산 장치(또는 전자 장치)에 설치 가능한 어플리케이션 형태로 구현될 수 있다. Meanwhile, the above-described methods according to various embodiments of the present disclosure may be implemented in the form of applications that can be installed in an existing computing device (or electronic device).

또한, 상술한 본 개시의 다양한 실시 예들에 따른 방법들은, 기존 연산 장치(또는 전자 장치)에 대한 소프트웨어 업그레이드, 또는 하드웨어 업그레이드만으로도 구현될 수 있다. In addition, the above-described methods according to various embodiments of the present disclosure may be implemented only by software upgrade or hardware upgrade of an existing computing device (or electronic device).

또한, 상술한 본 개시의 다양한 실시 예들은 연산 장치에 구비된 임베디드 서버, 또는 연산 장치 중 적어도 하나의 외부 서버를 통해 수행되는 것도 가능하다. In addition, various embodiments of the present disclosure described above may be performed through an embedded server provided in the computing device or at least one external server of the computing device.

한편, 본 개시의 일시 예에 따르면, 이상에서 설명된 다양한 실시 예들은 기기(machine)(예: 컴퓨터)로 읽을 수 있는 저장 매체(machine-readable storage media에 저장된 명령어를 포함하는 소프트웨어로 구현될 수 있다. 기기는, 저장 매체로부터 저장된 명령어를 호출하고, 호출된 명령어에 따라 동작할 수 있는 장치로서, 개시된 실시 예들에 따른 디스플레이 장치를 포함할 수 있다. 명령이 프로세서에 의해 실행될 경우, 프로세서가 직접, 또는 프로세서의 제어 하에 다른 구성요소들을 이용하여 명령에 해당하는 기능을 수행할 수 있다. 명령은 컴파일러 또는 인터프리터에 의해 생성 또는 실행되는 코드를 포함할 수 있다. 기기로 읽을 수 있는 저장 매체는, 비일시적(non-transitory) 저장매체의 형태로 제공될 수 있다. 여기서, '비일시적'은 저장매체가 신호(signal)를 포함하지 않으며 실재(tangible)한다는 것을 의미할 뿐 데이터가 저장매체에 반영구적 또는 임시적으로 저장됨을 구분하지 않는다.Meanwhile, according to a temporary example of the present disclosure, the various embodiments described above may be implemented as software including instructions stored in a machine-readable storage media readable by a machine (eg, a computer). The device is a device capable of calling a stored instruction from a storage medium and operating according to the called instruction, and may include a display device according to the disclosed embodiments. When the instruction is executed by the processor, the processor directly , or other components under the control of the processor to perform a function corresponding to the instruction. The instruction may include code generated or executed by a compiler or an interpreter. A machine-readable storage medium includes: It may be provided in the form of a non-transitory storage medium, where 'non-transitory' means that the storage medium does not include a signal and is tangible, but data is semi-permanent in the storage medium or temporarily stored.

또한, 본 개시의 일 실시 예에 따르면, 이상에서 설명된 다양한 실시 예들에 따른 방법은 컴퓨터 프로그램 제품(computer program product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다. 컴퓨터 프로그램 제품은 기기로 읽을 수 있는 저장 매체(예: compact disc read only memory (CD-ROM))의 형태로, 또는 어플리케이션 스토어(예: 플레이 스토어TM)를 통해 온라인으로 배포될 수 있다. 온라인 배포의 경우에, 컴퓨터 프로그램 제품의 적어도 일부는 제조사의 서버, 어플리케이션 스토어의 서버, 또는 중계 서버의 메모리와 같은 저장 매체에 적어도 일시 저장되거나, 임시적으로 생성될 수 있다.In addition, according to an embodiment of the present disclosure, the method according to the various embodiments described above may be provided by being included in a computer program product. Computer program products may be traded between sellers and buyers as commodities. The computer program product may be distributed in the form of a machine-readable storage medium (eg, compact disc read only memory (CD-ROM)) or online through an application store (eg, Play Store™). In the case of online distribution, at least a portion of the computer program product may be temporarily stored or temporarily generated in a storage medium such as a memory of a server of a manufacturer, a server of an application store, or a relay server.

또한, 본 개시의 일 실시 예에 따르면, 이상에서 설명된 다양한 실시 예들은 소프트웨어(software), 하드웨어(hardware) 또는 이들의 조합을 이용하여 컴퓨터(computer) 또는 이와 유사한 장치로 읽을 수 있는 기록 매체 내에서 구현될 수 있다. 일부 경우에 있어 본 명세서에서 설명되는 실시 예들이 프로세서 자체로 구현될 수 있다. 소프트웨어적인 구현에 의하면, 본 명세서에서 설명되는 절차 및 기능과 같은 실시 예들은 별도의 소프트웨어 모듈들로 구현될 수 있다. 소프트웨어 모듈들 각각은 본 명세서에서 설명되는 하나 이상의 기능 및 동작을 수행할 수 있다.In addition, according to an embodiment of the present disclosure, the various embodiments described above are stored in a recording medium readable by a computer or a similar device using software, hardware, or a combination thereof. can be implemented in In some cases, the embodiments described herein may be implemented by the processor itself. According to the software implementation, embodiments such as the procedures and functions described in this specification may be implemented as separate software modules. Each of the software modules may perform one or more functions and operations described herein.

한편, 상술한 다양한 실시 예들에 따른 기기의 프로세싱 동작을 수행하기 위한 컴퓨터 명령어(computer instructions)는 비일시적 컴퓨터 판독 가능 매체(non-transitory computer-readable medium) 에 저장될 수 있다. 이러한 비일시적 컴퓨터 판독 가능 매체에 저장된 컴퓨터 명령어는 특정 기기의 프로세서에 의해 실행되었을 때 상술한 다양한 실시 예에 따른 기기에서의 처리 동작을 특정 기기가 수행하도록 한다. Meanwhile, computer instructions for performing the processing operation of the device according to the above-described various embodiments may be stored in a non-transitory computer-readable medium. When the computer instructions stored in the non-transitory computer-readable medium are executed by the processor of the specific device, the specific device performs the processing operation in the device according to the various embodiments described above.

비일시적 컴퓨터 판독 가능 매체란 레지스터, 캐쉬, 메모리 등과 같이 짧은 순간 동안 데이터를 저장하는 매체가 아니라 반영구적으로 데이터를 저장하며, 기기에 의해 판독(reading)이 가능한 매체를 의미한다. 비일시적 컴퓨터 판독 가능 매체의 구체적인 예로는, CD, DVD, 하드 디스크, 블루레이 디스크, USB, 메모리카드, ROM 등이 있을 수 있다.The non-transitory computer-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, etc., and can be read by a device. Specific examples of the non-transitory computer-readable medium may include a CD, DVD, hard disk, Blu-ray disk, USB, memory card, ROM, and the like.

또한, 상술한 다양한 실시 예들에 따른 구성 요소(예: 모듈 또는 프로그램) 각각은 단수 또는 복수의 개체로 구성될 수 있으며, 전술한 해당 서브 구성 요소들 중 일부 서브 구성 요소가 생략되거나, 또는 다른 서브 구성 요소가 다양한 실시 예에 더 포함될 수 있다. 대체적으로 또는 추가적으로, 일부 구성 요소들(예: 모듈 또는 프로그램)은 하나의 개체로 통합되어, 통합되기 이전의 각각의 해당 구성 요소에 의해 수행되는 기능을 동일 또는 유사하게 수행할 수 있다. 다양한 실시 예들에 따른, 모듈, 프로그램 또는 다른 구성 요소에 의해 수행되는 동작들은 순차적, 병렬적, 반복적 또는 휴리스틱하게 실행되거나, 적어도 일부 동작이 다른 순서로 실행되거나, 생략되거나, 또는 다른 동작이 추가될 수 있다.In addition, each of the components (eg, a module or a program) according to the above-described various embodiments may be composed of a single or a plurality of entities, and some sub-components of the aforementioned sub-components may be omitted, or other sub-components may be omitted. Components may be further included in various embodiments. Alternatively or additionally, some components (eg, a module or a program) may be integrated into a single entity to perform the same or similar functions performed by each corresponding component prior to integration. According to various embodiments, operations performed by a module, program, or other component may be sequentially, parallel, repetitively or heuristically executed, or at least some operations may be executed in a different order, omitted, or other operations may be added. can

이상에서는 본 개시의 바람직한 실시 예에 대하여 도시하고 설명하였지만, 본 개시는 상술한 특정의 실시 예에 한정되지 아니하며, 청구범위에서 청구하는 본 개시의 요지를 벗어남이 없이 당해 개시에 속하는 기술분야에서 통상의 지식을 가진 자에 의해 다양한 변형실시가 가능한 것은 물론이고, 이러한 변형실시들은 본 개시의 기술적 사상이나 전망으로부터 개별적으로 이해되어져서는 안될 것이다.In the above, preferred embodiments of the present disclosure have been illustrated and described, but the present disclosure is not limited to the specific embodiments described above, and is commonly used in the technical field pertaining to the present disclosure without departing from the gist of the present disclosure as claimed in the claims. Various modifications may be made by those having the knowledge of

100: 전자 장치 200: 제1 서버 장치
300: 제2 서버 장치 400: 연산 장치
410: 통신 장치 420: 메모리
430: 디스플레이 440: 조작 입력 장치
450: 프로세서
100: electronic device 200: first server device
300: second server device 400: arithmetic unit
410: communication device 420: memory
430: display 440: operation input device
450: processor

Claims (17)

복수의 동형 암호문에 대한 정렬 명령을 입력받는 단계;
5개의 동형 암호문을 한 번의 스테이지에서 정렬 가능한 5-way 정렬기를 이용하여 상기 복수의 동형 암호문을 정렬하는 단계; 및
정렬 결과를 출력하는 단계;를 포함하며,
상기 5-way 정렬기는,
입력된 두 값 중 큰 값 또는 작은 값을 선택적으로 출력하는 비교 함수를 이용하여 정렬을 수행하는 동형 암호문 처리 방법.
receiving an alignment command for a plurality of homomorphic ciphertexts;
aligning the plurality of homomorphic ciphertexts using a 5-way sorter capable of aligning five homomorphic ciphertexts in one stage; and
Including; outputting the sort result;
The 5-way aligner,
A homomorphic ciphertext processing method in which sorting is performed using a comparison function that selectively outputs the larger or smaller value among two input values.
제1항에 있어서,
상기 정렬하는 단계는,
복수의 5-way 정렬기를 이용하여 병렬 정렬 처리를 수행하는 동형 암호문 처리 방법.
The method of claim 1,
The sorting step is
A homomorphic ciphertext processing method that performs parallel sort processing using a plurality of 5-way sorters.
삭제delete 제1항에 있어서,
상기 비교 함수는,
크기 비교에 따라 기설정된 값을 출력하는 근사 부호 함수와 입력 값의 곱의 연산으로 산출되는 동형 암호문 처리 방법.
According to claim 1,
The comparison function is
A homomorphic ciphertext processing method calculated by the operation of the product of an approximate sign function that outputs a preset value according to size comparison and an input value.
제4항에 있어서,
상기 근사 부호 함수는,
0보다 큰 입력 값에 대해서는 출력값이 1에 가까워지고, 0보다 작은 입력 값에 대해서는 출력 값이 -1에 가까워지도록 하는 합성 함수를 기설정된 횟수만큼 반복 연산한 함수인 동형 암호문 처리 방법.
5. The method of claim 4,
The approximate sign function is
A homomorphic ciphertext processing method, which is a function obtained by repeating a compound function that makes an output value close to 1 for an input value greater than 0 and an output value close to -1 for an input value less than 0 is repeated a predetermined number of times.
제5항에 있어서,
상기 근사 부호 함수는,
서로 다른 두 합성 함수 각각을 3회 반복 연산한 함수인 동형 암호문 처리 방법.
6. The method of claim 5,
The approximate sign function is
A homomorphic ciphertext processing method, which is a function that repeatedly operates two different compound functions three times.
제1항에 있어서,
상기 5-way 정렬기는,
제1 동형 암호문, 제2 동형 암호문 및 제3 동형 암호문이 입력되면, 상기 비교 함수를 이용하여 상기 제1 동형 암호문과 상기 제2 동형 암호문 중 큰 값 및 작은 값을 산출하고, 상기 비교 함수에 상기 산출된 큰 값과 상기 제3 동형 암호문을 입력하여 제1 출력 값을 출력하고, 상기 비교 함수에 상기 산출된 작은 값과 상기 제3 동형 암호문을 입력하여 제3 출력 값을 출력하고, 상기 제1 내지 제3 동형 암호문에 대한 합산 값에 상기 제1 출력 값 및 상기 제3 출력 값을 감산하여 제2 출력 값을 산출하여 출력하는 동형 암호문 처리 방법.
According to claim 1,
The 5-way aligner,
When the first isomorphic ciphertext, the second isomorphic ciphertext, and the third isomorphic ciphertext are input, a larger value and a smaller value among the first isomorphic ciphertext and the second isomorphic ciphertext are calculated using the comparison function, and the Inputting the calculated large value and the third isomorphic ciphertext to output a first output value, inputting the calculated small value and the third isomorphic ciphertext to the comparison function to output a third output value, and the first output value to a third isomorphic ciphertext processing method for calculating and outputting a second output value by subtracting the first output value and the third output value from the sum of values for the third homomorphic ciphertext.
제1항에 있어서,
상기 5-way 정렬기는,
정렬된 5개의 동형 암호문 각각의 평문 공간을 확장하는 동형 암호문 처리 방법.
According to claim 1,
The 5-way aligner,
A homomorphic ciphertext processing method that expands the plaintext space of each of five aligned homomorphic ciphertexts.
에러를 포함하는 근사 메시지에 대한 동형 암호문을 복수개 저장하는 메모리; 및
상기 복수개의 동형 암호문을 정렬하는 프로세서;를 포함하며,
상기 프로세서는,
5개의 동형 암호문을 한 번의 스테이지에서 정렬 가능한 5-way 정렬기를 이용하여 상기 복수의 동형 암호문을 정렬하며,
상기 5-way 정렬기는,
입력된 두 값 중 큰 값 또는 작은 값을 선택적으로 출력하는 비교 함수를 이용하여 정렬을 수행하는 연산 장치.
a memory for storing a plurality of isomorphic cipher texts for approximate messages including errors; and
Including; a processor for aligning the plurality of homomorphic ciphertexts;
The processor is
Sorting the plurality of homomorphic ciphertexts using a 5-way sorter capable of sorting 5 homomorphic ciphertexts in one stage,
The 5-way aligner,
An arithmetic unit that performs sorting using a comparison function that selectively outputs the larger or smaller value among two input values.
제9항에 있어서,
상기 프로세서는,
복수의 5-way 정렬기를 이용하여 병렬 정렬 처리를 수행하는 연산 장치.
10. The method of claim 9,
The processor is
A computing device that performs parallel sorting processing using a plurality of 5-way sorters.
삭제delete 제9항에 있어서,
상기 비교 함수는,
크기 비교에 따라 기설정된 값을 출력하는 근사 부호 함수와 입력 값의 곱의 연산으로 산출되는 연산 장치.
10. The method of claim 9,
The comparison function is
An arithmetic device calculated by calculating the product of an approximate sign function that outputs a preset value according to size comparison and an input value.
제12항에 있어서,
상기 근사 부호 함수는,
0보다 큰 입력 값에 대해서는 출력값이 1에 가까워지고, 0보다 작은 입력 값에 대해서는 출력 값이 -1에 가까워지도록 하는 합성 함수를 기설정된 횟수만큼 반복 연산한 함수인 연산 장치.
13. The method of claim 12,
The approximate sign function is
An arithmetic device which is a function obtained by repeatedly calculating a composition function such that an output value approaches 1 for an input value greater than 0 and an output value approaches -1 for an input value less than 0.
제13항에 있어서,
상기 근사 부호 함수는,
서로 다른 두 합성 함수 각각을 3회 반복 연산한 함수인 연산 장치.
14. The method of claim 13,
The approximate sign function is
An arithmetic unit that is a function that repeats each of two different composition functions three times.
제9항에 있어서,
상기 5-way 정렬기는,
제1 동형 암호문, 제2 동형 암호문 및 제3 동형 암호문이 입력되면, 상기 비교 함수를 이용하여 상기 제1 동형 암호문과 상기 제2 동형 암호문 중 큰 값 및 작은 값을 산출하고, 상기 비교 함수에 상기 산출된 큰 값과 상기 제3 동형 암호문을 입력하여 제1 출력 값을 출력하고, 상기 비교 함수에 상기 산출된 작은 값과 상기 제3 동형 암호문을 입력하여 제3 출력 값을 출력하고, 상기 제1 내지 제3 동형 암호문에 대한 합산 값에 상기 제1 출력 값 및 상기 제3 출력 값을 감산하여 제2 출력 값을 산출하여 출력하는 연산 장치.
10. The method of claim 9,
The 5-way aligner,
When the first isomorphic ciphertext, the second isomorphic ciphertext, and the third isomorphic ciphertext are input, a larger value and a smaller value among the first isomorphic ciphertext and the second isomorphic ciphertext are calculated using the comparison function, and the Inputting the calculated large value and the third isomorphic ciphertext to output a first output value, inputting the calculated small value and the third isomorphic ciphertext to the comparison function to output a third output value, and the first output value to a arithmetic device for calculating and outputting a second output value by subtracting the first output value and the third output value from the sum of the to third homomorphic ciphertexts.
제9에 있어서,
상기 5-way 정렬기는,
정렬된 5개의 동형 암호문 각각의 평문 공간을 확장하는 연산 장치.
The method of claim 9,
The 5-way aligner,
An arithmetic unit that expands the plaintext space of each of five aligned homomorphic ciphertexts.
동형 암호문의 처리 방법을 실행하기 위한 프로그램을 포함하는 컴퓨터 판독가능 기록 매체에 있어서,
상기 동형 암호문의 처리 방법은,
복수의 동형 암호문에 대한 정렬 명령을 입력받는 단계; 및
5개의 동형 암호문을 한 번의 스테이지에서 정렬 가능한 5-way 정렬기를 이용하여 상기 복수의 동형 암호문을 정렬하는 단계;를 포함하며,
상기 5-way 정렬기는,
입력된 두 값 중 큰 값 또는 작은 값을 선택적으로 출력하는 비교 함수를 이용하여 정렬을 수행하는 컴퓨터 판독 가능 기록 매체.
A computer-readable recording medium comprising a program for executing a method for processing homomorphic cipher text,
The processing method of the homomorphic cipher text,
receiving an alignment command for a plurality of homomorphic ciphertexts; and
Including; aligning the plurality of homomorphic ciphertexts using a 5-way sorter capable of sorting five homomorphic ciphertexts in one stage;
The 5-way aligner,
A computer-readable recording medium for performing sorting by using a comparison function that selectively outputs a larger value or a smaller value among two input values.
KR1020200036119A 2019-06-05 2020-03-25 Apparatus for sorting of approximate encrypted messages and method thereof KR102452181B1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/KR2020/007350 WO2020246848A1 (en) 2019-06-05 2020-06-05 Device and method for sorting approximately encrypted ciphertext
EP20818508.2A EP3982586A4 (en) 2019-06-05 2020-06-05 Device and method for sorting approximately encrypted ciphertext
US17/616,349 US20220255722A1 (en) 2019-06-05 2020-06-05 Practical sorting on large-scale encrypted data

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US201962857617P 2019-06-05 2019-06-05
US62/857,617 2019-06-05

Publications (2)

Publication Number Publication Date
KR20200140182A KR20200140182A (en) 2020-12-15
KR102452181B1 true KR102452181B1 (en) 2022-10-11

Family

ID=73780239

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200036119A KR102452181B1 (en) 2019-06-05 2020-03-25 Apparatus for sorting of approximate encrypted messages and method thereof

Country Status (1)

Country Link
KR (1) KR102452181B1 (en)

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Chatterjee, Ayantika 외 1명. "Sorting of Fully Homomorphic Encrypted Cloud Data: Can Partitioning be Effective?." IEEE Transactions on Services Computing 13.3 (2017.)
Feng Shi 외 2명, An Enhanced Multiway Sorting Network Based on n-Sorters, 2014 IEEE Global Conference on Signal and Information Processing (GlobalSIP) (2014.)*
정윤송 외 2명, 암호화된 데이터에 대한 프라이버시를 보존하는 k-means 클러스터링 기법, 정보보호학회논문지, Vol.28, No.6 (2018.12.)*

Also Published As

Publication number Publication date
KR20200140182A (en) 2020-12-15

Similar Documents

Publication Publication Date Title
EP3793127B1 (en) Terminal device performing homomorphic encryption, server device processing cipher text thereof, and methods thereof
KR101965628B1 (en) Terminal device for performing homomorphic encryption, server device for calculating encrypted messages, and methods thereof
KR102297536B1 (en) Apparatus for processing non-polynomial operation on encrypted messages and methods thereof
KR102393942B1 (en) Apparatus for performing quorum design on secret key and method thereof
KR102349855B1 (en) Method for encrypting or decrypting message by space complexity
JP7170878B2 (en) Apparatus and method for performing non-polynomial arithmetic on ciphertext
US20220255722A1 (en) Practical sorting on large-scale encrypted data
KR102522708B1 (en) Apparatus and method for performing statistical calculation on homomorphic ciphertext
KR102452181B1 (en) Apparatus for sorting of approximate encrypted messages and method thereof
KR20220121221A (en) Apparatus for conversion of homomorphic encrypted messase and method thereof
KR102475273B1 (en) Simulation apparatus for homomorphic encryption system and method thereof
KR102160294B1 (en) Apparatus for performing quorum design on secret key and method thereof
KR102382952B1 (en) Verifiable computing for approximate computation
KR20230003954A (en) Ciphertext processing method for zero-knowledge proof and apparatus thereof
KR20220146363A (en) Apparatus for sorting of homomorphic encrypted data and method thereof
KR102393941B1 (en) Encoding or decoding for approximate encrypted messages
US20240039695A1 (en) Electronic apparatus for generating homomorphic encrypted message and method therefor
KR102257779B1 (en) Tweaked interpolation for multiparty computation
US20230421352A1 (en) Apparatus for processing homomorphic encrypted messages and method thereof
KR20230049052A (en) Method for generating secret key of lattice electronic signature and apparatus thereof
KR20240048985A (en) method for generating homo encrypted message and apparatus for thereof

Legal Events

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