A kind of smart home safe communication system and communication means
Technical field
The present invention relates to a kind of smart home field of telecommunications, specifically, it is logical safely to relate to a kind of smart home
Letter system and communication means.
Background technique
With the fast development of intelligence, the network communication of mobile terminal device and answering extensively for smart home device
With demand of the people to smart home device telecommunication gradually increases.Currently, smart home device in the market, such as intelligence
The equipment such as energy camera, intelligent door lock, intelligent switch, it is already possible to pass through control of intelligent terminal, including smart phone, plate electricity
Brain, PC etc. carry out telecommunication, and greatly facilitate control of the user for smart home device.For example, when user returns
Family before can the certain intelligent switch of pre-cooling, so that smart home device is entered operating mode in advance, when so as to save
Between, it improves efficiency;Once forgetting band key, so that it may control intelligent door lock by control of intelligent terminal;When user stays out,
Situation in family can be monitored by smart home device, if there is unusual condition, so that it may long-range by smart home device
Relevant information is sent to the control of intelligent terminal of user, user is facilitated to handle unusual condition etc. in time.
However, the telecommunication of smart home device, while the life to us offers convenience, there is also greatly
Security risk.Perhaps criminal can intercept and capture and distort Content of Communication or illegal during data are transmitted to hacker
Access and malice control smart home device, property safety or personal safety to user bring threat.
The method carried out telecommunication between existing control equipment and smart home device is how improved, intelligent family is improved
The safety for occupying equipment telecommunication is current urgent problem.
In order to solve the above problems, people are seeking always a kind of ideal technical solution.
Summary of the invention
The purpose of the present invention is in view of the deficiencies of the prior art, so that a kind of smart home safe communication system is provided,
The present invention also provides the communication means of the smart home telecommunication system, this method, which has, to be easily achieved and safe and reliable
Advantage.
To achieve the goals above, the technical scheme adopted by the invention is that: a kind of smart home safe communication system, packet
Information sender, receiving party and Key Management server are included, the information sender is equipped with security module I, the letter
Breath recipient is equipped with security module II;
The information sender generates public private key pair I by the security module I, and by the public key of the public private key pair I
Information is stored in the Key Management server;The receiving party generates public private key pair by the security module II
II, and the public key information of the public private key pair II is stored in the Key Management server;
In the security module I and the Key Management server without session key in the state of, the information
Sender generates session key by the security module I, and the session key is believed with the public key of the public private key pair I respectively
The public key information of breath and the public private key pair II are encrypted, and session code key ciphertext corresponding with the public private key pair I is obtained
With session key ciphertext corresponding with the public private key pair II, and will session code key corresponding with the public private key pair I it is close
Text and session key ciphertext corresponding with the public private key pair II are stored in the Key Management server;The information hair
The side of sending is using the session key coded communication information and is sent to the receiving party;
There is no the session key in the security module I, and has the session in the Key Management server
In the state of key, the information sender obtains corresponding with the public private key pair I from the Key Management server
Session code key ciphertext, and with the private key information of the public private key pair I to the session key obtained from the Key Management server
Ciphertext is decrypted, and obtains the session key;The information sender is concurrent using the session key coded communication information
Give the receiving party;
In the state of having the session key in the security module I, the information sender directly uses described
Session key coded communication information is simultaneously sent to the receiving party;
In the state that the security module II does not have the session key, the receiving party is from the key management
Obtain corresponding with public private key pair II session key ciphertext in server, and with the private key information of the public private key pair II
The session key ciphertext obtained from the Key Management server is decrypted, the session key is obtained;The information connects
Debit decrypts the ciphertext of the communication information using the session key;
In the state that the security module II has the session key, the receiving party directly uses the meeting
Words key decrypts the ciphertext of the communication information.
It further include application server, the information sender and the receiving party answer with described respectively based on above-mentioned
It is connected with server communication.
Based on above-mentioned, the information sender is control equipment, and the receiving party is smart home device.
Based on above-mentioned, the information sender is smart home device, and the receiving party is control equipment.
A kind of communication means of smart home safe communication system, including registration the preparation stage, for the first time stage of communication and after
Continuous stage of communication;
Register the preparation stage
The information sender is registered in the Key Management server;The receiving party is in the key
It is registered in management server;
Stage of communication for the first time
The information sender generates session key by the security module I, the session key is used respectively described
The public key information of the public key information of public private key pair I and the public private key pair II are encrypted, and are obtained opposite with the public private key pair I
The session code key ciphertext and session key ciphertext corresponding with the public private key pair II answered, and will be with the public private key pair I phase
Corresponding session code key ciphertext and session key ciphertext corresponding with the public private key pair II are stored in the key management clothes
It is engaged in device;
The information sender is sent to the receiving party after encrypting the communication information with the session key;
The receiving party obtains session corresponding with the public private key pair II from the Key Management server
Key ciphertext, with the private key information of the public private key pair II to from the session key ciphertext that the Key Management server obtains into
Row decryption, is obtained the session key, and decrypted the ciphertext of the communication information using the session key, obtains the communication
Information, completion communicate for the first time;
The subsequent communications stage
The information sender is using the session key coded communication information and is sent to the receiving party, described
Receiving party decrypts the ciphertext of the communication information using the session key.
Based on above-mentioned, in the subsequent communications stage, before sending the communication information, the information sender inquires the safety
Whether the session key is had in module I, if not having, the information sender is obtained from the Key Management server
Session key ciphertext corresponding with the public private key pair I, with the public key information of the public private key pair I to from the key management
The session key ciphertext that server obtains is decrypted, and obtains the session key;The information sender uses the session
Key encrypted communication information is simultaneously sent to the receiving party.
Based on above-mentioned, in the subsequent communications stage, after the ciphertext for receiving the communication information, the receiving party inquires institute
It states and whether has the session key in security module II, if not having, the receiving party is from the cipher key management services
Corresponding with public private key pair II session key ciphertext is obtained in device, with the private key information of the public private key pair II to from institute
The session key ciphertext for stating Key Management server acquisition is decrypted, and obtains the session key, and close using the session
Key decrypts the ciphertext of the communication information, obtains the communication information.
Based on above-mentioned, registration preparation stage specific steps are as follows:
The information sender is registered in the Key Management server
After the information sender generates public private key pair I by the security module I, by the private key of the public private key pair I
Information is stored in the security module I, and the public key information of the public private key pair I is sent to the Key Management server
Middle storage;
The receiving party registers in the Key Management server
After the receiving party generates public private key pair II by the security module II, by the private of the public private key pair II
Key information is stored in the security module II, and the public key information of the public private key pair II is sent to the key management and is taken
It is stored in business device.
It further include application server, the information sender encrypts the communication information session key based on above-mentioned
After be sent to the application server, the receiving party is sent to after the application server processes.
The present invention has substantive distinguishing features outstanding and significant progress compared with the prior art, and specifically, the present invention will
Control equipment and smart home device registered in Key Management server respectively, and by control equipment public key and use this
It the public key of session key or smart home device after public key encryption and is stored in the conversation key safety of the public key encryption
In Key Management server;Control equipment and smart home device are provided with security module, using session key to transmission data
Encryption and decryption processing is carried out, so that hacker can not obtain data clear text, ensure that the peace of control equipment and smart home device transmission
Entirely, to efficiently solve the problems, such as that prior art safety is insufficient.
Detailed description of the invention
Fig. 1 is the structural schematic diagram of the remote communication system of smart home safety in the embodiment of the present invention 1.
Fig. 2 is the communication flow diagram of the remote communication system of smart home safety in the embodiment of the present invention 1.
Fig. 3 is the structural schematic diagram of the remote communication system of smart home safety in the embodiment of the present invention 2.
Fig. 4 is the communication flow diagram of the remote communication system of smart home safety in the embodiment of the present invention 2.
Specific embodiment
Below by specific embodiment, technical scheme of the present invention will be described in further detail.
Embodiment 1
As shown in Figure 1, a kind of smart home safe communication system, including at least one control equipment, at least one intelligence
Home equipment and Key Management server, the control equipment includes tablet computer, smart phone and PC;The intelligence
Home equipment include camera, intelligent door lock, refrigerator, TV, washing machine, air purifier, robot, intelligent switch/panel,
Intelligent socket/insert row, intelligent purpose remote controller, intelligent lighting, intelligent door and window, air-conditioning, intelligent kitchen tools, water heater, wireless access
Equipment and routing device;The Key Management server is adapted to kinds of platform, including Windows, Linux, Android and insertion
Formula platform.
In practical applications, the control equipment and the smart home device all have a unique identifier, when
When user needs to operate some smart home device or some control equipment, just identified by this identifier,
The control equipment and the smart home device are just distinguished by identifier in communication process later.
The control equipment, the smart home device and the Key Management server have network communication mould respectively
Block, the control equipment, the smart home device and the Key Management server are connected with each other by network.Preferably,
The network communication module is wireless communication module or wire communication module.
The control equipment both can may be receiving party for information sender, and the smart home device both may be used
Think that information sender may be receiving party;It should be noted that when the control equipment is information sender, institute
It states smart home device and is only receiving party;Similarly, when the smart home device is information sender, the control
Equipment is only receiving party.
Extrapolation or it is embedded with security module I in the information sender, the upper extrapolation of the receiving party or is embedded with peace
Full module ii;The security module I and security module II is Special safety chip;What the Special safety chip can provide
Cryptographic service includes: digital signature, encryption and decryption, certificate storage;The cryptographic algorithm that the Special safety chip is supported include: SM1,
SM2, SM3, SM4 national secret algorithm and international cryptography algorithm 3DES, AES, RSA and SHA-1, SHA-256;The Special safety chip
The bus interface of support includes: USB, SD and SPI.
The information sender generates public private key pair I by the security module I, and by the public key information of public private key pair I
PK1 is stored in the Key Management server;The receiving party generates public private key pair II by the security module II,
And the public key information PK2 of public private key pair II is stored in the Key Management server.
In the security module I and the Key Management server without session key in the state of, the information
Sender generates session key by the security module I, and the session key is believed with the public key of the public private key pair I respectively
The public key information of breath and the public private key pair II are encrypted, and session code key ciphertext corresponding with the public private key pair I is obtained
With session key ciphertext corresponding with the public private key pair II, and will session code key corresponding with the public private key pair I it is close
Text and session key ciphertext corresponding with the public private key pair II are stored in the Key Management server;The information hair
The side of sending is using the session key coded communication information and is sent to the receiving party;
There is no the session key in the security module I, and has the session in the Key Management server
In the state of key, the information sender obtains corresponding with the public private key pair I from the Key Management server
Session code key ciphertext, and with the private key information of the public private key pair I to the session key obtained from the Key Management server
Ciphertext is decrypted, and obtains the session key;The information sender is concurrent using the session key coded communication information
Give the receiving party;
In the state of having the session key in the security module I, the information sender directly uses described
Session key coded communication information is simultaneously sent to the receiving party;
In the state that the security module II does not have the session key, the receiving party is from the key management
Obtain corresponding with public private key pair II session key ciphertext in server, and with the private key information of the public private key pair II
The session key ciphertext obtained from the Key Management server is decrypted, the session key is obtained;The information connects
Debit decrypts the ciphertext of the communication information using the session key;
In the state that the security module II has the session key, the receiving party directly uses the meeting
Words key decrypts the ciphertext of the communication information.
Due in communication process, the information sender and the receiving party always using identical session key come
Coded communication information, thus the information sender and the receiving party only need to obtain a session key can be always
Communication, shortens the air time of the information sender and the receiving party, improves communication efficiency;In order to further
The safety for guaranteeing communication process, the communication information caused by avoiding session key from revealing are stolen, can periodically be sent by information
Side regenerates session key, the update for the key that conversates.
To guarantee that the information sender and the receiving party use identical session key, the information hair
The side of sending can send the version number of the session key simultaneously when sending and encrypting the communication information, for the receiving party
Verification.
Specifically, as shown in Fig. 2, a kind of communication means of smart home safe communication system, it is characterised in that: including note
Volume preparation stage, for the first time stage of communication and the subsequent communications stage;
Register the preparation stage
The information sender is registered in the Key Management server: the information sender passes through the peace
After full module I generates public private key pair I, the private key information SK1 of the public private key pair I is stored in the security module I, and will
The public key information PK1 of the public private key pair I, which is sent in the Key Management server, to be stored;
The receiving party registers in the Key Management server: the receiving party passes through the peace
After full module ii generates public private key pair II, the private key information SK2 of the public private key pair II is stored in the security module II,
And the public key information PK2 of the public private key pair II is sent in the Key Management server and is stored;
Stage of communication for the first time
The information sender generates session key by the security module I, respectively with the public key of the public private key pair I
The public key information of information and the public private key pair II encrypt the session key, obtain meeting corresponding with the public private key pair I
Code key ciphertext and session key ciphertext corresponding with the public private key pair II are talked about, and will be corresponding with the public private key pair I
Session key ciphertext and session key ciphertext corresponding with the public private key pair II are stored in the Key Management server;
The information sender is sent to the receiving party after encrypting the communication information with the session key;
The receiving party obtains session corresponding with the public private key pair II from the Key Management server
Key ciphertext, with the private key information of the public private key pair II to from the session key ciphertext that the Key Management server obtains into
Row decryption, is obtained the session key, and decrypted the ciphertext of the communication information using the session key, obtains the communication
Information, completion communicate for the first time;
The subsequent communications stage
The information sender is using the session key coded communication information and is sent to the receiving party, described
Receiving party decrypts the ciphertext of the communication information using the session key.
It should be noted that in the subsequent communications stage, it is possible to will appear the security module I or the security module
The situation that session key in II is removed;
If the session key in the security module I is removed, the information sender needs are regenerated at this time
New session key will be stored in the key after the new session key public key information PK2 of public private key pair II encryption
In management server;And the receiving party needs to obtain the close of the new session key from the Key Management server
Text is decrypted the ciphertext of the new session key using the private key information SK2 of the public private key pair II, it is close to obtain the new session
Key, whole process are comparatively laborious.
Therefore in order to be further simplified communication process, in the subsequent communications stage, the information sender sends the communication information
Before, first inquire in the security module I whether have the session key, if so, the session key encryption that then be used directly
The communication information is simultaneously sent to the receiving party;If no, the information sender is from the cipher key management services
Corresponding with public private key pair I session key ciphertext is obtained in device, with the private key information of the public private key pair I to from described
The session key ciphertext that Key Management server obtains is decrypted, and obtains the session key;The information sender uses
The session key encrypts the communication information and is sent to the receiving party.
If the session key in the security module II is removed, after receiving the communication information, receiving party's inquiry
Whether there is session key in the security module II, if not having, the receiving party is from the Key Management server
It is middle to obtain corresponding with public private key pair II session key ciphertext, with the private key information of the public private key pair II to from described
The session key ciphertext that Key Management server obtains is decrypted, and obtains the session key;The receiving party uses
The session key decrypts the ciphertext of the communication information, obtains the communication information.
Embodiment 2
As shown in Figure 3 and Figure 4, it is in place of the present embodiment and the difference of embodiment 1: further includes application server, it is described
Information sender and the receiving party connect with the application server communication respectively.
Specifically, the information sender is sent to the application server after encrypting the communication information with session key,
The receiving party is sent to after the application server processes.
Finally it should be noted that: the above embodiments are merely illustrative of the technical scheme of the present invention and are not intended to be limiting thereof;To the greatest extent
The present invention is described in detail with reference to preferred embodiments for pipe, it should be understood by those ordinary skilled in the art that: still
It can modify to a specific embodiment of the invention or some technical features can be equivalently replaced;Without departing from this hair
The spirit of bright technical solution should all cover within the scope of the technical scheme claimed by the invention.