Limited homomorphic encryption method and system based on multi-key NTRU

By adopting the finite sub-homomorphic encryption method of multi-key NTRU in the BFV algorithm, the problems of high computational key transmission cost, large re-linearization calculation consumption and large noise scale in the BFV algorithm are solved, and the communication cost and calculation overhead are achieved.

CN119834955AActive Publication Date: 2025-04-15INSTITUTE OF INFORMATION ENGINEERING CHINESE ACADEMY OF SCIENCES

Patent Information

Application Number
CN202510155046.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-04-15
Estimated Expiration
2045-02-12

AI Technical Summary

Technical Problem

In cloud computing, the BFV algorithm has problems such as high cost of computing key transmission, high cost of re-linearization calculations and large noise scale.

Method used

The finite sub-homomorphic encryption method based on multi-key NTRU is adopted, by generating the assignment key evk and homomorphic multiplication of ciphertext ct0 and ciphertext ct1 based on the key, the number of computational keys and computational overhead transmitted in relinearization are reduced.

Benefits of technology

It reduces the communication cost and calculation consumption during the heavy linearization process, and reduces the noise scale caused by heavy linearization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119834955A_ABST
    Figure CN119834955A_ABST
Patent Text Reader

Abstract

The invention discloses a finite-order homomorphic encryption method and system based on a multi-key NTRU, and belongs to the technical field of homomorphic encryption. The method comprises the following steps: generating an assignment key; obtaining a homomorphic multiplication result of the ciphertext ct0 and the ciphertext ct1 based on the assignment key; wherein the ciphertext ct0 and the ciphertext ct1 are respectively generated based on the plaintext m0 and the plaintext m1. According to the method, the communication cost of transmitting and calculating the secret key in the relinearization, the calculation consumption in the relinearization process and the noise scale caused by the relinearization can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of homomorphic encryption technology, and more specifically, to a limited-time homomorphic encryption method and system based on multi-key NTRU. Background Art

[0002] With the development and widespread application of cloud computing, especially the large number of e-commerce transactions conducted on cloud platforms, how to safely and effectively protect user privacy and security has become a hot topic in the field of cryptography research. If data is stored directly in plain text, sensitive data may be exposed to cloud service providers, which will leak user privacy information and bring a series of security issues to user private data. To solve this problem, the homomorphic encryption solution came into being. Figure 1 As shown in the figure, the user data is encrypted using a homomorphic encryption scheme, and then the ciphertext is sent to the cloud. The data can be uploaded, downloaded, deleted, updated, retrieved, and the objects of the operation are all ciphertext. This operation not only avoids the risk of data being intercepted, copied, tampered with, or forged during transmission, but also avoids the risk of data leakage by the data storage party or being hacked on the server side.

[0003] From the operation point of view, homomorphic encryption algorithms can be divided into additive homomorphic and multiplicative homomorphic. 1 ,m 2 And encryption and decryption algorithms Enc(), Dec():

[0004] ■Additive homomorphism: If Enc(m 1 )+Enc(m 2 )=Enc(m 1 +m 2 ) or m 1 +m 2 =Dec(Enc(m 1 )+Enc(m 2 )), then the addition homomorphism holds;

[0005] ■Multiplication homomorphism: If Enc(m 1 )*Enc(m 2 )=Enc(m 1 *m 2 ) or m 1 *m 2 =Dec(Enc(m 1 )*Enc(m 2 )), then the multiplication homomorphism holds.

[0006] Table 1 briefly introduces the classification and development of mainstream homomorphic encryption schemes.

[0007]

[0008]

[0009] Table 1

[0010] Homomorphic encryption can generally be divided into three categories: Partially Homomorphic Encryption (PHE), Somewhat Homomorphic Encryption (SHE) and Fully Homomorphic Encryption (FHE). The specific descriptions of the three homomorphic algorithms are as follows:

[0011] ■ Partially homomorphic encryption (PHE): can only satisfy one homomorphic encryption feature, either additive homomorphism or multiplicative homomorphism, but can support unlimited operations.

