Fully homomorphic encryption method with short ciphertext

By applying the round function and GPU to support large-scale matrix operations in the encryption process, the ciphertext size of the fully homomorphic encryption scheme is reduced, the problem of excessive ciphertext size is solved, and an efficient short ciphertext fully homomorphic encryption scheme is realized , significantly reducing the running time and ciphertext expansion rate.

CN115378570BActive Publication Date: 2024-08-27ENG UNIV OF THE CHINESE PEOPLES ARMED POLICE FORCE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210746577.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-28
Publication Date
2024-08-27
Estimated Expiration
2042-06-28

AI Technical Summary

Technical Problem

In the existing fully homomorphic encryption scheme, the large size of the ciphertext leads to an increase in the communication volume during the actual operation. How to reduce the size of the ciphertext without affecting efficiency is an urgent issue.

Method used

By applying the round function in the encryption process, a TFHE-type fully homomorphic encryption scheme with short ciphertext is generated and used, and the GPU's support for large-scale matrix operations is used to implement a fully homomorphic encryption scheme based on the cuFHE software library to reduce the size of the ciphertext. .

Benefits of technology

The ciphertext size is reduced, and the running time of a single gate circuit does not exceed 1 millisecond. Compared with the CGGI17 scheme, the ciphertext size is reduced by 62%, and the ciphertext expansion rate is effectively reduced when other performances are close.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115378570B
    Figure CN115378570B
Patent Text Reader

Abstract

This invention belongs to the field of information security, specifically relating to a fully homomorphic encryption method with short ciphertext, comprising the following steps: 1. A key generation algorithm to generate a public key, a private key, and a computation key; 2. An encryption algorithm to encrypt plaintext data using the public key; 3. Ciphertext computation to perform cryptomorphic processing on the ciphertext using the computation key; 4. A decryption algorithm to decrypt the ciphertext to obtain the plaintext data. Homomorphic encryption plays an important role in outsourced computing and privacy computing. This scheme effectively reduces the ciphertext size by applying the round function to the encryption process; and by leveraging the GPU's support for large-scale matrix operations, a fully homomorphic encryption scheme with short ciphertext is implemented based on the cuFHE software library. The execution time of a single gate circuit (including the bootstrapping process) on the CUDA platform is less than 1 millisecond. Compared to the classic CGGI17 scheme, this algorithm reduces the ciphertext size by 62%, demonstrating strong practicality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of encryption technology, and in particular to a fully homomorphic encryption method with short ciphertext. Background Art

[0002] Cryptography researchers believe that "public key encryption has opened up a new direction for cryptography, and practical fully homomorphic encryption schemes will give rise to new distributed computing models." After 13 years of development, the efficiency of fully homomorphic encryption has been greatly improved, and it has even gradually moved closer to practical applications. In 1995, Benaloh proposed the first public key encryption scheme that focuses on homomorphic properties. This scheme can perform a single addition or multiplication homomorphic operation. This type of scheme is also called semi-homomorphic encryption. In 2005, Boneh et al. proposed the first quasi-homomorphic encryption scheme (Somewhat Homomorphic Encryption, SHE) that supports homomorphic addition and multiplication and can run polynomial circuits of lower order. In 2009, Gentry constructed the first fully homomorphic encryption scheme (Fully Homomorphic Encryption, FHE) that supports arbitrary addition and arbitrary multiplication operations based on the difficult problem on ideal lattices and the sparse subset sum problem. In 2011, Brakerski and Vaikuntanathan used the LWE hypothesis to introduce relinearization and dimensionality reduction and modularity reduction techniques to construct the BV11b scheme. In 2012, Brakerski, Gentry, Vaikuntanathan and others optimized the modularity reduction technology based on the BV11b scheme to reduce the noise growth from exponential growth to linear growth, and constructed the BGV12 scheme, which is currently a relatively efficient type of fully homomorphic encryption scheme. Subsequently, Halevi and Shoup used C++ language and NTL mathematical function library to implement the BGV12 scheme and the corresponding ciphertext packing technology and optimization technology in GHS12b. The software library is called HElib. In 2018, Halevi and Shoup rewrote the Helib code and optimized the linear transformations used in the bootstrapping process and other processes. The new algorithm is 30-75 times faster than the original HElib algorithm, and the scale of key calculation is reduced by 33%-50%.

