National password hybrid homomorphic encryption method and system

By combining Guomi algorithm and homomorphic encryption algorithm, the linear and nonlinear layers of the SM4 algorithm are optimized, and efficient Guomi hybrid homomorphic encryption is achieved, solving the application limitations and complete application of Guomi algorithm in cloud server deployment. The problem of low homomorphic encryption efficiency improves decryption performance and efficiency.

CN119210721APending Publication Date: 2024-12-27SHANDONG UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411138541.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The lack of mixed homomorphic encryption algorithms with the national secret standard in the prior art limits the application of national secret algorithms in cloud server outsourcing computing deployment, and full homomorphic encryption has problems of ciphertext expansion and low operation efficiency.

Method used

Design and implement a mixed homomorphic encryption method of Guomi. Based on Guomi algorithm and homomorphic encryption algorithm, the linear and nonlinear layers of the SM4 algorithm can be optimized to reduce the total number of Boolean circuit gates, improve the performance of decryption circuits, and combine with TFHE to synchronize. The state encryption algorithm realizes efficient encryption and decryption operations.

Benefits of technology

It fills the gap in the mixed homomorphic encryption of Guomi algorithm, significantly improves the decryption performance of Guomi algorithm under homomorphic encryption, reduces the cost of computing, transmission and storage, solves the problem of ciphertext expansion, and improves operating efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119210721A_ABST
    Figure CN119210721A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of encryption, and provides a national cryptographic hybrid homomorphic encryption method and system, and the method comprises the steps: obtaining a plaintext through a client, and carrying out the symmetric encryption of the plaintext through a national cryptographic algorithm, and obtaining a symmetric ciphertext; the server side carries out homomorphic encryption on the symmetric ciphertext, runs a symmetric cryptographic algorithm decryption circuit, carries out homomorphic decryption and carries out homomorphic calculation operation in sequence to obtain an encryption operation result; and the client performs homomorphic decryption on the encryption operation result to obtain an operation result. Hybrid homomorphic encryption is designed and realized based on the national cryptographic algorithm and the homomorphic encryption algorithm, and the blank of hybrid homomorphic encryption based on the national cryptographic algorithm is filled.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of encryption technology, and in particular relates to a national secret mixed homomorphic encryption method and system. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] Homomorphic encryption is an important part of privacy protection technology and plays an important role in privacy protection. The concept of fully homomorphic encryption was first proposed by 1978. It allows data to be calculated in an encrypted state without decryption, thereby ensuring the security of data during the calculation process.

[0004] However, fully homomorphic encryption technology also has problems such as ciphertext expansion and low operating efficiency in practical applications. The huge computing, transmission and storage costs caused by it are an important bottleneck restricting the current deployment of cloud server outsourcing computing. In 2011, hybrid homomorphic encryption was proposed, which combines fully homomorphic encryption technology with traditional symmetric encryption to improve the operating efficiency of the client. Compared with directly encrypting messages homomorphically, the client first uses a homomorphic algorithm to encrypt the symmetric key and transmit it to the server. After that, all secret data only needs to be transmitted using symmetric encryption. Before processing the data, the cloud server needs to homomorphically execute the symmetric decryption circuit to obtain the symmetric plaintext in the homomorphic environment. This solution greatly reduces the complexity of client message encryption and transmission, but it puts higher requirements on the performance of the symmetric encryption algorithm used.

[0005] The SM4 algorithm is safe and efficient, can resist various existing attack methods and performs extremely well. At present, there is a lack of hybrid homomorphic encryption algorithms that meet the national secret standards, which forces related companies to seek other standard algorithms to meet the needs of hybrid homomorphic encryption, limiting the ability to always use national secret algorithms in certain specific fields, and also causing security issues. Summary of the invention

[0006] In order to solve the technical problems existing in the above-mentioned background technology, the present invention provides a national secret hybrid homomorphic encryption method and system, designs and implements hybrid homomorphic encryption based on the national secret algorithm and the homomorphic encryption algorithm, and fills the gap in hybrid homomorphic encryption based on the national secret algorithm.