[0012] ■ Limited-time homomorphic encryption (SHE): Limited-time homomorphic encryption means that some operations in the homomorphic encryption method (such as addition and multiplication) can only be performed a limited number of times;

[0013] ■Fully Homomorphic Encryption (FHE): Fully homomorphic encryption allows an unlimited number of addition and multiplication operations on the ciphertext.

[0014] Fully homomorphic encryption schemes are also constantly developing in practical applications. Various mainstream fully homomorphic encryption schemes have corresponding algorithm libraries. At present, the algorithm libraries of fully homomorphic encryption schemes are mainly implemented based on the C++ programming language and can be used on different operating systems. There are many algorithm libraries for fully homomorphic encryption schemes, among which the SEAL algorithm library released by Microsoft is a relatively mature one. In the Microsoft SEAL library, a variety of fully homomorphic encryption schemes BGV, BFV, and CKKS are supported, which have very different properties. The BFV scheme allows modular operations to be performed on encrypted integers, and the CKKS scheme allows addition and multiplication of encrypted real or complex numbers, but only approximate results can be obtained. For applications that require exact values, the BFV scheme is a better choice.

[0015] However, in the specific use of the BFV algorithm, it still faces the following shortcomings:

[0016] 1. A large number of computation keys need to be transmitted in the communication between the client and the server. These computation keys are large in size, which brings a large communication overhead;

[0017] 2. During the ciphertext calculation process on the server, a ciphertext refresh operation is required, which will bring a large computing overhead. Summary of the invention

[0018] In response to the above problems, the present invention discloses a finite-time homomorphic encryption method and system based on multi-key NTRU, which can reduce the communication cost of transmitting computing keys during relinearization, the computing consumption during the relinearization process, and the noise scale caused by relinearization.

[0019] To achieve the above objectives, the technical solution of the present invention includes the following contents.

[0020] A limited-time homomorphic encryption method based on multi-key NTRU, the method comprising:

[0021] Generate the valued key evk;

[0022] Based on the assigned key evk, the ciphertext ct is obtained 0 and ciphertext ct 1 The homomorphic multiplication result ct′ of 0 and ciphertext ct 1 Based on the plaintext m 0 and plaintext m 1 generate.

[0023] Furthermore, the assignment key evk=[h i +ω i s] q ; Among them, the i-th ternary polynomial g i The corresponding NTRU public key Three-variable polynomial g i ←R q , R q Indicates that all coefficients are in the finite field Z q A set of polynomials, sk represents the generated ciphertext ct 0 and ciphertext ct 1 The private key corresponding to the public key pk used, q represents the modulus corresponding to the public-private key pair (sk, pk), ω represents the ω-radix, i∈[1,l], and l is a positive integer.

[0024] Furthermore, the homomorphic multiplication result ct′=(c′ 0 ,c′ 1 ), where the first part of the homomorphic multiplication result t is the reduction modulus of the coefficients of the plaintext polynomial, ct 0 [0] indicates the ciphertext ct 0 The 0th order term, ct 1 [0] indicates the ciphertext ct 1 The 0th-order term, the second part of the homomorphic multiplication result Median Median ct 0 [1] represents the ciphertext ct 0 The first-order term, ct 1 [1] represents the ciphertext ct 1 The first term of .

[0025] A multi-key NTRU-based finite-time homomorphic encryption system, the system comprising:

[0026] An assignment key generation module, used to generate an assignment key evk;

[0027] A homomorphic multiplication calculation module is used to obtain the ciphertext ct based on the key evk 0 and ciphertext ct 1 The homomorphic multiplication result ct′ of 0 and ciphertext ct 1 Based on the plaintext m 0 and plaintext m 1 generate.

[0028] A weighted homomorphic electronic voting method is applied to a server, the method comprising:

[0029] Generate encryption and decryption public and private key pairs (sk, pk);

[0030] Get Voter V j Ballot information j The ballot data string B j The ciphertext data string mkNTRU-SHE-Enc(B j ); wherein the ciphertext data string mkNTRU-SHE-Enc(B j ) is generated using the public key pk;

[0031] Get Voter V j The weighted ciphertext mkNTRU-SHE-Enc(w j ); wherein the weighted ciphertext mkNTRU-SHE-Enc(w j ) is generated using the public key pk;

