US-12620285-B2 - Method for generating homomorphic encrypted message including vote analysis data and electronic apparatus therefor
Abstract
An electronic apparatus which generates a homomorphic encrypted message by homomorphically encrypting voting analysis data includes: a processor configured to execute the at least one instruction, wherein the processor is configured to generate a vote-homomorphic encrypted message including the voting data of the voter for a first candidate and a second candidate by using a first candidate mask corresponding to the first candidate in a first election and a second candidate mask corresponding to the second candidate in a second election, for a first election-homomorphic encrypted message acquired by homomorphically encrypting the voting data of the voter in the first election and a second election-homomorphic encrypted message acquired by homomorphically encrypting the voting data in the second election, and generate a result-homomorphic encrypted message including the number of voters who select the first candidate and the second candidate by using the generated vote-homomorphic encrypted message.
Inventors
- Junbum SHIN
- Dongyeon HONG
- Jaebeom AN
Assignees
- CRYPTO LAB INC.
Dates
- Publication Date
- 20260505
- Application Date
- 20230720
- Priority Date
- 20221007
Claims (9)
- 1 . An electronic apparatus comprising: a memory storing at least one instruction and a plurality of election-homomorphic encrypted messages acquired by homomorphically encrypting voting data on votes of a plurality of voters in a plurality of elections; and a processor configured to execute the at least one instruction, wherein the processor is configured to: generate a vote-homomorphic encrypted message including the voting data of the voter for a first candidate and a second candidate by using a first candidate bin mask corresponding to the first candidate in a first election and a second candidate bin mask corresponding to the second candidate in a second election, for a first election-homomorphic encrypted message acquired by homomorphically encrypting the voting data of the voter in the first election and a second election-homomorphic encrypted message acquired by homomorphically encrypting the voting data in the second election, generate a result-homomorphic encrypted message including the number of voters who select the first candidate and the second candidate by using the generated vote-homomorphic encrypted message, generate a first vote-homomorphic encrypted message including the voting data of the respective voters for the first candidate by using the first election-homomorphic encrypted messages of the respective voters and the first candidate bin mask, generate a second vote-homomorphic encrypted message including the voting data of the respective voters for the second candidate by using the second election-homomorphic encrypted messages of the respective voters and the second candidate bin mask, and generate the vote-homomorphic encrypted message including the voting data of the voter for the first candidate and the second candidate by homomorphically multiplying the first vote-homomorphic encrypted message by the second vote-homomorphic encrypted message, wherein the first candidate bin mask has plurality of slots corresponding to each candidate running for the first election, and 1 is a value in a slot corresponding to the first candidate, and zero in the other slots among the plurality of slots of the first candidate bin mask, and the second candidate bin mask has plurality of slots corresponding to each candidate running for the second election, and 1 is a value in a slot corresponding to the second candidate, and zero in the other slots among the plurality of slots of the second candidate bin mask, wherein the processor is configured to generate a table having dimensions corresponding to the number of times of the plurality of elections, and store the result-homomorphic encrypted message in one of a plurality of cells included in the generated table, wherein each dimension of the generated table includes at least one index, and the at least one index includes information on which candidates ran in each election, and wherein the homomorphic encryption scheme supports both additive and multiplicative homomorphism, forming a structure closed under both operations.
- 2 . The apparatus as claimed in claim 1 , wherein the first election-homomorphic encrypted message or the second election-homomorphic encrypted message has at least one slot, the at least one slot of the first election-homomorphic encrypted message or the second election-homomorphic encrypted message corresponds to at least one candidate running for the first election or the second election, and 1 is a value in a slot corresponding to a candidate voted for by the voter in the first election or the second election, and zero in the other slots among the at least one slot.
- 3 . The apparatus as claimed in claim 1 , wherein the vote-homomorphic encrypted message has one slot, 1 is a value in the slot of the vote-homomorphic encrypted message in case that the voter votes for both the first candidate and the second candidate, and zero in the other cases, and the processor is configured to generate the result-homomorphic encrypted message by homomorphically summing the vote-homomorphic encrypted messages of the respective voters.
- 4 . The apparatus as claimed in claim 1 , wherein the first vote-homomorphic encrypted message or the second vote-homomorphic encrypted message has one slot, 1 is a value in the slot of the first vote-homomorphic encrypted message in case that the voter votes for the first candidate, and zero in the other cases, and 1 is a value in the slot of the second vote-homomorphic encrypted message in case that the voter votes for the second candidate, and zero in the other cases.
- 5 . A method for generating a homomorphic encrypted message including voting analysis data, the method comprising: generating a vote-homomorphic encrypted message including voting data of respective voters for a first candidate and a second candidate by using a first candidate bin mask corresponding to the first candidate in a first election and a second candidate bin mask corresponding to the second candidate in a second election, for a plurality of election-homomorphic encrypted messages acquired by homomorphically encrypting the voting data of the respective voters in a plurality of elections, and generating a result-homomorphic encrypted message including the number of voters who select the first candidate and the second candidate by using the generated vote-homomorphic encrypted message, wherein the generating of the vote-homomorphic encrypted message includes: generating a first vote-homomorphic encrypted message including the voting data of the respective voters for the first candidate by using first election-homomorphic encrypted messages acquired by homomorphically encrypting the voting data of the voters in the first election and the first candidate bin mask corresponding to the first candidate in the first election; generating a second vote-homomorphic encrypted message including the voting data of the respective voters for the second candidate by using second election-homomorphic encrypted messages acquired by homomorphically encrypting the voting data of the voters in the second election and the second candidate bin mask corresponding to the second candidate in the second election; and generating the vote-homomorphic encrypted message including the voting data of the voter for the first candidate and the second candidate by homomorphically multiplying the first vote-homomorphic encrypted message by the second vote-homomorphic encrypted message, wherein the first candidate bin mask has plurality of slots corresponding to each candidate running for the first election, and 1 is a value in a slot corresponding to the first candidate, and zero in the other slots among the plurality of slots of the first candidate bin mask, and the second candidate bin mask has plurality of slots corresponding to each candidate running for the second election, and 1 is a value in a slot corresponding to the second candidate, and zero in the other slots among the plurality of slots of the second candidate bin mask, further comprising: generating a table having dimensions corresponding to the number of times of the plurality of elections; and storing the result-homomorphic encrypted message in one of a plurality of cells included in the generated table, wherein each dimension of the generated table includes at least one index, and the at least one index includes information on which candidates ran in each election, and wherein the homomorphic encryption scheme supports both additive and multiplicative homomorphism, forming a structure closed under both operations.
- 6 . The method as claimed in claim 5 , wherein the election-homomorphic encrypted message has at least one slot corresponding to each candidate running for the first election or the second election, and 1 is a value in a slot corresponding to a candidate voted for by the voter in the first election or the second election, and zero in the other slots among the at least one slot.
- 7 . The method as claimed in claim 5 , wherein the vote-homomorphic encrypted message has one slot, 1 is a value in the slot of the vote-homomorphic encrypted message in case that the voter votes for both the first candidate and the second candidate, and zero in the other cases, and in the generating of the result-homomorphic encrypted message, the result-homomorphic encrypted message is generated by homomorphically summing the vote-homomorphic encrypted messages of the respective voters.
- 8 . The method as claimed in claim 5 , wherein the first vote-homomorphic encrypted message or the second vote-homomorphic encrypted message has one slot, 1 is a value in the slot of the first vote-homomorphic encrypted message in case that the voter votes for the first candidate, and zero in the other cases, and 1 is a value in the slot of the second vote-homomorphic encrypted message in case that the voter votes for the second candidate, and zero in the other cases.
- 9 . A non-transitory computer-readable recording medium which includes a program for executing a method for generating a homomorphic encrypted message including voting analysis data, wherein the method includes: generating a vote-homomorphic encrypted message including voting data of respective voters for a first candidate and a second candidate by using a first candidate bin mask corresponding to the first candidate in a first election and a second candidate bin mask corresponding to the second candidate in a second election, for a plurality of election-homomorphic encrypted messages acquired by homomorphically encrypting the voting data of the respective voters in a plurality of elections, and generating a result-homomorphic encrypted message including the number of voters who select the first candidate and the second candidate by using the generated vote-homomorphic encrypted message, wherein the generating of the vote-homomorphic encrypted message includes: generating a first vote-homomorphic encrypted message including the voting data of the respective voters for the first candidate by using first election-homomorphic encrypted messages acquired by homomorphically encrypting the voting data of the voters in the first election and the first candidate bin mask corresponding to the first candidate in the first election; generating a second vote-homomorphic encrypted message including the voting data of the respective voters for the second candidate by using second election-homomorphic encrypted messages acquired by homomorphically encrypting the voting data of the voters in the second election and the second candidate bin mask corresponding to the second candidate in the second election; and generating the vote-homomorphic encrypted message including the voting data of the voter for the first candidate and the second candidate by homomorphically multiplying the first vote-homomorphic encrypted message by the second vote-homomorphic encrypted message, wherein the first candidate bin mask has plurality of slots corresponding to each candidate running for the first election, and 1 is a value in a slot corresponding to the first candidate, and zero in the other slots among the plurality of slots of the first candidate bin mask, and the second candidate bin mask has plurality of slots corresponding to each candidate running for the second election, and 1 is a value in a slot corresponding to the second candidate, and zero in the other slots among the plurality of slots of the second candidate bin mask, further comprising: generating a table having dimensions corresponding to the number of times of the plurality of elections; and storing the result-homomorphic encrypted message in one of a plurality of cells included in the generated table, wherein each dimension of the generated table includes at least one index, and the at least one index includes information on which candidates ran in each election, and wherein the homomorphic encryption scheme supports both additive and multiplicative homomorphism, forming a structure closed under both operations.
Description
CROSS-REFERENCE TO RELATED APPLICATION(S) This application claiming priority of a Korean patent application number 10-2022-0128951, filed on Oct. 7, 2022, in the Korean Intellectual Property Office, the disclosure of which is incorporated by reference herein in its entirety. BACKGROUND Field Apparatuses and method for generating a homomorphic encrypted message methods consistent with the disclosure relate to a method for generating a homomorphic encrypted message including voting analysis data and an electronic apparatus therefor, and more particularly, to a method for generating a homomorphic encrypted message including voting analysis data by performing time-sequential analysis on voting change data in a homogeneous voting system, and an apparatus therefor. Description of the Related Art Various services for transmitting and receiving data between various devices are supported in accordance with the development of electronic and communication technologies. As one example of the various services, a cloud computing service in which a user stores his/her personal data or the like in a server, and uses the data in the server is also actively used. In this environment, it is essential to use a security technology for preventing data leakage. Therefore, the server may store encrypted data. In this case, the server is required to decrypt the encrypted data in every case of searching for the stored data or performing a series of operations based on the data, which may cause waste of resources and time. In addition, the personal data may be easily leaked to a third party in case that the data temporarily decrypted for calculation in the server is hacked by the third party. A homomorphic encryption method is being studied to solve this problem. In case that the homomorphic encryption method is used, it is possible to acquire the same result as an encrypted value acquired by performing calculation on a plaintext even though the calculation is performed on the encrypted message itself without decrypting the encrypted data. Therefore, various calculations may be performed without decrypting the encrypted message. Meanwhile, a method for applying homomorphic encryption is being proposed in a voting system as well. Voting data may have a high possibility of revealing individual political inclinations or personal characteristics, and voting using the homomorphic encryption is proposed to protect individual privacy in an online voting system. The voting system requires time-sequential analysis on the voting data. However, every voting result in a plain text format needs to be stored for this purpose even though the time-sequential analysis is possible in an unencrypted state. Therefore, there has been a great concern about individual privacy violation. SUMMARY The disclosure aims to perform time-sequential analysis on homomorphically-encrypted voting data in a homogeneous voting system in which voting data is homomorphically encrypted to generate a homomorphic encrypted message including voting analysis data. According to an embodiment of the disclosure, an electronic apparatus includes: a memory storing at least one instruction and a plurality of election-homomorphic encrypted messages acquired by homomorphically encrypting voting data on votes of a plurality of voters in a plurality of elections; and a processor configured to execute the at least one instruction, wherein the processor is configured to generate a vote-homomorphic encrypted message including the voting data of the voter for a first candidate and a second candidate by using a first candidate mask corresponding to the first candidate in a first election and a second candidate mask corresponding to the second candidate in a second election, for a first election-homomorphic encrypted message acquired by homomorphically encrypting the voting data of the voter in the first election and a second election-homomorphic encrypted message acquired by homomorphically encrypting the voting data in the second election, and generate a result-homomorphic encrypted message including the number of voters who select the first candidate and the second candidate by using the generated vote-homomorphic encrypted message. The first election-homomorphic encrypted message or the second election-homomorphic encrypted message may have at least one slot, the at least one slot of the first election-homomorphic encrypted message or the second election-homomorphic encrypted message may correspond to at least one candidate running for the first election or the second election, and 1 may be a value in a slot corresponding to a candidate voted for by the voter in the first election or the second election, and zero in the other slots among the at least one slot. The processor may be configured to generate the first candidate mask or the second candidate mask having at least one slot, the first candidate mask may have the at least one slot corresponding to each candidate running for the firs