[0007] In order to achieve the above object, the present invention adopts the following technical solution:

[0008] The first aspect of the present invention provides a national secret mixed homomorphic encryption method, which is applied to a server side, comprising:

[0009] Obtaining a symmetric ciphertext, where the symmetric ciphertext is obtained by applying a national secret algorithm to the plaintext;

[0010] After homomorphically encrypting the symmetric ciphertext to obtain the symmetric ciphertext homomorphic ciphertext, the symmetric ciphertext homomorphic ciphertext is subjected to a symmetric cryptographic algorithm decryption circuit and homomorphically decrypted to obtain the plaintext homomorphic ciphertext;

[0011] A homomorphic computing operation is performed on the plaintext homomorphic ciphertext to obtain and send an encrypted computing result, so as to perform homomorphic decryption on the encrypted computing result to obtain a computing result.

[0012] Furthermore, the operation of the symmetric cryptographic algorithm decryption circuit and the homomorphic decryption are performed based on the symmetric key that has been homomorphically encrypted.

[0013] Furthermore, the reduction in the total number of Boolean circuit gates of the symmetric cryptographic algorithm decryption circuit is achieved by optimizing the linear layer and / or nonlinear layer of the symmetric cryptographic algorithm.

[0014] Furthermore, the optimization of the nonlinear layer refers to dividing the S-box of the symmetric cryptographic algorithm into an initial linear expansion, a nonlinear compression and a linear compression;

[0015] The initial linear expansion expands the number of input bits of the S-box by byte substitution and row shift;

[0016] The nonlinear compression compresses the expanded input bits through nonlinear mapping;

[0017] The linear compression maps the compressed input bits to the output bits of the S-box through column confusion and round key addition.

[0018] The second aspect of the present invention provides a national secret mixed homomorphic encryption method, which is applied to a client and includes:

[0019] Get the plaintext;

[0020] Symmetrically encrypt the plaintext using a national encryption algorithm, obtain and send a symmetric ciphertext, and obtain a returned encryption operation result;

[0021] Perform homomorphic decryption on the encrypted operation result to obtain the operation result;

[0022] The encryption operation result is obtained by sequentially performing homomorphic encryption on the symmetric ciphertext, running a symmetric cryptographic algorithm decryption circuit, performing homomorphic decryption, and performing homomorphic computing operations.

[0023] The third aspect of the present invention provides a national secret mixed homomorphic encryption method, comprising:

[0024] The client obtains the plaintext, and symmetric-encrypts the plaintext using the national encryption algorithm to obtain symmetric ciphertext;

[0025] The server performs homomorphic encryption on the symmetric ciphertext, runs a symmetric cryptographic algorithm decryption circuit, performs homomorphic decryption, and performs homomorphic computing operations in sequence to obtain an encryption operation result;

[0026] The client performs homomorphic decryption on the encrypted operation result to obtain the operation result.

[0027] A fourth aspect of the present invention provides a national secret hybrid homomorphic encryption system, including a client and a server;

[0028] The client is used to obtain plaintext, and symmetrically encrypt the plaintext using a national encryption algorithm to obtain a symmetric ciphertext;

[0029] The server is used to perform homomorphic encryption on the symmetric ciphertext in sequence, run a symmetric cryptographic algorithm decryption circuit, perform homomorphic decryption and perform homomorphic computing operations to obtain an encryption operation result;

[0030] The client is also used to perform homomorphic decryption on the encrypted operation result to obtain the operation result.

[0031] The fifth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in a national secret mixed homomorphic encryption method as described above.

[0032] The sixth aspect of the present invention provides a computer device, including a computer-readable storage medium, a processor, and a computer program stored on the computer-readable storage medium and executable on the processor, wherein when the processor executes the program, the steps in a national secret mixed homomorphic encryption method as described above are implemented.