[0032] Based on any of the above multi-key NTRU-based finite-time homomorphic encryption methods, the ciphertext data string mkNTRU-SHE-Enc(B i ) and the weighted ciphertext mkNTRU-SHE-Enc(w j ) is the homomorphic multiplication result ct′ j Afterwards, the homomorphic multiplication result ct′ j Perform summation to obtain the ciphertext vote counting result;

[0033] Use the private key sk to decrypt the ciphertext vote counting results to obtain the electronic voting results.

[0034] Further, the ballot information Ballot is generated j The process includes:

[0035] Voter V j Generate a public-private key pair And publish the public key to the administrator

[0036] The administrator generates a signature private key sk a And the signature verification public key pk a , and in the voter V j If you are eligible to vote, use the signature private key sk a Public key The signature of the verification public key pk a Send to host M;

[0037] The administrator generates random votes v j ;

[0038] Voter V j After signing, the public key Send it to the host M so that the host M can use the signature verification public key pk a Determine the voter V j Have voting rights;

[0039] In this voter V j If the host M has voting rights, he will Send to administrator;

[0040] When the administrator receives the public key sent by the host M Afterwards, with the voter V j Shared use key Generate ballot v j The ciphertext vc j , and the ciphertext vc j Sent to host M; wherein the key Generated using a symmetric encryption scheme;

[0041] Host M will ciphertext vc j Forward to voters V j ;

[0042] Voter V j Using the key The ciphertext vc j Restore to ballot v j After that, vote for each candidate to generate ballot information Ballotj .

[0043] A weighted homomorphic electronic voting system, the system comprising:

[0044] Key generation module, used to generate encryption and decryption public and private key pairs (sk, pk);

[0045] The first data acquisition module is used to obtain the voter V j Ballot information j The ballot data string B j The ciphertext data string mkNTRU-SHE-Enc(B j ); wherein the ciphertext data string mkNTRU-SHE-Enc(B j ) is generated using the public key pk;

[0046] The second data acquisition module acquires the voter V j The weighted ciphertext mkNTRU-SHE-Enc(w j ); wherein the weighted ciphertext mkNTRU-SHE-Enc(w j ) is generated using the public key pk;

[0047] The voting result generation module is used for the finite-time homomorphic encryption method based on multi-key NTRU described in any one of the above items to calculate the ciphertext data string mkNTRU-SHE-Enc(B i ) and the weighted ciphertext mkNTRU-SHE-Enc(w j ) is the homomorphic multiplication result ct′ j Afterwards, the homomorphic multiplication result ct′ j The ciphertext vote counting result is obtained by summing up; the ciphertext vote counting result is decrypted using the private key sk to obtain the electronic voting result.

[0048] An electronic device, characterized in that the electronic device includes: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements any of the above-mentioned multi-key NTRU-based limited-time homomorphic encryption methods or any of the above-mentioned weighted homomorphic electronic voting methods.

[0049] A computer-readable storage medium, characterized in that computer program instructions are stored on the computer-readable storage medium, and when the computer program instructions are executed by a processor, any of the above-mentioned multi-key NTRU-based finite-time homomorphic encryption methods or any of the above-mentioned weighted homomorphic electronic voting methods are implemented.

[0050] A computer program product, when the computer program product is run on a computer device, enables the computer device to execute any of the above-mentioned multi-key NTRU-based limited-time homomorphic encryption methods or any of the above-mentioned weighted homomorphic electronic voting methods.

[0051] Compared with the original BFV scheme, the calculation key of the present invention is changed from the previous two-tuple to one, and the new noise introduced is smaller. Compared with the relinearization operation in BFV, the new relinearization has the following advantages:

[0052] 1) Before performing relinearization, the number of polynomials for transmitting the calculation key is given by reduced to The key size is reduced to half of the original one, effectively reducing the communication cost;

[0053] 2) In performing the relinearization, only the first-order term c of the ciphertext needs to be recalculated 1 , and the 0th-order term c of the ciphertext 0 Keep it unchanged, so that each time you relinearize, the amount of computation required is only half of the original amount, effectively reducing the computational overhead. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 Schematic diagram of the homomorphic encryption scheme.

