A method for trustworthy communication of IoT devices

By introducing the mechanism of command numbers and random number queues into IoT device communication, combined with existing encryption technology, the problem of ciphertext replay attacks and time hijacking is solved, the security and credibility of IoT device communication are achieved, and enhanced information security.

CN114172936BActive Publication Date: 2024-09-13CHANGXUN COMM SERVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111516211.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-08
Publication Date
2024-09-13
Estimated Expiration
2041-12-08

AI Technical Summary

Technical Problem

IoT devices rely on simple encryption protocols when communicating and are vulnerable to ciphertext replay attacks and time hijacking, leading to information security risks. In particular, the encryption of simple instructions is ineffective and cannot effectively prevent hackers from controlling the device.

Method used

By introducing the mechanism of command number and random number queue, we ensure the legitimacy of the source of encrypted instructions, and perform identity confirmation and command number verification between the server and the device. Combined with existing encryption technologies such as RSA and TLS, we can resist replay attacks and Time hijack.

Benefits of technology

It effectively prevents ciphertext replay attacks and time hijacking, ensures the security and credibility of IoT device communications, is compatible with existing encryption technology, and enhances information security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114172936B
    Figure CN114172936B
Patent Text Reader

Abstract

The invention discloses a method for reliable communication of Internet of Things devices, including: the Internet of Things device sends an encrypted heartbeat data packet to a server, and a random number is added to a FIFO queue; the server confirms the device identity information through the received heartbeat data packet, and if the identity is correct, replaces and records the latest command number and random number, otherwise the heartbeat data packet is discarded; when the server sends instruction data to the Internet of Things device, the command data packet is encrypted and sent to the Internet of Things device; the Internet of Things device decrypts the acquired command data packet, confirms the identity information, and verifies the command number, and if the conditions are met, the Internet of Things device regenerates a random number and adds it to the FIFO queue, otherwise the command data packet is discarded. The invention improves security and solves the hidden danger of replay attack in the communication of Internet of Things devices; it is compatible with traditional encryption, does not affect the asymmetric encryption of the original transmission process, and can be used in a superimposed manner.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Internet of Things, and in particular to a method for trustworthy communication of Internet of Things devices. Background Art

[0002] When existing IoT devices communicate with cloud platforms, they generally use communication protocols such as TCP / IP, MQTT, HTTP, and WS. To ensure the security of communication data, TCP / IP can be encrypted through SSL, and MQTT, HTTP, and WS can be encrypted through TLS. However, the functions of IoT devices are often relatively simple, with few communication instructions, and it is easy to obtain the correspondence between communication ciphertexts and device function points through packet capture. Intruders only need to replay the communication ciphertext to the IoT device according to the correspondence between the communication ciphertext and the function point, and can achieve the purpose of controlling the IoT device function point without deciphering its communication ciphertext. In production practice, there is a solution to use time salting to resist ciphertext replay attacks, but attackers can hijack the device time through forged network synchronization, thereby bypassing time salting. Therefore, IoT devices that rely solely on communication content encryption will have huge information security risks.

[0003] The existing IoT device communication trust technology is mainly implemented using encrypted communication protocols such as WSS or HTTPS. The encryption method generally used is SSL or TLS, which is a type of asymmetric encryption that has good protection capabilities for communication content. Taking SSL HTTPS encrypted communication as an example, the device and the server first negotiate the conversation key, and then conduct a key-encrypted conversation. Figure 1 shown.

[0004] The disadvantages of the above-mentioned prior art are: it is mainly used for encryption protection of conversation content, but in addition to transmitting content data, IoT devices also transmit command data. Command data is often relatively simple. For example, a remotely controlled access control device only needs to receive two commands: "open" and "close". It is meaningless to encrypt such simple commands, because hackers do not need to crack the ciphertext. Hackers can directly control the opening and closing of the access control device by copying the ciphertext and replaying the ciphertext, thereby causing serious security incidents, such as Figure 2 Demonstrate a replay attack. Summary of the invention

[0005] To solve the above technical problems, the purpose of the present invention is to provide a method for secure and reliable communication of Internet of Things devices, which can determine whether the source of encryption instructions is legal and can resist device time hijacking and ciphertext replay attacks.

[0006] The purpose of the present invention is achieved through the following technical solutions:

[0007] A method for ensuring reliable communication between IoT devices, the method comprising the following steps:

[0008] Step A: The IoT device sends the encrypted heartbeat data packet to the server and adds the random number to the FIFO queue;