[0033] The seventh aspect of the present invention provides a computer program product, which is a computer program product containing a computer program. When a processor executes the computer program, it implements the steps in a national secret mixed homomorphic encryption method as described above.

[0034] Compared with the prior art, the present invention has the following beneficial effects:

[0035] The present invention designs and implements hybrid homomorphic encryption based on the national secret algorithm and the homomorphic encryption algorithm, filling the gap in hybrid homomorphic encryption based on the national secret algorithm.

[0036] The present invention adopts Boolean circuits to implement the national secret algorithm under homomorphic encryption. Since the operations of AND gates and XOR gates in homomorphic encryption are implemented through gate bootstrapping or programmable bootstrapping, the running time after these two types of gates will be significantly increased. The present invention optimizes the linear layer and nonlinear layer of the national secret algorithm respectively, reduces the total number of gates in the implementation of the national secret algorithm decryption circuit, and greatly improves the performance of the national secret algorithm decryption circuit under the homomorphic encryption algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0038] Figure 1 This is a flow chart of a national secret mixed homomorphic encryption method according to the first embodiment of the present invention;

[0039] Figure 2 1 is a framework diagram of a TFHE algorithm according to Embodiment 1 of the present invention;

[0040] Figure 3 This is a diagram of the SM4 algorithm optimization framework of the first embodiment of the present invention;

[0041] Figure 4 It is a structural diagram of a computer device according to Embodiment 6 of the present invention. DETAILED DESCRIPTION

[0042] To make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0043] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0044] Embodiment 1

[0045] This embodiment provides a national secret hybrid homomorphic encryption method, which uses the SM4 algorithm as a symmetric primitive, filling the gap in hybrid homomorphic encryption based on the national secret algorithm.

[0046] This embodiment provides a national secret hybrid homomorphic encryption method, which designs and implements hybrid homomorphic encryption based on the national secret algorithm SM4 and the TFHE homomorphic encryption algorithm (the third-generation fully homomorphic encryption algorithm). SM4 is used as the symmetric cipher used to encrypt data when the client sends it to the server. Compared with other international standard block cipher algorithms, SM4 has a broader application market, a richer ecological environment, and more solid security features, filling the gap in hybrid homomorphic encryption based on the national secret algorithm.

[0047] Since the SM4 algorithm involves a large number of linear and nonlinear transformations, there is still a certain performance gap compared to some symmetric cryptographic primitives designed specifically for hybrid homomorphic encryption. Therefore, how to use TFHE homomorphic operations to quickly and efficiently implement SM4 while ensuring the correctness of encryption and decryption is an important technical issue.

[0048] This embodiment provides a national secret hybrid homomorphic encryption method, which uses a Boolean circuit to implement the SM4 algorithm under TFHE. Since the operations of AND gates and XOR gates in TFHE are implemented through gate bootstrapping or programmable bootstrapping, the running time of these two gates will be significantly increased. This embodiment optimizes the linear layer and nonlinear layer of the SM4 circuit respectively, reduces the total number of gates (including AND gates and XOR gates) in the implementation of the SM4 decryption circuit, and greatly improves the performance of the decryption circuit of the national secret algorithm under the TFHE algorithm.

[0049] Note that the homomorphic encryption algorithm used is H, the symmetric encryption algorithm is S, and C S (m) is the symmetric ciphertext after the plaintext m is symmetric encrypted, C H (m) is the homomorphic ciphertext of the plaintext m after homomorphic encryption (referred to as plaintext homomorphic ciphertext), C HS (m) is the symmetric ciphertext C S (m) Homomorphic ciphertext after homomorphic encryption (abbreviated as symmetric ciphertext homomorphic ciphertext).

[0050] This embodiment provides a national secret mixed homomorphic encryption method, such as Figure 1 As shown, the following steps are included:

