A TCP private protocol communication authentication method for IoT devices

By using the authentication method based on TCP private protocol in IoT devices to generate and negotiate encryption and decryption keys, the communication security problem of IoT devices is solved, and the security authentication and data interaction security between the device and the cloud platform are realized.

CN118250016BActive Publication Date: 2024-09-10慧翰微电子股份有限公司
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410671569.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-28
Publication Date
2024-09-10
Estimated Expiration
2044-05-28

AI Technical Summary

Technical Problem

In the data communication process of existing IoT devices, due to embedded chips with fewer resources and no CA certificate system, communication security cannot be guaranteed and there is a risk of information leakage.

Method used

An authentication method based on the TCP private protocol is used to authenticate the terminal and the cloud platform by generating a first symmetric key and encrypting the device's unique code set, and negotiates a second symmetric key for encryption and decryption to ensure the security of data interaction.

Benefits of technology

The security authentication process between IoT devices and cloud platforms is implemented to ensure the security of data interaction, avoid information leakage, and improve communication security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118250016B
    Figure CN118250016B
Patent Text Reader

Abstract

The present application provides a TCP private protocol communication authentication method for an IoT device, wherein a terminal sends an authentication request to send the terminal's authentication information to a cloud platform. The cloud platform responds to the terminal's authentication request and sends the authentication result and cloud platform information to the terminal. After the terminal authenticates the cloud platform information, it uses public key encryption to request a communication key. The cloud platform responds to the terminal's communication key request and generates a random second symmetric key for communication. Subsequent interactions use the second symmetric key for login and data reporting, achieving one machine and one secret to ensure data interaction security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of Internet of Things, and in particular to a TCP private protocol communication authentication method for an Internet of Things device. Background Art

[0002] With the development of IoT technology, corresponding IoT devices are emerging in an endless stream, affecting our society and life. Communication technology is an important and key technology of IoT technology, and IoT devices need to interact with cloud platforms to complete basic communication functions, so that cloud platforms can monitor the status of IoT devices and upgrade equipment, etc. To this end, people have developed a variety of communication protocols and communication solutions.

[0003] However, due to the consideration of cost, resources, development efficiency and other factors, some IoT projects use embedded chips with less resources and no CA certificate system in the data communication process, and directly use TCP (Transmission Control Protocol) private protocol for data uplink and downlink communication. In this way, the communication security between embedded device terminals and cloud platforms cannot be guaranteed, and the necessary security authentication process is lacking, which may lead to the risk of information leakage. For the corporate community, communication security is related to the security of the entire IoT device and cloud platform. Therefore, it is very necessary to design a method for IoT devices to connect to cloud platforms based on TCP private protocol communication. Summary of the invention

[0004] The purpose of this application is to provide a TCP private protocol communication authentication method for an Internet of Things device to solve the security problems of existing Internet of Things devices.

[0005] In a first aspect, an embodiment of the present application provides a TCP private protocol communication authentication method for an IoT device, which is applied to an IoT device terminal, wherein the terminal communicates with a cloud platform based on a TCP private protocol, and the method includes:

[0006] Generate a first symmetric key for the authentication process between the terminal and the cloud platform based on the timestamp in the TCP private protocol message header and the device unique code set of the terminal;

[0007] Sending an authentication request to the cloud platform, wherein the authentication request carries a ciphertext of a unique code set of a device, wherein the ciphertext of the unique code set of a device is obtained by encrypting the unique code set of the device with a first symmetric key;

[0008] Receive the response authentication result returned by the cloud platform, and use the first symmetric key to decrypt to obtain the cloud platform information, the random number X and the public key;

[0009] If the authentication fails by comparing the cloud platform information with the cloud platform information built into the terminal, resending the authentication request to the cloud platform;

[0010] If the authentication is successful by comparing the cloud platform information with the cloud platform information built into the terminal, a communication key request is sent to the cloud platform; the communication key request carries a communication key request message, the communication key request message is obtained by encrypting a ciphertext encrypted by a public key using a first symmetric key, and the ciphertext encrypted by the public key is a ciphertext generated by encrypting the random number X using the public key;

[0011] After receiving the second symmetric key issued by the cloud platform, subsequent cloud platform and terminal interaction processes all use the second symmetric key for encryption and decryption.

[0012] In some implementations of the present application, the cloud platform information includes a cloud server address and a cloud server port.