[0003] The speed of the bootstrap process affects the speed of the fully homomorphic encryption scheme. The construction and optimization of the bootstrap process is a hot and difficult issue in the research of fully homomorphic encryption. In CRYPTO'2014, Alperin and Peikert created the first two-layer fully homomorphic scheme AP14, which uses a specially designed outer scheme to run the decryption circuit of the original scheme (inner scheme). The advantage of the two-layer fully homomorphic encryption scheme is that different outer schemes can be designed according to the characteristics of the decryption circuit of the inner scheme, so that it can efficiently run the decryption circuit of the inner scheme, and the noise of the bootstrap process of this scheme is smaller than that of BV14. But if Figure 1 As shown in , compared with the traditional bootstrapping process, the bootstrapping process in the two-layer fully homomorphic encryption scheme needs to add a third step of ciphertext conversion, that is, the outer ciphertext after running the decryption circuit is converted into the inner ciphertext. The existence of this conversion step greatly limits the form of the outer ciphertext. In EUROCRYPT'2015, Ducas and Micciancio constructed a more efficient two-layer fully homomorphic scheme FHEW. In ASIACRYPT'2016, Chillotti et al. constructed an efficient two-layer fully homomorphic scheme TFHE on the structure of T=(0,1], with a bootstrap operation time of less than 0.1 seconds and a bootstrap key reduced from 1G bytes to 23M bytes. In ASIACRYPT'2017, Chillotti et al. further optimized the accumulation process in the TFHE scheme, reducing the bootstrap process calculation time to 13 milliseconds. The cuFHE library is an open source GPU-based fully homomorphic encryption software library. Compared with the CPU-side CGGI17 implementation library TFHE, it has achieved a speed improvement of about 20 times on the NVIDIA Titan Xp graphics card.

[0004] Currently, efficient fully homomorphic encryption schemes include BGV and TFHE. The BGV scheme and its optimization scheme are typical efficient hierarchical fully homomorphic schemes. The depth of its homomorphic computing circuit is related to the security parameters, and it is suitable for multi-bit parallel computing. The TFHE scheme is an efficient pure fully homomorphic scheme, and the scheme is more suitable for serial operations and logical operations. Pure fully homomorphic encryption can efficiently construct arbitrary logic circuits (operations) without presetting the number of multiplication operations. Its drawback is that the plaintext and ciphertext expansion of the scheme is relatively large, reaching 16032. Therefore, how to reduce the ciphertext scale without affecting the efficiency of the scheme, thereby reducing the amount of communication in the actual operation process, is a practical problem that urgently needs to be solved. Summary of the invention

[0005] The purpose of the present invention is to provide a fully homomorphic encryption method with short ciphertext to solve the problems in the background technology.

[0006] To achieve the above object, the present invention provides the following technical solutions:

[0007] A fully homomorphic encryption method with short ciphertext, comprising the following steps:

[0008] Step 1: Initialize Setup(1 l ): Input security parameter l, define LWE dimension n, key distribution c, Gaussian distribution related parameter α, decomposition basis B ks , decomposition order d ks , Output system parameter pp LWE =(n,c,α,B ks ,d ks );

[0009] Step 2: Key Generation KeyGen (pp LWE ): Randomly select LWE key s←c n , GSW key s″∈B N [X] k Generate bootstrap key s, transform key KS s′→s,γ,t ={k i,j,v},in

[0010] Step 3: Encryption algorithm Enc(m,s): Input plaintext m∈{0,1}, private key s, uniformly select a′←T n , e←c, calculate b′=-<a′,s> +m / 4+e(mod1), output ciphertext (b,a)=round p,q (b′,a′)∈Z 2N n+1 ; The round function used in this article: In the actual algorithm, this paper takes p / q = 4N, and the round function can also be expressed as

[0011] Step 4: Decryption algorithm Dec(c,s): Input ciphertext c, private key s, output m′, so that b+<a,s> ≈m′ / 4(mod2N);

[0012] Step 5: Homomorphic NAND gate HomNAND(c1,c2): Input the ciphertext c1 corresponding to μ1, the ciphertext c2 corresponding to μ1, and output the ciphertext c corresponding to NAND(μ1,μ2).

[0013] Preferably, the ciphertext output by the encryption algorithm needs to be run through the round function after encryption, thereby reducing the size of the ciphertext.

[0014] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0015] The present invention constructs a TFHE type fully homomorphic encryption scheme with short ciphertext through a scheme. By applying the round function to the encryption process, the ciphertext size is effectively reduced; and by utilizing the feature of GPU supporting large-scale matrix operations, a fully homomorphic encryption scheme with short ciphertext is implemented based on the cuFHE software library. The experimental results show that the running time of a single gate circuit (including the bootstrap process) of this scheme on the CUDA platform does not exceed 1 millisecond. Compared with the CGGI17 scheme, the ciphertext size of this algorithm is reduced by 62%. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is the bootstrapping process in the two-layer fully homomorphic encryption scheme. DETAILED DESCRIPTION

