text:
CN111355684B - Internet of things data transmission method, device and system, electronic equipment and medium - Google Patents
Internet of things data transmission method, device and system, electronic equipment and medium Download PDF
check code
徐志辉
金振
金骑兵
廖婷
胡亮
China Mobile Communications Group Co Ltd
China Mobile Hangzhou Information Technology Co Ltd
China Mobile Group Zhejiang Co Ltd
2018-12-20 Application filed by China Mobile Communications Group Co Ltd, China Mobile Hangzhou Information Technology Co Ltd, China Mobile Group Zhejiang Co Ltd filed Critical China Mobile Communications Group Co Ltd
230000005540 biological transmission Effects 0.000 title claims abstract description 46
230000000875 corresponding Effects 0.000 claims description 99
230000004044 response Effects 0.000 claims description 72
238000004891 communication Methods 0.000 claims description 38
238000004590 computer program Methods 0.000 claims description 21
238000000034 method Methods 0.000 claims description 17
230000003993 interaction Effects 0.000 description 4
230000002093 peripheral Effects 0.000 description 4
238000009795 derivation Methods 0.000 description 2
230000000295 complement Effects 0.000 description 1
230000002452 interceptive Effects 0.000 description 1
H04—ELECTRIC COMMUNICATION TECHNIQUE
H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
H04L63/00—Network architectures or network communication protocols for network security
H04L63/06—Network architectures or network communication protocols for network security for supporting key management in a packet data network
H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
H04L9/0819—Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
H04L9/0822—Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using key encryption key
H04L9/0838—Key agreement, i.e. key establishment technique in which a shared key is derived by parties as a function of information contributed by, or associated with, each of these
H04L9/0891—Revocation or update of secret information, e.g. encryption key update or rekeying
The invention discloses a method, a device, a system, electronic equipment and a medium for transmitting data of the Internet of things, which are used for solving the problem of low security of data transmission of the Internet of things in the prior art. The method comprises the following steps: when data to be transmitted are detected, updating the information of the times of generating the derived key according to the first root key and sending the updated times to the Internet of things security platform; if first prompt information that the updated times exceeds a preset threshold value and is sent by the Internet of things security platform is received, a second root key is obtained, a first derived key is obtained based on the second root key, and data to be transmitted are encrypted and sent by the first derived key; and if second prompt information which is sent by the Internet of things security platform and updated for a time not exceeding a preset threshold value is received, acquiring a second derivative key based on the first root key, and encrypting and sending the data to be transmitted by adopting the second derivative key.
Internet of things data transmission method, device and system, electronic equipment and medium
The invention mainly relates to the technical field of network security, in particular to a method, a device, a system, electronic equipment and a medium for transmitting data of an internet of things.
In the long-distance access technology of the low-power-consumption Internet of Things, Narrow-Band Internet of Things (NB-IoT) gradually opens the head, and the security protection technology for data transmission of the Internet of Things equipment is very important in recent years. In the prior art, a protection means adopted for data transmission of internet of things equipment mainly adopts a hardware encryption chip, as shown in fig. 1. The security of the encryption chip depends on the security of the chip itself and also depends on the reliability of the encryption scheme, and most of the encryption chips in the mainstream at present adopt an "Elliptic curve encryption" (ECC) algorithm. The ECC algorithm is high in efficiency and occupies a small memory, but the encryption chip generally needs to purchase a corresponding tool development kit, so that the project cost of a terminal user is increased, the development period is prolonged, and the existing hardware architecture of the Internet of things equipment needs to be changed. And the fixed encryption algorithm is easy to be broken, and the safety performance is reduced.
Therefore, how to improve the security of data transmission of the internet of things equipment on the basis of not changing the existing hardware architecture of the internet of things equipment is an urgent problem to be solved.
Disclosure of Invention
The embodiment of the invention provides a method, a device, a system, electronic equipment and a medium for transmitting data of the Internet of things, which are used for solving the problem of low security of data transmission of the Internet of things in the prior art.
The embodiment of the invention provides an Internet of things data transmission method, which is applied to Internet of things equipment and comprises the following steps: when data to be transmitted are detected, updating the frequency information of the derivative key generated according to the first root key and sending the updated frequency to the Internet of things security platform, so that the Internet of things security platform judges whether the updated frequency exceeds a preset threshold value;
if first prompt information that the updated times sent by the Internet of things security platform exceed a preset threshold value is received, negotiating with the Internet of things security platform to obtain a second root key, negotiating with the Internet of things security platform to obtain a first derived key based on the second root key, encrypting data to be transmitted by adopting the first derived key and sending the encrypted data to the Internet of things security platform;
and if second prompt information that the updated times sent by the Internet of things security platform do not exceed a preset threshold value is received, generating a second derived key based on the first root key, the identification information of the first derived key, the stored second random number and the updated times, encrypting the data to be transmitted by adopting the second derived key, and sending the encrypted data to the Internet of things security platform.
The embodiment of the invention also provides an Internet of things data transmission method, which is applied to an Internet of things security platform and comprises the following steps:
receiving the updated times of generating a derived key according to the first root key sent by the Internet of things equipment;
judging whether the updated times exceed a preset threshold value;
if the number of times that the first root key is generated into the derived key exceeds a preset threshold value is larger than a preset threshold value, sending first prompt information to the Internet of things equipment, enabling the Internet of things equipment and the Internet of things security platform to negotiate to obtain a second root key, negotiating with the Internet of things security platform to obtain a first derived key based on the second root key, and receiving data to be transmitted, encrypted by the first derived key, sent by the Internet of things equipment;
if not, second prompt information that the number of times that the first root key is generated into the derived key does not exceed a preset threshold is sent to the internet of things device, so that the internet of things device generates a second derived key based on the first root key, the identification information of the device, the stored second random number and the updated number, and receives data to be transmitted, which are sent by the internet of things device and encrypted by the second derived key.
An embodiment of the present invention further provides an internet of things data transmission device, which is applied to an internet of things device, and the device includes:
the sending module is used for updating the frequency information of the derivative key generated according to the first root key and sending the updated frequency to the Internet of things security platform when the data to be transmitted is detected, so that the Internet of things security platform judges whether the updated frequency exceeds a preset threshold value;
the obtaining module is used for negotiating with the Internet of things security platform to obtain a second root key if first prompt information that the updated times sent by the Internet of things security platform exceed a preset threshold value is received, negotiating with the Internet of things security platform to obtain a first derived key based on the second root key, encrypting data to be transmitted by adopting the first derived key and sending the encrypted data to the Internet of things security platform; and if second prompt information that the updated times sent by the Internet of things security platform do not exceed a preset threshold value is received, generating a second derivative key based on the first root key, the identification information of the first derivative key, the stored second random number and the updated times, encrypting the data to be transmitted by adopting the second derivative key, and sending the encrypted data to the Internet of things security platform.
The embodiment of the invention also provides an internet of things data transmission device, which is applied to an internet of things security platform, and the device comprises:
the receiving module is used for receiving the updated times of generating the derived key according to the first root key sent by the Internet of things equipment;
the judging module is used for judging whether the updated times exceed a preset threshold value;
a prompt module, configured to send, to the internet of things device, first prompt information that a number of times that a first root key has been generated into a derived key exceeds a preset threshold, so that the internet of things device negotiates with the internet of things security platform to obtain a second root key, negotiates with the internet of things security platform to obtain a first derived key based on the second root key, and receives data to be transmitted, sent by the internet of things device, that is encrypted with the first derived key; if not, sending second prompt information that the number of times that the first root key is generated into the derived key does not exceed a preset threshold value to the Internet of things equipment, enabling the Internet of things equipment to generate a second derived key based on the first root key, the identification information of the Internet of things equipment, the stored second random number and the updated number, and receiving data to be transmitted, which are sent by the Internet of things equipment and encrypted by adopting the second derived key.
An embodiment of the present invention further provides an electronic device, where the electronic device includes a memory and a processor:
the processor is used for reading the program in the memory and executing the following processes: when data to be transmitted are detected, updating the number information of the generated derived key according to the first root key and sending the updated number to the Internet of things security platform, so that the Internet of things security platform judges whether the updated number exceeds a preset threshold value; if first prompt information that the updated times sent by the Internet of things security platform exceed a preset threshold value is received, negotiating with the Internet of things security platform to obtain a second root key, negotiating with the Internet of things security platform to obtain a first derived key based on the second root key, encrypting data to be transmitted by adopting the first derived key and sending the encrypted data to the Internet of things security platform; and if second prompt information that the updated times sent by the Internet of things security platform do not exceed a preset threshold value is received, generating a second derivative key based on the first root key, the identification information of the first derivative key, the stored second random number and the updated times, encrypting the data to be transmitted by adopting the second derivative key, and sending the encrypted data to the Internet of things security platform.
the processor is used for reading the program in the memory and executing the following processes: receiving the updated times of generating a derived key according to the first root key sent by the Internet of things equipment; judging whether the updated times exceed a preset threshold value; if yes, sending first prompt information that the number of times that a first root key is generated into a derived key exceeds a preset threshold value to the Internet of things equipment, enabling the Internet of things equipment to negotiate with the Internet of things security platform to obtain a second root key, negotiating with the Internet of things security platform to obtain a first derived key based on the second root key, and receiving data to be transmitted, which are sent by the Internet of things equipment and encrypted by the first derived key; if not, sending second prompt information that the number of times that the first root key is generated into the derived key does not exceed a preset threshold value to the Internet of things equipment, enabling the Internet of things equipment to generate a second derived key based on the first root key, the identification information of the Internet of things equipment, the stored second random number and the updated number, and receiving data to be transmitted, which are sent by the Internet of things equipment and encrypted by adopting the second derived key.
An embodiment of the present invention further provides an electronic device, including: the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
the memory has stored therein a computer program which, when executed by the processor, causes the processor to perform the method steps of any of the above applied to an internet of things device.
the memory has stored therein a computer program that, when executed by the processor, causes the processor to perform the method steps of any of the above applied to an internet of things security platform.
Embodiments of the present invention also provide a computer-readable storage medium, which stores a computer program executable by an electronic device, and when the program runs on the electronic device, the electronic device is caused to perform any of the method steps applied to an internet of things device.
Embodiments of the present invention further provide a computer-readable storage medium, which stores a computer program executable by an electronic device, and when the program runs on the electronic device, the electronic device is caused to perform any of the above method steps applied to a security platform of the internet of things.
The embodiment of the invention also provides an Internet of things data transmission system, which comprises electronic equipment applied to the Internet of things equipment and electronic equipment applied to the Internet of things safety platform.
The embodiment of the invention provides a method, a device, a system, electronic equipment and a medium for transmitting data of an Internet of things, wherein the method comprises the following steps: when data to be transmitted are detected, updating the number information of the generated derived key according to the first root key and sending the updated number to the Internet of things security platform, so that the Internet of things security platform judges whether the updated number exceeds a preset threshold value; if first prompt information that the updated times sent by the Internet of things security platform exceed a preset threshold value is received, negotiating with the Internet of things security platform to obtain a second root key, negotiating with the Internet of things security platform to obtain a first derived key based on the second root key, encrypting data to be transmitted by adopting the first derived key and sending the encrypted data to the Internet of things security platform; and if second prompt information that the updated times sent by the Internet of things security platform do not exceed a preset threshold value is received, generating a second derivative key based on the first root key, the identification information of the first derivative key, the stored second random number and the updated times, encrypting the data to be transmitted by adopting the second derivative key, and sending the encrypted data to the Internet of things security platform. In the embodiment of the invention, the internet of things security platform needs to judge whether the number of times that the updated first root key is generated into the derivative key exceeds the preset threshold value, if so, the root key negotiation is carried out again to obtain a new root key again, the first derivative key is generated based on the new root key, the first derivative key is adopted to encrypt the data to be transmitted, and when not exceeded, the second derivative key is generated according to the updated number of times.
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a data transmission protected by a hardware encryption chip according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an internal security component of an OpenCPU module according to an embodiment of the present invention;
fig. 3 is a schematic process diagram of a data transmission method of the internet of things according to embodiment 1 of the present invention;
fig. 4 is a data interaction diagram of a data transmission method of the internet of things according to embodiment 4 of the present invention;
fig. 5 is a schematic diagram of a specific architecture of an internet of things data transmission system according to embodiment 5 of the present invention;
fig. 6 is a schematic structural diagram of an internet of things data transmission device according to embodiment 5 of the present invention;
fig. 8 is a schematic structural diagram of an internet of things data transmission system according to an embodiment of the present invention;
Fig. 9 is an electronic device provided in embodiment 8 of the present invention;
fig. 10 is an electronic device provided in embodiment 9 of the present invention;
fig. 11 is an electronic device provided in embodiment 10 of the present invention;
fig. 12 is an electronic device provided in embodiment 11 of the present invention.
The present invention will now be described in further detail with reference to the accompanying drawings, in which it is apparent that the described embodiments are only some, but not all embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
in the long-distance access technology of the low-power-consumption Internet of Things, Narrow-Band Internet of Things (NB-IoT) gradually emerges in the head and coexists and complements the original 2G access technology, but the security of data transmission of the Internet of Things equipment is also an urgent problem to be solved. Domestic mainstream communication module manufacturers release an OpenCPU technical solution while successively releasing respective NB-IOT modules. The OpenCPU is an application mode which takes a module as a main processor, and provides a user to develop own application program in the module by sharing resources such as a processor, a memory, IO and the like in the module, so that the development process of the user on wireless application is simplified, the hardware structure design is simplified, and the product cost is reduced. The software architecture of the OpenCPU is shown in fig. 2, and mainly includes three layers, Core System, User API, and Application. According to the embodiment of the invention, the security component for data encryption is written on the OpenCPU module, so that the security of data transmission of the equipment of the Internet of things is improved.
Fig. 3 is a schematic process diagram of a data transmission method of the internet of things according to an embodiment of the present invention, where the process includes the following steps:
s301: when data to be transmitted are detected, updating the number information of the times of generating the derived key according to the first root key and sending the updated number to the Internet of things security platform, so that the Internet of things security platform judges whether the updated number exceeds a preset threshold value.
The internet of things equipment is composed of an OpenCPU module and a user Micro Control Unit (MCU). When the internet of things device detects that the user MCU needs to transmit data, in order to ensure that the data sent by the internet of things device is not tampered, the data to be transmitted is encrypted before being sent.
First, the internet of things device stores, for a first root key, information about the number of times that a derivative key has been generated according to the first root key, and in order to ensure security of the derivative key, the first root key used for generating the derivative key needs to be regenerated when the number of times of use reaches a preset threshold value.
Specifically, the internet of things equipment updates the information of the times of generating the derived key according to the first root key, sends the updated times to the internet of things security platform, and the internet of things security platform judges the updated times to determine whether the updated times exceed a preset threshold value. Specifically, the number of times of use is updated by adding 1 to the number of times of use.
S302: and negotiating with the Internet of things security platform to obtain a second root key if first prompt information of which the updated times exceed a preset threshold value is received, negotiating with the Internet of things security platform to obtain a first derived key based on the second root key, encrypting data to be transmitted by adopting the first derived key and transmitting the encrypted data to the Internet of things security platform.
And the Internet of things safety platform receives the updated times and compares the updated times with a preset threshold value stored by the Internet of things safety platform. And if the updated times exceed the preset threshold, sending first prompt information of which the updated times exceed the preset threshold to the Internet of things equipment.
After the internet of things equipment receives the first prompt message, in order to ensure the security of the derived key, the internet of things equipment performs root key negotiation with the internet of things security platform, so that a second root key different from the first root key is obtained, and then the internet of things security platform negotiates with the internet of things security platform to obtain a first derived key based on the second root key obtained again.
After the new first derivation secret key is obtained, in order to guarantee the security of data transmission of the internet of things equipment, the data to be transmitted are encrypted by the first derivation secret key, and the encrypted data to be transmitted are sent to the internet of things security platform.
S303: and if second prompt information that the updated times sent by the Internet of things security platform do not exceed a preset threshold value is received, generating a second derivative key based on the first root key, the identification information of the first derivative key, the stored second random number and the updated times, encrypting the data to be transmitted by adopting the second derivative key, and sending the encrypted data to the Internet of things security platform.
And if the Internet of things safety platform judges that the updated times do not exceed the preset threshold, sending second prompt information that the updated times exceed the preset threshold to the Internet of things equipment.
After the internet of things device receives the second prompt message, it is determined that the derivative key can be generated by using the first root key stored before, at this time, the internet of things device encrypts its own identification information, the stored second random number and the updated number by using the stored first root key, so as to generate a second derivative key.
After the second derivative key is obtained, in order to guarantee the security of data transmission of the internet of things equipment, the second derivative key is adopted to encrypt data to be transmitted, and the encrypted data to be transmitted are sent to the internet of things security platform.
In the embodiment of the invention, the internet of things security platform needs to judge whether the number of times that the updated first root key is generated into the derivative key exceeds the preset threshold value, if so, the root key negotiation is carried out again to obtain a new root key again, the first derivative key is generated based on the new root key, the first derivative key is adopted to encrypt the data to be transmitted, and when not exceeded, the second derivative key is generated according to the updated number of times.
in order to ensure variability of the derived key and further ensure security of data transmission, on the basis of the foregoing embodiment, in an embodiment of the present invention, a process of negotiating with an internet of things security platform to obtain a second root key includes:
encrypting identification information of the mobile terminal and a locally generated first random number by using a preset first key to obtain a first check code, and sending the first check code to the Internet of things security platform;
receiving a third check code, a result code and a second random number which are sent by an Internet of things security platform, wherein the Internet of things security platform decrypts the first check code by adopting a second key corresponding to the Internet of things equipment to obtain a first random number, encrypts identification information of the Internet of things equipment and the first random number by adopting the second key to obtain a second check code, judges whether the first check code and the second check code are consistent, and generates the second random number and the result code corresponding to the consistency of the check result if the first check code and the second check code are consistent; encrypting the identification information of the internet of things equipment, the first random number and the second random number by using the second key to generate a first negotiation root key, and encrypting the identification information of the internet of things equipment, a result code and the second random number by using the first negotiation root key to generate a third check code;
Judging whether the result code is a result code corresponding to a check result, if so, encrypting the identification information of the internet of things equipment, the first random number and the second random number by using the first secret key to generate a second negotiation root secret key, encrypting the identification information of the internet of things equipment, the result code and the second random number by using the second negotiation root secret key to generate a fourth check code, judging whether a third check code and the fourth check code are consistent, and if so, storing the second negotiation root secret key;
sending the fourth check code to the Internet of things security platform;
and receiving response information which is sent by the Internet of things security platform and is consistent with the third check code and the fourth check code, and determining the second negotiation root key as a second root key.
In order to ensure the safety of data interaction between the internet of things equipment and the internet of things security platform, a first secret key is arranged in each piece of internet of things equipment, in addition, in order to ensure the safety of data transmission, the first secret keys arranged in each piece of internet of things equipment are different, in addition, in order to ensure that the internet of things security platform can decrypt received data sent by the internet of things equipment, a second secret key corresponding to each piece of internet of things equipment is also stored in the internet of things security platform, and specifically, the second secret key can be stored corresponding to identification information of the internet of things equipment.
Firstly, the Internet of things equipment locally generates a first random number, and encrypts identification information of the Internet of things equipment and the first random number by adopting a preset first secret key to obtain a first check code, and the first check code is sent to the Internet of things security platform to initiate a root secret key negotiation request. In the embodiment of the present invention, the identification information of the internet of things device may be unique identification information UTID of a certain internet of things device, or may also be network access identifications IMEI and IMSI of an OpenCPU module built in the internet of things device, and specifically which identification information is adopted in the use process is not limited, and the internet of things security platform correspondingly stores the identification information corresponding to each internet of things device. In addition, in the embodiment of the present invention, in order to ensure the security of the random number, the identification information, and the like, before the check code is generated, each piece of information may be individually encrypted by using a first key preset by the internet of things device.
The Internet of things security platform receives the first check code, and in order to verify the validity of the first check code, the Internet of things security platform decrypts the first check code by using a second secret key corresponding to the Internet of things equipment to obtain a first random number. And encrypting the first random number and the identification information of the internet of things equipment by using the second key to obtain a second check code. Comparing the received first check code with the received second check code, judging whether the first check code is consistent with the second check code, if so, locally generating a second random number, and in order to send prompt information of a check result to the internet of things equipment, simultaneously generating a result code with a consistent check result of the first check code and the second check code, for example, 1 can be used for representing that the check result is consistent, 0 can represent that the check result is inconsistent, and when the check result is consistent, the result code generated by the internet of things safety platform is 1. And under the condition that the check result is inconsistent, an inconsistent result code can be directly returned to prompt the Internet of things equipment that the request of root key negotiation needs to be initiated again.
After the internet of things security platform generates a second random number and a result code, the identification information of the internet of things equipment, the first random number and the second random number are encrypted by adopting a second key corresponding to the internet of things equipment, and a first negotiation root key is obtained. In order to negotiate with the internet of things device for a root key to obtain a final root key, the generated first negotiated root key is used for encrypting the identification information, the result code and the second random number of the internet of things device, so that a third check code is generated. And the Internet of things security platform sends the generated third check code, the result code and the second random number to the Internet of things equipment.
After the internet of things equipment receives the third check code, the result code and the second random number, whether the received result code is the result code corresponding to the consistency of the check result is judged, if the result code is the result code corresponding to the consistency of the check result, in order to complete the negotiation process of the root key, the preset first key is adopted to encrypt the identification information of the equipment, the locally generated first random number and the received second random number, and the second negotiation root key is obtained. In order to determine consistency between the second root negotiation key and the first root negotiation key of the internet of things security platform, the internet of things device encrypts the identification information of the internet of things device, the received result code and the second random number by using the generated second root negotiation key to obtain a fourth check code. And judging whether the fourth check code is consistent with the received third check code, if so, storing the second negotiation root key, the second random number and the self identification information in a local related way. And in order to prompt the availability of the first negotiation root key generated by the internet of things security platform, the fourth check code is sent to the internet of things security platform.
And after the internet of things safety platform receives the fourth verification code, confirming whether the fourth verification code is consistent with a third verification code generated by the internet of things safety platform. And if the first negotiation root key is consistent with the root key, sending response information with consistent verification results to the Internet of things equipment, and determining the first negotiation root key which is generated before and corresponds to the Internet of things equipment as the final root key. In order to facilitate the subsequent background database to search data and debug, the time for determining the final root key is saved.
After the internet of things equipment receives the response information with the third check code and the fourth check code being consistent, the root key is successfully negotiated at the moment, and a second negotiated root key stored by the internet of things equipment is determined as the root key finally used for generating the derived key.
In the embodiment of the invention, the Internet of things equipment acquires the root key finally used for generating the derived key through interactive negotiation with the Internet of things security platform, so that the data encryption and transmission between the Internet of things equipment and the Internet of things security platform can be carried out by adopting mutually approved keys.
in order to further ensure the security of data transmission in the internet of things, on the basis of the foregoing embodiments, in an embodiment of the present invention, before the internet of things device sends encrypted data to be transmitted to the internet of things security platform, the method further includes:
The method comprises the steps that the Internet of things equipment sends a first connection request for establishing a security channel to an Internet of things security platform, wherein the first connection request carries a derived secret key;
receiving first response information which is sent by an Internet of things security platform and contains identification information of a port of a security channel to be established, taking the port corresponding to the identification information as a target port for establishing the security channel, wherein the second response information is sent when the Internet of things security platform judges that the derived key is consistent with a derived key corresponding to the Internet of things equipment stored by the Internet of things security platform.
After the derived key between the internet of things equipment and the internet of things security platform is successfully negotiated, when the internet of things equipment sends data, the derived key successfully negotiated is adopted to encrypt the data to be transmitted, and then the encrypted data to be transmitted is sent to the internet of things security platform. In order to ensure the data security in the transmission process, the embodiment of the invention also adopts a mode of establishing a secure channel.
After data to be transmitted is encrypted by the Internet of things equipment, in order to establish the secure channel for transmission, the Internet of things equipment firstly sends a first connection request for establishing the secure channel to the Internet of things secure platform, and the first connection request carries a derived key for encrypting the data to be transmitted.
After the internet of things security platform receives the first connection request, in order to determine whether a port for establishing a security channel can be allocated to the internet of things device, it is first determined whether the received derived key is consistent with a derived key corresponding to the internet of things device stored in the internet of things security platform, if so, the port for establishing the security channel is allocated to the internet of things device, and first response information including identification information of the port for establishing the security channel is sent to the internet of things device.
And after the Internet of things equipment receives the first response information, taking a port corresponding to the identification information contained in the first response information as a target port for establishing a safety channel.
Specifically, a user MCU (microprogrammed control unit) arranged in the Internet of things equipment sends data to be transmitted to an OpenCPU (open central processing unit) module arranged in the Internet of things equipment, and the module sends a first connection request to a Socks proxy server of the Internet of things safety platform by using a firewall security session transfer Protocol (Socks), wherein the first connection request can be represented by a connection request message, and specifically, in order to identify the identity of the Internet of things equipment, the connection request message comprises Internet of things equipment identification information UTID and a derived key of the Internet of things equipment. When the security platform of the internet of things judges that the derived key is consistent with the derived key of the internet of things equipment stored by the security platform of the internet of things, a port is allocated to establish a security channel so as to receive data to be transmitted sent by the equipment of the internet of things, and the same Socks protocol standard is adopted to send first response information containing identification information of the port of the security channel to be established to the equipment of the internet of things, wherein the specific identification information of the port can be an address of the port. If the secure platform of the internet of things judges that the derived key is inconsistent with the derived key of the device of the internet of things stored in the secure platform of the internet of things, an error code is returned to prompt the device of the internet of things to perform negotiation of the derived key again.
On the basis of the foregoing embodiments, in an embodiment of the present invention, before the internet of things device sends the encrypted data to be transmitted to the internet of things security platform, the method further includes:
the method comprises the steps that the Internet of things equipment sends a second connection request for establishing the connection of a secure channel to an Internet of things secure platform, wherein the second connection request carries a derived secret key and identification information of a target port of the secure channel to be established;
and receiving second response information which is sent by the Internet of things security platform and successfully establishes a security channel with the port of the identification information, wherein the second response information is sent when the Internet of things security platform judges that the derived secret key is consistent with a derived secret key corresponding to the Internet of things equipment stored in the Internet of things security platform.
After the target port for establishing the secure channel is determined by the internet of things device, in order to ensure the successful establishment of the secure channel, a second connection request for establishing the secure channel is sent to the internet of things secure platform, and the second connection request carries a derivative key for encrypting data to be transmitted and identification information of the target port for establishing the secure channel. Specifically, the internet of things device may send the second connection request to a DTLS proxy server of the internet of things Security platform through a data packet Transport Layer Security (DTLS) client program of the internet of things device.
And the Internet of things security platform receives the second connection request, judges whether the carried derived key is consistent with a derived key stored by the Internet of things security platform, allows a security channel to be established with the Internet of things equipment if the carried derived key is consistent with the derived key stored by the Internet of things security platform, and sends second response information of successfully establishing the security channel with a port corresponding to the identification information to the Internet of things equipment.
And after the Internet of things equipment receives the second response information, the encrypted data to be transmitted is sent to the Internet of things security platform by using the established security channel.
In the embodiment of the invention, the internet of things equipment sends the first connection request and the second connection request to the internet of things security platform, and the security channel between the internet of things equipment and the internet of things security platform is allowed to be established only when the internet of things security platform verifies that the derived key carried in the internet of things security platform is consistent with the derived key stored in the internet of things security platform, so that the security of data transmission is further ensured.
in order to determine a derivative key that is finally used to encrypt data to be transmitted, on the basis of the foregoing embodiments, in an embodiment of the present invention, the sending the updated number of times to the internet of things security platform includes:
The Internet of things equipment encrypts the identification information, the second random number and the updated times of the Internet of things equipment by using the stored root key to obtain a first negotiation derivative key, and encrypts the identification information and the updated times of the Internet of things equipment by using the first negotiation derivative key to obtain a sixth check code; sending the first negotiation derived key, the sixth check code and the updated times to an Internet of things security platform;
the generating a second derived key based on the first root key, the identification information of the first root key, the stored second random number, and the updated number of times includes:
and encrypting the identification information, the result code and the updated times of the device by using the first negotiation derived key to obtain a ninth check code, judging whether the ninth check code is consistent with the eighth check code, if so, determining the first negotiation derived key as a second derived key, wherein the eighth check code is obtained by encrypting the identification information, the second random number and the updated times of the device of the internet of things by using a stored root key by using the security platform of the internet of things to generate a second negotiation derived key, and encrypting the identification information, the result code and the updated times of the device of the internet of things by using the second negotiation derived key.
After the internet of things device and the internet of things security platform acquire the root key through negotiation interaction, in order to ensure the security of data transmission, interaction negotiation is performed again on the basis of the root key to acquire a derived key.
Firstly, the internet of things equipment encrypts self identification information, a second random number and the updated times of generating a derived key through a stored root key to obtain a first negotiation derived key, encrypts the self identification information and the updated times by using the first negotiation derived key to obtain a sixth check code, and sends the first negotiation derived key, the sixth check code and the updated times to an internet of things security platform to initiate a derived key negotiation request in order to negotiate the derived key.
And after receiving the first negotiation derivative key, the sixth check code and the updated times, the internet of things security platform judges whether the updated times exceed a preset threshold value, and if not, encrypts the identification information of the internet of things equipment and the updated times by using the first negotiation derivative key to obtain a seventh check code. And judging whether the seventh check code is consistent with the received sixth check code or not, and generating a result code corresponding to the consistency of the check result under the condition of consistency. At this time, the internet of things security platform encrypts the identification information of the internet of things device, the second random number and the updated times by using the root key which is passed through and stored in the previous negotiation to obtain a second negotiation derived key. In order to negotiate with the internet of things device to obtain a final derived key, the second negotiated derived key is used for encrypting the identification information, the result code and the updated times of the internet of things device to obtain an eighth check code, and the eighth check code and the result code corresponding to the seventh check code and the sixth check code are sent to the internet of things device together.
After the internet of things equipment receives the eighth check code and the result code, firstly, whether the received result code is the result code corresponding to the consistency of the check result is judged, if the result code is the result code corresponding to the consistency of the check result, in order to determine the consistency of the first negotiation derived key and the second negotiation derived key of the internet of things safety platform, the identification information, the result code and the updated times of the internet of things equipment are encrypted by using the first negotiation derived key generated by the equipment, a ninth check code is obtained by comparing the ninth check code with the received eighth check code, if the ninth check code is consistent with the eighth check code, the first negotiation derived key is determined as the derived key finally used for data encryption, and response information that the check result of the ninth check code is consistent with the eighth check code is sent to the internet of things safety platform, and prompting the security platform of the internet of things to determine the second negotiation derivative key generated by the security platform of the internet of things as a final derivative key.
In order to prevent the data transmission of the internet of things equipment from being controlled by illegal personnel and further ensure the data security of the internet of things equipment, the function of issuing the threat handling strategy is configured on the side of the internet of things security platform in the embodiment of the invention. Specifically, the internet of things security platform detects a flow value of the data to be transmitted in real time in the process of receiving the data to be transmitted and forwarding the data to other third-party service platforms, and when the flow value exceeds a preset threshold value, the internet of things equipment is considered to be in an abnormal state at the moment, and a threat handling strategy is sent to the internet of things equipment. The specific internet of things security platform can detect the data flow value at each moment in real time, and when the flow value of the data suddenly increases to or exceeds a preset flow threshold value at a certain moment, a threat handling strategy is sent, such as network disconnection and the like.
After the internet of things device receives the threat handling policy, a corresponding threat handling operation, such as a direct network outage, is performed according to the threat handling policy.
In the embodiment of the invention, the flow of the sent data is monitored by the Internet of things security platform, and when the flow exceeds a preset value, an instruction command of threat disposal is sent to the Internet of things equipment.
The above embodiments are described in detail with reference to fig. 4, and the method includes the following steps:
step 1: and the Internet of things equipment sends a fifth check code obtained by encrypting the identification information and the timestamp by using the first key to the Internet of things security platform so as to initiate a registration request.
The internet of things security platform receives the fifth check code, decrypts the fifth check code by adopting a second key corresponding to the internet of things equipment, obtains and stores identification information of the internet of things equipment, and sends prompt information of successful registration to the internet of things equipment.
Step 2: and the Internet of things equipment initiates a root key negotiation request to the Internet of things security platform.
And the Internet of things security platform replies root key negotiation response information to the Internet of things equipment.
And step 3: and the Internet of things equipment initiates a derived key negotiation request to the Internet of things security platform.
And the Internet of things security platform replies the derived key negotiation response information to the Internet of things equipment.
And 4, step 4: the method comprises the steps that the Internet of things equipment sends a first connection request for establishing a security channel to an Internet of things security platform, and the first connection request carries a derived secret key.
The Internet of things security platform judges whether the derived key is consistent with a derived key corresponding to the Internet of things equipment stored by the Internet of things security platform, if so, a port of a security channel to be established is distributed to the Internet of things equipment, and first response information containing identification information of the port of the security channel to be established is replied to the Internet of things equipment.
And 5: and the Internet of things equipment sends a second connection request for establishing the secure channel to the Internet of things secure platform, wherein the second connection request carries the derived secret key and the identification information of the target port of the secure channel to be established.
And the Internet of things security platform judges whether the derived key is consistent with a derived key corresponding to the Internet of things equipment stored by the Internet of things security platform, if so, a security channel is established by adopting a port corresponding to the identification information, and second response information of successfully establishing the security channel with the port of the identification information is sent to the Internet of things equipment.
Step 6: and encrypting the data to be transmitted by adopting the derived key which is negotiated, and sending the encrypted data to be transmitted to the Internet of things security platform by adopting the established security channel.
Specifically, the internet of things equipment sends data to be transmitted to the internet of things safety platform, the data carries the IP address of the third-party service platform, and the internet of things safety platform decrypts the encrypted data to be transmitted and sends the decrypted data to the third-party service platform corresponding to the IP address. And when the third-party service platform returns data, the Internet of things safety platform encrypts the data by adopting the derivative key corresponding to the Internet of things equipment and transmits the data through the safety channel. Specifically, a schematic structural diagram of the internet of things data transmission system is shown in fig. 5, and the internet of things data transmission system is composed of an internet of things device, an internet of things security platform, and a security channel, wherein an OpenCPU module written in a security component provided by the embodiment of the present invention is built in the internet of things device.
The specific implementation processes of the above steps are described in detail in the above embodiments, and are not described in detail in the embodiments of the present invention.
based on the same technical concept, the embodiment of the invention provides an internet of things data transmission device, which is applied to internet of things equipment. As shown in fig. 6, the apparatus provided in the embodiment of the present invention includes:
a sending module 701, configured to update, when data to be transmitted is detected, frequency information of a derivative key generated according to a first root key, and send the updated frequency to an internet of things security platform, so that the internet of things security platform determines whether the updated frequency exceeds a preset threshold;
An obtaining module 702, configured to negotiate with an internet of things security platform to obtain a second root key if first prompt information that is sent by the internet of things security platform and that is updated more than a preset threshold is received, negotiate with the internet of things security platform based on the second root key to obtain a first derived key, encrypt data to be transmitted by using the first derived key, and send the encrypted data to the internet of things security platform; and if second prompt information that the updated times sent by the Internet of things security platform do not exceed a preset threshold value is received, generating a second derived key based on the first root key, the identification information of the first derived key, the stored second random number and the updated times, encrypting the data to be transmitted by adopting the second derived key, and sending the encrypted data to the Internet of things security platform.
Further, the device further includes a first negotiation module 703, configured to encrypt the identification information of the device and a locally generated first random number by using a preset first key to obtain a first check code, and send the first check code to the internet of things security platform; receiving a third check code, a result code and a second random number which are sent by an Internet of things security platform, wherein the Internet of things security platform decrypts the first check code by adopting a second key corresponding to the Internet of things equipment to obtain a first random number, encrypts identification information of the Internet of things equipment and the first random number by adopting the second key to obtain a second check code, judges whether the first check code and the second check code are consistent, and generates the second random number and the result code corresponding to the consistency of the check result if the first check code and the second check code are consistent; encrypting the identification information of the internet of things equipment, the first random number and the second random number by using the second key to generate a first negotiation root key, and encrypting the identification information of the internet of things equipment, a result code and the second random number by using the first negotiation root key to generate a third check code; judging whether the result code is a result code corresponding to a check result, if so, encrypting the identification information of the internet of things equipment, the first random number and the second random number by using the first secret key to generate a second negotiation root secret key, encrypting the identification information of the internet of things equipment, the result code and the second random number by using the second negotiation root secret key to generate a fourth check code, judging whether a third check code and the fourth check code are consistent, and if so, storing the second negotiation root secret key; sending the fourth check code to the Internet of things security platform; and receiving response information which is sent by the Internet of things security platform and is consistent with the third check code and the fourth check code, and determining the second negotiation root key as a second root key.
Further, the apparatus further includes a first connection module 704, configured to send a first connection request requesting establishment of a secure channel to an internet of things security platform, where the first connection request carries a derived key; receiving first response information which is sent by an Internet of things security platform and contains identification information of a port of a security channel to be established, taking the port corresponding to the identification information as a target port for establishing the security channel, wherein the second response information is sent when the Internet of things security platform judges that the derived key is consistent with a derived key corresponding to the Internet of things equipment stored by the Internet of things security platform; sending a second connection request for establishing a security channel to the Internet of things security platform, wherein the second connection request carries a derived key and identification information of a target port of the security channel to be established; and receiving second response information which is sent by the Internet of things security platform and successfully establishes a security channel with the port of the identification information, wherein the second response information is sent when the Internet of things security platform judges that the derived key is consistent with a derived key corresponding to the Internet of things equipment stored by the Internet of things security platform.
Further, the obtaining module 702 is specifically configured to encrypt the identification information of the self, the second random number, and the updated times by using the stored root key to obtain a first negotiation derived key, and encrypt the identification information of the self and the updated times by using the first negotiation derived key to obtain a sixth check code; sending the first negotiation derivative key, the sixth check code and the updated times to an Internet of things security platform; and encrypting the identification information, the result code and the updated times of the internet of things equipment by using the first negotiation derived key to obtain a ninth check code, judging whether the ninth check code is consistent with the eighth check code, if so, determining the first negotiation derived key as a second derived key, wherein the eighth check code is obtained by encrypting the identification information, the second random number and the updated times of the internet of things equipment by using a stored root key by using the internet of things security platform to generate a second negotiation derived key, and encrypting the identification information, the result code and the updated times of the internet of things equipment by using the second negotiation derived key.
based on the same technical concept, the embodiment of the invention provides an internet of things data transmission device, which is applied to an internet of things security platform. As shown in fig. 7, the apparatus provided in the embodiment of the present invention includes:
a receiving module 801, configured to receive the updated number of times that a derivative key has been generated according to a first root key, where the number of times is sent by an internet of things device;
a determining module 802, configured to determine whether the updated number of times exceeds a preset threshold;
a prompt module 803, configured to send, to the internet of things device, first prompt information that the number of times that a first root key has been generated into a derived key exceeds a preset threshold, so that the internet of things device negotiates with the internet of things security platform to obtain a second root key, negotiates with the internet of things security platform to obtain a first root key based on the second root key, and receives data to be transmitted, which is sent by the internet of things device and encrypted with the first root key; if not, second prompt information that the number of times that the first root key is generated into the derived key does not exceed a preset threshold is sent to the internet of things device, so that the internet of things device generates a second derived key based on the first root key, the identification information of the device, the stored second random number and the updated number, and receives data to be transmitted, which are sent by the internet of things device and encrypted by the second derived key.
Further, the apparatus further includes a second negotiation module 804, configured to receive a first check code sent by the internet of things device, decrypt the first check code with a second key corresponding to the internet of things device, and obtain a first random number; encrypting the identification information of the Internet of things equipment and the first random number by adopting the second key to obtain a second check code, judging whether the first check code is consistent with the second check code, and if so, generating a second random number and a result code corresponding to the consistency of the check result; encrypting the identification information of the internet of things equipment, the first random number and the second random number by using the second key to generate a first negotiation root key, encrypting the identification information of the internet of things equipment, a result code and the second random number by using the first negotiation root key to generate a third check code, and sending the third check code to the internet of things equipment; receiving a fourth check code sent by the internet of things equipment, wherein the fourth check code is a result code corresponding to the consistency of the check result and judged by the internet of things equipment, if so, encrypting the identification information of the internet of things equipment, the first random number and the second random number by using the first secret key to generate a second negotiation root secret key, encrypting the identification information of the internet of things equipment, the result code and the second random number by using the second negotiation root secret key to generate a fourth check code, and sending the fourth check code when judging that the third check code is consistent with the fourth check code; and judging whether the third check code is consistent with the fourth check code, if so, storing a first negotiation root key aiming at the Internet of things equipment, determining the first negotiation root key as a second root key, and returning response information of the third check code is consistent with the fourth check code to the Internet of things equipment.
Further, the apparatus further includes a second connection module 805, configured to receive a first connection request that is sent by an internet of things device and requests to establish a secure channel, where the first connection request carries a derived key; judging whether the derived key is consistent with a derived key corresponding to the Internet of things equipment stored by the derived key; if the first response information is consistent with the identification information of the port of the security channel to be established, distributing the port of the security channel to be established for the Internet of things equipment, and sending the first response information containing the identification information of the port of the security channel to be established to the Internet of things equipment; receiving a second connection request for establishing a secure channel sent by the internet of things equipment, wherein the second connection request carries a derived key and identification information of a target interface of the secure channel to be established; judging whether the derived key is consistent with a derived key corresponding to the Internet of things equipment stored by the derived key; and if the identification information is consistent with the port identification information, sending second response information for successfully establishing a secure channel with the port identification information to the Internet of things equipment, and receiving encrypted data to be transmitted sent by the Internet of things equipment through the secure channel.
Further, the prompt module 803 is specifically configured to receive a first negotiation derived key, a sixth check code and updated times sent by the internet of things device, where the sixth check code is obtained by encrypting, by using the first negotiation derived key, identification information of the internet of things device and the times information; if the updated root key is judged to have been generated to derive the key for a number of times not exceeding a preset threshold, encrypting the identification information of the internet of things device and the updated number of times with the first negotiated derivative key to obtain a seventh check code, judging whether the sixth check code and the seventh check code are consistent, if so, generating a result code corresponding to the consistent check result, encrypting the identification information of the internet of things device, the second random number and the updated number of times with the stored root key to obtain a second negotiated derivative key, encrypting the identification information of the internet of things device, the result code and the updated number of times with the second negotiated derivative key to obtain an eighth check code, and sending the result code and the eighth check code to the internet of things device.
fig. 8 is a schematic structural diagram of an internet of things data transmission system according to an embodiment of the present invention, where the internet of things data transmission system 900 includes an internet of things device 901 and an internet of things security platform 902. Wherein:
the internet of things device 901 is configured to, when data to be transmitted is detected, update frequency information of a derivative key generated according to a first root key and send the updated frequency to an internet of things security platform, so that the internet of things security platform determines whether the updated frequency exceeds a preset threshold; if first prompt information that the updated times sent by the Internet of things security platform exceed a preset threshold value is received, negotiating with the Internet of things security platform to obtain a second root key, negotiating with the Internet of things security platform to obtain a first derived key based on the second root key, encrypting data to be transmitted by adopting the first derived key and sending the encrypted data to the Internet of things security platform; and if second prompt information that the updated times sent by the Internet of things security platform do not exceed a preset threshold value is received, generating a second derivative key based on the first root key, the identification information of the first derivative key, the stored second random number and the updated times, encrypting the data to be transmitted by adopting the second derivative key, and sending the encrypted data to the Internet of things security platform.
The internet of things security platform 902 is configured to receive the number of times that a derivative key has been generated according to the first root key after updating, where the number of times is sent by the internet of things device; judging whether the updated times exceed a preset threshold value; if yes, sending first prompt information that the number of times that a first root key is generated into a derived key exceeds a preset threshold value to the Internet of things equipment, enabling the Internet of things equipment to negotiate with the Internet of things security platform to obtain a second root key, negotiating with the Internet of things security platform to obtain a first derived key based on the second root key, and receiving data to be transmitted, which are sent by the Internet of things equipment and encrypted by the first derived key; if not, second prompt information that the number of times that the first root key is generated into the derived key does not exceed a preset threshold is sent to the internet of things device, so that the internet of things device generates a second derived key based on the first root key, the identification information of the device, the stored second random number and the updated number, and receives data to be transmitted, which are sent by the internet of things device and encrypted by the second derived key.
Specifically, a schematic structural diagram of the internet of things data transmission system is shown in fig. 6, and the internet of things data transmission system is composed of internet of things equipment, an internet of things security platform, and a security channel, where an OpenCPU module written in a security component provided in the embodiment of the present invention is built in the internet of things equipment.
The internet of things device 901 is configured to encrypt identification information of the device and a locally generated first random number by using a preset first key to obtain a first check code, and send the first check code to the internet of things security platform; receiving a third check code, a result code and a second random number which are sent by an Internet of things security platform, wherein the Internet of things security platform decrypts the first check code by adopting a second key corresponding to the Internet of things equipment to obtain a first random number, encrypts identification information of the Internet of things equipment and the first random number by adopting the second key to obtain a second check code, judges whether the first check code and the second check code are consistent, and generates the second random number and the result code corresponding to the consistency of the check result if the first check code and the second check code are consistent; encrypting the identification information of the internet of things equipment, the first random number and the second random number by using the second key to generate a first negotiation root key, and encrypting the identification information of the internet of things equipment, a result code and the second random number by using the first negotiation root key to generate a third check code; judging whether the result code is a result code corresponding to a check result, if so, encrypting the identification information of the internet of things equipment, the first random number and the second random number by using the first secret key to generate a second negotiation root secret key, encrypting the identification information of the internet of things equipment, the result code and the second random number by using the second negotiation root secret key to generate a fourth check code, judging whether a third check code and the fourth check code are consistent, and if so, storing the second negotiation root secret key; sending the fourth check code to the Internet of things security platform; and receiving response information which is sent by the Internet of things security platform and is consistent with the third check code and the fourth check code, and determining the second negotiation root key as a second root key.
The internet of things device 901 is configured to send a first connection request for requesting establishment of a secure channel to an internet of things security platform, where the first connection request carries a derived key; receiving first response information which is sent by an Internet of things security platform and contains identification information of a port of a security channel to be established, taking the port corresponding to the identification information as a target port for establishing the security channel, wherein the second response information is sent when the Internet of things security platform judges that the derived secret key is consistent with a derived secret key corresponding to the Internet of things equipment stored by the Internet of things security platform.
The internet of things device 901 is configured to send a second connection request for establishing a secure channel to the internet of things secure platform, where the second connection request carries a derived key and identification information of a target port for which the secure channel is to be established; and receiving second response information which is sent by the Internet of things security platform and successfully establishes a security channel with the port of the identification information, wherein the second response information is sent when the Internet of things security platform judges that the derived secret key is consistent with a derived secret key corresponding to the Internet of things equipment stored in the Internet of things security platform.
The internet of things device 901 is configured to encrypt the identification information of the device, the second random number, and the updated times by using the stored root key to obtain a first negotiation derivative key, and encrypt the identification information of the device and the updated times by using the first negotiation derivative key to obtain a sixth check code; sending the first negotiation derivative key, the sixth check code and the updated times to an Internet of things security platform; and encrypting the identification information, the result code and the updated times of the internet of things equipment by using the first negotiation derived key to obtain a ninth check code, judging whether the ninth check code is consistent with the eighth check code, if so, determining the first negotiation derived key as a second derived key, wherein the eighth check code is obtained by encrypting the identification information, the second random number and the updated times of the internet of things equipment by using a stored root key by using the internet of things security platform to generate a second negotiation derived key, and encrypting the identification information, the result code and the updated times of the internet of things equipment by using the second negotiation derived key.
The internet of things security platform 902 is configured to receive a first check code sent by an internet of things device, decrypt the first check code with a second key corresponding to the internet of things device, and obtain a first random number; encrypting the identification information of the Internet of things equipment and the first random number by adopting the second key to obtain a second check code, judging whether the first check code is consistent with the second check code, and if so, generating a second random number and a result code corresponding to the consistency of the check result; encrypting the identification information of the Internet of things equipment, the first random number and the second random number by adopting the second key to generate a first negotiation root key, encrypting the identification information of the Internet of things equipment, a result code and the second random number by adopting the first negotiation root key to generate a third check code, and sending the third check code to the Internet of things equipment; receiving a fourth check code sent by the internet of things equipment, wherein the fourth check code is a result code which is judged by the internet of things equipment whether the result code corresponds to a check result, if yes, encrypting the identification information of the internet of things equipment, the first random number and the second random number by using the first secret key to generate a second negotiation root secret key, encrypting the identification information of the internet of things equipment, the result code and the second random number by using the second negotiation root secret key to generate a fourth check code, and sending the fourth check code when the third check code and the fourth check code are judged to be consistent; and judging whether the third check code is consistent with the fourth check code, if so, storing a first negotiation root key aiming at the Internet of things equipment, determining the first negotiation root key as a second root key, and returning response information of the third check code is consistent with the fourth check code to the Internet of things equipment.
The internet of things security platform 902 is configured to receive a first connection request, which is sent by an internet of things device and requests to establish a secure channel, where the first connection request carries a derived key; judging whether the derived key is consistent with a derived key corresponding to the internet of things equipment stored by the derived key; and if the first response information contains the identification information of the port of the security channel to be established, distributing the port of the security channel to be established for the Internet of things equipment, and sending the first response information containing the identification information of the port of the security channel to be established to the Internet of things equipment.
The internet of things security platform 902 is configured to receive a second connection request for establishing a security channel sent by an internet of things device, where the second connection request carries a derived key and identification information of a target interface of the security channel to be established; judging whether the derived key is consistent with a derived key corresponding to the internet of things equipment stored by the derived key; and if the identification information is consistent with the port identification information, sending second response information for successfully establishing a secure channel with the port identification information to the Internet of things equipment, and receiving encrypted data to be transmitted sent by the Internet of things equipment through the secure channel.
The internet of things security platform 902 is configured to receive a first negotiation derived key, a sixth check code and updated times sent by an internet of things device, where the sixth check code is obtained by encrypting identification information of the internet of things device and the times information by using the first negotiation derived key; if the updated root key is judged to have been generated to derive the key for a number of times not exceeding a preset threshold, encrypting the identification information of the internet of things device and the updated number of times with the first negotiated derivative key to obtain a seventh check code, judging whether the sixth check code and the seventh check code are consistent, if so, generating a result code corresponding to the consistent check result, encrypting the identification information of the internet of things device, the second random number and the updated number of times with the stored root key to obtain a second negotiated derivative key, encrypting the identification information of the internet of things device, the result code and the updated number of times with the second negotiated derivative key to obtain an eighth check code, and sending the result code and the eighth check code to the internet of things device.
on the basis of the foregoing embodiments, an electronic device 1000 according to an embodiment of the present invention is further provided, as shown in fig. 9, including a memory 1001 and a processor 1002;
the processor 1002 is configured to read the program in the memory 1001, and execute the following processes:
when data to be transmitted are detected, updating the number information of the generated derived key according to the first root key and sending the updated number to the Internet of things security platform, so that the Internet of things security platform judges whether the updated number exceeds a preset threshold value;
and if second prompt information that the updated times sent by the Internet of things security platform do not exceed a preset threshold value is received, generating a second derivative key based on the first root key, the identification information of the first derivative key, the stored second random number and the updated times, encrypting the data to be transmitted by adopting the second derivative key, and sending the encrypted data to the Internet of things security platform.
In FIG. 9, the bus architecture may include any number of interconnected buses and bridges, with various circuits representing one or more processors, in particular processor 1002, and memory, in particular memory 1001. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein.
Alternatively, the processor 1002 may be a CPU (central processing unit), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or a CPLD (Complex Programmable Logic Device).
The processor is used for encrypting the identification information of the processor and a locally generated first random number by adopting a preset first secret key to obtain a first check code, and sending the first check code to the Internet of things security platform; receiving a third check code, a result code and a second random number which are sent by an Internet of things security platform, wherein the Internet of things security platform decrypts the first check code by adopting a second key corresponding to the Internet of things equipment to obtain a first random number, encrypts identification information of the Internet of things equipment and the first random number by adopting the second key to obtain a second check code, judges whether the first check code and the second check code are consistent, and generates the second random number and the result code corresponding to the consistency of the check result if the first check code and the second check code are consistent; encrypting the identification information of the internet of things equipment, the first random number and the second random number by using the second key to generate a first negotiation root key, and encrypting the identification information of the internet of things equipment, a result code and the second random number by using the first negotiation root key to generate a third check code; judging whether the result code is a result code corresponding to a check result, if so, encrypting the identification information of the internet of things equipment, the first random number and the second random number by using the first secret key to generate a second negotiation root secret key, encrypting the identification information of the internet of things equipment, the result code and the second random number by using the second negotiation root secret key to generate a fourth check code, judging whether a third check code and the fourth check code are consistent, and if so, storing the second negotiation root secret key; sending the fourth check code to the Internet of things security platform; and receiving response information which is sent by the Internet of things security platform and is consistent with the third check code and the fourth check code, and determining the second negotiation root key as a second root key.
The processor is used for sending a first connection request for requesting to establish a secure channel to the Internet of things secure platform, wherein the first connection request carries a derived secret key; receiving first response information which is sent by an Internet of things security platform and contains identification information of a port of a security channel to be established, taking the port corresponding to the identification information as a target port for establishing the security channel, wherein the second response information is sent when the Internet of things security platform judges that the derived secret key is consistent with a derived secret key corresponding to the Internet of things equipment stored by the Internet of things security platform.
The processor is used for sending a second connection request for establishing a secure channel to the Internet of things secure platform, wherein the second connection request carries a derived key and identification information of a target port of the secure channel to be established; and receiving second response information which is sent by the Internet of things security platform and successfully establishes a security channel with the port of the identification information, wherein the second response information is sent when the Internet of things security platform judges that the derived key is consistent with a derived key corresponding to the Internet of things equipment stored by the Internet of things security platform.
The processor is configured to encrypt the identification information of the processor, the second random number, and the updated times by using the stored root key to obtain a first negotiation derivative key, and encrypt the identification information of the processor and the updated times by using the first negotiation derivative key to obtain a sixth check code; sending the first negotiation derivative key, the sixth check code and the updated times to an Internet of things security platform; and encrypting the identification information, the result code and the updated times of the internet of things equipment by using the first negotiation derived key to obtain a ninth check code, judging whether the ninth check code is consistent with the eighth check code, if so, determining the first negotiation derived key as a second derived key, wherein the eighth check code is obtained by encrypting the identification information, the second random number and the updated times of the internet of things equipment by using a stored root key by using the internet of things security platform to generate a second negotiation derived key, and encrypting the identification information, the result code and the updated times of the internet of things equipment by using the second negotiation derived key.
on the basis of the foregoing embodiments, an embodiment of the present invention further provides an electronic device 1100, as shown in fig. 10, including a memory 1101 and a processor 1102;
the processor 1102 is configured to read the program in the memory 1101 and execute the following processes:
In FIG. 10, the bus architecture may include any number of interconnected buses and bridges, with various circuits representing one or more processors 1102 and a memory 1101, in particular a memory represented by a processor 1101. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein.
Alternatively, the processor 1102 may be a CPU (Central processing Unit), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array), or a CPLD (Complex Programmable Logic Device).
The processor is used for receiving a first check code sent by the Internet of things equipment, decrypting the first check code by adopting a second secret key corresponding to the Internet of things equipment, and acquiring a first random number; encrypting the identification information of the Internet of things equipment and the first random number by adopting the second key to obtain a second check code, judging whether the first check code is consistent with the second check code, and if so, generating a second random number and a result code corresponding to the consistency of the check result; encrypting the identification information of the Internet of things equipment, the first random number and the second random number by adopting the second key to generate a first negotiation root key, encrypting the identification information of the Internet of things equipment, a result code and the second random number by adopting the first negotiation root key to generate a third check code, and sending the third check code to the Internet of things equipment; receiving a fourth check code sent by the internet of things equipment, wherein the fourth check code is a result code corresponding to the consistency of the check result and judged by the internet of things equipment, if so, encrypting the identification information of the internet of things equipment, the first random number and the second random number by using the first secret key to generate a second negotiation root secret key, encrypting the identification information of the internet of things equipment, the result code and the second random number by using the second negotiation root secret key to generate a fourth check code, and sending the fourth check code when judging that the third check code is consistent with the fourth check code; and judging whether the third check code is consistent with the fourth check code, if so, storing a first negotiation root key aiming at the Internet of things equipment, determining the first negotiation root key as a second root key, and returning response information of the third check code is consistent with the fourth check code to the Internet of things equipment.
The processor is configured to receive a first connection request, which is sent by an internet of things device and requests to establish a secure channel, where the first connection request carries a derived key; judging whether the derived key is consistent with a derived key corresponding to the internet of things equipment stored by the derived key; and if the first response information contains the identification information of the port of the security channel to be established, distributing the port of the security channel to be established for the Internet of things equipment, and sending the first response information containing the identification information of the port of the security channel to be established to the Internet of things equipment.
The processor is configured to receive a second connection request for establishing a secure channel, where the second connection request carries a derived key and identification information of a target interface of the secure channel to be established; judging whether the derived key is consistent with a derived key corresponding to the internet of things equipment stored by the derived key; and if the identification information is consistent with the port of the Internet of things equipment, sending second response information for successfully establishing a secure channel with the port of the identification information to the Internet of things equipment, and receiving encrypted data to be transmitted sent by the Internet of things equipment through the secure channel.
The processor is configured to receive a first negotiation derived key, a sixth check code and updated times sent by the internet of things device, where the sixth check code is obtained by encrypting identification information of the internet of things device and the times information by using the first negotiation derived key; if the updated root key is judged to have been generated to derive the key for a number of times not exceeding a preset threshold, encrypting the identification information of the internet of things device and the updated number of times with the first negotiated derivative key to obtain a seventh check code, judging whether the sixth check code and the seventh check code are consistent, if so, generating a result code corresponding to the consistent check result, encrypting the identification information of the internet of things device, the second random number and the updated number of times with the stored root key to obtain a second negotiated derivative key, encrypting the identification information of the internet of things device, the result code and the updated number of times with the second negotiated derivative key to obtain an eighth check code, and sending the result code and the eighth check code to the internet of things device.
Example 10:
on the basis of the foregoing embodiments, an embodiment of the present invention further provides an electronic device 1200, as shown in fig. 11, including: the system comprises a processor 1201, a communication interface 1202, a memory 1203 and a communication bus 1204, wherein the processor 1201, the communication interface 1202 and the memory 1203 are communicated with each other through the communication bus 1204;
the memory 1203 has stored therein a computer program which, when executed by the processor 1201, causes the processor 1201 to perform the steps of:
Further, the processor is configured to encrypt the identification information of the processor and a locally generated first random number by using a preset first key to obtain a first check code, and send the first check code to the internet of things security platform; receiving a third check code, a result code and a second random number which are sent by an Internet of things security platform, wherein the Internet of things security platform decrypts the first check code by adopting a second key corresponding to the Internet of things equipment to obtain a first random number, encrypts identification information of the Internet of things equipment and the first random number by adopting the second key to obtain a second check code, judges whether the first check code and the second check code are consistent, and generates the second random number and the result code corresponding to the consistency of the check result if the first check code and the second check code are consistent; encrypting the identification information of the internet of things equipment, the first random number and the second random number by using the second key to generate a first negotiation root key, and encrypting the identification information of the internet of things equipment, a result code and the second random number by using the first negotiation root key to generate a third check code; judging whether the result code is a result code corresponding to a check result, if so, encrypting the identification information of the internet of things equipment, the first random number and the second random number by using the first secret key to generate a second negotiation root secret key, encrypting the identification information of the internet of things equipment, the result code and the second random number by using the second negotiation root secret key to generate a fourth check code, judging whether a third check code and the fourth check code are consistent, and if so, storing the second negotiation root secret key; sending the fourth check code to the Internet of things security platform; and receiving response information which is sent by the Internet of things security platform and is consistent with the third check code and the fourth check code, and determining the second negotiation root key as a second root key.
Further, the processor is configured to send a first connection request for requesting establishment of a secure channel to an internet of things security platform, where the first connection request carries a derived key; receiving first response information which is sent by an Internet of things security platform and contains identification information of a port of a security channel to be established, taking the port corresponding to the identification information as a target port for establishing the security channel, wherein the second response information is sent when the Internet of things security platform judges that the derived secret key is consistent with a derived secret key corresponding to the Internet of things equipment stored by the Internet of things security platform.
Further, the processor is configured to send a second connection request for establishing a secure channel to the internet of things secure platform, where the second connection request carries a derived secret key and identification information of a target port for which the secure channel is to be established; and receiving second response information which is sent by the Internet of things security platform and successfully establishes a security channel with the port of the identification information, wherein the second response information is sent when the Internet of things security platform judges that the derived secret key is consistent with a derived secret key corresponding to the Internet of things equipment stored in the Internet of things security platform.
Further, the processor is configured to encrypt the identification information of the processor, the second random number, and the updated times by using the stored root key to obtain a first negotiation derived key, and encrypt the identification information of the processor and the updated times by using the first negotiation derived key to obtain a sixth check code; sending the first negotiation derived key, the sixth check code and the updated times to an Internet of things security platform; and encrypting the identification information, the result code and the updated times of the internet of things equipment by using the first negotiation derived key to obtain a ninth check code, judging whether the ninth check code is consistent with the eighth check code, if so, determining the first negotiation derived key as a second derived key, wherein the eighth check code is obtained by encrypting the identification information, the second random number and the updated times of the internet of things equipment by using a stored root key by using the internet of things security platform to generate a second negotiation derived key, and encrypting the identification information, the result code and the updated times of the internet of things equipment by using the second negotiation derived key.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface 1202 is used for communication between the electronic apparatus and other apparatuses.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a central processing unit, a Network Processor (NP), and the like; but may also be a Digital instruction processor (DSP), an application specific integrated circuit, a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like.
on the basis of the foregoing embodiments, an embodiment of the present invention further provides an electronic device 1300, as shown in fig. 12, including: the system comprises a processor 1301, a communication interface 1302, a memory 1303 and a communication bus 1304, wherein the processor 1301, the communication interface 1302 and the memory 1303 complete mutual communication through the communication bus 1304;
the memory 1303 stores therein a computer program that, when executed by the processor 1301, causes the processor 1301 to perform the steps of:
Further, the processor is configured to receive a first check code sent by the internet of things device, decrypt the first check code by using a second key corresponding to the internet of things device, and obtain a first random number; encrypting the identification information of the Internet of things equipment and the first random number by adopting the second key to obtain a second check code, judging whether the first check code is consistent with the second check code, and if so, generating a second random number and a result code corresponding to the consistency of the check result; encrypting the identification information of the Internet of things equipment, the first random number and the second random number by adopting the second key to generate a first negotiation root key, encrypting the identification information of the Internet of things equipment, a result code and the second random number by adopting the first negotiation root key to generate a third check code, and sending the third check code to the Internet of things equipment; receiving a fourth check code sent by the internet of things equipment, wherein the fourth check code is a result code which is judged by the internet of things equipment whether the result code corresponds to a check result, if yes, encrypting the identification information of the internet of things equipment, the first random number and the second random number by using the first secret key to generate a second negotiation root secret key, encrypting the identification information of the internet of things equipment, the result code and the second random number by using the second negotiation root secret key to generate a fourth check code, and sending the fourth check code when the third check code and the fourth check code are judged to be consistent; and judging whether the third check code is consistent with the fourth check code, if so, storing a first negotiation root key aiming at the Internet of things equipment, determining the first negotiation root key as a second root key, and returning response information of the third check code is consistent with the fourth check code to the Internet of things equipment.
Further, the processor is configured to receive a fifth check code sent by the internet of things device, decrypt the fifth check code by using a second key corresponding to the internet of things device, obtain identification information of the internet of things device, and store the identification information; and sending prompt information of the Internet of things safety platform for successful registration of the Internet of things equipment to the Internet of things equipment.
Further, the processor is configured to receive a first connection request, which is sent by an internet of things device and requests to establish a secure channel, where the first connection request carries a derived key; judging whether the derived key is consistent with a derived key corresponding to the internet of things equipment stored by the derived key; and if the first response information contains the identification information of the port of the security channel to be established, distributing the port of the security channel to be established for the Internet of things equipment, and sending the first response information containing the identification information of the port of the security channel to be established to the Internet of things equipment.
Further, the processor is configured to receive a second connection request for establishing a secure channel, where the second connection request carries a derived key and identification information of a target interface of the secure channel to be established; judging whether the derived key is consistent with a derived key corresponding to the internet of things equipment stored by the derived key; and if the identification information is consistent with the port of the Internet of things equipment, sending second response information for successfully establishing a secure channel with the port of the identification information to the Internet of things equipment, and receiving encrypted data to be transmitted sent by the Internet of things equipment through the secure channel.
Further, the processor is configured to receive a first negotiation derived key, a sixth check code and updated times sent by the internet of things device, where the sixth check code is obtained by encrypting identification information of the internet of things device and the times information by using the first negotiation derived key; if the number of times that the updated root key is generated into the derived key does not exceed a preset threshold value, encrypting the identification information of the internet of things equipment and the updated number of times by using the first negotiation derived key to obtain a seventh check code, judging whether the sixth check code and the seventh check code are consistent, if so, generating a result code corresponding to a consistent check result, encrypting the identification information of the internet of things equipment, the second random number and the updated number of times by using the stored root key to obtain a second negotiation derived key, encrypting the identification information of the internet of things equipment, the result code and the updated number of times by using the second negotiation derived key to obtain an eighth check code, and sending the result code and the eighth check code to the internet of things equipment.
The communication interface 1302 is used for communication between the above-described electronic device and other devices.
on the basis of the foregoing embodiments, an embodiment of the present invention further provides a computer-readable storage medium, in which a computer program executable by an electronic device is stored, and when the program is run on the electronic device, the electronic device is caused to execute the following steps:
the memory having stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of:
Further, the processor is configured to send a first connection request for requesting establishment of a secure channel to an internet of things security platform, where the first connection request carries a derived key; receiving first response information which is sent by an Internet of things security platform and contains identification information of a port of a security channel to be established, taking the port corresponding to the identification information as a target port for establishing the security channel, wherein the second response information is sent when the Internet of things security platform judges that the derived key is consistent with a derived key corresponding to the Internet of things equipment stored by the Internet of things security platform.
Further, the processor is configured to send a second connection request for establishing a secure channel to the internet of things secure platform, where the second connection request carries a derived key and identification information of a target port of the secure channel to be established; and receiving second response information which is sent by the Internet of things security platform and successfully establishes a security channel with the port of the identification information, wherein the second response information is sent when the Internet of things security platform judges that the derived key is consistent with a derived key corresponding to the Internet of things equipment stored by the Internet of things security platform.
Further, the processor is configured to encrypt the identification information of the processor, the second random number, and the updated times by using the stored root key to obtain a first negotiation derived key, and encrypt the identification information of the processor and the updated times by using the first negotiation derived key to obtain a sixth check code; sending the first negotiation derivative key, the sixth check code and the updated times to an Internet of things security platform; and encrypting the identification information, the result code and the updated times of the internet of things equipment by using the first negotiation derived key to obtain a ninth check code, judging whether the ninth check code is consistent with the eighth check code, if so, determining the first negotiation derived key as a second derived key, wherein the eighth check code is obtained by encrypting the identification information, the second random number and the updated times of the internet of things equipment by using a stored root key by using the internet of things security platform to generate a second negotiation derived key, and encrypting the identification information, the result code and the updated times of the internet of things equipment by using the second negotiation derived key.
The computer readable storage medium may be any available medium or data storage device that can be accessed by a processor in an electronic device, including but not limited to magnetic memory such as floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc., optical memory such as CDs, DVDs, BDs, HVDs, etc., and semiconductor memory such as ROMs, EPROMs, EEPROMs, non-volatile memory (NAND FLASH), Solid State Disks (SSDs), etc.
Further, the processor is configured to receive a first check code sent by the internet of things device, decrypt the first check code by using a second key corresponding to the internet of things device, and obtain a first random number; encrypting the identification information of the Internet of things equipment and the first random number by using the second key to obtain a second check code, judging whether the first check code and the second check code are consistent, and if so, generating a second random number and a result code corresponding to the consistency of the check result; encrypting the identification information of the internet of things equipment, the first random number and the second random number by using the second key to generate a first negotiation root key, encrypting the identification information of the internet of things equipment, a result code and the second random number by using the first negotiation root key to generate a third check code, and sending the third check code to the internet of things equipment; receiving a fourth check code sent by the internet of things equipment, wherein the fourth check code is a result code corresponding to the consistency of the check result and judged by the internet of things equipment, if so, encrypting the identification information of the internet of things equipment, the first random number and the second random number by using the first secret key to generate a second negotiation root secret key, encrypting the identification information of the internet of things equipment, the result code and the second random number by using the second negotiation root secret key to generate a fourth check code, and sending the fourth check code when judging that the third check code is consistent with the fourth check code; and judging whether the third check code is consistent with the fourth check code, if so, storing a first negotiation root key for the Internet of things equipment, determining the first negotiation root key as a second root key, and returning response information of the third check code which is consistent with the fourth check code to the Internet of things equipment.
Further, the processor is configured to receive a first connection request that is sent by an internet of things device and requests for establishing a secure channel, where the first connection request carries a derived key; judging whether the derived key is consistent with a derived key corresponding to the internet of things equipment stored by the derived key; if the first response information is consistent with the second response information, the port of the safety channel to be established is distributed to the Internet of things equipment, and the first response information containing the identification information of the port of the safety channel to be established is sent to the Internet of things equipment.
Further, the processor is configured to receive a first negotiation derived key, a sixth check code and updated times sent by the internet of things device, where the sixth check code is obtained by encrypting identification information of the internet of things device and the times information by using the first negotiation derived key; if the updated root key is judged to have been generated to derive the key for a number of times not exceeding a preset threshold, encrypting the identification information of the internet of things device and the updated number of times with the first negotiated derivative key to obtain a seventh check code, judging whether the sixth check code and the seventh check code are consistent, if so, generating a result code corresponding to the consistent check result, encrypting the identification information of the internet of things device, the second random number and the updated number of times with the stored root key to obtain a second negotiated derivative key, encrypting the identification information of the internet of things device, the result code and the updated number of times with the second negotiated derivative key to obtain an eighth check code, and sending the result code and the eighth check code to the internet of things device.
The computer readable storage medium may be any available media or data storage device that can be accessed by a processor in an electronic device, including but not limited to magnetic memory such as floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc., optical memory such as CDs, DVDs, BDs, HVDs, etc., and semiconductor memory such as ROMs, EPROMs, EEPROMs, non-volatile memory (NAND FLASH), Solid State Disks (SSDs), etc.
For system/apparatus embodiments, the description is relatively simple because it is substantially similar to the method embodiments, and reference may be made to some description of the method embodiments for relevant points.
It should be noted that, in this document, relational terms such as first and second, and the like are used solely to distinguish one entity or operation from another entity or operation without necessarily requiring or implying any actual such relationship or order between such entities or operations.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely application embodiment, or an embodiment combining application and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all changes and modifications that fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.
1. The data transmission method of the Internet of things is applied to equipment of the Internet of things, and comprises the following steps:
2. The method of claim 1, wherein negotiating with the internet of things security platform to obtain the second root key comprises:
Encrypting the identification information of the mobile terminal and a locally generated first random number by adopting a preset first secret key to obtain a first check code, and sending the first check code to the Internet of things security platform;
receiving a third check code, a result code and a second random number which are sent by an Internet of things security platform, wherein the Internet of things security platform decrypts the first check code by adopting a second secret key corresponding to the Internet of things equipment to obtain a first random number, encrypts identification information of the Internet of things equipment and the first random number by adopting the second secret key to obtain a second check code, judges whether the first check code and the second check code are consistent, and generates the second random number and the result code corresponding to the consistency of the check result if the first check code and the second check code are consistent; encrypting the identification information of the Internet of things equipment, the first random number and the second random number by adopting the second key to generate a first negotiation root key, and encrypting the identification information of the Internet of things equipment, a result code and the second random number by adopting the first negotiation root key to generate a third check code;
and receiving response information that the third check code and the fourth check code are consistent and sent by the Internet of things security platform, and determining the second negotiation root key as a second root key.
3. The method of claim 1, wherein before the internet of things device sends the encrypted data to be transmitted to the internet of things security platform, the method further comprises:
the method comprises the steps that the Internet of things equipment sends a first connection request for establishing a secure channel to an Internet of things secure platform, wherein the first connection request carries a derived secret key;
receiving first response information which is sent by an Internet of things security platform and contains identification information of a port of a security channel to be established, and taking the port corresponding to the identification information as a target port for establishing the security channel, wherein the first response information is sent when the Internet of things security platform judges that the derived key is consistent with a derived key corresponding to the Internet of things equipment stored by the Internet of things security platform;
before the internet of things equipment sends the encrypted data to be transmitted to the internet of things security platform, the method further comprises the following steps:
the method comprises the steps that the Internet of things equipment sends a second connection request for establishing a safety channel to an Internet of things safety platform, wherein the second connection request carries a derived secret key and identification information of a target port of the safety channel to be established;
And receiving second response information which is sent by the Internet of things security platform and successfully establishes a security channel with the port of the identification information, wherein the second response information is sent when the Internet of things security platform judges that the derived key is consistent with a derived key corresponding to the Internet of things equipment stored by the Internet of things security platform.
4. The method of claim 1, wherein sending the updated number of times to an internet of things security platform comprises:
the Internet of things equipment encrypts the identification information, the second random number and the updated times of the Internet of things equipment by using the stored root key to obtain a first negotiation derivative key, and encrypts the identification information and the updated times of the Internet of things equipment by using the first negotiation derivative key to obtain a sixth check code; sending the first negotiation derivative key, the sixth check code and the updated times to an Internet of things security platform;
generating a second derivative key based on the first root key, the identification information of the first root key, the stored second random number, and the updated number of times includes:
and encrypting the identification information, the result code and the updated times of the internet of things equipment by using the first negotiation derived key to obtain a ninth check code, judging whether the ninth check code is consistent with the eighth check code, if so, determining the first negotiation derived key as a second derived key, wherein the eighth check code is obtained by encrypting the identification information, the second random number and the updated times of the internet of things equipment by using a stored root key by using the internet of things security platform to generate a second negotiation derived key, and encrypting the identification information, the result code and the updated times of the internet of things equipment by using the second negotiation derived key.
5. The data transmission method of the Internet of things is applied to a security platform of the Internet of things, and comprises the following steps:
6. The method of claim 5, wherein negotiating to obtain the second root key comprises:
receiving a first check code sent by the Internet of things equipment, and decrypting the first check code by adopting a second key corresponding to the Internet of things equipment to obtain a first random number;
encrypting the identification information of the Internet of things equipment and the first random number by adopting the second key to obtain a second check code, judging whether the first check code is consistent with the second check code, and if so, generating a second random number and a result code corresponding to the consistency of the check result;
encrypting the identification information of the Internet of things equipment, the first random number and the second random number by adopting the second key to generate a first negotiation root key, encrypting the identification information of the Internet of things equipment, a result code and the second random number by adopting the first negotiation root key to generate a third check code, and sending the third check code to the Internet of things equipment;
receiving a fourth check code sent by the internet of things equipment, wherein the fourth check code is a result code corresponding to the consistency of the check result and judged by the internet of things equipment, if so, encrypting the identification information of the internet of things equipment, the first random number and the second random number by using a first secret key to generate a second negotiation root secret key, encrypting the identification information of the internet of things equipment, the result code and the second random number by using the second negotiation root secret key to generate a fourth check code, and sending the fourth check code when judging that the third check code is consistent with the fourth check code;
And judging whether the third check code is consistent with the fourth check code, if so, storing a first negotiation root key for the Internet of things equipment, determining the first negotiation root key as a second root key, and returning response information of the third check code which is consistent with the fourth check code to the Internet of things equipment.
7. The method of claim 5, wherein before receiving the data to be transmitted sent by the internet of things device and encrypted by using the derived key, the method further comprises:
receiving a first connection request which is sent by Internet of things equipment and requests for establishing a secure channel, wherein the first connection request carries a derived secret key;
judging whether the derived key is consistent with a derived key corresponding to the internet of things equipment stored by the derived key;
if the port of the security channel to be established is consistent with the port of the security channel to be established, the port of the security channel to be established is distributed to the Internet of things equipment, and first response information containing identification information of the port of the security channel to be established is sent to the Internet of things equipment;
before receiving the to-be-transmitted data encrypted by the derived key and sent by the internet of things device, the method further includes:
receiving a second connection request for establishing a secure channel sent by the internet of things equipment, wherein the second connection request carries a derived key and identification information of a target interface of the secure channel to be established;
and if the identification information is consistent with the port identification information, sending second response information for successfully establishing a secure channel with the port identification information to the Internet of things equipment, and receiving encrypted data to be transmitted sent by the Internet of things equipment through the secure channel.
8. The method of claim 5, wherein the receiving the updated number of times the derivative key has been generated from the first root key sent by the IOT device comprises:
receiving a first negotiation derivative key, a sixth check code and updated times sent by the internet of things equipment, wherein the sixth check code is obtained by encrypting identification information of the internet of things equipment and the times information by adopting the first negotiation derivative key;
if not, sending second prompt information that the number of times that the first root key is generated into the derived key does not exceed a preset threshold value to the internet of things device comprises the following steps:
if the updated root key is judged to have been generated to derive the key for a number of times not exceeding a preset threshold, encrypting the identification information of the internet of things device and the updated number of times with the first negotiated derivative key to obtain a seventh check code, judging whether the sixth check code and the seventh check code are consistent, if so, generating a result code corresponding to the consistent check result, encrypting the identification information of the internet of things device, the second random number and the updated number of times with the stored root key to obtain a second negotiated derivative key, encrypting the identification information of the internet of things device, the result code and the updated number of times with the second negotiated derivative key to obtain an eighth check code, and sending the result code and the eighth check code to the internet of things device.
9. The utility model provides a thing networking data transmission device which characterized in that is applied to thing networking equipment, the device includes:
the obtaining module is used for negotiating with the Internet of things security platform to obtain a second root key if first prompt information that the updated times sent by the Internet of things security platform exceed a preset threshold value is received, negotiating with the Internet of things security platform to obtain a first derived key based on the second root key, encrypting data to be transmitted by adopting the first derived key and sending the encrypted data to the Internet of things security platform; and if second prompt information that the updated times sent by the Internet of things security platform do not exceed a preset threshold value is received, generating a second derived key based on the first root key, the identification information of the first derived key, the stored second random number and the updated times, encrypting the data to be transmitted by adopting the second derived key, and sending the encrypted data to the Internet of things security platform.
10. The utility model provides a thing networking data transmission device which characterized in that is applied to thing networking security platform, the device includes:
a prompt module, configured to send, to the internet of things device, first prompt information that a number of times that a first root key has been generated into a derived key exceeds a preset threshold, so that the internet of things device negotiates with the internet of things security platform to obtain a second root key, negotiates with the internet of things security platform to obtain a first derived key based on the second root key, and receives data to be transmitted, sent by the internet of things device, that is encrypted with the first derived key; if not, second prompt information that the number of times that the first root key is generated into the derived key does not exceed a preset threshold is sent to the internet of things device, so that the internet of things device generates a second derived key based on the first root key, the identification information of the device, the stored second random number and the updated number, and receives data to be transmitted, which are sent by the internet of things device and encrypted by the second derived key.
11. An electronic device, comprising a memory and a processor:
12. An electronic device, characterized in that the electronic device comprises a memory and a processor:
the processor is used for reading the program in the memory and executing the following processes: receiving the updated times of generating a derived key according to the first root key sent by the Internet of things equipment; judging whether the updated times exceed a preset threshold value; if the root key is the to-be-transmitted data, sending first prompt information that the number of times that the first root key is generated into the derived key exceeds a preset threshold value to the Internet of things equipment, enabling the Internet of things equipment and an Internet of things security platform to negotiate to obtain a second root key, negotiating with the Internet of things security platform to obtain a first derived key based on the second root key, and receiving the to-be-transmitted data which is sent by the Internet of things equipment and encrypted by the first derived key; if not, second prompt information that the number of times that the first root key is generated into the derived key does not exceed a preset threshold is sent to the internet of things device, so that the internet of things device generates a second derived key based on the first root key, the identification information of the device, the stored second random number and the updated number, and receives data to be transmitted, which are sent by the internet of things device and encrypted by the second derived key.
13. An electronic device, comprising: the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
the memory has stored therein a computer program which, when executed by the processor, causes the processor to carry out the steps of the method of any one of claims 1-4.
the memory has stored therein a computer program which, when executed by the processor, causes the processor to carry out the steps of the method of any one of claims 5 to 8.
15. A computer-readable storage medium, characterized in that it stores a computer program executable by an electronic device, which program, when run on the electronic device, causes the electronic device to carry out the steps of the method according to any one of claims 1-4.
16. A computer-readable storage medium, characterized in that it stores a computer program executable by an electronic device, which program, when run on the electronic device, causes the electronic device to carry out the steps of the method of any of claims 5-8.
17. An internet-of-things data transmission system, characterized in that the system comprises an electronic device applied to an internet-of-things device according to claim 11 and an electronic device applied to an internet-of-things security platform according to claim 12.
CN201811564415.6A 2018-12-20 2018-12-20 Internet of things data transmission method, device and system, electronic equipment and medium Active CN111355684B (en)
CN201811564415.6A CN111355684B (en) 2018-12-20 2018-12-20 Internet of things data transmission method, device and system, electronic equipment and medium
CN201811564415.6A Active CN111355684B (en) 2018-12-20 2018-12-20 Internet of things data transmission method, device and system, electronic equipment and medium
CN112291196A (en) * 2020-09-28 2021-01-29 北京芯盾集团有限公司 End-to-end encryption method and system suitable for instant messaging
CN112468295A (en) * 2020-11-26 2021-03-09 武汉嘟嘟有位科技有限公司 Internet of things communication encryption method and system based on parking lock equipment and computer equipment
CN106788960A (en) * 2016-12-01 2017-05-31 北京信安世纪科技有限公司 A kind of method and device of key agreement
CN108449756A (en) * 2018-06-29 2018-08-24 北京邮电大学 A kind of system of network cryptographic key updating, method and device
CN109005028A (en) * 2018-11-02 2018-12-14 美的集团股份有限公司 Cryptographic key negotiation method, Cloud Server, equipment, storage medium and system
JP2014175970A (en) * 2013-03-12 2014-09-22 Fuji Xerox Co Ltd Information distribution system, information processing device, and program
CN108632231A (en) * 2017-03-24 2018-10-09 中移(杭州)信息技术有限公司 A kind of internet of things equipment, Internet of Things authentication platform, authentication method and system
CN107948183B (en) * 2017-12-06 2021-02-02 深圳数字电视国家工程实验室股份有限公司 Key distribution method and system suitable for Internet of things
CN108616528B (en) * 2018-04-23 2020-10-23 浪潮集团有限公司 Cloud storage method and system
CN108965302B (en) * 2018-07-24 2021-10-15 苏州科达科技股份有限公司 Media data transmission system, method, device and storage medium
CN110324287B (en) 2020-10-23 Access authentication method, device and server
WO2019153701A1 (en) 2019-08-15 Method and apparatus for obtaining device identification
CN111865872B (en) 2021-08-27 Method and equipment for realizing terminal security policy in network slice
WO2019019887A1 (en) 2019-01-31 Server authentication method, apparatus and system for terminal access, server and computer readable storage medium
WO2018023936A1 (en) 2018-02-08 Method and device for implementing sharing of wireless access point
CN110708164B (en) 2022-03-04 Control method and device for Internet of things equipment, storage medium and electronic device
CN111355684B (en) 2022-06-28 Internet of things data transmission method, device and system, electronic equipment and medium
EP3940989A1 (en) 2022-01-19 Communication method and communication device
CN110730447B (en) 2022-02-22 User identity protection method, user terminal and core network
CN104243452B (en) 2018-02-02 A kind of cloud computing access control method and system
CN110621016A (en) 2019-12-27 User identity protection method, user terminal and base station
CN105187369A (en) 2015-12-23 Data access method and data access device
US10728045B2 (en) 2020-07-28 Authentication device, authentication system, authentication method, and program
CN106878233B (en) 2020-11-10 Method for reading security data, security server, terminal and system
US9049012B2 (en) 2015-06-02 Secured cryptographic communication system
CN114095277A (en) 2022-02-25 Power distribution network secure communication method, secure access device and readable storage medium
CN114223233A (en) 2022-03-22 Data security for network slice management
CN111093169A (en) 2020-05-01 Communication establishing method and device
CN113132320A (en) 2021-07-16 Encryption transmission method and device and electronic equipment
CN107948243B (en) 2020-10-16 Internet of things communication method, terminal and system
CN107005528B (en) 2020-10-27 Wireless device hardware security system for wireless spectrum usage
CN111131300B (en) 2022-06-17 Communication method, terminal and server
CN112400335B (en) 2022-09-09 Method and computing device for performing data integrity protection
CN114465825B (en) 2022-07-26 Online monitoring system, method and device for power transmission line and master station
CN112187462B (en) 2022-04-29 Data processing method and device, electronic equipment and computer readable medium