[0013] In some implementations of the present application, the receiving the second symmetric key issued by the cloud platform includes:

[0014] When receiving the communication key message sent by the cloud platform, the first symmetric key is used for decryption; if the decryption is successful, the second symmetric key is obtained; if the decryption fails, the TCP connection is disconnected.

[0015] In some embodiments of the present application, the generating of the first symmetric key for the authentication process between the terminal and the cloud platform based on the timestamp in the TCP private protocol message header and the device unique code set of the terminal includes:

[0016] A hash calculation is performed based on the timestamp in the TCP private protocol message header and the device unique code set of the terminal, and the generated value is used as the first symmetric key in the authentication process between the terminal and the cloud platform.

[0017] In a second aspect, an embodiment of the present application provides a TCP private protocol communication authentication method for an IoT device, which is applied to a cloud platform, wherein the cloud platform communicates with an IoT device terminal based on a TCP private protocol, and the method includes:

[0018] receiving an authentication request sent by the terminal;

[0019] Decrypt the device unique code set ciphertext in the authentication request using the first symmetric key to obtain the device unique code set of the terminal;

[0020] The decrypted device unique code set of the terminal is compared and authenticated with the device unique code set imported in advance from the database; if the corresponding device unique code set is authenticated from the database, the terminal is authenticated successfully; if the corresponding device unique code set cannot be authenticated from the database, the TCP connection is disconnected;

[0021] After the terminal is successfully authenticated, the response authentication result is encrypted with the first symmetric key and sent to the terminal, and the response authentication result includes cloud platform information, random number X and public key data;

[0022] Receive the communication key request sent by the terminal, use the first symmetric key to decrypt the communication key request message, obtain the ciphertext, and then decrypt the ciphertext with the private key matching the public key to generate a random number X, which is compared with the random number X saved by the cloud platform. If the comparison is successful, the second symmetric key for subsequent communication is issued. If the decryption or comparison fails, the TCP connection is disconnected.

[0023] In some implementations of the present application, the cloud platform information includes a cloud server address and a cloud server port.

[0024] In some implementations of the present application, the issuing of a second symmetric key for subsequent communication includes:

[0025] When the second symmetric key is issued, the first symmetric key is used to encrypt the second symmetric key.

[0026] Compared with the prior art, the TCP private protocol communication authentication method for IoT devices provided by this application is that the terminal sends an authentication request to send the terminal's authentication information to the cloud platform. The cloud platform responds to the terminal authentication request and sends the authentication result and cloud platform information to the terminal. After the terminal authenticates the cloud platform information, it uses encryption to request a communication key. The cloud platform responds to the terminal's communication key request and generates a random second symmetric key for communication. The subsequent interaction uses the second symmetric key for login and data reporting, so that one machine has one key to ensure data interaction security. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to further understand the embodiments of the present disclosure, the specific process of the embodiments of the present disclosure is described in more detail in conjunction with the accompanying drawings, so as to more clearly reflect the purpose of the present invention. The accompanying drawings mainly represent the specific process of the embodiments and constitute part of the specification. They are used together with the embodiments of the present disclosure to explain the present disclosure and do not constitute a limitation of the present disclosure. In the accompanying drawings, the same reference numerals generally represent steps.

[0028] Figure 1 It is a flowchart of a TCP private protocol communication authentication method for an Internet of Things device provided by an exemplary embodiment of the present disclosure;

[0029] Figure 2 It is a flowchart of a TCP private protocol communication authentication method for an Internet of Things device provided by another exemplary embodiment of the present disclosure;

[0030] Figure 3It is a schematic diagram of the interactive flow of a TCP private protocol communication authentication method for an Internet of Things device provided by an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0031] The exemplary embodiments according to the present disclosure will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure, and it should be understood that the present disclosure is not limited to the exemplary embodiments described here.

[0032] It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.

[0033] Those skilled in the art can understand that the terms "first" and "second" in the embodiments of the present disclosure are only used to distinguish different steps, and neither represent any specific technical meaning nor indicate the necessary logical order between them.

[0034] In addition, the term "and / or" in the present disclosure is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present disclosure generally indicates that the associated objects before and after are in an "or" relationship.

[0035] In addition, the control end in the embodiment of the present disclosure includes a computer system, a server, etc.

