Power terminal data encryption transmission method and system based on seed key library
By adopting a power terminal data encryption transmission method based on seed key store in the smart grid system, the session key is obtained by using seed key calculation, and the power data is multi-encrypted transmission, which solves the problem of insufficient data transmission security in the smart grid system and achieves efficient and secure data transmission.
Patent Information
- Application Number
- CN202311256456.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-27
- Publication Date
- 2025-03-28
AI Technical Summary
In the process of data transmission in smart grid systems, we face information security risks such as eavesdropping and forgery. Traditional encryption and decryption algorithms are easy to be cracked and it is difficult to ensure the security of data transmission.
The power terminal data encryption transmission method based on the seed key store is adopted, and the seed key store is generated through the same key generator, and it is injected separately at the data transmitting end and the receiving end. The session key is calculated using the seed key, and the power data is multi-encrypted and transmitted, and the original data is decrypted layer by layer at the receiving end.
It greatly enhances data confidentiality, improves the transmission security of power data, ensures that even if the transmitted data is stolen, it cannot be cracked, reduces the risk and losses of data interception, and facilitates key replacement, further improving data security.
Smart Images

Figure CN119728126A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data transmission security, and in particular to a method and system for power terminal data encryption transmission based on a seed key library. Background Art
[0002] The power system needs to transmit a large amount of sensitive data at all times, such as the power consumption of power users and the operating status of power equipment. If these data are leaked maliciously, it will cause immeasurable losses to power supply companies and power users. At present, there are a large number of smart devices in the smart grid system, and most of them use wireless communication. Therefore, the data is facing information security risks such as eavesdropping and forgery during transmission. The use of traditional encryption algorithms to encrypt smart grid data information, such as fixed encryption and decryption algorithms, can easily lead to the key being cracked. Once the data is eavesdropped, it is difficult to ensure the security of smart grid data transmission.
[0003] Therefore, improving the transmission security of existing power data has become one of the issues that urgently need to be solved in this technical field. Summary of the invention
[0004] In order to overcome the shortcomings of the above-mentioned prior art, the present invention provides a method and system for power terminal data encryption transmission based on a seed key library, which specifically adopts the following technical solutions: A method for encrypting and transmitting power terminal data based on a seed key library comprises the following steps: S1. Generate a seed key library using the same key generator for the data transmitter and the data receiver, and inject them into the seed key library respectively; S2. When the data transmitter and the data receiver perform data transmission, the data transmitter will first select the seed key of its own seed key library as the session seed key, and calculate the session seed key according to the preset key derivation algorithm in the data transmitter to obtain the session key; encrypt the power data using the session key to obtain the encrypted power data, then combine the encrypted power data with the calculation parameters of the corresponding session key to obtain the primary combined power data, and use the seed key to perform secondary encryption on the primary combined power data to obtain the secondary encrypted power data, and then combine the number of the corresponding seed key and the secondary encrypted power data to obtain the secondary combined power data; S3. After receiving the secondary combined power data, the data receiving end first obtains the seed key from its own seed key library according to the number of the seed key; then uses the seed key to decrypt the secondary encrypted power data in the secondary combined power data to obtain the primary combined power data; then obtains the calculation parameters of the session key from the primary combined power data, and uses the same key derivation algorithm to combine the calculation parameters of the session key and the seed key to obtain the corresponding session key; the data receiving end uses the calculated session key to decrypt the encrypted power data in the primary combined power data to obtain the power data.
[0005] Preferably, the key derivation algorithm adopts one of the HKDF algorithm, the Scrypt algorithm or the Argon2 algorithm.
[0006] Preferably, the calculation parameters of the session key include at least a salt value and an iteration number, and the salt value and iteration number of the same session key in the data transmitting end and the data receiving end are the same.
[0007] Preferably, the secure injection method of the seed key in step S2 includes keyboard input, floppy disk input or key gun input.
[0008] Preferably, when the seed key library is injected into the data transmitting end and the data receiving end in step S1, the following steps are also included: S101. When the seed key library is initially injected, the injection order remains the same, and a transmission key number table is generated at the same time; S102. When the data transmitting end and the data receiving end store the corresponding seed key library respectively, the corresponding seed key library will be rearranged and numbered according to its own rules, and a storage key number table will be generated at the same time; wherein the storage key number table of the data transmitting end and the data receiving end has a single mapping relationship with the transmission key number table respectively.
[0009] Preferably, the number corresponding to the seed key in the secondary combined power data adopts the number of the transmission key number table.
[0010] Preferably, the process of obtaining the secondary combined power data in step S2 further includes the following steps: S201. Before combining the seed key number and the secondary encrypted power data, the data transmitter first converts the storage key number corresponding to the seed key into the transmission key number according to a preset conversion rule; S202. Then, the data transmitting end combines the converted transmission key number with the secondary encrypted power data to obtain secondary combined power data.
[0011] Preferably, in step S3, after the data receiving end receives the secondary combined power data, the following steps are further included: S301. After receiving the secondary combined power data, the data receiving end will first convert the transmission key number in the secondary combined power data into the storage key number corresponding to the data receiving end according to the preset conversion rule of the data receiving end; S302. Then, the seed key corresponding to the key number stored in the data receiving terminal is used to decrypt the secondary encrypted power data to obtain the primary combined power data; S303. Then, the seed key corresponding to the key number stored in the data receiving terminal is used to decrypt the secondary encrypted power data to obtain the calculation parameters of the primary combined power data and the session key; S304. The data receiving end calculates the session key according to the calculation parameters of the seed key and the session key, and uses the session key to decrypt the encrypted power data.
[0012] Preferably: the method further comprises the following steps: S4. When the seed key library is updated, the data transmitting end first encrypts the new seed key using any seed key of the old seed key library, and transmits the new seed key to the data receiving end according to steps S2 and S3; after receiving and decrypting the new seed key, the data receiving end updates and replaces the corresponding seed key of the seed key library. After the replacement is completed, the data receiving end returns the operation execution result to the data transmitting end, and the data transmitting end updates and replaces its own seed key library according to the operation execution result.
[0013] The present invention also discloses a power terminal data encryption transmission system based on a seed key library, comprising a data transmitting end and a data receiving end, wherein the data transmitting end and the data receiving end are both provided with a seed key library, an encryption and decryption module, a number conversion module and a transmission communication module. The seed key library is used to store seed key data corresponding to the data transmitting end or the data receiving end; The encryption and decryption module is used to perform encryption and decryption operations on power data and data combination; The number conversion module is used to convert the storage key number and the transmission key number of the seed key; The transmission communication module is used to realize power data transmission between the data transmitting end and the data receiving end. Beneficial Effects
[0014] The technical solution of the present invention achieves the following beneficial effects: The power terminal data encryption transmission method of the present invention realizes multiple encryption of power data based on the seed key. During the data transmission process, the session key is calculated by the seed key, and the session key calculation parameters are combined with the power data for encryption, and transmitted together to the data receiving end. The power data is obtained by decrypting the received data layer by layer. This process greatly enhances data confidentiality and improves the transmission security of power data. Even if the transmitted data is stolen during the data transmission process, it cannot be cracked, reducing the risk of data interception and loss. At the same time, in the subsequent key update process, the key replacement can be conveniently realized, further improving data security. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a structural schematic diagram of the power terminal data encryption transmission method system in the present invention.
[0016] Figure 2 It is a data transmission flow diagram of the power terminal data encryption transmission method in the present invention.
[0017] Figure 3 It is a structural schematic diagram of the relationship between the storage key number and the transmission key number in the present invention. Implementation
[0018] The present invention will be further described below in conjunction with the accompanying drawings. The following examples are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the scope of protection of the present invention. It should be pointed out that the following detailed descriptions are all exemplary and are intended to provide further explanation of the present application.
[0019] Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those generally understood by those of ordinary skill in the art to which this application belongs. It should be noted that the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0020] Combination Figure 1-3 As shown, this embodiment specifically discloses a method for encrypting and transmitting power terminal data based on a seed key library, which includes the following steps: S1. Generate a seed key library for the data transmitter and the data receiver using the same key generator, and inject them respectively; wherein the secure injection method of the seed key includes keyboard input, floppy disk input or key gun input, and any one or more of the above methods can be used in combination during actual use. In this embodiment, the seed key can be injected by physical means for the first time to ensure the security of the key, and subsequent key updates can be encrypted and updated through the old seed key.
[0021] When the seed key library is injected into the data transmitting end and the data receiving end in step S1, the following steps are also included: S101. When the seed key library is initially injected, the injection order remains the same, and a transmission key number table is generated at the same time; S102. When the data transmitter and the data receiver store the corresponding seed key library respectively, the corresponding seed key library will be rearranged and numbered according to its own rules, and a storage key number table will be generated at the same time; wherein the storage key number table of the data transmitter and the data receiver respectively has a single mapping relationship with the transmission key number table. In this embodiment, the data transmitter and the data receiver respectively arrange and number the seed key library, and only the corresponding transmission key number is attached to the power data during the transmission process, which can avoid the seed key from being deduced after the data is intercepted, thereby improving the security of data transmission.
[0022] S2. When the data transmitter and the data receiver perform data transmission, the data transmitter will first select the seed key of its own seed key library as the session seed key, and calculate the session seed key according to the preset key derivation algorithm in the data transmitter to obtain the session key; encrypt the power data using the session key to obtain the encrypted power data, then combine the encrypted power data with the calculation parameters of the corresponding session key to obtain the primary combined power data, and use the seed key to perform secondary encryption on the primary combined power data to obtain the secondary encrypted power data, and then combine the number of the corresponding seed key and the secondary encrypted power data to obtain the secondary combined power data; In this embodiment, the number of the seed key corresponding to the secondary combined power data adopts the number of the transmission key number table. Specifically, the process of obtaining the secondary combined power data in step S2 also includes the following steps: S201. Before combining the seed key number and the secondary encrypted power data, the data transmitter first converts the storage key number corresponding to the seed key into a transmission key number according to a preset conversion rule; the preset conversion rule is mainly used to form a single mapping relationship between the storage key number and the transmission key number, and then the data transmitter can obtain the transmission key number through the storage key number, or obtain the storage key number in reverse.
[0023] S202. The data transmitter then combines the converted transmission key number with the secondary encrypted power data to obtain secondary combined power data. The transmission key number is only used for number correspondence during data transmission, and the actual seed key storage key number still needs to undergo certain calculations and conversions before it can be known, which greatly improves data confidentiality and prevents data from being decrypted.
[0024] S3. After receiving the secondary combined power data, the data receiving end first obtains the seed key from its own seed key library according to the number of the seed key; then uses the seed key to decrypt the secondary encrypted power data in the secondary combined power data to obtain the primary combined power data; then obtains the calculation parameters of the session key from the primary combined power data, and uses the same key derivation algorithm to combine the calculation parameters of the session key and the seed key to obtain the corresponding session key; the data receiving end uses the calculated session key to decrypt the encrypted power data in the primary combined power data to obtain the power data.
[0025] Furthermore, after the data receiving end receives the secondary combined power data in step S3, the following steps are also included: S301. After the data receiving end receives the secondary combined power data, it will first convert the transmission key number in the secondary combined power data into the storage key number corresponding to the data receiving end according to the preset conversion rule of the data receiving end; it should be noted that the preset conversion rule corresponding to the data receiving end has no correlation with the preset conversion rule of the data sending end, thereby ensuring that the data has a high confidentiality in the transmission or reception stage respectively.
[0026] S302. Then, the seed key corresponding to the key number stored in the data receiving terminal is used to decrypt the secondary encrypted power data to obtain the primary combined power data; S303. Then, the seed key corresponding to the key number stored in the data receiving terminal is used to decrypt the secondary encrypted power data to obtain the primary combined power data and the calculation parameters of the session key; S304. The data receiving end calculates the session key according to the calculation parameters of the seed key and the session key, and uses the session key to decrypt the encrypted power data.
[0027] It should be noted that in step S2 of this embodiment, the random seed key of the seed key library is used as the session key seed to calculate the session key, and after multiple encryptions and combinations, the encrypted data with extremely strong confidentiality is obtained. In the subsequent data decryption process, the power data can be obtained by decrypting the content attached to the transmitted data in sequence, which not only improves the data transmission efficiency and avoids complex verification procedures, but also ensures the secure transmission of data.
[0028] S4. When the seed key library is updated, the data transmitting end first encrypts the new seed key using any seed key of the old seed key library, and transmits the new seed key to the data receiving end according to steps S2 and S3; after receiving and decrypting the new seed key, the data receiving end updates and replaces the corresponding seed key of the seed key library. After the replacement is completed, the data receiving end returns the operation execution result to the data transmitting end, and the data transmitting end updates and replaces its own seed key library according to the operation execution result.
[0029] It should be noted that the key derivation algorithm described in this embodiment may adopt one of the HKDF algorithm, the Scrypt algorithm or the Argon2 algorithm. In the process of calculating the session key, the calculation parameters of the session key include at least a salt value and an iteration number, and the salt value and iteration number of the same session key in the data transmitting end and the data receiving end are the same, thereby ensuring that the session keys calculated by the data transmitting end and the data receiving end are the same.
[0030] Furthermore, the present embodiment also discloses a power terminal data encryption transmission system based on a seed key library, and the data encryption transmission system can be operated and used by adopting the above-mentioned power terminal data encryption transmission method. Specifically, the system includes a data transmitting end and a data receiving end, wherein the data transmitting end and the data receiving end are both provided with a seed key library, an encryption and decryption module, a number conversion module and a transmission communication module. The seed key library is used to store seed key data corresponding to the data transmitting end or the data receiving end; The encryption and decryption module is used to perform encryption and decryption operations on power data and data combination; The number conversion module is used to convert the storage key number and the transmission key number of the seed key; The transmission communication module is used to realize power data transmission between the data transmitting end and the data receiving end.
[0031] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for encrypting and transmitting power terminal data based on a seed key library, characterized in that: The steps include: S1. Generate a seed key library using the same key generator for the data transmitter and the data receiver, and inject them into the seed key library respectively; S2. When the data transmitter and the data receiver perform data transmission, the data transmitter will first select the seed key of its own seed key library as the session seed key, and calculate the session seed key according to the preset key derivation algorithm in the data transmitter to obtain the session key; Encrypting the power data using the session key to obtain encrypted power data, then combining the encrypted power data with a calculation parameter corresponding to the session key to obtain primary combined power data, and re-encrypting the primary combined power data using the seed key to obtain secondary encrypted power data, then combining the number corresponding to the seed key and the secondary encrypted power data to obtain secondary combined power data; S3. After receiving the secondary combined power data, the data receiving end first obtains the seed key from its own seed key library according to the seed key number; Then, the seed key is used to decrypt the secondary encrypted power data in the secondary combined power data to obtain the primary combined power data; then, the calculation parameters of the session key are obtained from the primary combined power data, and the corresponding session key is obtained by combining the calculation parameters of the session key and the seed key using the same key derivation algorithm; The data receiving end uses the calculated session key to decrypt the encrypted power data in the combined power data to obtain the power data.
2. The method for encrypting and transmitting power terminal data according to claim 1, characterized in that: The key derivation algorithm adopts one of the HKDF algorithm, the Scrypt algorithm or the Argon2 algorithm.
3. The method for encrypting and transmitting power terminal data according to claim 1, characterized in that: The calculation parameters of the session key include at least a salt value and an iteration number, and the salt value and iteration number of the same session key in the data transmitting end and the data receiving end are the same.
4. The method for encrypting and transmitting power terminal data according to claim 1, characterized in that: The secure injection method of the seed key in step S2 includes keyboard input, floppy disk input or key gun input.
5. The method for encrypting and transmitting power terminal data according to claim 1, characterized in that: When the seed key library is injected into the data transmitting end and the data receiving end in step S1, the following steps are also included: S101. When the seed key library is initially injected, the injection order remains the same, and a transmission key number table is generated at the same time; S102. When the data transmitting end and the data receiving end store the corresponding seed key library respectively, the corresponding seed key library will be rearranged and numbered according to its own rules, and a storage key number table will be generated; The storage key number table and the transmission key number table of the data transmitting end and the data receiving end respectively have a single mapping relationship.
6. The method for encrypting and transmitting power terminal data according to claim 5, characterized in that: The number corresponding to the seed key in the secondary combined power data adopts the number of the transmission key number table.
7. The method for encrypting and transmitting power terminal data according to claim 6, characterized in that: The process of obtaining the secondary combined power data in step S2 also includes the following steps: S201. Before combining the seed key number and the secondary encrypted power data, the data transmitter first converts the storage key number corresponding to the seed key into the transmission key number according to a preset conversion rule; S202. Then, the data transmitting end combines the converted transmission key number with the secondary encrypted power data to obtain secondary combined power data.
8. The method for encrypting and transmitting power terminal data according to claim 7, characterized in that: After the data receiving end receives the secondary combined power data in step S3, the following steps are also included: S301. After receiving the secondary combined power data, the data receiving end will first convert the transmission key number in the secondary combined power data into the storage key number corresponding to the data receiving end according to the preset conversion rule of the data receiving end; S302. Then, the seed key corresponding to the key number stored in the data receiving terminal is used to decrypt the secondary encrypted power data to obtain the primary combined power data; S303. Then, the seed key corresponding to the key number stored in the data receiving terminal is used to decrypt the secondary encrypted power data to obtain the calculation parameters of the primary combined power data and the session key; S304. The data receiving end calculates the session key according to the calculation parameters of the seed key and the session key, and uses the session key to decrypt the encrypted power data.
9. The method for encrypting and transmitting power terminal data according to claim 1, characterized in that: The following steps are also included: S4. When the seed key library is updated, the data transmitting end first encrypts the new seed key using any seed key of the old seed key library, and transmits the new seed key to the data receiving end according to steps S2 and S3; after receiving and decrypting the new seed key, the data receiving end updates and replaces the corresponding seed key of the seed key library. After the replacement is completed, the data receiving end returns the operation execution result to the data transmitting end, and the data transmitting end updates and replaces its own seed key library according to the operation execution result.
10. A power terminal data encryption transmission system based on a seed key library, comprising a data transmitter and a data receiver, characterized in that: The data transmitting end and the data receiving end are both provided with a seed key library, an encryption and decryption module, a number conversion module and a transmission and communication module. The seed key library is used to store seed key data corresponding to the data transmitting end or the data receiving end; The encryption and decryption module is used to perform encryption and decryption operations on power data and data combination; The number conversion module is used to convert the storage key number and the transmission key number of the seed key; The transmission communication module is used to realize power data transmission between the data transmitting end and the data receiving end.