A homomorphic encryption data security fusion method based on combined random numbers
By combining random number Paillier homomorphic encryption and lightweight ECDSA signature algorithm, the contradiction between computing overhead and security protection in IoT data security fusion is resolved, low-overhead data confidentiality and integrity are achieved, and network life is extended.
Patent Information
- Application Number
- CN202211515099.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-30
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2042-11-30
AI Technical Summary
Existing data security fusion methods cannot balance data security protection and computing and communication overhead, resulting in increased energy consumption of IoT nodes with limited network resources.
The Paillier homomorphic encryption algorithm based on combined random numbers and the lightweight ECDSA digital signature algorithm are adopted. The base station initializes the parameters and keys, the ordinary nodes encrypt and sign the data, the cluster head node verifies and integrates the data, and the base station decrypts to obtain the true result, reducing the computing overhead and ensuring the confidentiality and integrity of the data.
While ensuring data confidentiality and integrity, it reduces the computing overhead of nodes, extends the network life, and improves the utilization efficiency of network resources.
Smart Images

Figure CN115765968B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of communication security technology, relates to a data security fusion method for the Internet of Things, and mainly relates to a homomorphic encryption data security fusion method based on combined random numbers. Background Art
[0002] With the steady development of society and the economy, people's demands for quality of life are gradually increasing, and the demand for smarter lifestyles is becoming increasingly popular. The rapid development of IoT technology has enabled an increasing number of intelligent devices to enter people's daily lives. These devices offer reliability, flexibility, security, and self-healing capabilities. They not only work independently but also collaborate and complement each other, profoundly changing how people live, work, and interact with the physical world.
[0003] As the Internet of Things (IoT) continues to grow, the communication, computing, and storage resources consumed to process and transmit data within the network are also increasing. The IoT consists of a large number of battery-powered data nodes with limited storage and computing capabilities. How to effectively handle the massive amounts of data generated by the IoT is a pressing challenge in current networks.
[0004] Data fusion is one of the key technologies currently used to reduce IoT data transmission overhead. Data fusion involves analyzing the raw data from different nodes during the layer-by-layer data upload process, removing any non-compliant or duplicate data, and then integrating the valid raw data in a streamlined manner to improve efficiency and extend network life. While data fusion significantly reduces network data transmission volume and effectively extends network life, it also poses security risks. The IoT generally transmits information via wireless communications. During the data fusion process, due to the open nature of wireless channels and the unsupervised nature of nodes, attackers can eavesdrop on transmissions over the wireless link to obtain private information, threatening the privacy of data held by individual sensor nodes. Therefore, ensuring the confidentiality and integrity of the data fusion process is crucial.
[0005] The process of protecting data confidentiality and integrity naturally increases energy consumption. Therefore, the contradiction between limited network resources (such as node energy and storage space) and necessary security requirements is a key issue that current data security fusion methods must address. Summary of the Invention
[0006] The present invention addresses the problem that existing data security fusion algorithms cannot balance data security protection and computational communication overhead. It provides a homomorphic encryption data security fusion method based on combined random numbers. First, the base station initializes the necessary parameters and generates key information for each node participating in data fusion. Ordinary nodes encrypt the original data using an improved algorithm based on combined random numbers and Paillier homomorphic encryption, and sign the ciphertext using a lightweight ECDSA digital signature algorithm. The cluster head node verifies the signature of the member data, performs ciphertext fusion on the verified data, and generates a new signature. Finally, the base station decrypts the fused ciphertext according to the Paillier algorithm to obtain the true fusion result. The method of the present invention uses an improved Paillier homomorphic encryption algorithm based on combined random numbers to ensure data confidentiality while reducing the computational overhead of the nodes, and uses a lightweight ECDSA digital signature algorithm to ensure the integrity and freshness of the data.
[0007] To achieve the above objectives, the present invention adopts a technical solution: a homomorphic encryption data security fusion method based on combined random numbers, comprising the following steps:
[0008] S1, system initialization phase: The base station initializes the necessary parameters for each node participating in data fusion and generates key information. The necessary parameters include at least the node ID of the node's unique identity. i , Cluster Identity CID j , buffer pool space and related parameters of the finite field elliptic curve E;
[0009] S2, encryption and signature phase: ordinary nodes use an improved algorithm based on combined random numbers and Paillier homomorphic encryption to encrypt the original data and use the lightweight ECDSA digital signature algorithm to sign the ciphertext;
[0010] S3, data fusion stage,: the cluster head node verifies the signature of the member data, performs ciphertext fusion on the verified data and generates a new signature;
[0011] S4, data decryption stage: The base station decrypts the fusion ciphertext according to the Paillier algorithm to obtain the true fusion result.
[0012] As an improvement of the present invention, in step S1, the base station generates public key (n, g) and private key (λ, μ) information according to the Paillier homomorphic encryption algorithm, where g=n+1 is fixed, the base station retains the private key information, and the public key information is broadcast throughout the network.
[0013] As an improvement of the present invention, in step S1, the base station generates the relevant parameters (p, a, b, G, q) of the finite field elliptic curve E according to the ECDSA digital signature algorithm and loads them to each node. The elliptic curve E:y2 =(x 3 +ax+b)mod p, where p is a randomly generated large prime number, a and b are the coefficients of the curve equation, G is the base point selected on the elliptic curve E, and q is the order of the base point G; each node randomly selects the private key information sk on the elliptic curve integer field ij , calculate the corresponding public key PK ij , and upload the public key information to the cluster head node and base station.
[0014] As an improvement of the present invention, step S2 further includes:
[0015] S21, after receiving the query request broadcast by the base station, the ordinary node checks the status flag of the cache pool i If the cache pool is in the cache stage, then the process goes to step S22; if the cache pool is full, then the node is in the combined random number stage, then the process goes to step S24;
[0016] S22, random number Generation, modular exponentiation r n mod n 2 Then, the ciphertext c is calculated using the following formula ij :
[0017] c ij =g m ·r n mod n 2 =(mn+1)·r n mod n 2
[0018] Among them, m represents the original data of the node, c ij Represents node CM ij The ciphertext generated after homomorphic encryption;
[0019] S23, cache calculated value r n mod n 2 , the corresponding statistical number is set to 0, and it is determined whether the buffer pool space is full. If it is full, continue to step S24, otherwise, return to step S22;
[0020] S24, according to the improved Paillier homomorphic encryption algorithm based on combined random numbers, randomly select 2 data k1=r1 from the cache pool n mod n 2 and To judge the freshness of the data, if the number of times t1 and t2 of the two data are used does not reach the threshold T, a new random number s = k1k2 mod n is generated by combining random numbers. 2 Complete the encryption of the original data, the encryption formula is cij =(mn+1)s mod n 2 , then cache s, randomly replace one of k1 and k2, inherit its usage count t, and add 1 to the usage count of the other data that has not been replaced; otherwise, a new random number is generated to calculate the ciphertext and the cache pool data is updated;
[0021] S25: Sign the calculated ciphertext, the signature object is Ec=c ij ||query a ||time a , where query a 、time a The query number and timestamp information corresponding to this query;
[0022] S26: Information upload, the message format is (c ij ,query a ,time a ,ID i ,σ ij ), including ciphertext data c ij , request related information, node number ID i And the generated signature σ ij .
[0023] As another improvement of the present invention, in step S21, the specific method for checking the cache pool status is:
[0024]
[0025] Where c i Represents node CM ij The amount of space currently occupied by the buffer pool, where C represents the node CM ij The total size of the pre-allocated buffer pool; when flag i =true, indicating that there is space in the cache pool and the node is currently in the cache stage; when flag i =false, indicating that the cache pool is full and the node is currently in the random number combination phase.
[0026] As another improvement of the present invention, a random number needs to be generated before the signature calculation in step S25. According to the principle of ECDSA digital signature algorithm, the signature of message Ec is completed, and the final signature content is σ ij =(r,s).
[0027] As another improvement of the present invention, in step S3, the cluster head node performs signature verification on the member data, which at least includes querying whether the information is correct, whether the member is a legal member in the cluster, whether the signature is verified, etc., to filter out false data in the network. If the verification is successful, the data is accepted; otherwise, the data is discarded.
[0028] As another improvement of the present invention, the step S3 in which the cluster head node performs ciphertext fusion on the verified data and generates a new signature specifically includes: the cluster head node performs fusion operation on the verified ciphertext data to obtain the fused ciphertext of the cluster, and uses c j represents the fused ciphertext of all nodes in cluster j, and the ciphertext fusion formula is as follows:
[0029]
[0030] After completing the data fusion operation, the cluster head uses its own private key Sign the fused ciphertext and get the signature result σ j , the signature object is (c j ||query a ||time a );
[0031] Then, upload the processing results to the base station, the message format is (c j ,query a ,time a ,CID j ,σ j ), including cluster fusion ciphertext c j , query related information, cluster identity CID j And the overall signature result σ j .
[0032] As a further improvement of the present invention, in step S4, the base station uses the Paillier homomorphic encryption private key (λ, μ) to decrypt the fused data and obtain the true fused value. The specific decryption formula is as follows:
[0033] M=D(c)=L(c λ mod n 2 )·μmod n
[0034] Where L(x) = x-1 / n, c represents the fused ciphertext of the entire network node, and M represents the final fused result of this query.
[0035] Compared with existing technologies, this paper improves on the traditional Paillier homomorphic encryption algorithm and proposes a data security fusion method based on Paillier combined random numbers. This method generates new random numbers by combining historical random numbers and establishes a suitable update strategy to maintain the freshness of cached data. While protecting data confidentiality, it reduces the computational overhead caused by frequent modular exponentiation operations and extends the life of the network. This paper also introduces the lightweight ECDSA digital signature algorithm to ensure data integrity, freshness, and non-repudiation, ensuring good security performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 The data transmission flow chart of the method of the present invention based on the homomorphic encryption data security fusion method of the combined random number;
[0037] Figure 2 This is a workflow diagram of common nodes in the encryption and signature phase in step S2 of the method of the present invention;
[0038] Figure 3 This is a workflow diagram of the random number combination stage in step S2 of the method of the present invention.
[0039] Figure 4 This is a workflow diagram of the data fusion stage in step S3 of the method of the present invention;
[0040] Figure 5 This is a workflow diagram of the data decryption phase in step S4 of the method of the present invention. DETAILED DESCRIPTION
[0041] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. It should be understood that the following specific embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention.
[0042] Example 1
[0043] A method for secure data fusion using homomorphic encryption based on combined random numbers, comprising the following steps:
[0044] Step S1, system initialization phase, allocates necessary parameters, keys and update strategies to each node.
[0045] An IoT node cluster typically consists of three parts: base stations, cluster heads, and regular nodes. The base station, at the top of the hierarchy, possesses unlimited energy, computing power, and storage capabilities, and is responsible for managing all nodes within the network. Before deploying IoT nodes, the base station must initialize the necessary parameters for each node.
[0046] (1) The base station distributes a unique node ID to each node participating in data fusion. i, pre-loaded on each node.
[0047] (2) The base station distributes a cluster identity CID to each cluster j , as the unique identifier of the cluster, all nodes in the cluster share the cluster identity.
[0048] (3) The base station generates a public key (n, g) and a private key (λ, μ) according to the Paillier homomorphic encryption algorithm, where the public key g is fixed to n+1. The base station retains the private key information and publishes the generated public key information within the network.
[0049] (4) The base station sets a cache pool of size C for each node to store the homomorphic encryption parameters calculated in historical queries, and sets the cache data usage threshold T and an appropriate update strategy to maintain the freshness of the data in the cache pool.
[0050] (5) The base station generates the relevant parameters (p, a, b, G, q) of the finite field elliptic curve E according to the ECDSA digital signature algorithm and loads it to each node. The curve equation is defined as: E:y 2 =(x 3 +ax+b)mod p, where p is a randomly generated large prime number, a and b are the coefficients of the curve equation, G is the base point selected on the elliptic curve E, and q is the order of the base point G. Each node randomly selects the private key information sk on the elliptic curve integer field. ij , calculate the corresponding public key PK ij , and upload the public key information to the cluster head node and base station.
[0051] The data query request is initiated by the base station, such as Figure 1 The base station generates the relevant information for this query request, including the query number query a and query time a , and then broadcasts the query request and related information to all nodes in the network. After receiving the query request, the nodes in the network process and merge the data and upload it.
[0052] Step S2: encryption and signature phase, ordinary nodes complete the relevant processing of the original data.
[0053] The general processing flow of ordinary nodes in the encryption and signature stage is as follows Figure 2 shown.
[0054] (1) Ciphertext calculation
[0055] After receiving the query request from the base station, the node CM ij First check the status flag of the cache pool i The cache pool status formula is as follows:
[0056]
[0057] Where c i Represents node CM ij The amount of space currently occupied by the buffer pool, where C represents the node CM ij The total size of the pre-allocated buffer pool. If flag i = true, indicating that there is space in the cache pool and the node is currently in the cache stage. i =false, indicating that the cache pool is full and the node is currently in the random number combination phase.
[0058] During the caching phase, the data encryption process is divided into two steps.
[0059] 1) The encryption process is consistent with the traditional Paillier homomorphic encryption algorithm, generating a random number first Calculate r n mod n 2 , and use the following formula to calculate the ciphertext.
[0060] c ij =g m ·r n mod n 2 =(mn+1)·r n mod n 2
[0061] Among them, m represents the original data of the node, c ij Represents node CM ij The ciphertext generated after homomorphic encryption.
[0062] 2) After completing the ciphertext calculation, the node needs to calculate the value r generated by the data query n mod n 2 Cache, and initialize its statistical times t = 0; then determine whether the cache pool space is full, if it is full, the cache pool state is transferred to flag i =false.
[0063] During the random number combination phase, nodes do not generate random numbers and perform modular exponentiation each time. Instead, they randomly select multiple historical random numbers from the cache pool, combine them into a new random number, and then use this new random number to homomorphically encrypt the original data. This method uses the simplest method of randomly selecting a combination of two historical random numbers. The specific implementation process is described below.
[0064] 1) Randomly select 2 numbers k1=r1 from the cache pool of size C n mod n 2 and Determine whether the number of times k1 and k2 are used, t1 and t2, reaches the threshold T;
[0065] 2) If neither t1 nor t2 reaches the threshold T, calculate the combined random number s = k1k2 mod n 2 , and calculate the ciphertext according to the formula.
[0066] c ij =(mn+1)s mod n 2
[0067] After the ciphertext calculation is completed, cache s, randomly replace one of k1 and k2, inherit its usage count, and add 1 to the usage count of the other number that has not been replaced. The general processing process is as follows Figure 3 shown.
[0068] 3) If one of t1 and t2 reaches the threshold T, a new random number r is generated and r is calculated. n mod n 2 And replace it, count the number of times back to 0, and then calculate c ij =(mn+1)·r n mod n 2 Get the ciphertext.
[0069] (2) Signature calculation
[0070] In this method, digital signature is implemented based on ciphertext, and the signature object is: Ec=c ij ||query a ||time a , including the query number and timestamp information corresponding to this query. Before calculating the signature, a random number must be generated. Where q is the order of the elliptic curve base point G, and then the message Ec is signed according to the principle of the lightweight ECDSA digital signature algorithm. The final signature content is σ ij =(r,s).
[0071] (3) Information upload
[0072] After completing the encryption and signing operations, the node CM ij Upload the processing results to the cluster head node CH j , the final uploaded information is (c ij ,query a ,time a ,ID i ,σ ij ), including ciphertext data c ij , request related information, node number ID i And the generated signature σ ij .
[0073] Step S3, data fusion phase, the cluster head node completes the verification and fusion operation of member data
[0074] The general processing flow of the cluster head node in the data fusion stage is as follows: Figure 4 As shown. When the cluster head CH j After receiving the upload information, first identify the node ID of the identity i Check to see if the source of the information is a member node in the cluster. If not, reject the information. If the identity is true, check the query number query a and timestamp time a The validity of the uploaded information is checked to see if it matches the current query. If not, the information is rejected. If it does match, the signature verification operation is performed. This step is a preliminary test of the uploaded information to filter out false data such as illegal identities or query information that does not match.
[0075] After preliminary data filtering, the cluster head node CH j Need to use node CM ij The signature verification public key PK ij Complete the signature σ ij Verify the integrity of the data and the legitimacy of the information source. If the signature verification of the data uploaded by the node passes, it indicates that the information source is legitimate and has not been tampered with during the communication process, and the data is accepted. If the signature verification fails, it indicates that the integrity of the data uploaded by the node is compromised or the source is illegal, and the false data must be discarded.
[0076] For data that passes signature verification, the cluster head node CH j Its ciphertext c ij Perform fusion operation. Use c j represents the fused ciphertext of all nodes in cluster j, and its calculation formula is as follows.
[0077]
[0078] Cluster head node CH j After completing the integration of the original data in the cluster, you need to use your own private key Sign the fused ciphertext as a whole, the signature object is: (c j ||query a ||time a ).
[0079] After completing all the above operations, the cluster head node uploads the processing results to the base station. The final uploaded information is expressed as: (c j ,query a ,time a ,CIDj ,σ j ), including cluster fusion ciphertext c j , query related information, cluster identity CID j And the overall signature result σ j .
[0080] Step S4, data decryption phase, the base station decrypts to obtain the final fusion result
[0081] The general processing flow of the base station in the data decryption stage is as follows: Figure 5 In this method, the base station BS completes the decryption of the fused ciphertext data. The base station needs to j Uploaded information (c j ,query a ,time a ,CID j ,σ j ) completes the verification of identity, query information, and signature, discards false data, and performs a fusion operation on the verified data to obtain the fused ciphertext c of the entire network node; finally, the base station uses the Paillier homomorphic encryption private key (λ, μ) to complete the decryption of the fused data and obtain the true fused value. The specific decryption formula is as follows:
[0082] M=D(c)=L(c λ mod n 2 )·μmod n
[0083] Where, L(x) = x-1 / n, and M represents the final fusion result of this query.
[0084] In summary, the method of the present invention realizes the secure integration of IoT data, while ensuring data confidentiality, integrity and freshness, with lower computing overhead and better energy saving.
[0085] It should be noted that the above content merely illustrates the technical idea of the present invention and cannot be used to limit the scope of protection of the present invention. For ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications all fall within the scope of protection of the claims of the present invention.
Claims
1. A homomorphic encryption data security fusion method based on combined random numbers, characterized in that: The following steps are involved: S1, system initialization phase: The base station initializes the necessary parameters for each node participating in data fusion and generates key information. The necessary parameters include at least the node ID i , Cluster Identity CID j , buffer pool space and related parameters of the finite field elliptic curve E; S2, encryption and signature phase: ordinary nodes use an improved algorithm based on combined random numbers and Paillier homomorphic encryption to encrypt the original data and use the lightweight ECDSA digital signature algorithm to sign the ciphertext; S21, after receiving the query request broadcast by the base station, the ordinary node checks the status flag of the cache pool i If the cache pool is in the cache stage, then the process goes to step S22; if the cache pool is full, then the node is in the combined random number stage, then the process goes to step S24; S22, random number Generation, modular exponentiation r n mod n 2 Then, the ciphertext c is calculated using the following formula ij : c ij =g m ·r n mod n 2 =(mn+1)·r n mod n 2 Among them, m represents the original data of the node, c ij Represents node CM ij The ciphertext generated after homomorphic encryption, (n, g) is the public key generated by the base station according to the Paillier homomorphic encryption algorithm; S23, cache calculated value r n mod n 2 , the corresponding statistical number is set to 0, and it is determined whether the buffer pool space is full. If it is full, continue to step S24, otherwise, return to step S22; S24, according to the improved Paillier homomorphic encryption algorithm based on combined random numbers, randomly select 2 data k1=r1 from the cache pool n mod n 2 and To judge the freshness of the data, if the number of times t1 and t2 of the two data are used does not reach the threshold T, a new random number s = k1k2 mod n is generated by combining random numbers. 2 Complete the encryption of the original data, the encryption formula is c ij =(mn+1)s mod n 2 , then cache s, randomly replace one of k1 and k2, inherit its usage count t, and add 1 to the usage count of the other data that has not been replaced; otherwise, a new random number is generated to calculate the ciphertext and the cache pool data is updated; S25: Sign the calculated ciphertext, the signature object is Ec=c ij ||query a ||time a , where query a 、time a The query number and timestamp information corresponding to this query; S26: Information upload, the message format is (c ij ,query a ,time a ,ID i ,σ ij ), including ciphertext data c ij , request related information, node number ID i And the generated signature σ ij ; S3, data fusion stage: the cluster head node verifies the signature of the member data, performs ciphertext fusion on the verified data and generates a new signature; S4, data decryption stage: The base station decrypts the fusion ciphertext according to the Paillier algorithm to obtain the true fusion result.
2. The method for secure homomorphic encryption data fusion based on combined random numbers as claimed in claim 1, characterized in that: In step S1, the base station generates public key (n, g) and private key (λ, μ) information according to the Paillier homomorphic encryption algorithm, where g is fixed to n+1. The base station retains the private key information and broadcasts the public key information to the entire network.
3. The method for secure homomorphic encryption data fusion based on combined random numbers as described in claim 2, characterized in that: In step S1, the base station generates the relevant parameters (p, a, b, G, q) of the finite field elliptic curve E according to the ECDSA digital signature algorithm and loads them to each node. The elliptic curve E:y 2 =(x 3 +ax+b) mod p, where p is a randomly generated large prime number, a and b are the coefficients of the curve equation, G is the base point selected on the elliptic curve E, and q is the order of the base point G; each node randomly selects the private key information sk on the elliptic curve integer field ij , calculate the corresponding public key PK ij , and upload the public key information to the cluster head node and base station.
4. The method for secure homomorphic encryption data fusion based on combined random numbers as claimed in claim 3, characterized in that: In step S21, the specific method for checking the cache pool status is: Where c i Represents node CM ij The amount of space currently occupied by the buffer pool, where C represents the node CM ij The total size of the pre-allocated buffer pool; when flag i =true, indicating that there is space in the cache pool and the node is currently in the cache stage; when flag i =false, indicating that the cache pool is full and the node is currently in the random number combination phase.
5. The method for secure homomorphic encryption data fusion based on combined random numbers as claimed in claim 4, characterized in that: Before the signature calculation in step S25, a random number needs to be generated. According to the principle of ECDSA digital signature algorithm, the signature of message Ec is completed, and the final signature content is σ ij =(r,s).
6. A method for secure homomorphic encryption data fusion based on combined random numbers as claimed in claim 5, characterized in that: In step S3, the cluster head node verifies the member data's signature, including at least querying whether the information is correct, whether the member is a legal member in the cluster, whether the signature is verified, etc., to filter out false data in the network. If the verification is successful, the data is accepted; otherwise, the data is discarded.
7. The method for secure homomorphic encryption data fusion based on combined random numbers as claimed in claim 6, characterized in that: The step S3 in which the cluster head node performs ciphertext fusion on the verified data and generates a new signature specifically includes: the cluster head node performs fusion operation on the verified ciphertext data to obtain the fused ciphertext of the cluster, and uses c j represents the fused ciphertext of all nodes in cluster j, and the ciphertext fusion formula is as follows: After completing the data fusion operation, the cluster head uses its own private key Sign the fused ciphertext and get the signature result σ j , the signature object is (c j ||query a ||time a ); Then, upload the processing results to the base station, the message format is (c j ,query a ,time a ,CID j ,σ j ), including cluster fusion ciphertext c j , query related information, cluster identity CID j And the overall signature result σ j .
8. The method for secure homomorphic encryption data fusion based on combined random numbers as claimed in claim 7, characterized in that: In step S4, the base station uses the Paillier homomorphic encryption private key (λ, μ) to decrypt the fused data and obtain the true fused value. The specific decryption formula is as follows: M=D(c)=L(c λ mod n 2 )·μ mod n Where L(x) = x-1 / n, c represents the fused ciphertext of the entire network node, and M represents the final fused result of this query.