Industrial wireless network security communication method based on national cryptographic algorithm
By using the national secret algorithm SM2 for identity authentication in industrial wireless networks, and using SM3 and SM4 for key negotiation and data encryption, the problems of device identity authentication and data encryption in industrial wireless networks are solved, and data security and integrity are achieved.
Patent Information
- Application Number
- CN202411918092.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-11
AI Technical Summary
Industrial wireless network WIA-FA faces security problems in industrial environments. Attackers may disguise themselves as legitimate devices, join the network and steal or tamper with data. The data of wireless communication is transmitted through open wireless channels and is easily captured by monitoring devices.
The secure communication method based on the State Secret algorithm is adopted, and the two-way identity authentication of the device is performed through the State Secret algorithm SM2, and the key negotiation and data encryption are used to ensure the confidentiality and integrity of the data.
Device identity authentication and data encryption in industrial wireless networks are realized, ensuring the security and integrity of the data, and preventing attackers from stealing or tampering with data.
Smart Images

Figure CN119814324A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial wireless networks, and in particular to a secure communication method for industrial wireless networks based on a national encryption algorithm. Background Art
[0002] The WIA-FA (Industrial Wireless Network WIA Specification Part 2: WIA System Architecture and Communication Specifications for Factory Automation) wireless network system is a set of factory automation wireless data transmission solutions developed specifically for the high real-time and high reliability requirements of factory automation. It is suitable for factory automation or other application scenarios with high speed and reliability requirements to establish a 2.4GHz / 5GHz industrial wireless local area network to achieve high-speed wireless data transmission. The WIA-FA physical layer uses the physical layer based on IEEE STD 802.11-2012 for communication, and can use different modulation and demodulation methods (FHSS / DSSS / OFDM, etc.). WIA-FA has been unanimously approved by the International Electrotechnical Commission's Industrial Process Measurement, Control and Automation Technical Committee and released as an IEC publicly available technical specification (PAS, Publicly Available Specification) document, becoming the world's first wireless technical specification for factory high-speed automatic control applications.
[0003] The National Cryptography Algorithm (SM series algorithm) is a series of cryptographic algorithm standards issued by the State Cryptography Administration of China, including the public key cryptography algorithm SM2, the hash algorithm SM3 and the symmetric cryptography algorithm SM4. These algorithms are widely used in fields such as information security, data encryption and identity authentication, especially in domestic industrial control, financial payment, wireless communication and other scenarios. SM2 is a public key cryptography algorithm based on elliptic curve cryptography (ECC) for encryption, decryption, digital signature and key negotiation. SM3 is an encryption hash algorithm similar to the international standard SHA-256, which is mainly used to generate fixed-length message digests and detect whether data has been tampered with. SM4 is a symmetric block encryption algorithm with a block length of 128 bits and a key length of 128 bits. It is widely used in wireless communications (such as WLAN), data encryption storage and industrial control systems.
[0004] Industrial Wireless Network (WIA-FA) is a highly reliable, low-latency wireless communication protocol for factory automation and is widely used in smart manufacturing, industrial control, and real-time monitoring. However, due to its operating environment and the inherent characteristics of wireless communication, WIA-FA faces many security issues. In an industrial environment, attackers may disguise themselves as legitimate devices, join the network, and steal or tamper with data. Wireless communication data is transmitted through open wireless channels. Attackers can use listening devices to capture unencrypted data packets to obtain sensitive information. A secure communication method for industrial wireless networks based on national encryption algorithms is needed to solve this problem. Summary of the invention
[0005] The purpose of the present invention is to provide an industrial wireless network security communication method based on a national encryption algorithm to solve the problems raised in the above background technology.
[0006] To achieve the above-mentioned purpose, the present invention provides the following technical solution: a method for secure communication of industrial wireless networks based on national encryption algorithms, comprising the following specific steps.
[0007] S1. Identity authentication is required before the device is connected to the network. The gateway device and the field device complete two-way identity authentication through the national secret algorithm SM2 to ensure the legitimacy of the device. Identity authentication first uses the field device to pre-configure a unique device ID, public and private key pair (SM2) and digital certificate when it leaves the factory;
[0008] S2. The field device sends an authentication request to the gateway, and uses a random number generator to generate a random number R1. The authentication request message contains the following information: device ID; random number R1; current timestamp T1; device digital certificate (Cert_Device). The message format is M1 = {DeviceID, T1, R1, Cert_Device}. The gateway device verifies the legitimacy of the field device digital certificate through the CA public key.
[0009] S3, generate a random number R2, construct an authentication response; use the device public key to encrypt R1||R2; the message format is M2={Enc DevicePK (R1||R2),T2};
[0010] S4. The device uses its own private key to decrypt M2 and verify whether R1 matches. Returns the signature of the random number R2 (using the device private key). The message format is M3 = {Sign DeviceSK (R2)};
[0011] S5. The signature in the gateway verification confirms the legitimacy of the device identity, and both parties complete the identity authentication;
[0012] S6, where the key negotiation includes the field device generating a random number R A, encrypted with the gateway public key and sent to the gateway, the message format is: M4 = {Enc GatewayPK (R A )};
[0013] S7. The gateway generates a random number R B , encrypt the returned message M5 using the public key of the field device = {Enc DevicePK (R B )};
[0014] Both parties decrypt the received random number R A and R B , and generate a shared session key: K S =SM3(R A ||R B ||Device||GatewayID);
[0015] S8, both parties use K S Calculate HMAC-SM3 for test data (such as the string "test") and verify each other to ensure the key is consistent;
[0016] S9, wherein encryption and data integrity verification include using a session key to encrypt communication data to ensure confidentiality and integrity of the data;
[0017] S10, before sending the data, the data is first grouped, each group is 128 bits long, and the session key K is used. S The CTR mode of SM4 encrypts the data payload. The CTR mode is suitable for industrial real-time data transmission. The ciphertext format is C=SM4 CTR (K S ,Payload). Calculate the HMAC-SM3 data integrity check code MAC of the encrypted data: MAC = HMAC-SM3 (K S , C);
[0018] S11, the access device receives the encrypted data packet from the field device, receives the encrypted data packet through the gateway device GW, and verifies the legitimacy of the data packet according to the device ID and timestamp;
[0019] S12, perform integrity check: re-use HMAC-SM3 to calculate the message authentication code MAC' for the decrypted message; the calculation formula is MAC'=HMAC-SM3(K S ,C), parse and process the decrypted data and forward the data to the host computer.
[0020] As a preferred technical solution of the present invention, after identity authentication is completed in step S5, both parties need to conduct key negotiation and use SM2 and a random number exchange mechanism to generate a session key to ensure the dynamic nature and security of the key.
[0021] As a preferred technical solution of the present invention, in step S9, the national encryption algorithm SM4 is used to encrypt data, and HMAC-SM3 is used to verify the integrity of the data.
[0022] As a preferred technical solution of the present invention, the encrypted data packet sent in step S10 includes an encrypted valid field and a message authentication code, and the message format is Encrypted P = {Header, C, MAC}.
[0023] As a preferred technical solution of the present invention, the security module is called in step S11, using the shared key K S And SM4's CTR mode decrypts ciphertext C:
[0024] As a preferred technical solution of the present invention, in step S12, the received MAC and the calculated MAC' are compared. If the two are the same, the data has not been tampered with.
[0025] Compared with the prior art, the present invention has the following beneficial effects:
[0026] (1) The present invention is a secure communication method for an industrial wireless network based on a national secret algorithm. The secure communication method provided by the present invention includes three stages: identity authentication, key negotiation, and data encryption and decryption. The national secret algorithm SM2 is used for identity authentication, and the hash-based message authentication code SM3 (HMAC-SM3) and SM4 block cipher algorithm (SM4) are used to encrypt transmission data and verify data integrity.
[0027] (2) The present invention is a secure communication method for an industrial wireless network based on a national encryption algorithm. The secure communication method provided by the present invention considers how to save the storage space and communication overhead of the WIA-FA network while realizing a set of autonomous and controllable secure transmission protocols based on industrial wireless network standards and cryptographic algorithms, thereby fundamentally ensuring the safety, reliability and controllability of the industrial communication process. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0029] Figure 1 is a network topology diagram of the present invention;
[0030] Figure 2 It is the overall flow chart of the secure communication of the present invention;
[0031] Figure 3 It is the WIA-FA protocol stack structure of the present invention;
[0032] Figure 4 It is the WIA-FA data stream secure transmission of the present invention;
[0033] Figure 5 It is the data link layer frame structure with security of the present invention. DETAILED DESCRIPTION
[0034] Below, the invention is further described in conjunction with the accompanying drawings and specific embodiments:
[0035] Example 1
[0036] refer to Figure 1 to Figure 2 Example 1 is described, including the following specific steps.
[0037] S1. Identity authentication is required before the device is connected to the network. The gateway device and the field device complete two-way identity authentication through the national secret algorithm SM2 to ensure the legitimacy of the device. Identity authentication first uses the field device to pre-configure a unique device ID, public and private key pair (SM2) and digital certificate when it leaves the factory;
[0038] S2. The field device sends an authentication request to the gateway, and uses a random number generator to generate a random number R1. The authentication request message contains the following information: device ID; random number R1; current timestamp T1; device digital certificate (Cert_Device). The message format is M1 = {DeviceID, T1, R1, Cert_Device}. The gateway device verifies the legitimacy of the field device digital certificate through the CA public key.
[0039] S3, generate a random number R2, construct an authentication response; use the device public key to encrypt R1||R2; the message format is M2={Enc DevicePK (R1||R2),T2};
[0040] S4. The device uses its own private key to decrypt M2 and verify whether R1 matches. Returns the signature of the random number R2 (using the device private key). The message format is M3 = {Sign DeviceSK (R2)};
[0041] S5. The signature in the gateway verification confirms the legitimacy of the device identity, and both parties complete the identity authentication;
[0042] S6, where the key negotiation includes the field device generating a random number R A , encrypted with the gateway public key and sent to the gateway, the message format is: M4 = {Enc GatewayPK (R A )};
[0043] S7. The gateway generates a random number R B , encrypt the returned message M5 using the public key of the field device = {Enc DevicePK (R B )};
[0044] Both parties decrypt the received random number R A and R B , and generate a shared session key: K S =SM3(R A ||R B ||Device||GatewayID);
[0045] S8, both parties use K S Calculate HMAC-SM3 for test data (such as the string "test") and verify each other to ensure the key is consistent;
[0046] In this implementation, after identity authentication is completed in step S5, both parties need to perform key negotiation and use SM2 and a random number exchange mechanism to generate a session key to ensure the dynamic nature and security of the key.
[0047] Example 2
[0048] refer to Figures 3 to 5 Description of Example 2, This implementation further describes Example 1, including encryption and data integrity verification including using a session key to encrypt communication data to ensure confidentiality and integrity of the data;
[0049] S10. Before sending data, the data is first grouped, each group is 128 bits long, and the data payload is encrypted using the session key and SM4's CTR mode. The CTR mode is suitable for industrial real-time data transmission. The ciphertext format is. Calculate the HMAC-SM3 data integrity check code MAC of the encrypted data:
[0050] S11, the access device receives the encrypted data packet from the field device, receives the encrypted data packet through the gateway device GW, and verifies the legitimacy of the data packet according to the device ID and timestamp;
[0051] S12, perform integrity check: re-use HMAC-SM3 to calculate the message authentication code MAC′ for the decrypted message; the calculation formula is MAC′=HMAC-SM3(,C), parse and process the decrypted data, and forward the data to the main control computer;
[0052] In this implementation, in step S9, the national secret algorithm SM4 is used to encrypt data, and HMAC-SM3 is used to verify the integrity of the data. In step S10, an encrypted data packet is sent, including an encrypted valid field and a message authentication code. The message format is EncryptedP = {Header, C, MAC}. In step S11, the security module is called and the shared key K is used. S And SM4's CTR mode decrypts ciphertext C: In step S12, the received MAC is compared with the calculated MAC'. If the two are the same, the data has not been tampered with.
[0053] In the description of the present invention, it should be noted that the orientations or positional relationships indicated by the terms "top", "bottom", "one side", "the other side", "front", "back", "middle part", "inside", "top end", "bottom end", etc. are based on the orientations or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention; the terms "first", "second", and "third" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance; in addition, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be a connection between the two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0054] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for secure communication of industrial wireless networks based on national encryption algorithms, characterized in that: The specific steps are as follows. S1. Identity authentication is required before the device is connected to the network. The gateway device and the field device complete two-way identity authentication through the national secret algorithm SM2 to ensure the legitimacy of the device. Identity authentication first uses the field device to pre-configure a unique device ID, public and private key pair (SM2) and digital certificate when it leaves the factory; S2. The field device sends an authentication request to the gateway, and uses a random number generator to generate a random number R1. The authentication request message contains the following information: device ID; random number R1; Current timestamp T1; device digital certificate (Cert_Device), the message format is M1 = {DeviceID, T1, R1, Cert_Device}, the gateway device verifies the legitimacy of the field device digital certificate through the CA public key; S3, generate a random number R2, construct an authentication response; use the device public key to encrypt R1||R2; the message format is M2={Enc DevicePK (R1||R2),T2}; S4. The device uses its own private key to decrypt M2 and verify whether R1 matches. Returns the signature of the random number R2 (using the device private key). The message format is M3 = {Sign DeviceSK (R2)}; S5. The signature in the gateway verification confirms the legitimacy of the device identity, and both parties complete the identity authentication; S6, where the key negotiation includes the field device generating a random number R A , encrypted with the gateway public key and sent to the gateway, the message format is: M4 = {Enc GatewayPK (R A )}; S7. The gateway generates a random number R B , encrypt the returned message M5 using the public key of the field device = {Enc DevicePK (R B )}; Both parties decrypt the received random number R A and R B , and generate a shared session key: K S =SM3(R A ||R B ||Device||GatewayID); S8, both parties use K S Calculate HMAC-SM3 for test data (such as the string "test") and verify each other to ensure the key is consistent; S9, wherein encryption and data integrity verification include using a session key to encrypt communication data to ensure confidentiality and integrity of the data; S10, before sending the data, the data is first grouped, each group is 128 bits long, and the session key K is used. S The CTR mode of SM4 encrypts the data payload. The CTR mode is suitable for industrial real-time data transmission. The ciphertext format is C=SM4 CTR (K S ,Payload). Calculate the HMAC-SM3 data integrity check code MAC of the encrypted data: MAC = HMAC-SM3 (K S , C); S11, the access device receives the encrypted data packet from the field device, receives the encrypted data packet through the gateway device GW, and verifies the legitimacy of the data packet according to the device ID and timestamp; S12, perform integrity check: re-use HMAC-SM3 to calculate the message authentication code MAC′ for the decrypted message; The calculation formula is MAC′=HMAC-SM3(K S ,C), parse and process the decrypted data and forward the data to the host computer.
2. According to claim 1, a method for secure communication of industrial wireless network based on national secret algorithm is characterized in that: After the identity authentication is completed in step S5, both parties need to negotiate a key and use SM2 and a random number exchange mechanism to generate a session key to ensure the dynamic nature and security of the key.
3. According to claim 1, a method for secure communication of industrial wireless network based on national secret algorithm is characterized in that: In step S9, the national encryption algorithm SM4 is used to encrypt data, and HMAC-SM3 is used to verify the integrity of the data.
4. According to claim 1, a method for secure communication of industrial wireless network based on national secret algorithm is characterized in that: In step S10, an encrypted data packet is sent, including an encrypted valid field and a message authentication code, and the message format is Encrypted P = {Header, C, MAC}.
5. According to claim 1, a method for secure communication of industrial wireless network based on national secret algorithm is characterized in that: In step S11, the security module is called and the shared key K is used. S And SM4's CTR mode decrypts ciphertext C:
6. According to claim 1, a method for secure communication of industrial wireless network based on national secret algorithm is characterized in that: In step S12, the received MAC is compared with the calculated MAC'. If the two are the same, the data has not been tampered with.
Citation Information
Patent Citations
WIA-PA network security communication method based on national cryptographic algorithm
CN113055162A
Method for realizing secure transmission of data based on SM2-SM3-SM4 cryptographic algorithm
CN113572741A
Security communication method for time-sensitive network based on national cryptographic algorithm
CN114614984A
Key negotiation method, gateway, terminal equipment and storage medium
CN114884659A
CoAP protocol identity authentication and data encryption method based on national secret
CN116707826A
Cited By
Secure data transmission method suitable for open source gap terminal equipment
CN120750560A
A secure data transmission method suitable for open-source honeycomb terminal devices
CN120750560B
Data transmission method and system based on SM series cryptographic algorithm
CN121077656A
AI model security protection system and method based on domestic cryptographic algorithm and digital certificate
CN121098640A