[0036] It should also be understood that the description of the various embodiments in the present disclosure focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.

[0037] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0038] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.

[0039] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.

[0040] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0041] The disclosed embodiments can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with many other general or special computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers, etc. include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, etc.

[0042] Electronic devices such as terminal devices, computer systems, servers, etc. can be described in the general context of computer system executable instructions (such as program modules) executed by computer systems. Generally, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in distributed cloud computing environments, where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.

[0043] In order to enable those skilled in the art to accurately and clearly understand the technical solution of the present disclosure, the technical solution of the present disclosure is described in detail by way of examples.

[0044] The present invention is mainly aimed at solving the problem that the existing embedded devices with less internal resources have low security when connected to the cloud platform, which leads to the risk of information leakage. A method for securely connecting devices to the platform based on the TCP private protocol is designed to ensure the security of data interaction.

[0045] In order to solve the above-mentioned communication security problem, the disclosed design uses the RSA asymmetric encryption algorithm and the AES symmetric encryption algorithm, uses RSA for signature verification and authentication, and negotiates the AES interactive key after the authentication is completed, so that each device has its own key, thereby improving communication security.

[0046] Please refer to Figure 1 , Figure 1 The figure shows a flow chart of a TCP private protocol communication authentication method for an IoT device provided by an exemplary embodiment of the present disclosure. In the embodiment of the present disclosure, the TCP private protocol communication authentication method for an IoT device is applied to an IoT device terminal, and the terminal communicates with a cloud platform based on a TCP private protocol.

[0047] like Figure 1 As shown, the present invention discloses a TCP private protocol communication authentication method for an Internet of Things device, which may include the following steps:

[0048] Step 101, generating a first symmetric key for the authentication process between the terminal and the cloud platform based on the timestamp in the TCP private protocol message header and the device unique code set of the terminal;

[0049] Specifically, a hash calculation is performed based on the timestamp in the TCP private protocol message header and the device unique code set of the terminal, and the generated value is used as the first symmetric key of the terminal and cloud platform authentication process, which can be specifically AES128-KEY1. The hash calculation can specifically use the MD5 algorithm, which is not limited in this application.

[0050] Step 102, sending an authentication request to the cloud platform, wherein the authentication request carries a ciphertext of a unique code set of the device, wherein the ciphertext of the unique code set of the device is obtained by encrypting the unique code set of the device with a first symmetric key;

[0051] Step 103, receiving the response authentication result returned by the cloud platform, decrypting it using the first symmetric key to obtain the cloud platform information, the random number X and the public key; specifically, it can be an RSA4096 public key.

[0052] Specifically, the cloud platform information includes a cloud server address and a cloud server port.

[0053] Step 104: if the authentication fails by comparing the cloud platform information with the cloud platform information built into the terminal, resend an authentication request to the cloud platform;

[0054] Step 105: If the authentication is successful by comparing the cloud platform information with the cloud platform information built into the terminal, a communication key request is sent to the cloud platform; the communication key request carries a communication key request message, and the communication key request message is obtained by encrypting the public key encrypted ciphertext by a first symmetric key, and the public key encrypted ciphertext is a ciphertext generated by encrypting the random number X by using the public key;

[0055] Step 106: Receive the second symmetric key issued by the cloud platform, and use the second symmetric key for encryption and decryption in subsequent cloud platform and terminal interaction processes. The second symmetric key may be AES128-KEY2.

[0056] Specifically, when a communication key message sent by the cloud platform is received, the first symmetric key is used for decryption; if the decryption is successful, the second symmetric key is obtained; if the decryption fails, the TCP connection is disconnected.

[0057] Figure 2It is a flow chart of a TCP private protocol communication authentication method for an IoT device provided by another exemplary embodiment of the present disclosure. In the embodiment of the present disclosure, the TCP private protocol communication authentication method for an IoT device is applied to a cloud platform, and the cloud platform communicates with an IoT device terminal based on a TCP private protocol.

[0058] like Figure 2 As shown, the present invention discloses a TCP private protocol communication authentication method for an Internet of Things device, which may include the following steps:

[0059] Step 201, receiving an authentication request sent by the terminal;

[0060] Step 202, using the first symmetric key to decrypt the device unique code set ciphertext in the authentication request to obtain the device unique code set of the terminal;