[0009] Step B: The server confirms the device identity information through the received heartbeat data packet. If the identity is correct, it replaces and records the latest command number and random number. Otherwise, it discards the heartbeat data packet.

[0010] Step C: When the server sends instruction data to the IoT device, the command data packet is encrypted and sent to the IoT device;

[0011] Step D: The IoT device decrypts the acquired command data packet, confirms the identity information, and verifies the command number. If the conditions are met, the IoT device regenerates a random number and adds it to the FIFO queue; otherwise, the command data packet is discarded.

[0012] Compared with the prior art, one or more embodiments of the present invention may have the following advantages:

[0013] By introducing the concept of command number, IoT devices are protected from replay attacks, and random number queues are used to ensure that IoT devices can receive concurrent commands, with the concurrent number being less than or equal to the length of the random number queue. On this basis, existing mainstream encryption technologies such as asymmetric encryption RSA and communication process encryption TLS can be compatible, thus ensuring the communication reliability of IoT devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 It is a prior art flow chart;

[0015] Figure 2 It is a replay attack flow chart provided by the prior art;

[0016] Figure 3 It is a flow chart of a method for secure and reliable communication of IoT devices. DETAILED DESCRIPTION

[0017] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be further described in detail below in conjunction with embodiments and drawings.

[0018] like Figure 3 As shown in FIG. 1 , the trusted method flow of IoT device communication includes the following steps:

[0019] Step 10 The IoT device sends the encrypted heartbeat data packet to the server and adds the random number to the FIFO queue;

[0020] The IoT device forms a heartbeat packet data through the device address code, device serial number, command number, and random number, which is encrypted by the RSA public key and sent to the server.

[0021] Step 20 The server confirms the device identity information through the received heartbeat data packet. If the identity is correct, it replaces and records the latest command number and random number. Otherwise, it discards the heartbeat data packet.

[0022] The server decrypts the data using the RSA key and confirms the device identity using the device address code and device serial number.

[0023] The above steps 10 and 20 specifically include: device address code MAC, device serial number ID, command number N, random number M, and use the serial number function to form a heartbeat data packet D

[0024] D = f json (MAC, ID, N, M)

[0025] Using the RSA algorithm and public key K, encrypt D to form D′

[0026] D′=f RAS (D, K)

[0027] Add the random number M to the FIFO (First Input First Output) queue, and send D′ to the server via MQTT, HTTP, or other protocols. The secret key of the server-side RAS is K′

[0028] The decryption process is:

[0029] The deserialization process is:

[0030] Identity verification condition: {MAC, ID} = {MAC exit , ID exit}.

[0031] Step 30: When the server sends instruction data to the IoT device, the command data packet is encrypted and sent to the IoT device;

[0032] When the IoT device obtains command data, the command number is incremented by 1 and combined with the instruction data, device address code, device serial number, and random number to form a command data packet, which is encrypted by the RSA key and sent to the IoT device.

[0033] Let the command number N′=N+1, the command data is I, and the rest of the device address code MAC, device serial number ID, and random number M remain unchanged, forming D″

[0034] D″=f RAS (f json(N′,I,MAC,ID,M),K′)

[0035] Step 40: The IoT device decrypts the acquired command data packet, confirms the identity information, and verifies the command number. If the conditions are met, the IoT device regenerates a random number and adds it to the FIFO queue; otherwise, the command data packet is discarded.

[0036] The IoT device decrypts the received command data packet through the RSA public key and confirms the identity information using the device address code, device serial number, and random number.

[0037] The decryption process is:

[0038] The deserialization process is:

[0039] Command number determination condition: N′>N

[0040] After the IoT device obtains the information {N′, I, MAC, ID, M}, it confirms the identity of {MAC, ID} and checks whether M exists in the FIFO queue. If all conditions are met, it executes command I, sets N=N′, generates a new random number M′ and adds it to the FIFO queue, and removes M from the FIFO queue. If any one of them is not met, the entire information is discarded. The next heartbeat packet data is {MAC, ID, N′, M′} or {MAC, ID, N, M}.

[0041] The specific embodiments are as follows:

[0042] The device address code MAC, device serial number ID, command number N, random number M, use the serial number function to form a heartbeat data packet D, and use the RAS algorithm and public key K to encrypt to obtain D′, as shown in Table 1:

[0043] Table 1

[0044]

[0045]

[0046] The IoT device adds the random number M to the FIFO (First Input First Output) queue and sends D′ to the server through protocols such as MQTT and HTTP. The secret key of the server-side RAS is K′, and the server obtains the heartbeat data packet D through decryption, as shown in Table 2:

[0047] Table 2

[0048]

[0049] The server extracts the device information, command number and random number from the heartbeat data packet D by deserialization

[0050] As shown in Table 3

[0051] Table 3

[0052]

[0053]

[0054] If the device address code MAC and device serial number ID are both registered on the server, the command number N and random number M of the corresponding device on the server are updated.

[0055] Let the command number N′=N+1, the command data is I, and the rest of the device address code MAC, device serial number ID, and random number M remain unchanged, forming D″

[0056] D″=f RAS (f json (N′, I, MAC, ID, M), K′); as shown in Table 4 below:

[0057] Table 4

[0058]

[0059]

[0060] The decryption process in step 40 is the same as the deserialization process in steps 10, 20 and 30. The judgment condition for whether to execute the command is: N′>N&&M∈FIFO{M1,M1,...,M n}. When the conditions are met, let N = N', generate a new random number M' and add it to the FIFO queue, and M is removed from the FIFO queue. If one of them is not met, the entire information is discarded. The next heartbeat packet data is {MAC, ID, N', M'} or {MAC, ID, N, M}. As shown in Table 5 below:

[0061] Table 5

[0062]

[0063] Although the embodiments disclosed in the present invention are as above, the above contents are only embodiments adopted for facilitating the understanding of the present invention and are not intended to limit the present invention. Any technician in the technical field to which the present invention belongs can make any modifications and changes in the form and details of the implementation without departing from the spirit and scope disclosed in the present invention, but the patent protection scope of the present invention shall still be subject to the scope defined in the attached claims.

Claims

1. A method for ensuring communication trust in IoT devices, characterized in that: The method comprises the following steps: Step A: The IoT device sends the encrypted heartbeat data packet to the server and adds the random number to the FIFO queue. Step B: The server confirms the device identity information through the received heartbeat data packet. If the identity is correct, it replaces and records the latest command number and random number. Otherwise, it discards the heartbeat data packet. In step C, when the server sends instruction data to the IoT device, the server encrypts the command data packet and sends it to the IoT device; Step D: The IoT device decrypts the acquired command data packet, confirms the identity information, and verifies the command number. If the conditions are met, the IoT device regenerates a random number and adds it to the FIFO queue; otherwise, the command data packet is discarded. The step C specifically includes: when the IoT device obtains the command data, the command number is incremented by 1 and combined with the instruction data, the device address code, the device serial number, and the random number to form a command data packet, which is encrypted with the RSA key and then sent to the IoT device; Let the command number N′=N+1, the command data be I, and the rest of the device address code MAC, device serial number ID, and random number M remain unchanged, forming D″ The decryption process is: Where D″ is the encrypted command data packet, K is the public key, and K′ is the secret key of the server-side RAS; The deserialization process is: Command number determination condition: N′>N After the IoT device obtains the information {N′, I, MAC, ID, M}, it confirms the identity of {MAC, ID} and checks whether M is in the FIFO queue. If all conditions are met, it executes command I, sets N = N′, generates a new random number M′ and adds it to the FIFO queue, and removes M from the FIFO queue. If any one of the conditions is not met, the entire information is discarded; the next heartbeat packet data is {MAC, ID, N′, M′} or {MAC, ID, N, M}.

2. The method for ensuring communication trust in IoT devices according to claim 1, wherein: In step A, the IoT device generates heartbeat packet data using the device address code, device serial number, command number, and random number, which is encrypted with the RSA public key and then sent to the server.

3. The method for ensuring communication trust in IoT devices according to claim 1, wherein: In step B: the server decrypts the data using the RSA key and confirms the device identity using the device address code and device serial number.

4. The method for ensuring communication trust in IoT devices according to claim 1, wherein: In step D, the IoT device decrypts the acquired command data packet using the RSA public key and confirms the identity information using the device address code, device serial number, and random number.

5. The method for ensuring communication trust in IoT devices according to claim 1 or 2, wherein: The steps A and B specifically include: device address code MAC, device serial number ID, command number N, random number M, and using the serial number function to form a heartbeat data packet D. D=f json (MAC,ID,N,M) Use the RSA algorithm and public key K to encrypt D to form D′ D'=f RAS (D,K) Add the random number M to the FIFO (First Input First Output) queue and send D′ to the server via protocols such as MQTT and HTTP. The secret key of the server-side RAS is K′. The decryption process is: The deserialization process is: Identity verification condition: {MAC, ID} = {MAC exit , ID exit }.