[0055] Figure 2 This is a flowchart of the finite-time homomorphic encryption method based on multi-key NTRU. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments and the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0057] Since the BFV scheme has a long history of development, is supported by a rich algorithm library, and has high implementation efficiency, the present invention considers making improvements to the BFV scheme. The BFV scheme is a fully homomorphic encryption scheme based on RLWE. Its structure is divided into two layers, the first layer is limited-time homomorphism (SHE), and the second layer is bootstrapping technology. On the basis of the first layer of limited-time homomorphism, the fully homomorphic function of BFV is realized by using the bootstrapping technology of the second layer.

[0058] The improvement of the present invention is aimed at the first layer of BFV - the limited homomorphic version (SHE). By replacing the RLWE encryption used in the relinearization technology with multi-key NTRU encryption, the communication cost of transmitting the calculation key in the relinearization, the computational consumption in the relinearization process, and the noise scale caused by the relinearization are reduced.

[0059] Table 2 is a description of the related symbols.

[0060]

[0061]

[0062] Table 2

[0063] First, we briefly introduce the finite-time homomorphic version of BFV. The BFV scheme computes the n +1), the scheme includes 7 algorithms: private key generation, public key generation, computational key generation, encryption, decryption, homomorphic addition and homomorphic multiplication:

[0064] ■BFV private key generation BFV.SecretKeyGen(λ): output private key s←R 2 , let sk=s.

[0065] ■BFV public key generation BFV.PublicKeyGen(sk): Input s=sk, a←R q and e←χ, output public key pk=([-(as+e)] q ,a).

[0066] ■BFV calculation key generation BFV.EvaluationKeyGen(sk,ω): input a i ←R q and e i ←χ, where Output calculation key evk = ([-(a i s+e i )+ω i s 2 ] q ,a i ).

[0067] ■BFV encryption BFV.Encrypt(pk,m): input plaintext m∈R t , sampling 1 ,e 2 ←X, express the public key as pk=(p 0 ,p 1 ), output ct = ([Δm + p0 u+e 1 ] q ,[p 1 u+e 2 ]).

[0068] ■BFV decryption BFV.Decrypt(sk,ct): input s=sk,c 0 =ct[0],c 1 =ct[1], output plain text

[0069] ■BFV addition BFV.Add(ct 0 ,ct 1 ): Input ct 0 ,ct 1 , output (ct 0 [0]+ct 1 [0],ct 0 [1]+ct 1 [1]).

[0070] ■BFV multiplication BFV.Multiply(ct 0 ,ct 1 ): Input ct 0 ,ct 1 ,calculate

[0071]

[0072] c 2 With ω as base, it is expressed as make

[0073]

[0074] Output (c′ 0 ,c′ 1 ).

[0075] Relinearization: The encrypted ciphertext is ct = (c 0 ,c 1 ) is divided into two parts, of which c 0 It is expressed as the 0th order term of s, c 1 In the multiplication operation, the new ciphertext obtained by multiplying two ciphertexts is in the form of ct = (c 0 ,c 1 ,c 2 ), whose elements increase the quadratic term c 2 (Here c 0 ,c 1 ,c 2Different from the previous one). To correct this phenomenon, BFV introduces the relinearization technique, whose purpose is to restore a ciphertext of degree 2 to a new ciphertext of degree 1. Specifically, for a ciphertext of degree 2 ct = (c 0 ,c 1 ,c 2 ), we need to find ct′=(c′ 0 ,c′ 1 ), so that

[0076] [c 0 +c 1 ·s+c 2 ·s 2 ] q =[c′ 0 +c′ 1 ·s+r] q ,

[0077] Where r is a polynomial with a smaller norm.

[0078] The third step of the algorithm, BFV.EvaluationKeyGen(sk,ω), introduces the relinearization key evk=([-(a i s+e i )+ω i s 2 ] q ,a i ), c 2 With ω as base, it is expressed as make

[0079]

[0080] at this time

[0081]

