A homomorphic encryption-based measurement data security sharing method
Patent Information
- Application Number
- CN202310745812.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-21
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2043-06-21
AI Technical Summary
随着智能电网建设的推进,传统的加密方法对于海量复杂的电力数据难以达到理想效果
[0029] Implementing this invention has the following beneficial effects: This invention constructs a secure power system transmission system composed of smart meters, smart fusion terminals, and metering automation systems. By using a secret sharing scheme, the system operates relatively securely and stably. By using homomorphic encryption, the measurement data is transmitted in encrypted form, and the metering automation system ultimately decrypts the data to protect user privacy. By implementing this two-step approach, it can accurately and effectively transmit massive amounts of complex measurement data securely, which has high practical application significance.
Smart Images

Figure CN116743341B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power data security technology, specifically to a method for secure sharing of measurement data based on homomorphic encryption. Background Technology
[0002] In recent years, with the increasing digitalization and informatization in the power sector, major power grid companies have also increased their demand for secure and reliable transmission of power system measurement data. Secure sharing and transmission of measurement data mainly includes two aspects: the construction of a secure power system transmission system and security assurance during the measurement data sharing and transmission process. This securely shared measurement data can provide power companies with a data source for big data analysis of electricity consumption, enabling them to promptly detect abnormal electricity usage and thus provide precise and effective guidance for business decisions and corporate development.
[0003] Measurement data sharing primarily addresses the secure transmission of collected measurement data within the system. Electricity data collected during routine power operations is highly susceptible to noise, missing values, and inconsistencies, and is also vulnerable to malicious attacks and data tampering. Data encryption prevents unauthorized access to or alteration of internal privacy data, ensuring secure and reliable acquisition of necessary measurement data for further data analysis. However, with the advancement of smart grid construction, traditional encryption methods are proving ineffective for handling massive amounts of complex electricity data. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a method for secure sharing of measurement data based on homomorphic encryption, so as to accurately and effectively transmit massive and complex measurement data securely.
[0005] To address the aforementioned technical problems, this invention provides a method for securely sharing measurement data based on homomorphic encryption, comprising:
[0006] Step S1: Construct a secure power system transmission architecture consisting of smart meters, smart converged terminals, and metering automation systems. The smart meters, smart converged terminals, and metering automation systems are connected through a secure channel.
[0007] Step S2: The measurement data collected by the smart meter is encrypted using a homomorphic encryption algorithm. After being uploaded to the smart fusion terminal, the data is aggregated and then uploaded to the metering automation system.
[0008] Furthermore, step S1 also includes: calculating the key using the national cryptographic SM4 algorithm, decomposing the key into n blocks and distributing them to all smart meters using the Shamir secret sharing scheme, publishing the parameters within the power system secure transmission system, and completing the initialization of the power system secure transmission system.
[0009] Furthermore, the automated metering system selects a random number λ∈Z. n Forming 4 characters, Z n For the given finite field, encryption is performed using the SM4 national cryptographic algorithm to obtain the required key P. CS = (p0, p1, ..., p i , ...), and respectively p i The network space that is specifically decrypted by p0 and distributed to smart meters and metering automation systems.
[0010] Furthermore, the metering automation system decomposes the key into n blocks for the smart meters. The key is only reconstructed when the number of secret fragments exceeds a given threshold d, that is, when more than d smart meters successfully upload data to the metering automation system.
[0011] Further, step S2 specifically includes: using the GSW homomorphic encryption system to encrypt the transmission of measurement data, and calculating the key p at the smart meter using the SM4 algorithm. i The new key is obtained to encrypt the collected measurement data; data aggregation is completed at the intelligent fusion terminal; finally, data exceeding the given threshold is collected at the metering automation system, the key is reconstructed, the protected original text is calculated, and the relevant measurement data that protects user privacy is decrypted.
[0012] Furthermore, smart meters periodically acquire measurement data m i ∈Z n Before uploading, the measurement data m i The encryption process is as follows:
[0013] Take the key p obtained from each smart meter using the national cryptographic SM4 algorithm. i Decompose it digit by digit and write it as a column vector. Output in the form of As a key, let The length is n;
[0014] Take the generated key The first n-1 terms are used as a vector. Randomly generate an n×(n-1) matrix A, where the elements of matrix A are A. ij ∈Z n Correspondingly, an n-dimensional random noise vector is taken. Make the upper limit of the absolute value B of the noise vector much smaller than Z. n Scope;
[0015] Generate ciphertext C, Where μ is the number to be encrypted, and I n It is an n-order identity matrix, which will be used to solve the fault-tolerant learning LWE problem. Concatenate them into an n-order matrix and superimpose them on the information μ·I to be encrypted. n superior.
[0016] Furthermore, the intelligent fusion terminal selects addition operations to complete the aggregation of ciphertext, and the specific process is as follows:
[0017] Let the number of smart converged terminals be *a*, and the number of smart meters corresponding to each smart converged terminal be *b*. Then the ciphertext C obtained by aggregating data from each smart converged terminal... i for:
[0018]
[0019] Among them, C ij This represents the encrypted message of the smart meter j corresponding to the smart fusion terminal i.
[0020] Furthermore, the encrypted data uploaded by the intelligent fusion terminal to the metering automation system is either further aggregated and then decrypted, or decrypted directly.
[0021] Furthermore, before decrypting the data, it is first necessary to confirm whether the number of smart meters that have successfully uploaded data exceeds the set threshold, so as to reconstruct the key p0 obtained by the national cryptographic SM4 algorithm. The specific process is as follows:
[0022] Within the metering automation system, each network space (CS) is responsible for encrypted calculations. j Using {l j (0), f(x) j )}calculate in:
[0023]
[0024] All data is collected by the core network space of the metering automation system. After key reconstruction, we obtain key p0, which gives:
[0025] Furthermore, the reconstructed key p0 is used to calculate the remaining keys p using a round key calculation method. i This allows for decryption, and the specific decryption process is as follows:
[0026] The obtained key p i The vector is obtained according to the construction method during encryption. and I
[0027] calculate Complete the decryption of the ciphertext matrix C and obtain an approximate value of the original text μ:
[0028]
[0029] Implementing this invention has the following beneficial effects: This invention constructs a secure power system transmission system composed of smart meters, smart fusion terminals, and metering automation systems. By using a secret sharing scheme, the system operates relatively securely and stably. By using homomorphic encryption, the measurement data is transmitted in encrypted form, and the metering automation system ultimately decrypts the data to protect user privacy. By implementing this two-step approach, it can accurately and effectively transmit massive amounts of complex measurement data securely, which has high practical application significance. Attached Figure Description
[0030] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0031] Figure 1 This is a flowchart illustrating a method for secure sharing of measurement data based on homomorphic encryption according to an embodiment of the present invention.
[0032] Figure 2 This is a schematic diagram illustrating the specific process of a method for securely sharing measurement data based on homomorphic encryption according to an embodiment of the present invention.
[0033] Figure 3 This is a schematic diagram of a secure power transmission system in an embodiment of the present invention.
[0034] Figure 4 This is a flowchart illustrating the encryption and decryption process of the GSW algorithm used in this embodiment of the invention. Detailed Implementation
[0035] The following description of the embodiments is taken with reference to the accompanying drawings, which illustrate specific embodiments in which the invention can be implemented.
[0036] Please refer to Figure 1 As shown, this embodiment of the invention provides a method for secure sharing of measurement data based on homomorphic encryption, including:
[0037] Step S1: Construct a secure power system transmission architecture consisting of smart meters, smart converged terminals, and metering automation systems. The smart meters, smart converged terminals, and metering automation systems are connected through a secure channel.
[0038] Step S2: The measurement data collected by the smart meter is encrypted using a homomorphic encryption algorithm. After being uploaded to the smart fusion terminal, the data is aggregated and then uploaded to the metering automation system.
[0039] Specifically, please combine Figure 2 , Figure 3 As shown, in order to securely upload all measurement data to the metering automation system, a secure power system transmission architecture needs to be established at the physical layer first. In this embodiment, the secure power system transmission architecture constructed in step S1 consists of three layers, from bottom to top: smart meter (SM), intelligent converged terminal (IFT), and metering automation system (CS). The three layers are connected via an authenticated secure channel, thus forming a three-layer secure power system transmission architecture composed of smart meter, intelligent converged terminal, and metering automation system.
[0040] Because the system is relatively closed and independent, it is an internal information transmission problem within the power system. As the actual control core of the entire power system's secure transmission system, the power monitoring system uses the metering automation system to calculate the parameters and keys used by the system and distribute them to all entities, replacing a trusted third-party institution.
[0041] To alleviate computational space pressure in some practical applications, this embodiment chooses to use the SM4 algorithm, a symmetric encryption system based on Chinese national cryptography, for encryption and decryption. The encryption process of the SM4 algorithm mainly consists of 32 iterations and 1 reverse transformation, as detailed below:
[0042] Step 1: 32 iterations
[0043] SM4 has a block size of 4 characters. The input is a 4-character plaintext (X0, X1, X2, X3), which requires 32 rounds of iteration. Each round requires a 1-character round key, for a total of 32 round keys, denoted as (rk0, rk1, ..., rk). 31 The iterative process essentially involves using the round key of each round and the round function F to calculate the next word, as follows:
[0044] X 4+i =F(X) i X i+1 X i+2 X i+3 rk i (i∈[0, 31])
[0045] Executing this round function F for 32 rounds will ultimately yield 36 words, namely (X0, X1, X2, X3, ..., X...). 32 X 33 X 34 X 35 This completes the first step of the encryption process.
[0046] This round function F(X) i X i+1 X i+2 X i+3 rki It receives five '1' characters as parameters and ultimately generates a single '1' character. The internal calculations required are as follows:
[0047]
[0048] Here, the T function is the synthetic permutation function.
[0049] The synthetic permutation function T receives a 1-word input A and produces a 1-word output C. It consists of two steps: a nonlinear transformation τ and a linear transformation L, i.e., C = T(A) = L(τ(A)).
[0050] (1) Nonlinear transformation τ:
[0051] The nonlinear transform τ receives 1 word (i.e. 4 bytes) of input, let A = (a0, a1, a2, a3), and outputs 1 word of result, let B = (b0, b1, b2, b3).
[0052] Nonlinear transformation involves performing an Sbox transformation on each byte of the input parameters to obtain the output result.
[0053] B=(b0, b1, b2, b3)=τ(A)=(Sbox(a0), Sbox(a1), Sbox(a2), Sbox(a3))
[0054] (2) Linear transformation L:
[0055] The linear transform L receives a word B as input and performs calculations to obtain a word C as output. The specific calculation process is as follows:
[0056]
[0057] After nonlinear and linear transformations, one iteration is completed, and the content of the next character is calculated.
[0058] Step 2: One reverse transformation.
[0059] The final four characters (X) 32 X 33 X 34 X 35 The ciphertext is obtained by reversing the order of Y0, Y1, Y2, Y3, and Y4, resulting in (X0, Y1, Y2, Y3) = (X ...2, Y3, Y4). 35 X 34 X 33 X 32 ).
[0060] This completes the entire encryption transformation process. The decryption process, like the encryption process, requires 32 rounds of iteration and one reverse transformation; however, it requires changing the round keys according to (rk). 31 rk30 The order of , ..., rk0 is reversed.
[0061] The automated metering system selects random numbers λ∈Z n Forming 4 characters, Z n For the defined finite field, encrypt according to the above steps to obtain the required key P. CS = (p0, p1, ..., p i ...) and respectively p i The network space that is specifically decrypted by p0 and distributed to smart meters and metering automation systems.
[0062] Due to the possibility of individual malfunctions among the vast number of smart meters, and the vulnerability of a single smart meter holding the complete key to compromise, this embodiment introduces the Shamir secret sharing scheme to ensure system security and stability. The metering automation system can decompose the key into n blocks and distribute them to the smart meters. The key can only be reconstructed when the number of secret fragments exceeds a given threshold d, meaning that more than the given threshold of smart meters successfully uploads data to the metering automation system. Considering the large number of smart meters, d is taken as 90% of the total number of meters M.
[0063] The specific steps are as follows:
[0064] Step I: The automated metering system embeds the key p0 into a randomly generated d-th degree polynomial function:
[0065] f(x) = p0 + a1x + a2x 2 +…+a d x d modσ
[0066] Among them, a i ∈Z m σ is a prime number.
[0067] Step II: The automated metering system will use f(x) j ) and l j (0) As a key, it is distributed via a secure channel to the network space CS of each part of the metering automation system participating in encryption and decryption calculations. j ,in
[0068] The parameters generated in the above steps can be made public within the system.
[0069] After the power system's secure transmission architecture is completed, homomorphic encryption algorithms are needed to encrypt and aggregate measurement data to ensure secure transmission and prevent the data from being acquired or tampered with.
[0070] Power data collected during routine power operations is highly susceptible to noise and other contaminants, necessitating the consideration of noise factors when using homomorphic encryption algorithms. Homomorphic encryption algorithms are more complex than general encryption algorithms, and the massive number of terminals in a power system collects measurement data at regular intervals, resulting in a large volume of data requiring encryption and placing high demands on the system's computing space and capabilities. Considering both of these factors, this embodiment selects the GSW algorithm, a finite-level fully homomorphic encryption algorithm, to ensure privacy while maintaining computational speed and minimizing the impact of noise.
[0071] Therefore, the encrypted transmission process can be divided into three parts: data collection encryption, data aggregation, and data decryption, as follows: Figure 4 As shown, the specific steps are as follows:
[0072] (1) Data collection encryption:
[0073] Smart meters periodically acquire measurement data m i ∈Z n The measurement data m needs to be processed before uploading. i Encryption is performed. The encryption steps are as follows:
[0074] Step 1: Key generation.
[0075] Take the key p obtained from each smart meter using the national cryptographic SM4 algorithm. i Decompose it digit by digit and write it as a column vector. Output in the form of As a key, let The length is n.
[0076] Step 2: Encryption calculation.
[0077] The principle of encryption equations containing noise is: Where μ is the number to be encrypted, and C is the ciphertext. It's noise.
[0078] Take the generated key The first n-1 terms, i.e., the vector Constructing a fault-tolerant learning (LWE) problem example:
[0079] i: Randomly generate an n×(n-1) matrix A, where the elements of matrix A are A ij ∈Z n Correspondingly, an n-dimensional random noise vector is taken. Make the upper limit of the absolute value B of the noise vector much smaller than Z. n The range.
[0080] ii: Generate ciphertext C: Where In It is an n-order identity matrix, which will solve the LWE problem. Concatenate them into an n-order matrix and superimpose them on the information μ·I to be encrypted. n This ensures information security.
[0081] (2) Data aggregation:
[0082] Each smart meter transmits the encrypted ciphertext to the corresponding smart fusion terminal at the upper layer through a secure channel, where the smart fusion terminal aggregates the ciphertext. Considering the privacy protection of the measurement data and the noise enhancement caused by multiplication operations, addition operations are chosen to complete the aggregation of the ciphertext.
[0083] Let the number of smart converged terminals be *a*, and the number of smart meters corresponding to each smart converged terminal be *b*. Then the ciphertext C obtained by aggregating data from each smart converged terminal... i for:
[0084]
[0085] Among them, C ij The encrypted data of smart meter j corresponding to smart fusion terminal i, after encryption and aggregation, can only be decrypted by the metering automation system to obtain the summed measurement data, which can be traced to the corresponding smart fusion terminal but not to the corresponding smart meter.
[0086] (3) Data decryption:
[0087] Depending on the scale of use, encrypted data uploaded from the intelligent fusion terminal to the metering automation system can be further aggregated and then decrypted, or it can be decrypted directly.
[0088] Before decrypting the data, it is first necessary to confirm whether the number of smart meters that have successfully uploaded data exceeds the set threshold, so as to reconstruct the key p0 obtained by the national cryptographic SM4 algorithm:
[0089] Step 1: Within the metering automation system, each network space (CS) responsible for encrypted calculations... j Using {l j (0), f(x) j )}calculate in:
[0090]
[0091] Step 2: All data is collected by the core network space of the metering automation system. After key reconstruction, we obtain key p0, which gives:
[0092] The remaining keys p can be obtained from the reconstructed key p0 using the round key calculation method.i This allows for decryption, and the specific decryption process is as follows:
[0093] Step 1: From the obtained key p i The vector is obtained according to the construction method during encryption. and
[0094] Step 2: Calculation Complete the decryption of the ciphertext matrix C:
[0095]
[0096] Given that C is known, its value is much greater than the noise. This allows us to ignore the effects of noise during calculation and obtain an approximate value of μ in the original text.
[0097] The above decryption steps can be used to decrypt the encrypted and aggregated measurement data, allowing for the acquisition of core electricity consumption data while protecting privacy.
[0098] The data security sharing method described in this invention patent can be used to encrypt the measurement data collected by smart meters using homomorphic encryption algorithms, after the power system's secure transmission system is established. The data is then uploaded to the smart converged terminal for data aggregation and processing before being uploaded to the metering automation system, thereby obtaining the required electricity consumption data while protecting user privacy.
[0099] By encrypting the transmission of measurement data using homomorphic encryption algorithms after establishing a secure power system transmission architecture, core electricity consumption data is transmitted to the metering automation system while protecting privacy, preventing unauthorized access or tampering. This embodiment is based on the powerful computing capabilities of a metering automation system and is susceptible to noise, but this noise is negligible and allows for the calculation of approximate values.
[0100] As can be seen from the above description, compared with the prior art, the beneficial effects of the present invention are as follows: The present invention constructs a secure power system transmission system composed of smart meters, smart fusion terminals, and metering automation systems; the system operates relatively securely and stably by using a secret sharing scheme; and the measurement data is encrypted and transmitted by using homomorphic encryption, with the metering automation system ultimately decrypting to obtain relevant measurement data that protects user privacy. The two-step implementation can accurately and effectively transmit massive and complex measurement data securely, and has high practical application significance.
[0101] The above description is merely a preferred embodiment of the present invention and should not be construed as limiting the scope of the invention. Therefore, any equivalent variations made in accordance with the claims of the present invention are still within the scope of the present invention.
Claims
1. A method for secure sharing of measurement data based on homomorphic encryption, characterized in that, include: Step S1: Construct a secure power system transmission architecture consisting of smart meters, smart converged terminals, and metering automation systems. The smart meters, smart converged terminals, and metering automation systems are connected via a secure channel. A key is calculated using the national cryptographic SM4 algorithm and decomposed into its constituent parts using the Shamir secret sharing scheme. The block is given to all smart meters, and the parameters are published within the power system security transmission system to complete the initialization of the power system security transmission system; Step S2: The measurement data collected by the smart meter is encrypted using a homomorphic encryption algorithm. After being uploaded to the smart fusion terminal, the data is aggregated and then uploaded to the metering automation system. The metering automation system selects random numbers It consists of 4 characters. For the defined finite field, encryption is performed using the SM4 national cryptographic algorithm to obtain the required key. and respectively and Distributed to the specific decrypted network space corresponding to smart meters and metering automation systems.
2. The method according to claim 1, characterized in that, The automated metering system decomposes the key into Blocks are fed to smart meters when the number of secret fragments exceeds a given threshold. That is, there are more than a given threshold. The key is reconstructed only when the smart meter successfully uploads the data to the metering automation system.
3. The method according to claim 1, characterized in that, Step S2 specifically includes: using the GSW homomorphic encryption system to encrypt the transmission of measurement data, and calculating the key at the smart meter using the SM4 algorithm. The new key is obtained to encrypt the collected measurement data; data aggregation is completed at the intelligent fusion terminal; finally, data exceeding the given threshold is collected at the metering automation system, the key is reconstructed, the protected original text is calculated, and the relevant measurement data that protects user privacy is decrypted. The GSW homomorphic encryption system is used to encrypt the transmission of measurement data, and the key is calculated using the SM4 algorithm at the smart meter. The new key is used to encrypt the collected measurement data, specifically including: Smart meters periodically acquire measurement data. Before uploading the measurement data The encryption process is as follows: Take the key obtained from each smart meter using the national cryptographic SM4 algorithm. Decompose it digit by digit and write it as a column vector. Output in the form of As a key, let The length is ; Take the generated key The former Term, as a vector Randomly generate one matrix ,matrix elements Corresponding to this, take 3D random noise vector This makes the upper limit of the absolute value of the noise vector possible. much smaller Scope; Generate ciphertext , ,in, For the numbers to be encrypted, yes The identity matrix of order 1 will be used to solve the fault-tolerant learning LWE problem. spliced together An 1-order matrix is superimposed on the information to be encrypted. superior.
4. The method according to claim 3, characterized in that, The intelligent fusion terminal selects addition operation to complete the aggregation of ciphertext. The specific process is as follows: The number of intelligent converged terminals is The number of smart meters corresponding to each smart converged terminal is The ciphertext obtained by each intelligent fusion terminal is then aggregated. for: in, Indicates intelligent converged terminal i Corresponding smart meters j The encrypted text.
5. The method according to claim 4, characterized in that, The encrypted data uploaded by the intelligent fusion terminal to the metering automation system is further aggregated and then decrypted, or it is decrypted directly.
6. The method according to claim 5, characterized in that, Before decrypting the data, it is necessary to first confirm whether the number of smart meters that have successfully uploaded data exceeds the set threshold, in order to reconstruct the key obtained by the national cryptographic SM4 algorithm. The specific process is as follows: Each network space within the metering automation system is responsible for encrypted calculations. use calculate ,in: All data is collected by the core network space of the metering automation system. Perform key reconstruction to obtain the key. ,have: .
7. The method according to claim 6, characterized in that, The key obtained from reconstruction The remaining keys are obtained using the round key calculation method. This allows for decryption, and the specific decryption process is as follows: The obtained key The vector is obtained according to the construction method during encryption. and ; calculate Complete the ciphertext matrix Decryption to obtain the original text Approximate value: 。
Citation Information
Patent Citations
Private data aggregation method and system for smart power grid
CN115085940A