[0051] Step 1. Initialization: The client runs the key generation algorithms H.KeyGen and S.KeyGen of the homomorphic encryption TFHE and symmetric encryption SM4 schemes respectively, that is, (sk H ,pk H )←H.KeyGen(λ),sk S ←S.KeyGen(λ), where λ is the security parameter and sk H is the homomorphic private key, pk H is the homomorphic public key, sk Sis a symmetric key; and the homomorphic public key pk generated by the client H and the symmetric key after homomorphic encryption H.Enc, namely C H (sk i S )=H.Enc(sk i S ,pk H ) and sent to the server. i S That is the symmetric key sk S .

[0052] Step 2: Symmetric encryption: The client, based on the symmetric key, uses the symmetric encryption scheme S.Enc to encrypt its data (plaintext) m, and sends the symmetric encrypted data (symmetric ciphertext) C. S (m i )=S.Enc(m i ,sk S ) to the server. i For the i-th batch of messages corresponding to the plaintext m, the client sends the plaintext to the server in batches.

[0053] Step 3: Homomorphic decryption: The server receives data C sent by the client. S (m i ) After that, first use the homomorphic public key pk H , perform homomorphic encryption on it and convert it into symmetric ciphertext homomorphic ciphertext C HS (m i ); for client data (symmetric ciphertext homomorphic ciphertext C HS (m i )), after running the symmetric cryptographic algorithm decryption circuit S.Dec using the H.Eval (homomorphic decryption circuit) algorithm, a homomorphic decryption operation is performed, making the client's data C HS (m i ) is converted into plaintext homomorphic ciphertext C H (m i ), that is, C H (m i )=H.Eval(S.Dec(C HS (m i ),C H (sk i S ),pk H )).

[0054] Among them, H is the homomorphic encryption algorithm, including H.KeyGen, H.Encrypt, H.Decrypt, and H.Eval.

[0055] Step 4: Homomorphic computation: After successfully converting the symmetric ciphertext sent by the client into homomorphic encryption, the server performs a homomorphic computation operation f on the plaintext homomorphic ciphertext according to the computation operation f that the client wants to perform, i.e., C H (f(m i ))=H.Eval(f(C H (m i ))).

[0056] Step 5: Result return: After the server completes the homomorphic calculation operation, it sends the encrypted calculation result C H (f(m i )) to the client, which performs homomorphic decryption H.Dec after receiving it and obtains the calculated data f(m i ), that is, f(m i )=H.Dec(C H (f(m i )),sk H ).

[0057] like Figure 2 As shown, under TFHE, Boolean circuit gates can be mainly implemented through gate bootstrapping and programmable bootstrapping. In these two implementation methods, each Boolean circuit gate will increase the running time of the decryption circuit. Therefore, the optimization goal is to reduce the total number of Boolean circuit gates of the SM4 decryption circuit.

[0058] In this embodiment, Figure 3 As shown, by optimizing the SM4 linear layer and the nonlinear layer, the total number of Boolean circuit gates of the SM4 decryption circuit is reduced.

[0059] (1) Optimization of the SM4 linear layer.

[0060] Assume that the input of SM4 linear transformation L is The output is So:

[0061] C=L(B)=B⊕(B<<<2)⊕(B<<<10)⊕(B<<<18)⊕(B<<<24).

[0062] Note that the linear transformation L can be converted into a bit-level matrix for further optimization, written as a 32×32 The matrix M on the graph is as follows:

[0063]

[0064] Then the output of the linear transformation L can be obtained through C=M·B. Then the normal circuit implementation requires 128 XOR gates. Therefore, the goal of optimizing the linear layer is to reduce the number of XOR gates required for the matrix multiplication y=M·x circuit.

[0065] The following introduces an algorithm that can achieve this purpose:

[0066] Use the RNBP (Randomised-Normal-BP) algorithm to optimize the linear layer of the symmetric encryption algorithm SM4. The algorithm description is as follows:

[0067] First is the BP algorithm: Let the input variables x0, x1,..., xn-1 and the output variables y0, y1,..., ym-1 represent the n-bit input and m-bit output of the m×n matrix M respectively. Therefore, yi can be expressed as a linear Boolean function of xj, 0 ≤ j < n. This heuristic method defines two parameters: one parameter is the basis S, which is used to record the set of known variables (or expressions); the other parameter is the distance vector Dist[], where Dist = (δ(S, y0), δ(S, y1),..., δ(S, ym-1)), and δ(S, yi) represents the minimum number of XOR (exclusive OR gates) required to obtain yi from S.

[0068] Initially, this heuristic method first adds all the input variables x0, x1,..., xn-1 to the basis S and initializes the distance vector Dist[] to the Hamming weight of each row minus 1, that is, Dist[i] = δ(S, yi) = wt(Mi) - 1, i ∈ [0, m - 1], where Mi represents the i-th row of the matrix M, and wt(M) represents the Hamming weight of the matrix M; then, this heuristic method selects two variables from S and represents the sum of these two variables by a new variable, so that if this new variable is added to S, the sum of the new distance vectors can be minimized; the BP algorithm executes the above steps until all elements of Dist[] are zero. When selecting new basis elements, if there are multiple candidates that can minimize the sum of the new distance vectors, then the Euclidean norm will be used to resolve the conflict, and only the candidate that maximizes the Euclidean norm of the updated Dist[] vector can be added to S.

[0069] RNBP differs from the BP algorithm in the way it handles conflict decisions. In the original BP algorithm, if there are multiple candidates that minimize the sum of their distance vectors, the Euclidean norm of these distance vectors should be calculated and the candidate with the largest Euclidean norm should be selected. However, if there are still multiple candidates with the same largest Euclidean norm, the BP algorithm will select the first candidate or use some randomization method. Boyar and Peralta introduced randomization of this stage, where the first candidate that appears is selected (or discarded) with probability 1 / 2, and the second candidate is treated in a similar way if the first candidate is discarded. However, this results in unequal probabilities of selecting these equally good candidates. Therefore, RNBP treats these candidates equally and each candidate is selected with the same probability.

[0070] Through the RNBP algorithm, the number of XOR gates required for matrix multiplication (ie, SM4 linear transformation L) can be further reduced.

[0071] (2) Optimization of the SM4 nonlinear layer.

[0072] The S-box of the SM4 algorithm is divided into three stages:

[0073] Initial linear expansion (U): This stage maps 8 input bits to 22 bits. Specifically, it includes a series of linear transformations and permutations to expand the number of input bits and increase obfuscation. These transformations and permutations include byte substitutions (SubBytes) and row shifts (ShiftRows).

[0074] Non-linear compression (F): This stage is represented by a circuit containing only AND and XOR logic gates, mapping the previous 22 bits to 18 bits. This stage introduces strong obfuscation and non-linearity mainly through non-linear mapping using S-boxes. An S-box is a fixed lookup table where each input byte corresponds to a unique output byte.

[0075] Linear Compression (B): This stage maps the previous 18 bits to the 8 output bits of the S-box. It includes a series of linear transformations and permutations to further increase obfuscation and diffusion. These transformations and permutations include MixColumns and Round Key Addition.

[0076] Implement the circuit.

[0077] The hybrid homomorphic encryption framework is adopted to solve the ciphertext expansion problem of the original TFHE. At the same time, after optimizing the SM4 algorithm, the homomorphic decryption speed is optimized by more than ten times, as shown in Table 1.

[0078] Table 1. Optimization results

[0079] SM4 is not optimized After SM4 optimization Performance Improvements 2567.16s 185.64s 1382%

[0080] Embodiment 2

[0081] This embodiment provides a national secret mixed homomorphic encryption method, which is applied to the server side and includes:

[0082] Obtaining a symmetric ciphertext, wherein the symmetric ciphertext is obtained by applying a national secret algorithm to the plaintext;