[0061] Step 203, the decrypted device unique code set of the terminal is compared and authenticated with the device unique code set imported in advance into the database; if the corresponding device unique code set is authenticated from the database, the terminal is authenticated successfully; if the corresponding device unique code set cannot be authenticated from the database, the TCP connection is disconnected;

[0062] Step 204: after the terminal is successfully authenticated, the response authentication result is encrypted with the first symmetric key and sent to the terminal, the response authentication result includes cloud platform information, random number X and public key data;

[0063] Step 205: Receive the communication key request sent by the terminal, use the first symmetric key to decrypt the communication key request message, obtain the ciphertext encrypted by the public key, and then decrypt the ciphertext encrypted by the public key using the private key matching the public key to generate a random number X, which is compared with the random number X saved by the cloud platform. If the comparison is successful, the second symmetric key for subsequent communication is issued. If the decryption or comparison fails, the TCP connection is disconnected.

[0064] In order to enable those skilled in the art to clearly and accurately understand the technical solutions of the embodiments of the present disclosure, Figure 3 The interaction diagram shown provides a detailed introduction to the embodiments of the present disclosure.

[0065] Figure 3 This is a schematic diagram of the interaction process of a TCP private protocol communication authentication method for an IoT device provided by an exemplary embodiment of the present disclosure, and the interaction process is as follows:

[0066] 1. Terminal authentication request, sending the terminal's authentication information to the cloud platform.

[0067] 2. The cloud platform responds to the terminal authentication request and sends the authentication result and cloud platform information to the terminal.

[0068] 3. After the terminal authenticates the cloud platform information, it uses RSA encryption to request the communication key.

[0069] 4. The cloud platform responds to the terminal's communication key request and generates a random AES128-KEY2 key for communication, achieving one machine and one key.

[0070] 5. Subsequent interactions use AES128-KEY2 for login and data reporting.

[0071] The communication protocol format of this disclosure is designed as follows:

[0072] Table 1 is the data type, which specifies the data type of the communication protocol, which is mainly divided into BYTE, WORD, DWORD, array BYTE[N], STRING string, STREAM byte stream, etc.

[0073] Table 1 Data types

[0074]

[0075] Table 2 shows the communication protocol data packet structure and definition. The communication protocol mainly consists of three parts: a fixed data header, a variable-length data body, and a data tail check code. The fixed-length data header includes a header identifier, a command unit, a device unique code SN, a data unit encryption method, a serial number, a timestamp, and a data unit length. The variable data body is determined by the data length, and the data unit body is different in different interaction processes. The data tail is a data check value, which is used to verify the integrity of the data.

[0076] Table 2 Data packet structure and definition

[0077]

[0078] Table 3 is the definition of the identifiers in the command unit in Table 2. The present invention mainly uses authentication request and response 0x01, data communication key request and response 0x02, and the remaining command identifiers are used for subsequent business interactions.

[0079] Table 3 Command identification definition

[0080]

[0081] Tables 1 to 3 above are TCP private protocol communication formats. Based on the TCP communication protocol architecture, the present invention uses the RSA asymmetric encryption algorithm and the symmetric encryption algorithm AES, uses RSA for signature verification and authentication, and negotiates the AES interactive key after the authentication is completed, so that each device has its own key to ensure data interaction security. The detailed steps are as follows:

[0082] Step 1: Import the terminal authentication data into the cloud platform and import the device unique code set (ICCID / SN / IMEI relationship) into the cloud platform database in advance.

[0083] Step 2: AES128-KEY1 key generation for the device and cloud platform authentication process, sender key generation logic: When TCP communication data is generated, the local UTC time is used as the timestamp, and the device unique serial number SN is filled into the message header (see Table 2). Use the generated timestamp and the terminal device unique code set information (card number ICCID + device serial number SN + communication module number IMEI) to perform MD5 calculation to generate a 16-byte array, and the generated value is used as the AES128-KEY1 key. In addition, using the timestamp as one of the key generation elements can ensure that the AES128-KEY1 is different for each interaction process, which is not easy to be cracked, and information security is achieved.

[0084] Step 3: The terminal uses AES128-KEY1 to encrypt and authenticate the unique code set of the terminal device (SN / ICCID / IMEI) to the cloud platform, where the SN is already reflected in the message header, and the message header data unit encryption method uses 0x01 (AES128 encryption method). The terminal authentication request data body format is shown in Table 4 below:

[0085] Table 4 Terminal authentication request data body format

[0086]

[0087] Step 4: After the cloud platform receives the terminal authentication request information (command identifier is 0x01), it parses the device unique serial code SN from the 4th starting byte of the message header in Table 2, and parses the timestamp from the 22nd starting byte. At the same time, the cloud platform finds the corresponding ICCID and IMEI values ​​from the database according to the SN, and then uses the timestamp and the device unique code set (ICCID, SN and IMEI) to generate AES128-KEY1, decrypts the data unit part, and compares and authenticates the ICCID and IMEI in Table 4 with the device unique code set (ICCID, SN and IMEI) imported in advance in the database. If the corresponding relationship is incorrect, the TCP connection is disconnected (to ensure data interaction security and communication link resources are not occupied). If the corresponding device unique code set (ICCID, SN and IMEI) is compared and authenticated from the cloud platform database, the cloud platform authenticates the terminal successfully.

[0088] Step 5: After the cloud platform successfully authenticates the terminal in step 4, the cloud platform generates an AES128-KEY1 encrypted response authentication result (command identifier 0x01) using the key generation method in step 2 and sends it to the terminal. The response authentication result data unit is shown in Table 5 below, including cloud platform information (cloud server address + cloud server port), random number X, and RSA4096 public key data.

[0089] Table 5 Platform authentication response message format

[0090]

[0091] Step 6: The terminal receives the cloud platform authentication result information, and uses the key generation method in step 2 to generate AES128-KEY1 for decryption to obtain the cloud platform information, random number X, and RSA public key data as shown in Table 5. If the terminal fails to authenticate by comparing the cloud platform information (domain name + port) with its built-in cloud platform information (domain name + port), go back to step 1. If the authentication of the cloud platform is successful, proceed to the next step.

[0092] Step 7: After the terminal successfully authenticates the cloud platform information in step 6, send a communication key request message to the cloud platform (command identifier 0x02), which is also encrypted using AES128-KEY1. The communication key request message is the ciphertext generated by encrypting the random number X with the RSA4096 public key in step 6.

[0093] Table 6 Terminal communication key request message format

[0094]

[0095] Step 8: After the cloud platform receives the communication key request message (command identifier 0x02), it uses the key generation method in step 2 to generate AES128-KEY1 to decrypt and generate RSA ciphertext, and then decrypts the private key that matches the RSA4096 public key to generate the random number X in Table 6, and compares it with the random number X saved by the platform. If the comparison is successful, the communication key AES128-KEY2 is issued (Table 7 below shows the communication key message, and the key value is also encrypted and issued using AES128-KEY1). If it fails, the TCP connection is disconnected.

[0096] Table 7 Communication key message format

[0097]

[0098] Step 9: When the terminal receives the communication key message (command identifier 0x02) sent by the platform, it uses the key generation method in step 2 to generate AES128-KEY1 for decryption. If the decryption is successful, the subsequent platform and terminal interaction processes will use AES128-KEY2 for encryption and decryption. If the decryption fails, the TCP connection is disconnected.

[0099] As described above, using a customized TCP-based private protocol and the described solution, each authentication process uses an inconsistent AES128-KEY1, ensuring the security of encrypted data in the authentication process. At the same time, in the design of the present invention, a cloud platform is added to authenticate the terminal, and the terminal also authenticates the cloud platform. After the authentication is completed, a new communication random key AES128-KEY2 is negotiated, so that each device has one key, ensuring the security of the key in each subsequent interaction process.

[0100] Among them, as long as any of the above steps has a verification anomaly, the TCP link is disconnected to ensure communication security and resource release, and the terminal needs to re-initiate the authentication process. The entire design process ensures the legitimacy of the cloud platform and the terminal, and also ensures communication security. Therefore, through the solution used in the present invention, the interaction of embedded devices based on TCP communication can be made safer.

[0101] The technical solution disclosed in the embodiment of the present disclosure is that the terminal sends an authentication request to send the authentication information of the terminal to the cloud platform. The cloud platform responds to the terminal authentication request and sends the authentication result and cloud platform information to the terminal. After the terminal authenticates the cloud platform information, it uses RSA encryption to request a communication key. The cloud platform responds to the terminal communication key request and generates a random AES128-KEY2 key for communication. The subsequent interaction uses the AES128-KEY2 key for login and data reporting, so that one machine has one key to ensure the security of data interaction.