[0082] Here r can be taken as where e i Taken from the distribution χ (Gaussian distribution in BFV), r can be regarded as a polynomial with a small norm. Relinearization will introduce new noise r in the ciphertext operation. As the number of multiplications increases, the noise continues to accumulate until the correct plaintext cannot be solved. Therefore, the multiplication operations supported by this scheme are limited.

[0083] Improvement idea: Note that the calculated key evk is in the form of a tuple (evk[0],evk[1]), and additional transmission is required before performing relinearization Once the size of evk is reduced, the key size can be reduced, thereby reducing the communication cost of the scheme. At the same time, in the relinearization, the 0th-order term c of the ciphertext needs to be recalculated separately.0 and the first-order term c 1 , reducing the size of evk can also reduce the computational cost of this scheme. In addition, after performing relinearization, new noise r will be introduced. Reducing the noise size can also improve the efficiency of the scheme.

[0084] The key calculation in BFV is based on RLWE. In order to achieve the above purpose, Figure 2 As shown, the present invention attempts to construct a new computation key based on multi-key NTRU:

[0085] In a given ring R, assuming that the private key s←R 2 Reversible, take A three-variable polynomial g i ←R q (polynomial with coefficients +1, -1, 0), let for NTRU public key instance. The calculation key at this time

[0086] evk=[h i +ω i s] q .

[0087] Improved relinearization: For a ciphertext of degree 2 ct = (c 0 ,c 1 ,c 2 ), c 2 With ω as base, it is expressed as make

[0088]

[0089] at this time

[0090]

[0091] Here r can be taken as where g i Taken from a three-variable polynomial with coefficients +1,-1,0.

[0092] Table 3 is a comparison between the present invention and the BFV algorithm

[0093]

[0094] Table 3

[0095] Advantages: Compared with the relinearization operation in BFV, the most significant change is that the calculation key changes from a binary to a single tuple. The new relinearization operation brings the following advantages:

[0096] 1. Before performing relinearization, the calculation key is The polynomial is reduced to The key size is reduced, thus reducing the communication overhead;

[0097] 2. When performing homomorphic multiplication operations, only the first-order terms of the ciphertext need to be recalculated, while the zero-order terms of the ciphertext remain unchanged.

[0098] In this way, the amount of computation required for each ciphertext multiplication operation is only 1 / 2 of the original BFV scheme, which effectively reduces the computational overhead; from this, we can design a new encryption algorithm.

[0099] Multi-key NTRU-based limited-time homomorphic encryption algorithm (mkNTRU-SHE)

[0100] As with the BFV solution, the new algorithm calculates in the loop R = Z[x] / (x n +1), the parameter set is also consistent with BFV. The scheme includes a total of 7 algorithms: private key generation, public key generation, computational key generation, encryption, decryption, homomorphic addition and homomorphic multiplication:

[0101] ■mkNTRU-SHE private key generation mkNTRU-SHE.SecretKeyGen(λ): Output private key s←R 2 , let sk=s.

[0102] ■mkNTRU-SHE public key generation mkNTRU-SHE.PublicKeyGen(sk): Input s=sk, a←R q and e←χ, output public key pk=([-(ax+e)] q ,a).

[0103] ■mkNTRU-SHE calculation key generation mkNTRU-SHE.EvaluationKeyGen(sk,ω): input g i ←R q (polynomial with coefficients +1,-1,0), where Output calculation key: evk = [h i +ω i s] q .

[0104] ■mkNTRU-SHE encryption mkNTRU-SHE.Encrypt(pk,m): Input plaintext m∈R t , sampling 1 ,e 2 ←χ, the public key is represented as pk=(p 0 ,p 1 ), output ct = ([Δm + p 0 u+e1 ] q ,[p 1 u+e 2 ]).

[0105] ■mkNTRU-SHE decryption mkNTRU-SHE.Decrypt(sk,ct): input s=sk,c 0 =ct[0],c 1 =ct[1], output plain text

[0106] ■mkNTRU-SHE addition mkNTRU-SHE.Add(ct 0 ,ct 1 ): Input ct 0 ,ct 1 , output (ct 0 [0]+ct 1 [0],ct 0 [1]+ct 1 [1]).