[0017] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0018] See also Figure 1 In one embodiment, a fully homomorphic encryption method with short ciphertext includes the following operations:

[0019] Initialize Setup(1 l ): Input security parameter l, define LWE dimension n, key distribution c, Gaussian distribution related parameter α, decomposition basis B ks , decomposition order d ks , Output system parameter pp LWE =(n,c,α,B ks ,d ks ).

[0020] Key GenerationKeyGen(pp LWE ): Randomly select LWE key s←c n , GSW key s″∈B N [X] k Generate bootstrap key s, transform key KS s′→s,γ,t ={k i,j,v},in

[0021] Encryption algorithm Enc(m,s): Input plaintext m∈{0,1}, private key s, uniformly select a′←T n , e←c, calculate b′=-<a′,s> +m / 4+e(mod1), output ciphertext (b,a)=round p,q (b′,a′)∈Z 2N n+1 The round function used in this article is: In the actual algorithm, this paper takes p / q = 4N, and the round function can also be expressed as

[0022] Decryption algorithm Dec(c,s): Input ciphertext c, private key s, output m′, so that b+<a,s> ≈m′ / 4(mod2N).

[0023] Homomorphic NAND gate (including bootstrapping process) HomNAND(c1,c2): Input the ciphertext c1 corresponding to μ1, the ciphertext c2 corresponding to μ1, and output the ciphertext c corresponding to NAND(μ1,μ2).

[0024] Algorithm 1: Homomorphic NAND gate process (HomNAND):

[0025]

[0026] The test items are: homomorphic gate circuit calculation time, encryption and decryption time, etc., which realizes the encryption of two groups of 896-bit data and runs the homomorphic basic gate circuit NAND (including the bootstrap process). The experimental results show that the ciphertext expansion rate of the scheme is reduced from 16032 to 6012, the average encryption time of a single bit is 0.0711633 milliseconds, the average decryption time is 0.0008012 milliseconds, and the average basic gate circuit (including the bootstrap process) is 0.785347 milliseconds. The scheme comparison experimental data is shown in the following table. Therefore, this scheme effectively reduces the ciphertext scale while other performance is similar;

[0027]

[0028] The above embodiment discloses a fully homomorphic encryption method with short ciphertext, wherein the idea of ​​this scheme is: in the CGGI17 scheme, a single-bit ciphertext c is 32-bit data of 501 dimensions (the plaintext expansion rate is 16032), and the ciphertext is directly operated during homomorphic calculation. However, when the scheme runs the bootstrap process on the ciphertext, it is necessary to convert the ciphertext component c[i] into the ring Z[X] / X N +1 in X c[i] In order to make the calculation on the ring more efficient, the ring is usually taken as Z[X] / X 1024 +1. This results in a 32-bit ciphertext component and Z[X] / X N +1 in X iThe exponent conflicts. The solution of the CGGI17 scheme is to run the round function on the ciphertext before the bootstrap process, reducing the 501-dimensional 32-bit ciphertext c to 501-dimensional 11-bit, that is, before the core step of the bootstrap process is run, most of the redundant information of the ciphertext will be discarded. This paper considers discarding redundant information when generating ciphertext, that is, running the round function during the ciphertext generation process. The analysis shows that by setting the round function reasonably, the ciphertext size can be effectively reduced, and the noise can be reduced to an acceptable range, further improving the efficiency of the scheme.

[0029] The above is only a specific implementation of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present disclosure, which should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A fully homomorphic encryption method with short ciphertext, characterized in that: The following steps are involved: Step 1: Initialize Setup(1 l ): Input security parameter l, define LWE dimension n, key distribution c, Gaussian distribution related parameter α, decomposition basis B ks , decomposition order d ks , Output system parameter pp LWE =(n,c,α,B ks ,d ks ); Step 2: Key Generation KeyGen (pp LWE ): Randomly select LWE key s←c n , GSW key s″∈B N [X] k , generate bootstrap key s, transform key KS s′→s,γ,t ={k i,j,v },in Step 3: Encryption algorithm Enc(m,s): Input plaintext m∈{0,1}, private key s, uniformly select a′←T n , e←c, calculate b′=-<a′,s> +m / 4+e(mod1), output ciphertext (b,a)=round p,q (b′,a′)∈Z 2N n+1 ; The round function used: In the actual algorithm, taking p / q = 4N, the round function can also be expressed as Step 4: Decryption algorithm Dec(c,s): Input ciphertext c, private key s, output m′, so that b+<a,s> ≈m′ / 4(mod2N); Step 5: Homomorphic NAND gate HomNAND(c1,c2): Input the ciphertext c1 corresponding to μ1, the ciphertext c2 corresponding to μ1, and output the ciphertext c corresponding to NAND(μ1,μ2).