A power system equipment data security acquisition method and system
By adopting a synchronous key system and dynamic key management in the power system, the problems of easy leakage of sensor data and static key management are solved, and high-security data acquisition and transmission in the power system are realized.
Patent Information
- Application Number
- CN202610227913.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-26
- Publication Date
- 2026-06-30
AI Technical Summary
In existing power system monitoring, the encrypted sensor data is easily manipulated by attackers to infer equipment status through frequency analysis or differential analysis. Furthermore, the static key management mode leads to the spread of security risks and the leakage of historical data, which cannot meet the security requirements for long-term operation.
A synchronous key system is adopted, including a data encryption key and a random number encryption key. By constructing standardized data blocks and encrypting them using a random number sequence evaluated by entropy, and combining a hash function and a timestamp for key updates, the isolation and dynamic management of keys are ensured.
It effectively resists ciphertext-only attacks and differential analysis, prevents the spread of security risks caused by key leakage, ensures the security of sensor data and the irrecoverability of historical data, and meets the security requirements of long-term operation of power systems.
Smart Images

Figure CN122316677A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial internet and data security technology, specifically to a method and system for secure data acquisition from power system equipment. Background Technology
[0002] Existing power system monitoring relies on industrial control terminals to collect various sensor data, such as turbine temperature, speed, or water level information. These physical quantities typically exhibit a small number of valid data bits, fixed numerical variation ranges, and obvious periodic or gradual changes. When using traditional encryption methods for transmission, the low entropy of the plaintext data often makes it difficult to completely mask the statistical distribution patterns of the original data. Attackers can easily infer the equipment's operating status by performing frequency analysis or differential analysis on the ciphertext. Furthermore, for variable-length valid data generated by sensors with different levels of precision, existing technologies usually require adding explicit length description fields to the data packets for parsing. This not only increases transmission bandwidth overhead but also raises the complexity of the data frame structure.
[0003] In terms of key management systems, current industrial control systems mostly adopt static or flat key architectures, lacking strict mechanisms for isolating key uses. Devices often reuse the same root key in different cryptographic operations such as data encryption and integrity verification, or there is a strong mathematical correlation between subkeys. Once a device suffers a side-channel attack that leads to the leakage of a functional key, attackers can easily use that key to reverse-engineer the master key or forge legitimate instructions for other functions through cross-protocol attacks, causing security risks to spread throughout the entire system network.
[0004] Furthermore, power infrastructure typically operates continuously for extended periods, while existing key update mechanisms are often lagging or reliant on manual maintenance. The long-term use of a single session key leads to an excessively large volume of encrypted data under that key, providing attackers with opportunities to accumulate ciphertext samples for statistical decryption. Simultaneously, this static key management model lacks forward security guarantees; if the current key is physically extracted or cracked, historical communication records stored in the database face the risk of complete decryption, failing to meet the requirements of critical infrastructure for secure traceability of historical data. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a method and system for secure data acquisition from power system equipment. It solves the problems in industrial control scenarios such as hydropower generation, where the limited number of effective bits in sensor data and the uniformity of numerical variation patterns lead to the easy leakage of encrypted statistical features, and the difficulty of resisting side-channel attacks with a single key system.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] The first aspect of the present invention provides a method for secure data acquisition from power system equipment, comprising the following steps: establishing a synchronized key system between the power system equipment and the data center, wherein the key system includes mutually isolated data encryption keys and random number encryption keys; At the data transmitting end, the power system equipment acquires sensor data and generates a random number sequence; the random number sequence is concatenated in the high-order direction of the sensor data to construct a standardized data block; the standardized data block is encrypted using the data encryption key to generate ciphertext data, and the random number sequence is independently encrypted using the random number encryption key to generate a random number ciphertext stream; a transmission data packet containing the ciphertext data and the random number ciphertext stream is encapsulated and sent. At the data receiving end, the data center receives the transmitted data packet, uses the key system to decrypt the ciphertext data and the random number ciphertext stream respectively, and restores the standardized data block and the random number sequence; based on the restored random number sequence, the original sensor data is separated from the restored standardized data block.
[0008] Preferably, the step of establishing a synchronized key system includes: the key management center generating a master key, and based on the master key and the unique device identifier of the power system equipment, performing a hash-based message authentication code key derivation function extension operation to generate a device key; the power system equipment and the data center respectively derive the data encryption key and the random number encryption key based on the device key.
[0009] Preferably, the step of constructing a standardized data block includes: calculating the difference between a preset standardized length and the effective number of bits of the sensor data, generating a random number sequence with a length equal to the difference; performing an entropy evaluation on the random number sequence, and performing a splicing operation when the entropy value is greater than or equal to a preset safety threshold, wherein the random number sequence is located in the high bit and the sensor data is located in the low bit.
[0010] Preferably, the step of separating the original sensor data includes: the data center obtaining the effective number of bits based on the unique device identifier and calculating the random number padding length; extracting a bit sequence of the corresponding length from the restored random number sequence; comparing the high-order bit data of the normalized data block with the extracted bit sequence, and if they match, removing the high-order bit data and retaining the low-order data.
[0011] Preferably, the step of generating ciphertext data includes: concatenating multiple consecutive standardized data blocks into an aggregated group; using the data encryption key as a key, and combining a unique device identifier and a serial number counter to generate an initialization vector; and encrypting the aggregated group using the Galois counter mode of a block cipher algorithm.
[0012] Preferably, the step of generating the random number ciphertext stream includes: concatenating multiple random number sequences corresponding to the aggregated group into a random number stream; reusing the initialization vector used when generating the ciphertext data; and encrypting the random number stream using the random number encryption key and a counter mode of a block cipher algorithm.
[0013] Preferably, the step of deriving the data encryption key and the random number encryption key based on the device key includes: constructing tag parameters that characterize the data encryption purpose, the random number encryption purpose, and the message authentication purpose, respectively; using the device key as input key material, and combining the tag parameters to perform a hash-based message authentication code operation to calculate the data encryption key, the random number encryption key, and the message authentication code key, respectively.
[0014] Preferably, the method further includes: obtaining the current system timestamp value; concatenating the ciphertext data, the random number ciphertext stream, and the system timestamp value to form data to be signed; generating a message authentication code value using the message authentication code key; and the transmitted data packet containing the system timestamp value and the message authentication code value.
[0015] Preferably, the method further includes a key update step: when the running time recorded by the internal security clock of the device reaches a preset period, or the amount of transmitted data recorded by the data transmission counter reaches a preset threshold, the current timestamp is used as the salt value, the unique device identifier is used as the context information, and the current device key is used as the input key material to perform a hash-based message authentication code key derivation function operation to generate a new generation of device key.
[0016] A second aspect of the present invention provides a data security acquisition system for power system equipment, comprising power system equipment and a data center; The power system equipment is used to establish a synchronized key system with the data center. The key system includes mutually isolated data encryption keys and random number encryption keys. The power system equipment is used to acquire sensor data, generate random number sequences, concatenate the random number sequences with the sensor data to construct standardized data blocks, encrypt the standardized data blocks using the data encryption keys to generate ciphertext data, encrypt the random number sequences using the random number encryption keys to generate random number ciphertext streams, and send data packets for transmission. The data center is used to receive the transmitted data packets, decrypt and restore the standardized data blocks and the random number sequence using the key system, and separate the original sensor data from the standardized data blocks based on the restored random number sequence.
[0017] This invention provides a method and system for secure data acquisition from power system equipment. It offers the following advantages: 1. This invention solves the problem of easily leaked statistical characteristics in low-significant-bit industrial data by constructing standardized data blocks through high-order random number sequences that have passed entropy evaluation by splicing high-order bits of sensor data, and by employing a dual-channel transmission mechanism of independent data encryption and random number stream encryption. This method utilizes the irregular jumps in high-order random numbers to completely disrupt the periodic or gradual change patterns of the original sensor data in the time domain, resulting in a uniform statistical distribution of the ciphertext and effectively resisting ciphertext-only attacks and differential analysis. Simultaneously, the receiving end uses the decrypted random number stream as a mask to directly strip the padding bits, achieving accurate restoration of variable-length data without needing to add an extra length description field to the ciphertext.
[0018] 2. This invention establishes a hierarchical derivation system from the master key to the session subkey based on HMAC and applies a strict label separation principle to achieve physical and logical isolation of key permissions. This system ensures that the three types of keys—data encryption, random number encryption, and message authentication—are mathematically independent, preventing the spread of security risks or the reverse derivation of the master key due to the leakage of a single-function key. Simultaneously, by binding unique device identifiers, it guarantees the independence of the key space for all devices in the network, avoids cross-device key reuse attacks, and improves the overall anti-intrusion capability of the system.
[0019] 3. This invention achieves forward security in the communication process by integrating a dynamic key update module based on dual thresholds of time period and data flow, and using the current timestamp as a salt value in key iteration. This mechanism forces the periodic replacement of session keys, effectively limiting the amount of data encrypted under the same key and preventing attackers from collecting enough ciphertext samples for statistical decryption. Simultaneously, the timestamp-based unidirectional irreversible derivation logic ensures that even if the current key is physically extracted, attackers cannot recover communication content from historical periods, thus meeting the long-term security requirements of power monitoring systems. Attached Figure Description
[0020] Figure 1 This is a diagram illustrating the architecture of a power system equipment data security acquisition system according to an embodiment of the present invention. Figure 2 This is a flowchart illustrating a method for secure data acquisition from power system equipment according to an embodiment of the present invention. Figure 3 This is a schematic diagram of the key hierarchical derivation and update logic according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the data transmission and reception process according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the time-domain waveform of raw sensor data according to an embodiment of the present invention; Figure 6 This is a schematic diagram of the time-domain waveform of a standardized data block after forward random padding, according to an embodiment of the present invention. Figure 7 This is a schematic diagram comparing the statistical distribution histograms of the original data and the filled data according to an embodiment of the present invention.
[0021] Among them, 100 is the Key Management Center; 200 is the Power System Equipment; and 300 is the Data Center. Detailed Implementation
[0022] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] See attached document Figure 1 The present invention provides a power system equipment data security acquisition system, which includes a key management center 100, power system equipment 200 and a data center 300.
[0024] To achieve high-security key lifecycle management, the Key Management Center 100 is configured as the system's root of trust. Its physical carrier is a server conforming to the national cryptographic standard level 2 or above, and it integrates an immutable hardware security module and a key generation server. The Key Management Center 100 is used to generate and manage the system's master key, and distributes the corresponding key materials to the power system equipment 200 and the data center 300 through a physically isolated dedicated network or an offline method escorted by designated personnel, ensuring that the master key never appears in plaintext form on the public network.
[0025] The power system equipment 200 is deployed at the hydropower generation site, specifically manifested as an industrial control terminal integrating cryptographic computing capabilities, including but not limited to turbine unit monitoring instruments, water level sensors, or temperature transmitters. The power system equipment 200 is equipped with a data acquisition unit, a physical true random number generator, a cryptographic processing unit, and a communication unit. The data acquisition unit is used to acquire physical quantity data from the equipment, which typically has the physical characteristic of a fixed and continuous range of numerical variation. The physical true random number generator is used to collect physical entropy sources such as thermal noise or shot noise to generate high-entropy random number sequences. The cryptographic processing unit is used to perform key derivation, data forward padding, block aggregation encryption, and message authentication code calculation. The communication unit is used to send encrypted data packets to the data center 300 via the power dispatch data network or other industrial Ethernet.
[0026] Data center 300 includes a data receiving server, a cryptographic machine, and an application processing server. Data center 300 is used to receive data packets from power system equipment 200 and perform message authentication, decryption, data separation, and threshold verification operations in the secure environment of the cryptographic machine.
[0027] See attached document Figure 2 The present invention also provides a method for secure data acquisition from power system equipment, which mainly includes an initialization phase S1, a data encryption and transmission phase S2, and a data reception and decryption phase S3.
[0028] In the initialization phase S1, the key management center 100 generates a master key and imports it into the cryptographic machine of the data center 300 via an offline secure method. For each power system device 200, the key management center 100 derives a unique device key based on the master key. Specifically, the key management center 100 performs Hash-based Message Authentication Code Key Derivation Function Expansion (HKDF-Expand), utilizing the expansion characteristics of the Hash-based Message Authentication Code Key Derivation Function (HKDF) algorithm to uniformly diffuse the entropy of the master key into the subkeys. During this process, the master key is used as the input pseudo-random key, the unique device identifier of the power system device 200 is used as the context information input, and the output key length is set to the number of bits adapted to the encryption algorithm strength, thereby calculating the unique device key. This device key is pre-written into the non-volatile secure storage area of the power system device 200 with tamper-proof protection via a secure channel.
[0029] In the data encryption transmission phase S2, the power system equipment 200 first performs multi-level key derivation and isolation operations to prevent the spread of system risks due to the leakage of a single key. The cryptographic processing unit within the equipment reads the preset equipment key and, based on the tag separation principle, constructs tag information representing the purposes of data encryption, random number encryption, and message authentication as different input messages. It then uses hash-based message authentication code (HMAC) operations to derive data encryption keys, random number encryption keys, and message authentication code keys whose purposes are mutually isolated.
[0030] Subsequently, the power system equipment 200 enters the data processing flow. The data acquisition unit acquires sensor data with a specific number of significant bits. The physical true random number generator generates a random number sequence required to complete the preset standardized length and calculates its bit entropy according to the preset cryptographic industry standard (GM / T0062-2018). When the entropy value reaches the preset security threshold, the cryptographic processing unit concatenates the high-entropy random number sequence to the high-bit direction of the sensor data to construct a standardized data block that conforms to the preset standardized length, thereby masking the statistical characteristics of the original data through a forward random padding mechanism.
[0031] To improve encryption efficiency and reduce transmission redundancy, the cryptographic processing unit sequentially concatenates multiple consecutively generated standardized data blocks into an aggregated block adapted to the length of the SM4 block cipher algorithm processing unit (with any insufficient portion padded according to Public Key Cryptography Standard #7 (PKCS#7)). This aggregated block is then encrypted using the data encryption key in the Galois / Counter (GCM) mode of the SM4 algorithm. During this process, the initialization vector is generated using the data encryption key as the key, combined with the device identifier and the counter value, ensuring the uniqueness of the encryption. Simultaneously, the cryptographic processing unit concatenates each random number sequence into an independent data stream according to the acquisition order and generates independent random number ciphertexts using the random number encryption key in the Counter (CTR) mode of the SM4 algorithm.
[0032] Finally, the system concatenates the ciphertext data, the random number ciphertext, and the timestamp, uses the message authentication code key based on the SM3 hash algorithm (HMAC-SM3) to calculate the check value, and constructs a complete data packet containing the sequence number, ciphertext, random number ciphertext, timestamp, and check value, which is then sent by the communication unit to the data center 300.
[0033] In the data reception and decryption phase S3, after receiving the data packet, the data center 300 first recalculates the corresponding device key and three sub-keys (data encryption key, random number encryption key, and message authentication key) based on the device identifier in the data packet and using the stored master key. The data center 300 checks the continuity of the data packet sequence number to defend against replay attacks and performs HMAC-SM3 operations on the received ciphertext data, random number ciphertext, and timestamp using the locally derived message authentication key. If the calculated checksum is completely consistent with the message authentication key in the data packet, the integrity and authenticity of the data are confirmed. Subsequently, the data center 300 decrypts the ciphertext data using the data encryption key, restores the aggregated packet, and splits it into multiple standardized data blocks; simultaneously, it decrypts the random number ciphertext using the random number encryption key, restoring the random number sequence. Using the restored random number sequence, the data center 300 separates the random number sequence and target data from each standardized data block, accurately extracting the original sensor data. Finally, the application processing server performs logical verification on the extracted data according to the preset physical quantity threshold range (such as the reasonable range of turbine unit temperature), and completes the secure collection and storage of data after confirming that there are no errors.
[0034] Furthermore, to defend against side-channel attacks targeting the key and meet key management compliance requirements, the power system equipment 200 is equipped with a key update module. This module is configured to monitor the internal security clock and data transmission counter. When the running time recorded by the security clock reaches a preset time period, or the cumulative amount of transmitted data recorded by the data transmission counter reaches a preset data volume threshold, the key update module triggers a key update operation. The update operation is based on the current device key, timestamp salt value, and device identifier. It uses the HKDF function to calculate a new generation device key. The specific calculation logic is as follows: the old device key is used as the input key material, the current timestamp is used as the salt value, and the device identifier is used as context information. These are input into the HKDF function to generate a new device key. After the update is completed, the system automatically regenerates three subkeys based on the new device key, and the old key is then securely destroyed.
[0035] See attached document Figure 3 In the initialization phase S1, the key management center 100 performs calculations according to the hierarchical key isolation system. Master key ( The master key is generated by the key management center 100 and imported into the data center 300 offline in a secure manner. Both parties use hardware security modules that comply with national cryptographic standards to store the master key, and the master key is not stored in plaintext on any non-volatile general-purpose storage medium. The system extends the security trust of the master key to the power system equipment 200 through cryptographic operations, realizing the physical and logical isolation of key permissions.
[0036] For each individual power system device 200, the key management center 100 generates a unique device key based on the device's unique device identifier. Let the... The unique device identifier for each power system device is: The unique device identifier is the unique device identifier burned into the device at the factory; the master key is... The system uses HKDF-Expand to perform key computation, and its mathematical expression is as follows: ; in, Represents the generated first Each power system device has its own unique device key; An extended component representing a hash-based message authentication code key derivation function; The master key, which serves as the input pseudo-random key material; Represents context information parameters, used to bind specific application scenarios or identities; This represents the specific numerical value assigned to the context information parameter, i.e., the first... A unique device identifier for each power system device; This represents the output key length parameter; This represents the specific bit length value.
[0037] Context information parameters Bound to a unique device identifier Its technical purpose is to cryptographically bind the derived key space to the hardware identity of a specific device, utilizing... The avalanche effect of the function ensures that the device keys of any two power system devices are completely uncorrelated in their bit sequences; the output key length parameter is set to 256 to adapt to the key strength requirements of the subsequent SM4 and HMAC-SM3 algorithms. For the specific internal operation logic of the HKDF-Expand function, those skilled in the art can refer to the standards issued by the State Cryptography Administration or relevant international standard documents for implementation. Its underlying algorithm implementation is well-known technology in this field and will not be elaborated here. Generated device key. It is pre-installed in the non-volatile security storage area of the power system equipment 200 in an offline security manner.
[0038] In the preprocessing stage of data encryption transmission S2, the power system equipment 200 constructs a business sub-key layer using a pre-set device key. To avoid key reuse attacks and privilege abuse caused by the reuse of a single key, the cryptographic processing unit implements a label separation principle. The label separation principle uses the device key... Using the root as a reference, and combining specific domain-specific separation tags, three functionally isolated subkeys are calculated using the HMAC algorithm: the data encryption key and the key. Random number encryption key and message authentication key The specific calculation logic is as follows: ; ; ; in, , and These represent the output data encryption key, random number encryption key, and message authentication key, respectively. This represents a hash-based message authentication code algorithm; The device key, representing the input key material; These represent tag parameters used to distinguish different derived uses; , and These represent ASCII string constants assigned to the tag parameters, used to identify the specific business purpose of the key; Operators that concatenate binary data; A byte constant representing hexadecimal values, used as a mandatory separator between the string and subsequent data.
[0039] The specific mathematical iteration process of the HMAC algorithm can be directly invoked by those skilled in the art based on existing cryptographic standards. Its standard implementation is well-known in the field and will not be elaborated upon here. Through this derivation mechanism, even if an attacker cracks the data encryption key used for data encryption... It is also impossible to reverse engineer the root device key. Therefore, it is impossible to forge a key with a valid message authentication code. The signature control instructions effectively prevent security risks.
[0040] To counter statistical analysis attacks targeting long-term static keys, the power system equipment 200 incorporates a dynamic key update mechanism driven by both time and events.
[0041] As a time-based security strategy, the key update module maintains local clock synchronization via the secure NTP protocol, setting the time synchronization error tolerance to ±10 seconds. The specific message handshake process of the secure network time protocol can be implemented by those skilled in the art using existing network protocol stacks; its time synchronization communication mechanism is well-known in the field and will not be elaborated upon here. The key update module sets the maximum key lifespan to 24 hours. The maximum lifespan threshold is set based on the daily periodicity characteristics of power system data, forcing daily key changes effectively cuts off attackers' path to differential analysis using accumulated historical ciphertext.
[0042] As a data volume-based security strategy, the key update module monitors the cumulative number of encrypted data packets sent. When the transmitted data volume exceeds 2... 10 An instant update is triggered when 1024 transmission units are reached. Choose option 2. 10 Using the data transmission threshold as a security limit based on block cipher algorithms in a specific mode, by limiting the number of ciphertext blocks generated under the same key, can prevent the risk of key recovery due to the leakage of statistical characteristics of plaintext data.
[0043] When the update condition is triggered, the system executes a key iteration algorithm based on forward security: ; in, This represents the new device key generated after the update; Represents a hash-based message authentication code key derivation function; This represents the old device key that was in use before the update; This represents the salt value parameter used to introduce randomness; The current system timestamp that represents the value assigned to the salt parameter; Parameters representing context information; The unique device identifier that is assigned to the context information parameter.
[0044] Introduce the current system timestamp The technical objective is to inject unpredictable entropy that flows unidirectionally over time into the key update process, ensuring that even with a unique device identifier... The new device key generated each time remains unchanged. It is also unique, thus effectively resisting replay attacks. Context information parameters are again bound to a unique device identifier. To maintain consistency in identity.
[0045] Complete the new device key After the calculation, the cryptographic processing unit immediately uses the new key to re-execute the subkey derivation steps defined in the initialization phase to generate a new data encryption key. Random number encryption key and message authentication key Considering the latency in network transmission, the system maintains decryption support for the old device key within a preset transition time window during key switching. Once the new key is confirmed to be effective, the memory area storing the old device key is immediately securely overwritten and destroyed to prevent cold start attacks from recovering the old device key.
[0046] See attached document Figure 4 In the data encryption and transmission phase S2, the system enters the data acquisition and forward filling construction process. The data acquisition and forward filling construction process aims to solve the problem of encrypted statistical feature leakage caused by the low effective bit depth and simple variation pattern of sensor data in hydropower scenarios (such as the gradual change of unit temperature, reservoir water level, turbine speed data).
[0047] The data acquisition unit obtains real-time physical quantity data from sensors at the hydropower generation site according to a preset sampling frequency. Let the acquisition sequence index be... , corresponding to the acquisition sequence index The raw sensor data is Its effective data bits are Considering the differences in accuracy and measurement range among various sensors in the power system, and the requirements of subsequent block cipher algorithms on the length of processing units, this embodiment limits the number of effective data bits. The range of values is When raw sensor data When the effective data bits are less than 32 bits, if deterministic zero-filling is used directly, attackers can easily crack the plaintext by traversing the low-bit numerical space. Therefore, the system uses a forward random filling mechanism based on physical entropy sources for data preprocessing.
[0048] A physical true random number generator utilizes microscopic random physical processes within a circuit as an entropy source. Specific implementations include, but are not limited to, utilizing physical phenomena such as thermal noise or shot noise from resistors. These physical noise sources are unpredictable and non-periodic, providing a high-quality random seed for the system. The physical true random number generator generates a random number sequence for filling, denoted by an index corresponding to the acquisition sequence. The random number sequence is To ensure that the final standardized data block length is standardized to 32 bits (i.e., 4 bytes), the length of the generated random number sequence needs to be dynamically calculated based on the effective number of bits in the original sensor data. The calculation logic for the random number sequence length is as follows: Bits. That is, when the raw sensor data... The fewer bits used, the better the random number sequence can be filled. The more bits there are, the more dynamically the information entropy of the standardized data block can be compensated. Specifically, when the effective data bits... When the length is 32, the random number sequence length is 0, and the generated random number sequence is empty. The standardized data block is logically composed directly from the original sensor data, thus ensuring the consistency of the algorithm process under different data bit widths.
[0049] To prevent the randomness of the output sequence from decreasing due to environmental interference (such as strong electromagnetic fields) or hardware aging, the cryptographic processing unit immediately performs an online entropy assessment according to the GM / T0062-2018 standard, "Requirements for Random Number Testing of Cryptographic Products," after generating a non-empty random number sequence. The entropy assessment process calculates the non-empty random number sequence. The minimum entropy is calculated, and an entropy threshold of 0.7 bits / byte is set. The entropy threshold is set to balance randomness quality and generation efficiency, ensuring that the random number sequence is sufficient to mask the statistical distribution of the original sensor data. For the specific minimum entropy calculation formula and accompanying statistical test model involved in the GM / T0062-2018 standard, those skilled in the art can consult the GM / T0062-2018 standard document or use existing compliant cryptographic libraries for implementation. The underlying algorithm principles are well-known in the field and will not be elaborated upon here.
[0050] The system performs strict closed-loop control over the quality of random numbers. If a non-empty random number sequence is detected... If the entropy value is less than 0.7 bits / byte, the system determines that the currently generated random number sequence has a risk of weak randomness, causing the normalized data block after padding to still retain predictable characteristics. At this time, the cryptographic processing unit triggers a random number sequence generation failure alarm and sends a reset command to the physical true random number generator, forcing the re-collection of physical noise sources and the generation of a new random number sequence until the entropy value meets the preset requirement. Only when the entropy value is greater than or equal to 0.7 bits / byte is the generated random number sequence allowed to enter the next level of processing.
[0051] When random number sequence After entropy evaluation (skipping entropy evaluation if the random number sequence is empty), the cryptographic processing unit performs a forward padding operation, placing the high-entropy random number sequence on the high-order side of the original sensor data to construct a normalized data block. Let the index corresponding to the acquisition sequence be... The standardized data blocks are Its construction formula is as follows: ; in, This represents a standardized data block with a fixed physical length of 32 bits to accommodate the granularity of subsequent SM4 algorithm grouping. This represents a sequence of random numbers, located in the high-order (front) part of the normalized data block. Represents the binary concatenation operator; This represents the raw sensor data, which is located in the lower (late) part of the normalized data block.
[0052] The advantage of using the forward padding construction operation is that it utilizes the high-entropy random number sequence in the high bits. Completely disrupted the original sensor data The statistical distribution pattern, even in raw sensor data The data exhibits slight linear changes during continuous acquisition, and the resulting standardized data blocks are then stitched together. Numerical values also exhibit irregular jumps, thus effectively resisting differential analysis attacks.
[0053] Following the generation of standardized data blocks, the cryptographic processing unit executes a standardized data block aggregation and aggregation block encryption process. This process aims to address the low efficiency of payload transmission in traditional single-data encryption modes by improving encryption throughput through aggregation strategies and utilizing independent random number stream encryption channels to assist the receiving end in achieving accurate separation of variable-length data.
[0054] The cryptographic processing unit is equipped with an aggregated block buffer, and the system continuously receives standardized data blocks as the acquisition sequence progresses. To adapt to the SM4 block cipher algorithm's requirement of a fixed 128-bit input length and to reduce the frequency of encryption operations, the system sets the aggregation threshold to 4. That is, four consecutive 32-bit normalized data blocks are concatenated into a single aggregated block. Let the sequence number counter be... The aggregated grouping is Its aggregation construction logic is expressed as follows: ; in, Represents aggregated grouping; to This represents four standardized data blocks arranged in chronological order. Represents a serial number counter; This represents the binary concatenation operator.
[0055] Considering the real-time and integrity requirements of data transmission, when the data transmission timer times out and the number of normalized data blocks remaining in the buffer is insufficient to meet the aggregation threshold, the system performs padding according to the PKCS#7 specification. For the specific byte padding rules and boundary handling logic involved in the PKCS#7 standard, those skilled in the art can refer to international standard documents such as IETF RFC 5652 for implementation; these standard specifications are well-known technologies in the field and will not be elaborated upon here. Let the number of normalized data blocks remaining in the buffer be... (satisfy If the total length of the current data is , then the total length of the current data is bytes, length of bytes to be padded for The system constructs a byte length of The PKCS#7 padding byte sequence, where the hexadecimal value of each byte is strictly equal to... The PKCS#7 padding byte sequence is appended to the remaining normalized data block, padding to a length of 128 bits, thus constructing a format-compliant aggregated group. .
[0056] After the aggregated group is constructed, the cryptographic processing unit calls the data encryption key. The GCM mode of the SM4 algorithm is used for aggregation grouping. Encryption is performed. For the round function iteration process of the SM4 block cipher algorithm and the Galois field multiplication logic of the GCM mode of the SM4 algorithm, those skilled in the art can directly refer to GB / T32907-2016 "Information Security Technology - SM4 Block Cipher Algorithm" and related mode standards. The underlying implementation of the algorithm is well-known in the field and will not be elaborated here. The GCM mode of the SM4 algorithm provides data confidentiality while optimizing processing performance using its parallel GHASH function. To eliminate the risk of key stream leakage caused by the reuse of initialization vectors (IVs) in stream cipher mode, the system uses HMAC to dynamically calculate a globally unique initialization vector. The formula for generating the initialization vector is as follows: ; in, Represents the initialization vector; This represents the truncation function, used to retain the high 96 bits of the operation result; This represents a hash-based message authentication code algorithm. For the specific compression function and padding logic of the hash-based message authentication code algorithm, those skilled in the art can refer to standard documents such as GB / T 15852.2-2012. Its calculation mechanism is well-known in the field and will not be elaborated here. Data encryption key derived during the initialization phase; Represents a unique device identifier; Represents the binary concatenation operator. A unique device identifier in the formula. The introduction of this ensures isolation of the initialization vector space between different devices, while the serial number counter The introduction of this feature ensures the uniqueness of the initialization vector for the same device across different time dimensions. Based on the generated initialization vector, the system performs ciphertext block computation: ; in, Represents encrypted grouping; This represents the encryption operation of the SM4 algorithm in the GCM mode of the SM4 algorithm; Represents the data encryption key; Represents aggregated grouping; This represents the initialization vector.
[0057] After completing the encryption operation of the aggregated packets, the system executes an independent encryption and integrity encapsulation process for the random number stream. The technical purpose of this process is to construct a transmission protocol data unit with anti-tampering, anti-replay, and traceability characteristics, ensuring that data center 300 can verify the legitimacy of the data source and the integrity of the content.
[0058] In this embodiment, the cryptographic processing unit maintains a random number stream processing logic independent of the aggregated block encryption channel. This logic is applied to the random number stream corresponding to the current aggregated block extracted from the preceding aggregation step. Four raw random number streams spliced together in the order of collection The system calls the random number encryption key. The stream encryption operation is performed using the counter mode (CTR) of the SM4 algorithm. For the specific state update and XOR operation process of the SM4 algorithm in counter mode, those skilled in the art can implement it in accordance with the GB / T32907-2016 standard "Information Security Technology SM4 Block Cipher Algorithm". Its mode principle is well-known in the field and will not be elaborated further here. The system generates a random number ciphertext stream. Follow the following operational logic: ; in, This represents the ciphertext stream of random numbers generated after encryption. The counter mode operation function represents the SM4 block cipher algorithm; This represents the random number encryption key derived during the initialization phase; This represents the original stream of random numbers generated in the preceding steps.
[0059] The physical significance of using the SM4 algorithm's counter mode here lies in the fact that it generates a ciphertext stream of random numbers. Length of the original random number stream The length of each block is strictly consistent and no extra padding bytes are introduced. This allows the receiving end to accurately determine the length of the random number used for forward padding in each standardized data block after decryption, ensuring the separability of the random number plus the effective data structure.
[0060] Based on random number ciphertext stream Upon generation, the system initiates the message authentication code calculation phase. The cryptographic processing unit reads the current system timestamp and, combined with the ciphertext blocks generated in previous steps, constructs the input data for calculating the message authentication code to be signed. To prevent man-in-the-middle attackers from tampering with the ciphertext blocks or random number ciphertext stream, the system follows the Encrypt-then-MAC security paradigm. The cryptographic processing unit utilizes the message authentication code key derived during the initialization phase. The message authentication code value is generated based on the HMAC-SM3 algorithm. For the specific iterative compression structure and padding method of the HMAC-SM3 algorithm, those skilled in the art can implement it according to standard documents such as GB / T 15852.2-2012 "Information Security Technology - Message Authentication Code". Its algorithm implementation is well-known in the field and will not be elaborated here. Let the generated message authentication code value be... The calculation formula is as follows: ; in, This represents the calculated value of a fixed-length message authentication code. This represents a key hash message authentication code algorithm based on the SM3 domestic cryptographic hash algorithm; Represents the message authentication key; The ciphertext packet representing the current transmission batch; Represents the binary concatenation operator; Represents a ciphertext stream of random numbers; This represents the current system timestamp value.
[0061] This formula incorporates system timestamp values. The technical objective is to embed a time-dimensional freshness proof into the transmitted data packets. The system sets a validity window threshold for the system timestamp values based on the initial configuration (e.g., ...). (seconds), the receiving end can directly discard historical data packets that exceed the time window by verifying the system's timestamp value, thus effectively limiting the time span of replay attacks. Simultaneously, ciphertext blocks... With random number ciphertext stream By incorporating both into the hash operation, a strong binding relationship is established between the ciphertext block and the random number ciphertext stream. Any independent tampering with the random number ciphertext stream will result in a change to the message authentication code value. The calculation failed, thus ensuring the authenticity of the decryption parameters.
[0062] After calculating the message authentication code, the communication unit performs the final encapsulation of the transmission protocol data unit. To support the receiver's identification of the source of the transmitted data packet and strict verification of its continuity, the system explicitly adds a unique device identifier to the header of the transmitted data packet. And a strictly incrementing serial number counter Let's assume a counter corresponding to the serial number. The transmitted data packets are Its structural assembly logic is as follows: ; in, Represents the binary transport data packet that is ultimately injected into the physical link; This represents a unique device identifier, used by the receiving end to index the decryption key. This represents a serial number counter, and its value is equal to... ; Represents the binary concatenation operator; Represents encrypted grouping; Represents a ciphertext stream of random numbers; Represents the system timestamp value; This represents the message authentication code value.
[0063] Through this encapsulation structure, the random number ciphertext stream Grouping with ciphertext They maintain physical independence while being subject to the tail message authentication code value. Integrity protection. Data Center 300 receives transmitted data packets... Then, using the unique device identifier transmitted in plaintext. Determine the corresponding device key and subkey, and use the serial number counter. Verify data continuity and utilize message authentication code values. The integrity of the entire payload is verified, and the dual-channel decryption process is only initiated after verification, thus achieving defense in depth from the transport layer to the application layer at the protocol level.
[0064] See attached document Figure 2 In the data reception and decryption phase S3, the data center 300 performs multi-level security verification and data restoration operations. The technical objective of this phase is to verify the authenticity of the data source and the integrity of the content through cryptographic means, and to accurately restore the variable-length valid physical data using a dual-channel decryption mechanism and preset test point configurations.
[0065] The data receiving server continuously listens to the secure communication port, and when it receives a data packet from the power system equipment 200... Upon this, the system immediately initiates the protocol parsing process. During this process, the system extracts the unique device identifier for plaintext transmission from the header of the transmission data packet, based on the predefined transmission data packet structure. and serial number counter Simultaneously, the ciphertext packets in the ciphertext payload are parsed. Random number ciphertext stream System timestamp value and message authentication code value .
[0066] To effectively defend against replay attacks and reduce the load on backend cryptographic operations, the system performs lightweight timing verification before invoking the cryptographic machine. The system reads a local trusted time source and calculates the current time against the system timestamp value in the transmitted data packet. The difference. If the difference exceeds the preset valid time window (e.g. If the system determines that the transmitted data packet is an expired replay message or a network latency error message within a specified time window, it will discard it directly. After passing the time window verification, the system retrieves the unique device identifier. Compare the associated local state database with the sequence number counter. The sequence number of the previous frame recorded locally Only when Strictly greater than When the system confirms that the transmitted data packet has time freshness, it updates the local sequence number record; otherwise, it is considered a duplicate data packet and is rejected.
[0067] After confirming the timeliness of the transmitted data packets, the cryptographic machine performs key context reconstruction based on a hierarchical key isolation system. The system then retrieves the master key stored within the hardware security module. Based on the received unique device identifier The device key is recalculated using the HKDF algorithm logic that is completely consistent with that in the initialization phase S1. Based on the reconstructed device key Based on the same tag separation principle as the device, the system reuses the aforementioned HMAC formula to calculate the data encryption keys required for this session. Random number encryption key and message authentication key .
[0068] After obtaining the session subkey, the system performs the critical integrity verification step S. The cryptographic machine uses the locally derived message authentication key. Perform HMAC-SM3 operations on the received key data fields to calculate the locally desired message authentication code value. This calculation process tightly binds the ciphertext, the random number stream, and the timestamp, and its formula is expressed as follows: ; in, The value of the message authentication code representing local computation in the data center; This represents a message authentication code algorithm based on the SM3 hash algorithm; Represents the message authentication key; This represents the received ciphertext packet; This represents the received ciphertext stream of random numbers; This represents the received system timestamp value; This represents the binary concatenation operator.
[0069] The system will calculate With the data packets carried Perform a bit-by-bit comparison. If the two are completely identical, the system confirms the integrity and authenticity of the data source and proceeds to the subsequent dual-channel decryption process; if any discrepancies exist, the system triggers a security alarm and terminates the current session.
[0070] In the dual-channel decryption process, the data center processes business data decryption and auxiliary random number decryption in parallel (300). For the business data channel, the system first utilizes a locally derived data encryption key. and the received serial number counter Based on the generation logic defined by the sender, reconstruct a globally unique initialization vector that is completely identical to that of the sender. .
[0071] Based on the reconstructed initialization vector, the system performs GCM mode decryption using the SM4 algorithm: ; in, This represents the decrypted and restored aggregated packet, the content of which should be strictly consistent with the plaintext packet constructed by the sender; This function represents the decryption and authentication function of the SM4 algorithm in Galois / counter mode. Before outputting plaintext, this function automatically verifies the authentication tag of the SM4 algorithm in GCM mode. If the verification fails, it indicates that the ciphertext was corrupted during transmission, and the decryption process will automatically terminate.
[0072] Meanwhile, for the auxiliary random number channel, the system uses a random number encryption key. Perform a counter mode (CTR) decryption operation on the SM4 algorithm to reconstruct the original random number stream: ; in, This represents the original random number stream recovered after decryption; This represents the decryption function of the SM4 algorithm in counter mode; This indicates that a locally reconstructed initialization vector, consistent with the one used during encryption, is used as the synchronization parameter.
[0073] Obtain the decrypted aggregated group With random number stream Next, the application processing server performs data separation and extraction operations. To correctly handle any existing padding data, the system first checks the 128-bit aggregated blocks. The system identifies the characteristics of the trailing bytes. If the system detects that the trailing bytes conform to the Public Key Cryptography Standard #7 (PKCS#7) padding specification, it first removes these padding bytes to obtain the actual payload data. Subsequently, the system sequentially splits the padding-free payload data into multiple 32-bit normalized data blocks. (in (This refers to the sub-index within the current group). This step ensures that even if data is sent to fill the gaps below the aggregation threshold, the receiving end can correctly reconstruct the original normalized data block sequence.
[0074] To implement the technical logic of restoring the payload using random number channel data, the system uses the filling structure defined in this embodiment. Perform reverse separation. The system calls the preset measurement point configuration database to obtain the unique device identifier. and channel index The corresponding number of significant bits in the raw sensor data The system calculates the random number padding length corresponding to the standardized data block. .
[0075] Based on the calculated padding length, the system extracts the decrypted and restored continuous random number stream. By sequentially extracting bit sequences of corresponding lengths from the data, a random number sequence corresponding one-to-one with the current normalized data block can be obtained. Subsequently, the system performs a stripping operation based on a random number sequence to standardize the data blocks. With the extracted random number sequence High-order matching and removal are performed to separate the low-order raw sensor data. .
[0076] ; in, Represents the restored original sensor data; This represents a decoupling function, whose logic is confirmation. High-bit pattern and After strict consistency is achieved, the high-order prefix is removed, and the remaining low-order valid data is retained. This step strictly follows the processing logic of using the decrypted random number sequence for data separation, ensuring a logical closed loop for the dual-channel decrypted data at the application layer.
[0077] Finally, the application processing server performs the extracted data according to the pre-set physical quantity logic verification table. Perform logical plausibility checks (e.g., verify whether the turbine speed is within the physically permissible range). Data that passes the verification is marked as reliable data and written to the historical database for use in power dispatch analysis.
[0078] The specific hardware circuit structure of the data receiving server, cryptographic machine, and application processing server, as well as the physical implementation of the underlying storage format and network communication interface of the database, can be implemented by those skilled in the art using general computer equipment, commercial hardware security modules, and mature database management systems. These are well-known technologies in the field and will not be elaborated here.
[0079] This embodiment is applied to the monitoring network of a large hydropower station for monitoring and safe transmission of the temperature of the core bearing of the turbine unit.
[0080] Device initialization and key distribution. During the system deployment phase, the key management center 100 generates a 256-bit master key (…). Assume the generated master key is a hexadecimal sequence 0x8A...3F. For the turbine monitoring terminal (i.e., power system equipment 200) numbered HYDRO_UNIT_07, the key management center 100 extracts the unique device identifier of this equipment. =UUID-550e8400-e29b.
[0081] Key Management Center 100 performs HKDF-Expand operation: ; Calculated device key The key is injected into a secure storage area at physical address 0x800000 by connecting to the JTAG security interface of the power system equipment 200 using a dedicated handheld key injection terminal.
[0082] Dynamic subkey derivation. After the power system equipment 200 is powered on, the cryptographic processing unit 203 reads... Perform the following HMAC-SM3 operation: Data encryption key Input tag 0x4441544101 (i.e., ASCIIDATA+0x01) to calculate a 256-bit key.
[0083] Random number encryption key Input tag 0x52414E4401 (i.e. ASCIIRAND+0x01) to calculate a 256-bit key.
[0084] Message authentication key Input tag 0x4D414301 (i.e. ASCIIMAC+0x01) to calculate a 256-bit key.
[0085] Data Acquisition and Standardization. During operation, the data acquisition unit 201 collects the bearing temperature through the PT100 temperature sensor.
[0086] Data feature analysis (see appendix) Figure 5 ):like Figure 5 The original sensor data in the time domain, as shown, accurately reflects the physical characteristics of the turbine unit with 12 bits of effective precision. The curve in the figure exhibits a clear sinusoidal periodic fluctuation within the quantization range of 400 to 600 (corresponding to slow temperature rises and falls). This smooth and continuous waveform characteristic indicates a strong temporal correlation between the data points, making it easy for attackers to predict subsequent values through the waveform.
[0087] Current moment The collected analog quantity temperature is The analog-to-digital converter quantizes it into an integer. (Corresponding to binary 001000001100). The effective number of bits for this physical quantity. It is determined to be 12 bits.
[0088] Random number generation and forward padding. Physical true random number generator 202 detected. Calculate the number of bits needed to fill in. The circuit generates a 20-bit random number sequence using a thermal noise source. For example, binary 10110101110000111001 (i.e. hexadecimal 0xB5C39).
[0089] The system performed an online entropy assessment according to GM / T0062-2018, confirming that the minimum entropy of the sequence is greater than 0.7. The cryptographic processing unit 203 constructed standardized data blocks. :
[0090] Temporal whitening (see appendix) Figure 6 Once the above high-level filling is completed, the form of the original sensor data immediately undergoes a qualitative change. (See attached diagram.) Figure 5 A smooth curve, with Figure 6 The time-domain waveforms of the standardized data blocks in the data demonstrate a numerical jump to... The behavior after the magnitude change. At this point, the curve exhibits violent high-frequency oscillations, and the original sinusoidal periodic characteristics are completely submerged in random noise dominated by the high 20 bits of random numbers, making it visually impossible to discern any physical laws.
[0091] Leveling over the statistical domain (see appendix) Figure 7 Appendix Figure 7 This intuitively reveals the mathematical essence of this operation. The left subplot (before processing) shows that the data is highly concentrated in the [400, 600] interval, exhibiting sharp low-entropy peaks; while the right subplot (after processing) shows that the data is forcibly stretched into a uniform distribution across the entire 32-bit integer space. This reconstruction from concentrated to uniform distribution proves that the information entropy of the data has been maximized, completely eliminating the statistical fingerprint of the original data.
[0092] Aggregation and Encryption. The system caches normalized data blocks from four consecutive sampling periods, constructing 128-bit aggregated packets. At the same time, the random number sequences corresponding to these 4 periods (total) The bits are concatenated in order to form the original random number stream. .
[0093] Ciphertext computation: using right Perform SM4-GCM encryption to generate Initialization vector Depend on and serial number counter It is generated by HMAC truncation to ensure that N is not repeated in each transmission.
[0094] Random number stream encryption: using right Perform SM4-CTR encryption to generate .
[0095] Encapsulation and transmission. Communication units assemble and transmit data packets: Header: UUID-550e8400-e29b || =1024; Payload: =1735689600; Trailer: The data packet (HMAC-SM3 value calculated for the payload) is sent to the data center 300 via industrial Ethernet.
[0096] Data reception and data restoration. The data center 300 receives data packets, verifies the MAC address, and then decrypts the data using the locally reconstructed subkey. and During the data separation phase, the application processing server 303, based on the configuration database, knows that the valid bits for the device corresponding to UUID-550e8400-e29b are 12 bits. The system then... The first 32-bit block, 0xB5C3920C, is extracted from the middle. The system then... The first 20 bits, 0xB5C39, are extracted from the middle.
[0097] The system executes the separation logic: verifying whether the high 20 bits of 0xB5C3920C are equal to 0xB5C39; if the verification passes, remove the high 20 bits, retaining the low 12 bits 0x20C; convert 0x20C to decimal. Then divide by the quantification factor to get .
[0098] Combined with appendix Figure 5 To be continued Figure 7 Through comprehensive data analysis, this embodiment verifies the effectiveness of the proposed technical solution in protecting low-entropy industrial data.
[0099] First, regarding data confidentiality and resistance to statistical analysis, this solution addresses the problem of plaintext feature leakage through a dual mechanism of time-domain masking and frequency-domain equalization.
[0100] Evidence of temporal masking: Comparison Appendix Figure 5(Original waveform) and appendix Figure 6 (The filled waveform) clearly shows the process of the disappearance of physical laws. (Attached) Figure 5 The periodic sine wave, which is very easy to model and predict, is located in the middle. Figure 6 The transformation into an unpredictable random noise waveform proves that the forward padding mechanism successfully cuts off the residual physical quantity change trend in the ciphertext.
[0101] Statistical evidence of resistance: Appendix Figure 7 It provides a more critical proof of security. Traditional encryption often struggles to mask statistical biases in low-entropy data (such as...). Figure 7 The left-hand side shows a centralized distribution, while this scheme achieves this by introducing high-order random numbers. Figure 7 The right side shows a perfectly uniform distribution. This distribution characteristic means that for an attacker, each intercepted data block is equally probable, thus completely thwarting frequency-based attack methods.
[0102] Secondly, regarding data integrity and transmission efficiency, this embodiment employs an aggregated block encryption strategy, merging four 32-bit data blocks into a single SM4 block for GCM processing. Compared to encrypting each data block independently, this reduces GCM call overhead and N generation overhead by 75%. Simultaneously, the dual-channel decryption mechanism (i.e., an independent random number ciphertext stream channel) ensures that variable-length data (such as the 12-bit valid data in this example) can be accurately restored at the receiving end without needing to carry an explicit length field in the ciphertext, thus saving bandwidth resources.
[0103] Finally, regarding security throughout the entire lifecycle, this embodiment ensures device key security through physically isolated key distribution, hierarchical key derivation based on HKDF, and a dynamic update mechanism combined with timestamps. The system provides forward security. Even if the session subkey is obtained by a side-channel attack at a certain moment, the attacker cannot reverse-engineer the master key or forge subsequent legitimate data packets, thus meeting the high-level security requirements of power monitoring systems for tamper-proofing, replay protection, and eavesdropping prevention.
Claims
1. A method for securely acquiring data from power system equipment, characterized in that, include: Based on the key materials distributed by the key management center (100), a synchronized key system is established between the power system equipment (200) and the data center (300), the key system including mutually isolated data encryption keys and random number encryption keys; The power system equipment (200) acquires sensor data and generates a random number sequence, concatenates the random number sequence with the sensor data to construct a standardized data block, encrypts the standardized data block using the data encryption key to generate ciphertext data, and independently encrypts the random number sequence using the random number encryption key to generate a random number ciphertext stream, and finally encapsulates and sends a transmission data packet containing the ciphertext data and the random number ciphertext stream. The data center (300) receives the transmission data packet, decrypts the ciphertext data and the random number ciphertext stream using the key system, restores the standardized data block and the random number sequence, and separates the original sensor data from the restored standardized data block based on the restored random number sequence, and then stores the separated sensor data to complete secure data acquisition.
2. The method for secure data acquisition from power system equipment according to claim 1, characterized in that, The specific steps for establishing a synchronized key system between the power system equipment (200) and the data center (300) include: The key management center (100) generates a master key, and based on the master key and the unique device identifier of the power system device (200), performs a hash-based message authentication code key derivation function extension operation to calculate the device key, and pre-installs the device key in the power system device (200); The power system equipment (200) and the data center (300) respectively derive the data encryption key and the random number encryption key based on the equipment key, thereby completing the synchronous key system between the two communicating parties.
3. The method for secure data acquisition from power system equipment according to claim 2, characterized in that, The specific steps for constructing standardized data blocks include: Determine the effective number of bits in the sensor data; Calculate the difference between the preset standardized length and the effective data bits, determine the difference as the random number padding length, and generate the random number sequence with a length equal to the random number padding length; The random number sequence is subjected to entropy evaluation. When the entropy value of the random number sequence is greater than or equal to a preset safety threshold, a splicing operation is performed. The random number sequence is located in the high bit of the standardized data block, and the sensor data is located in the low bit of the standardized data block, thereby constructing the standardized data block.
4. The method for secure data acquisition from power system equipment according to claim 3, characterized in that, The step of separating the original sensor data from the restored normalized data block based on the restored random number sequence specifically includes: The data center (300) queries the preset configuration according to the unique device identifier, obtains the effective data bits of the sensor data, calculates the random number padding length according to the effective data bits, and extracts a bit sequence with a length equal to the random number padding length from the restored random number sequence; Verify whether the high-order bits of the standardized data block are consistent with the extracted bit sequence; If they match, the high-order bits of the bit sequence in the standardized data block are removed, and the low-order bits are retained to obtain the original sensor data.
5. A method for secure data acquisition from power system equipment according to claim 4, characterized in that, The specific steps for generating ciphertext data include: The power system equipment (200) splices together multiple consecutive standardized data blocks to construct aggregated groups; The power system equipment (200) maintains an incrementing serial number counter and uses the data encryption key as a key to generate an initialization vector by combining the unique device identifier with the serial number counter; The Galois counter mode of the block cipher algorithm is used to encrypt the aggregated blocks using the data encryption key and the initialization vector, thereby generating the ciphertext data.
6. A method for secure data acquisition from power system equipment according to claim 5, characterized in that, The specific steps for generating a ciphertext stream of random numbers include: Multiple random number sequences corresponding to the aggregated group are concatenated to construct a random number stream; The initialization vector used when generating the ciphertext data is reused; The random number stream is encrypted using the random number encryption key and the initialization vector in the counter mode of the block cipher algorithm, thereby generating the random number ciphertext stream.
7. A method for secure data acquisition from power system equipment according to claim 2, characterized in that, The steps for deriving the data encryption key and the random number encryption key based on the device key specifically include: The power system equipment (200) and the data center (300) construct tag parameters that characterize data encryption, random number encryption, and message authentication purposes; Using the device key as the input key material and the combination of the tag parameters and the separator as the input message, a hash-based message authentication code operation is performed to calculate the data encryption key, the random number encryption key, and the message authentication code key.
8. A method for secure data acquisition from power system equipment according to claim 7, characterized in that, Before sending the transmission data packet containing the ciphertext data and the random number ciphertext stream, the method further includes a step of calculating the message authentication code value, specifically including: Get the current system timestamp value; The encrypted data, the random number encrypted stream, and the system timestamp value are concatenated to form the data to be signed; Using the message authentication code key, a message authentication code operation based on a hash algorithm is performed on the data to be signed, thereby obtaining the message authentication code value; Accordingly, the transmitted data packet also includes the system timestamp value and the message authentication code value.
9. A method for secure data acquisition from power system equipment according to claim 2, characterized in that, The method further includes a key update step for maintaining the synchronized key system, specifically including: The power system equipment (200) monitors the internal security clock and data transmission counter; When the running time recorded by the security clock reaches a preset time period, or the amount of transmitted data recorded by the data transmission counter reaches a preset data amount threshold, the power system equipment (200) uses the current timestamp as the salt value, the unique device identifier as the context information, and the current device key as the input key material to perform a hash-based message authentication code key derivation function operation, thereby generating a new generation of device keys.
10. A data security acquisition system for power system equipment, characterized in that, The method for secure data acquisition from power system equipment as described in any one of claims 1-9 includes: A key management center (100) is used to generate master keys and distribute key materials; The power system equipment (200) is used to establish a synchronized key system with the data center (300), the key system including mutually isolated data encryption keys and random number encryption keys; and to acquire sensor data and generate a random number sequence, and to combine the random number sequence with the sensor data to construct a standardized data block; The power system equipment (200) also uses the data encryption key to encrypt the standardized data block to generate ciphertext data, and uses the random number encryption key to independently encrypt the random number sequence to generate a random number ciphertext stream, and encapsulates and sends a transmission data packet containing the ciphertext data and the random number ciphertext stream. The data center (300) is used to establish a synchronized key system with the power system equipment (200), receive the transmission data packets, decrypt the ciphertext data and the random number ciphertext stream using the key system, restore the standardized data block and the random number sequence; and separate the original sensor data from the restored standardized data block according to the restored random number sequence, and store the separated sensor data to complete secure data acquisition.