[0107] ■mkNTRU-SHE multiplication mkNTRU-SHE.Multiply(ct 0 ,ct 1 ): Input ct 0 ,ct 1 ,calculate

[0108]

[0109] c 2 With ω as base, it is expressed as make

[0110]

[0111] Output (c′ 0 ,c′ 1 ).

[0112] Experimental performance

[0113] In this experiment, the coefficient of the reduced plaintext polynomial is t = 2, χ is a Gaussian distribution with a standard deviation of σ, and the base of the logarithm ω is Two specific parameter sets mk-128 and mk-192 with security strengths of 128 bits and 192 bits respectively are designed, as shown in Table 4. It can be seen that the speed of the present invention is much higher than that before the improvement.

[0114]

[0115]

[0116] Table 4

[0117] Application Scenario

[0118] The application scenario of the present invention is specifically described below using an improved weighted homomorphic electronic voting system.

[0119] The weighted electronic voting system consists of: Voters V j , Administrator A, Candidate C t , host M and server, are described as follows

[0120] ●Voters V j : The set of voters with voting rights, where j∈[1,m].

[0121] ●Administrator A: Before the voting begins, he and voter V j A common key is negotiated through the key negotiation protocol During the voting process, administrator A is responsible for generating a set of random electronic ballots, encrypting them using a symmetric encryption algorithm with the negotiated key as the private key, and distributing the ciphertext to the corresponding voters V. i .

[0122] ●Host M: Responsible for distributing the ballots to voters anonymously.

[0123] Candidate C t : The set of elected objects, where t∈[1,n]. Here, the present invention uses C i Indicates the number of votes a candidate received, with 1 and 0 representing being elected and not elected respectively.

[0124] ●Server: Implement the legality verification and self-counting functions of ballots.

[0125] The electronic voting solution consists of four stages: registration stage, ballot acquisition stage, voting stage and vote counting stage. They are described as follows:

[0126] Registration stage:

[0127] (1) Voter V j Generate a key and register it with the public key. j Choose a random private key Calculate the corresponding public key Here, the public key and private key can be generated by using the elliptic curve public key encryption scheme. j Make its public key available to administrators

[0128] (2) The administrator generates a signature key. In order to add a qualified voter to the voter list, the administrator needs to generate a pair of signature private key and signature verification public key for signing, denoted as sk a and pk a . The elliptic curve signature algorithm can also be used here for key generation and subsequent signing.

[0129] (3) The administrator determines the list of voters. In order to grant voters V i Signature authority: The administrator shall identify the qualifications of voters in advance and approve the voters who meet the requirements. j , its public key Finally, the administrator makes the list of voters and the additional signatures public.

[0130] Voting acquisition phase:

[0131] (1) The administrator generates a random electronic ballot t j .

[0132] (2) Voter V j Request a vote from the host M, and M verifies V in the voter list j The signature of the requester confirms whether the requester has the right to vote. i , the host will V j The public key Sent to Administrator A, requesting an electronic ballot.

[0133] (3) Administrator A uses V j Shared secret key Encrypted Ballotsv j , the corresponding ciphertext vc j Sent to the host, who then sends vc j Forwarded to voters. The encryption scheme here uses a symmetric encryption scheme.

[0134] Voting phase:

[0135] Corresponding to n candidates C=[C 1 ,C 2 ,…,C n ] and m legal voters V = [V 1 ,V 2 ,…,V m ], each vote

[0136] Voting information:

[0137] Ballot j =(v j ,B j ).

[0138] Among them, v j The vote representing the voter, B j The vote data string B representing the voter j = {b 1 ,b 2 ,…,b t ,…,b n},j=1,2,…,m. Ballot data b t ∈{0,1},t=1,2,…,n, default vote data b t Set to "0" to indicate that candidate C t No choice; after the voter chooses a candidate, the ballot data b t will be set to "1".

[0139] (1) The server generates the public key, private key, and assignment key of the mkNTRU-SHE homomorphic encryption scheme, set to sk, pk, evk respectively.

[0140] (2) The administrator uses the public key pk encrypted by mkNTRU-SHE to encrypt each voter V j The weight w j , and the resulting ciphertext mkNTRU-SHE-Enc(w j ) on the server.