[0083] After homomorphically encrypting the symmetric ciphertext to obtain the symmetric ciphertext homomorphic ciphertext, the symmetric ciphertext homomorphic ciphertext is subjected to a symmetric cryptographic algorithm decryption circuit and homomorphically decrypted to obtain the plaintext homomorphic ciphertext;

[0084] A homomorphic computing operation is performed on the plaintext homomorphic ciphertext to obtain and send an encrypted computing result, so as to perform homomorphic decryption on the encrypted computing result to obtain a computing result.

[0085] Among them, the operation of the symmetric cryptographic algorithm decryption circuit and the homomorphic decryption are carried out based on the symmetric key that has been homomorphically encrypted.

[0086] The reduction of the total number of Boolean circuit gates of the decryption circuit of the symmetric cryptographic algorithm is achieved by optimizing the linear layer and / or nonlinear layer of the symmetric cryptographic algorithm.

[0087] The optimization of the nonlinear layer refers to dividing the S-box of the symmetric cryptographic algorithm into initial linear expansion, nonlinear compression and linear compression;

[0088] The initial linear expansion expands the number of input bits of the S-box by byte substitution and row shift;

[0089] The nonlinear compression compresses the expanded input bits through nonlinear mapping;

[0090] The linear compression maps the compressed input bits to the output bits of the S-box through column confusion and round key addition.

[0091] It should be noted here that the various steps in this embodiment correspond one-to-one to the various steps in Example 1, and the specific implementation process is the same, which will not be repeated here.

[0092] Embodiment 3

[0093] This embodiment provides a national secret mixed homomorphic encryption method, which is applied to a client and includes:

[0094] Get the plaintext;

[0095] Symmetrically encrypt the plaintext using a national encryption algorithm, obtain and send a symmetric ciphertext, and obtain a returned encryption operation result;

[0096] Perform homomorphic decryption on the encrypted operation result to obtain the operation result;

[0097] The encryption operation result is obtained by sequentially performing homomorphic encryption on the symmetric ciphertext, running a symmetric cryptographic algorithm decryption circuit, performing homomorphic decryption, and performing homomorphic computing operations.

[0098] It should be noted here that the various steps in this embodiment correspond one-to-one to the various steps in Example 1, and the specific implementation process is the same, which will not be repeated here.

[0099] Embodiment 4

[0100] This embodiment provides a national secret hybrid homomorphic encryption system, which specifically includes a client and a server;

[0101] The client is used to obtain plaintext, and symmetrically encrypt the plaintext using a national encryption algorithm to obtain a symmetric ciphertext;

[0102] The server is used to perform homomorphic encryption on the symmetric ciphertext in sequence, run a symmetric cryptographic algorithm decryption circuit, perform homomorphic decryption and perform homomorphic computing operations to obtain an encryption operation result;

[0103] The client is also used to perform homomorphic decryption on the encrypted operation result to obtain the operation result.

[0104] It should be noted here that each execution end in this embodiment corresponds one-to-one to each step in Example 1, and the specific implementation process is the same, which will not be repeated here.

[0105] Embodiment 5

[0106] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in a national secret mixed homomorphic encryption method as described in the above embodiment one are implemented.

[0107] Embodiment 6

[0108] This embodiment provides a computer device, such as Figure 4 As shown, it includes a computer-readable storage medium 1003, a processor 1001, a communication interface 1002, and a computer program stored on the computer-readable storage medium 1003 and executable on the processor 1001, wherein the processor 1001, the communication interface 1002, and the computer-readable storage medium 1003 can be connected via a bus or other means. Among them, the communication interface 1002 is used to receive and send data, and the processor 1001 implements the steps in a national secret mixed homomorphic encryption method as described in the above-mentioned embodiment 1 when executing the program.

[0109] Embodiment 7

[0110] This embodiment provides a computer program product, which is a computer program product containing a computer program. When the processor executes the computer program, the steps in the national secret mixed homomorphic encryption method described in the above embodiment 1 are implemented.