[0102] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.

[0103] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0104] The method of the present disclosure may be implemented in many ways. For example, the method of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.

[0105] It should also be noted that in the method disclosed herein, each step can be decomposed and / or recombined, and these decompositions and / or recombinations should be regarded as equivalent solutions of the present disclosure.

[0106] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0107] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims

1. A TCP private protocol communication authentication method for an Internet of Things device, applied to an Internet of Things device terminal, wherein the terminal communicates with a cloud platform based on a TCP private protocol, and is characterized in that: The method comprises: Generate a first symmetric key for the authentication process between the terminal and the cloud platform based on the timestamp in the TCP private protocol message header and the device unique code set of the terminal; Sending an authentication request to the cloud platform, wherein the authentication request carries a ciphertext of a unique code set of a device, wherein the ciphertext of the unique code set of a device is obtained by encrypting the unique code set of the device with a first symmetric key; Receive the response authentication result returned by the cloud platform, and use the first symmetric key to decrypt to obtain the cloud platform information, the random number X and the public key; If the authentication fails by comparing the cloud platform information with the cloud platform information built into the terminal, resending the authentication request to the cloud platform; If the authentication is successful by comparing the cloud platform information with the cloud platform information built into the terminal, a communication key request is sent to the cloud platform; the communication key request carries a communication key request message, the communication key request message is obtained by encrypting a ciphertext encrypted by a public key using a first symmetric key, and the ciphertext encrypted by the public key is a ciphertext generated by encrypting the random number X using the public key; After receiving the second symmetric key issued by the cloud platform, the subsequent cloud platform and terminal interaction processes all use the second symmetric key for encryption and decryption; The receiving of the second symmetric key issued by the cloud platform includes: Upon receiving the communication key message sent by the cloud platform, the first symmetric key is used for decryption; if the decryption is successful, the second symmetric key is obtained; if the decryption fails, the TCP connection is disconnected; The cloud platform information includes the cloud server address and cloud server port.

2. The method according to claim 1, characterized in that The generating of the first symmetric key for the authentication process between the terminal and the cloud platform based on the timestamp in the TCP private protocol message header and the device unique code set of the terminal includes: A hash calculation is performed based on the timestamp in the TCP private protocol message header and the device unique code set of the terminal, and the generated value is used as the first symmetric key in the authentication process between the terminal and the cloud platform.

3. A TCP private protocol communication authentication method for an Internet of Things device, applied to a cloud platform, wherein the cloud platform communicates with an Internet of Things device terminal based on a TCP private protocol, characterized in that: The method comprises: receiving an authentication request sent by the terminal; Decrypt the device unique code set ciphertext in the authentication request using the first symmetric key to obtain the device unique code set of the terminal; The decrypted device unique code set of the terminal is compared and authenticated with the device unique code set imported in advance from the database; if the corresponding device unique code set is authenticated from the database, the terminal is authenticated successfully; if the corresponding device unique code set cannot be authenticated from the database, the TCP connection is disconnected; After the terminal is successfully authenticated, the response authentication result is encrypted with the first symmetric key and sent to the terminal, and the response authentication result includes cloud platform information, random number X and public key data; Receive the communication key request sent by the terminal, use the first symmetric key to decrypt the communication key request message, obtain the ciphertext encrypted by the public key, and then use the private key matching the public key to decrypt the ciphertext encrypted by the public key to generate a random number X, and compare it with the random number X saved by the cloud platform. If the comparison is successful, issue the second symmetric key for subsequent communication. If the decryption or comparison fails, disconnect the TCP connection; The cloud platform information includes the cloud server address and cloud server port.

4. The method according to claim 3, characterized in that The sending of the second symmetric key for subsequent communication includes: When the second symmetric key is issued, the first symmetric key is used to encrypt the second symmetric key.

Citation Information

Patent Citations

  • Decentralized key management method based on homomorphic encryption

    CN104486307A

  • Bidirectional authentication method and system for vehicle-mounted terminal and central platform

    CN111314274A

  • Communication method and device, communication system and storage medium

    CN115766119A

  • Trusted authentication method for intelligent lamp post

    CN116132156A

  • Data transmission method, apparatus and system, electronic device, and readable medium

    WO2023141876A1