[0141] (3) Voter V j use vc j Decrypt and get the electronic ballot v j . String the voter's ballot data into B j The encrypted ciphertext data string mkNTRU-SHE-Enc(B j ) to the server.

[0142] (4) Submit ballot: The voter submits the ballot to the server and the time specified for submitting the ballot is up. j , the server has its vote data triple:

[0143] Ctxt_Ballot j =(v j ,mkNTRU-SHE-Enc(B j ),mkNTRU-SHE-Enc(w j )),

[0144] Among them, mkNTRU-SHE-Enc(B j) is a data string of length n, corresponding to the ciphertext information of whether each candidate is selected, (mkNTRU-SHE-Enc(B j )) t It refers to the secret ballot information of the tth candidate.

[0145] Counting phase:

[0146] (1) After the voting is over, the server collects the votes, verifies and counts them. During the counting process, the ciphertext addition is calculated using the homomorphic addition of BFV homomorphic encryption, and the homomorphic multiplication of the ciphertext is calculated using the evk of mkNTRU-SHE. When counting, the secret ballot information (mkNTRU-SHE-Enc(BFV)) in all the ballots is first counted. j )) t and the secret ballot weight Enc(w i ) are homomorphically multiplied, and then all the products are homomorphically added to get the ciphertext vote count of candidate G:

[0147]

[0148] (2) The final decryption private key sk is used to restore the election result, that is,

[0149]

[0150] And automatically published.

[0151] Although the present invention has been disclosed as above by way of embodiments, it is not intended to limit the present invention. Appropriate modifications or equivalent substitutions of the technical solutions of the present invention made by ordinary technicians in the field should all be included in the protection scope of the present invention. The protection scope of the present invention shall be based on what is defined in the claims.

Claims

1. A finite-time homomorphic encryption method based on multi-key NTRU, characterized in that: The method comprises: Generate the valued key evk; Based on the assigned key evk, a homomorphic multiplication result ct′ of the ciphertext ct0 and the ciphertext ct1 is obtained; wherein the ciphertext ct0 and the ciphertext ct1 are generated based on the plaintext m0 and the plaintext m1 respectively.

2. The method for finite-time homomorphic encryption based on multi-key NTRU according to claim 1, characterized in that: The assignment key evk=[h i +ω i s] q ; Among them, the i-th ternary polynomial g i The corresponding NTRU public key Three-variable polynomial g i ←R q , R q Indicates that all coefficients are in the finite field Z q where sk represents the private key corresponding to the public key pk used to generate the ciphertext ct0 and ciphertext ct1, q represents the modulus corresponding to the public-private key pair (sk, pk), ω represents the ω-radix, i∈[1,l], and l is a positive integer.

3. The method for finite-time homomorphic encryption based on multi-key NTRU according to claim 2, characterized in that: The homomorphic multiplication result ct′=(c′0, c′1), wherein the first part of the homomorphic multiplication result t is the reduced modulus of the coefficients of the plaintext polynomial, ct0[0] represents the 0th order term of the ciphertext ct0, ct1[0] represents the 0th order term of the ciphertext ct1, and the second part of the homomorphic multiplication result Median Median ct0[1] represents the first-order term of the ciphertext ct0, and ct1[1] represents the first-order term of the ciphertext ct1.

4. A finite-time homomorphic encryption system based on multi-key NTRU, characterized in that: The system comprises: An assignment key generation module, used to generate an assignment key evk; A homomorphic multiplication calculation module is used to obtain a homomorphic multiplication result ct′ of the ciphertext ct0 and the ciphertext ct1 based on the key evk; wherein the ciphertext ct0 and the ciphertext ct1 are generated based on the plaintext m0 and the plaintext m1 respectively.