[0111] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0112] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0113] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0114] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A national secret mixed homomorphic encryption method, characterized in that: Applied to the server side, including: Obtaining a symmetric ciphertext, where the symmetric ciphertext is obtained by applying a national secret algorithm to the plaintext; After homomorphically encrypting the symmetric ciphertext to obtain the symmetric ciphertext homomorphic ciphertext, the symmetric ciphertext homomorphic ciphertext is subjected to a symmetric cryptographic algorithm decryption circuit and homomorphically decrypted to obtain the plaintext homomorphic ciphertext; A homomorphic computing operation is performed on the plaintext homomorphic ciphertext to obtain and send an encrypted computing result, so as to perform homomorphic decryption on the encrypted computing result to obtain a computing result.

2. A national secret mixed homomorphic encryption method as claimed in claim 1, characterized in that: The operation of the symmetric cryptographic algorithm decryption circuit and the homomorphic decryption are performed based on the symmetric key that has been homomorphically encrypted.

3. A national secret mixed homomorphic encryption method as described in claim 1, characterized in that: The reduction of the total number of Boolean circuit gates of the symmetric cryptographic algorithm decryption circuit is achieved by optimizing the linear layer and / or nonlinear layer of the symmetric cryptographic algorithm.

4. A national secret mixed homomorphic encryption method as described in claim 3, characterized in that: The optimization of the nonlinear layer refers to dividing the S-box of the symmetric cryptographic algorithm into initial linear expansion, nonlinear compression and linear compression; The initial linear expansion expands the number of input bits of the S-box by byte substitution and row shift; The nonlinear compression compresses the expanded input bits through nonlinear mapping; The linear compression maps the compressed input bits to the output bits of the S-box through column confusion and round key addition.

5. A national secret mixed homomorphic encryption method, characterized in that: Applied to the client, including: Get the plaintext; Symmetrically encrypt the plaintext using a national encryption algorithm, obtain and send a symmetric ciphertext, and obtain a returned encryption operation result; Perform homomorphic decryption on the encrypted operation result to obtain the operation result; The encryption operation result is obtained by sequentially performing homomorphic encryption on the symmetric ciphertext, running a symmetric cryptographic algorithm decryption circuit, performing homomorphic decryption, and performing homomorphic computing operations.

6. A national secret mixed homomorphic encryption method, characterized in that: include: The client obtains the plaintext, and symmetrically encrypts the plaintext using the national encryption algorithm to obtain symmetric ciphertext; The server performs homomorphic encryption on the symmetric ciphertext, runs a symmetric cryptographic algorithm decryption circuit, performs homomorphic decryption, and performs homomorphic computing operations in sequence to obtain an encryption operation result; The client performs homomorphic decryption on the encrypted operation result to obtain the operation result.

7. A national secret mixed homomorphic encryption system, characterized in that: Including client and server; The client is used to obtain plaintext, and symmetrically encrypt the plaintext using a national encryption algorithm to obtain a symmetric ciphertext; The server is used to perform homomorphic encryption on the symmetric ciphertext in sequence, run a symmetric cryptographic algorithm decryption circuit, perform homomorphic decryption and perform homomorphic computing operations to obtain an encryption operation result; The client is also used to perform homomorphic decryption on the encrypted operation result to obtain the operation result.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps in a national secret mixed homomorphic encryption method as described in any one of claims 1-4 or claim 5 are implemented.

9. A computer device comprising a computer-readable storage medium, a processor, and a computer program stored on the computer-readable storage medium and executable on the processor, characterized in that: When the processor executes the program, it implements the steps in a national secret mixed homomorphic encryption method as described in any one of claims 1-4 or claim 5.

10. A computer program product, which is a computer program product containing a computer program, characterized in that When the processor executes the computer program, the steps in a national secret mixed homomorphic encryption method as described in any one of claims 1 to 4 or claim 5 are implemented.

Citation Information

Cited By

  • Multi-modal education data security processing method and system based on national cryptographic algorithm and homomorphic encryption

    CN121664422A