5. A weighted homomorphic electronic voting method, characterized in that: Applied to a server, the method comprises: Generate encryption and decryption public and private key pairs (sk, pk); Get Voter V j Ballot information j The ballot data string B j The ciphertext data string mkNTRU-SHE-Enc(B j ); wherein the ciphertext data string mkNTRU-SHE-Enc(B j ) is generated using the public key pk; Get Voter V j The weighted ciphertext mkNTRU-SHE-Enc(w j ); wherein the weighted ciphertext mkNTRU-SHE-Enc(w j ) is generated using the public key pk; Based on the finite-time homomorphic encryption method based on multi-key NTRU according to any one of claims 1 to 3, the ciphertext data string mkNTRU-SHE-Enc(B i ) and the weighted ciphertext mkNTRU-SHE-Enc(w j ) is the homomorphic multiplication result ct′ j Afterwards, the homomorphic multiplication result ct′ j Perform summation to obtain the ciphertext vote counting result; Use the private key sk to decrypt the ciphertext vote counting results to obtain the electronic voting results.

6. The weighted homomorphic electronic voting method according to claim 5, characterized in that: Generate the ballot information Ballot j The process includes: Voter V j Generate a public-private key pair And publish the public key to the administrator The administrator generates a signature private key sk a And the signature verification public key pk a , and in the voter V j If you are eligible to vote, use the signature private key sk a Public key The signature of the verification public key pk a Send to host M; The administrator generates random votes v j ; Voter V j After signing, the public key Send it to the host M so that the host M can use the signature verification public key pk a Determine the voter V j Have voting rights; In this voter V j If the host M has voting rights, he will Send to Admin; When the administrator receives the public key sent by the host M Afterwards, with the voter V j Shared use key Generate ballot v j The ciphertext vc j , and the ciphertext vc j Sent to host M; wherein the key Generated using a symmetric encryption scheme; Host M will ciphertext vc j Forward to voters V j ; Voter V j Using the key The ciphertext vc j Restore to ballot v j After that, vote for each candidate to generate ballot information Ballot j .

7. A weighted homomorphic electronic voting system, characterized in that: The system comprises: Key generation module, used to generate encryption and decryption public and private key pairs (sk, pk); The first data acquisition module is used to obtain the voter V j Ballot information j The ballot data string B j The ciphertext data string mkNTRU-SHE-Enc(B j ); wherein the ciphertext data string mkNTRU-SHE-Enc(B j ) is generated using the public key pk; The second data acquisition module acquires the voter V j The weighted ciphertext mkNTRU-SHE-Enc(w j ); wherein the weighted ciphertext mkNTRU-SHE-Enc(w j ) is generated using the public key pk; The voting result generation module is used to calculate the ciphertext data string mkNTRU-SHE-Enc(B) based on the finite-time homomorphic encryption method based on multi-key NTRU according to any one of claims 1 to 3. i ) and the weighted ciphertext mkNTRU-SHE-Enc(w j ) is the homomorphic multiplication result ct′ j Afterwards, the homomorphic multiplication result ct′ j The ciphertext vote counting result is obtained by summing up; the ciphertext vote counting result is decrypted using the private key sk to obtain the electronic voting result.

8. An electronic device, characterized in that: The electronic device includes: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the limited-time homomorphic encryption method based on multi-key NTRU as described in any one of claims 1-3 or the weighted homomorphic electronic voting method as described in any one of claims 5-6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the limited-time homomorphic encryption method based on multi-key NTRU as described in any one of claims 1 to 3 or the weighted homomorphic electronic voting method as described in any one of claims 5 to 6.

10. A computer program product, characterized in that When the computer program product runs on a computer device, the computer device executes the limited-time homomorphic encryption method based on multi-key NTRU as described in any one of claims 1 to 3 or the weighted homomorphic electronic voting method as described in any one of claims 5 to 6.

Citation Information

Patent Citations

  • Agency re-signcryption method supporting voting system

    CN109887150A

  • Anonymous reputation voting method, device and system for decentralized community governance

    CN118353641A

  • Block chain electronic voting method for providing vote security and data privacy protection

    CN118379825A

  • Grid-based MQTT protocol security authentication method

    CN118509177A

  • Homomorphic decryption method, nonvolatile storage medium and electronic equipment

    CN119011112A

Cited By

  • High-security multi-key fully homomorphic encryption decryption method

    CN120498625A

  • Security analysis method for post-quantum NTRU cryptographic algorithm

    CN120825286A