CN107466466B - Secure communication method, controlled device and equipment, remote control device and equipment - Google Patents

Secure communication method, controlled device and equipment, remote control device and equipment Download PDF

Info

Publication number
CN107466466B
CN107466466B CN201680010430.9A CN201680010430A CN107466466B CN 107466466 B CN107466466 B CN 107466466B CN 201680010430 A CN201680010430 A CN 201680010430A CN 107466466 B CN107466466 B CN 107466466B
Authority
CN
China
Prior art keywords
variable
remote control
message
control device
equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201680010430.9A
Other languages
Chinese (zh)
Other versions
CN107466466A (en
Inventor
陈少伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nationz Technologies Inc
Original Assignee
Nationz Technologies Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nationz Technologies Inc filed Critical Nationz Technologies Inc
Publication of CN107466466A publication Critical patent/CN107466466A/en
Application granted granted Critical
Publication of CN107466466B publication Critical patent/CN107466466B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic

Abstract

The invention discloses a safe communication method, a controlled device and equipment, a remote control device and equipment. By the method, the invention can prevent the controlled equipment from receiving the received message and solve the problem that the controlled equipment is easy to be attacked by replay.

Description

Secure communication method, controlled device and equipment, remote control device and equipment
Technical Field
The present invention relates to the field of information security, and in particular, to a secure communication method, a controlled device and apparatus, a remote control device and apparatus.
Background
When the remote control device communicates with the controlled device, the remote control device generally transmits radio frequency signals such as bluetooth. At this point, the message interval sent by the remote control device is very short, typically 7 ms. The controlled device needs to identify the validity of the message within 7ms, and can not be realized through traditional three-way handshaking and other complex protocols; and because of the openness of the radio frequency protocol, the controlled device can receive information sent by any radio frequency device in the frequency band of the controlled device in a transmission mode similar to broadcasting instead of point-to-point transmission. Therefore, if the controlled device cannot authenticate the validity of the remote control device communicating with the controlled device, the validity of the received message cannot be judged; further, communicated messages are easily intercepted and thus replay attacked.
One existing solution is to use a frequency hopping sequence to improve the communication security level, where the frequencies of each communication are different, and to continuously change the communication frequency through an internal frequency hopping sequence preset in the device to perform security protection. However, the frequency hopping sequence is easy to be acquired by a third party, so that the third party can easily find the communication frequency of the frequency hopping sequence, thereby carrying out malicious message attack and acquiring the control right of the controlled equipment.
Disclosure of Invention
The invention mainly solves the technical problem of providing a secure communication method, a controlled device and equipment, a remote control device and equipment, and can solve the problem that the controlled equipment in the prior art is easy to attack by malicious messages.
In order to solve the technical problems, the invention adopts a technical scheme that: there is provided a secure communication method including:
the method comprises the steps that controlled equipment receives a message sent by remote control equipment, wherein the message at least comprises identity information and a first variable of the remote control equipment;
the controlled equipment verifies the identity information of the remote control equipment and judges whether a first variable and a second variable stored in the controlled equipment meet a first preset relationship or not, the first variable and the second variable meet a second preset relationship in an initial state before the message is sent, and the first variable should be changed to meet the first preset relationship every time the remote control equipment sends the message;
and when the verification is passed and the first preset relation is met, judging that the message is valid, otherwise, judging that the message is invalid.
The first variable and the second variable are count values, the first preset relationship means that the first variable is larger than the second variable, and the second preset relationship means that the first variable is equal to the second variable.
Wherein, when the verification passes and the first preset relationship is satisfied, the method further comprises:
and the controlled equipment replaces the second variable saved by the controlled equipment with the first variable.
Wherein, the message is request binding information, and after the message is determined to be valid, the method includes:
the controlled equipment stores the identity information of the remote control equipment so as to bind the remote control equipment;
and storing the grade information representing the priority level of the remote control equipment.
Wherein, defining the remote control device as a first remote control device, and after storing the level information representing the priority level of the remote control device, the method comprises:
the controlled equipment receives connection request information sent by second remote control equipment, the identity information and the grade information of the second remote control equipment are stored in the controlled equipment, and the connection request information comprises the identity information of the remote control equipment;
judging the priority level of the first remote control device and the priority level of the second remote control device according to the grade information of the first remote control device and the second remote control device;
and when the priority level of the second remote control equipment is higher than that of the first remote control equipment, receiving the connection request of the second remote control equipment, preferentially processing the message of the second remote control equipment or disconnecting the first remote control equipment, and otherwise, suspending processing or discarding the connection request information of the second remote control equipment.
The identity information of the remote control equipment comprises the ID of the remote control equipment, a private key signature value of a first variable and a public key certificate of the remote control equipment; the verifying the identity information of the remote control device by the controlled device specifically comprises:
acquiring a public key of the remote control equipment from a public key certificate of the remote control equipment;
and verifying the validity of the private key signature value by using the public key.
Wherein, the message is operation information, and before the controlled device receives the message sent by the remote control device, the method comprises the following steps:
the controlled equipment receives connection request information sent by remote control equipment, wherein the connection request information comprises identity information of the remote control equipment, and the identity information of the remote control equipment comprises a remote control equipment ID and a private key signature value of the remote control equipment ID; the verifying, by the controlled device, the identity information of the remote control device specifically includes:
verifying the validity of the private key signature value by using a public key prestored by the controlled equipment;
if the verification is passed, the connection request information is judged to be valid, otherwise, the connection request information is judged to be invalid.
Wherein, after determining that the connection request message is valid, the method includes: the controlled equipment and the remote control equipment negotiate to obtain a session key;
the operation information is encrypted through a cryptographic algorithm, the session key is used for encrypting an encryption key adopted by the cryptographic algorithm, and the session key is obtained through renegotiation during each connection.
Wherein the cryptographic algorithm is a block encryption algorithm.
In order to solve the technical problem, the invention adopts another technical scheme that: a method of providing secure communications, comprising:
the method comprises the steps that a remote control device sends a message to a controlled device, wherein the message at least comprises identity information and a first variable of the remote control device;
the identity information of the remote control device is used for being verified by the controlled device and judging whether a first preset relation is met between the first variable and a second variable stored in the controlled device, the first variable and the second variable meet a second preset relation in an initial state before the message is sent, and the first variable should be changed to meet the first preset relation every time the message is sent by the remote control device.
The first variable and the second variable are count values, the first preset relationship means that the first variable is larger than the second variable, and the second preset relationship means that the first variable is equal to the second variable.
The message is request binding information, and the identity information of the remote control equipment comprises the ID of the remote control equipment, a private key signature value of a first variable and a public key certificate of the remote control equipment; the public key certificate is used for verifying the validity of the private key signature value.
Wherein the message is operation information, and before the remote control device sends the message to the controlled device, the method includes:
sending connection request information to the controlled equipment, wherein the connection request information comprises identity information of the remote control equipment, and the identity information of the remote control equipment comprises the ID of the remote control equipment and a private key signature value of the ID of the remote control equipment; and the private key signature value is used for being verified by the controlled equipment by utilizing a pre-saved public key.
Wherein, after the remote control device sends a message to the controlled device, the method includes:
negotiating with the controlled device to obtain a session key;
the operation information is encrypted through a cryptographic algorithm, the session key is used for encrypting an encryption key adopted by the cryptographic algorithm, and the session key is obtained through renegotiation during each connection.
In order to solve the technical problem, the invention adopts another technical scheme that: there is provided a controlled apparatus including:
the receiving module is used for receiving a message sent by the remote control equipment, wherein the message at least comprises identity information and a first variable of the remote control equipment;
the verification module is used for verifying the identity information of the remote control equipment and judging whether a first variable and a second variable stored in the controlled equipment meet a first preset relationship or not, the first variable and the second variable meet a second preset relationship in an initial state before the message is sent, and the first variable should be changed to meet the first preset relationship every time the remote control equipment sends the message;
and the output module is used for outputting a verification result, outputting the effective verification result of the message when the verification is passed and the first preset relation is met, and otherwise, outputting the ineffective verification result of the message.
In order to solve the technical problem, the invention adopts another technical scheme that: there is provided a remote control device including:
a sending module, configured to send a message to the controlled device, where the message at least includes identity information of the remote control device and a first variable;
the identity information of the remote control device is used for being verified by the controlled device and judging whether the first variable and a second variable stored in the controlled device meet a first preset relationship or not, and the first variable and the second variable meet a second preset relationship in an initial state before the message is sent.
And the variable module is used for generating the first variable so that the first variable changes to meet the first preset relation every time the remote control device sends the message.
In order to solve the technical problem, the invention adopts another technical scheme that: there is provided a controlled device including:
a communication circuit and a processor connected to each other;
the communication circuit is used for receiving a message sent by remote control equipment, wherein the message at least comprises identity information and a first variable of the remote control equipment;
the processor is configured to verify the identity information of the remote control device and determine whether the first variable and a second variable stored in the controlled device satisfy a first preset relationship, where the first variable and the second variable satisfy a second preset relationship in an initial state before the message is sent, and the first variable should be changed to satisfy the first preset relationship every time the remote control device sends the message;
and when the verification is passed and the first preset relation is met, outputting a valid verification result of the message, otherwise, outputting an invalid verification result of the message.
In order to solve the technical problem, the invention adopts another technical scheme that: there is provided a remote control device characterized by comprising:
a communication circuit and a processor connected to each other;
the processor is configured to generate the first variable, so that the first variable changes to satisfy the first preset relationship every time the communication circuit sends the message;
the communication circuit is configured to send a message to the controlled device, where the message includes at least identity information of the remote control device and a first variable.
The invention has the beneficial effects that: different from the prior art, the method verifies the identity information of the remote control equipment and judges whether the first variable and the second variable stored in the controlled equipment meet a first preset relationship, and when the verification is passed and the first preset relationship is met, the message is judged to be valid, otherwise, the message is judged to be invalid. Because the first variable and the second variable satisfy the second preset relationship in the initial state before the message is sent, the first variable should be changed to satisfy the first preset relationship every time the remote control device sends the message, and when the verification is passed and the first preset relationship is satisfied, the identity of the remote control device is legal and the message is not the message already received by the controlled device, so that by the method, the controlled device can be prevented from receiving the received message, and the problem that the controlled device is easily attacked by replay is solved.
Drawings
FIG. 1 is a flow diagram of one embodiment of a method of secure communication of the present invention;
FIG. 2 is a flow chart of yet another embodiment of a method of secure communication of the present invention;
FIG. 3 is a schematic view of an embodiment of a controlled device of the present invention;
FIG. 4 is a schematic view of one embodiment of a remote control device of the present invention;
FIG. 5 is a schematic diagram of an embodiment of a controlled device of the present invention;
fig. 6 is a schematic diagram of an embodiment of the remote control device of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the method for secure communication, the controlled device and apparatus, the remote control device and apparatus provided by the present invention are described in further detail below with reference to the accompanying drawings and the detailed description.
When the controlled device communicates with the remote control device, the controlled device generally transmits through radio frequency signals, and because the radio frequency signals are transmitted in a broadcast-like manner, the controlled device can receive all information in the same frequency band, so that the controlled device is easily attacked maliciously, and therefore, a certain authentication method can be adopted to judge whether the remote control device is legal or not, so that illegal impersonation attack is prevented, but the controlled device still has the risk of being attacked by replay. Replay attacks refer to an attacker resending data that has already been received by a device once for the purpose of spoofing the device. The data sent by the replay attack is data sent by a legal remote control device, and cannot be identified by adopting an authentication method, so that whether the data is received or not needs to be identified by adopting a certain method.
Referring to fig. 1, an embodiment of a method for secure communication according to the present invention includes the following steps:
s101: the method comprises the steps that controlled equipment receives a message sent by remote control equipment, wherein the message at least comprises identity information and a first variable of the remote control equipment;
the identity information of the remote control equipment is information capable of representing the unique identity of the remote control equipment, and the first variable is a count value and is used for recording the times of sending messages of the same type by the remote control equipment.
For example, the controlled device a receives a message a sent by the remote control device B, where the message a at least includes an ID number of B, a signature value obtained by signing the ID number with a private key of B, and a first variable, and if a is a message of the type sent for the first time, such as a request for binding information, the first variable in the request for binding information is 1, and when binding is requested next time, the first variable is 2, and so on.
The message type in the embodiment of the present invention is not limited, and when the message is operation information, the controlled device is in communication connection with the remote control device before receiving the message sent by the remote control device. In the connection process, the controlled equipment receives connection request information sent by remote control equipment, wherein the connection request information comprises identity information of the remote control equipment, and the identity information of the remote control equipment comprises a remote control equipment ID and a private key signature value of the remote control equipment ID;
s102: the controlled equipment verifies the identity information of the remote control equipment and judges whether the first variable and a second variable stored in the controlled equipment meet a first preset relationship or not;
the first variable and the second variable meet a second preset relationship in an initial state before the message is sent, and the first variable should be changed to meet the first preset relationship every time the remote control device sends the message;
in a specific application, the first variable and the second variable are both count values, the first preset relationship indicates that the first variable is greater than the second variable, and the second preset relationship indicates that the first variable is equal to the second variable.
For example, before the remote control device B sends a message to the controlled device a, a first variable stored in B is the same as a second variable stored in a, for example, both are 0, and when B sends a message to a, 1 is added to the first variable and then the first variable is sent to a, then the first variable 1 in the message received by B is greater than the second variable 0, and the first preset relationship is satisfied, and the message is determined to be valid, otherwise, the message is determined to be invalid.
In yet another specific application, when the message is a request for binding information, the identity information of the remote control device includes the remote control device ID, the remote control device ID and a private key signature value of a first variable, a public key certificate of the remote control device; the verifying the identity information of the remote control device by the controlled device specifically comprises:
1) acquiring a public key of the remote control equipment from a public key certificate of the remote control equipment;
2) and verifying the validity of the private key signature value by using the public key.
The controlled equipment and the remote control equipment are both internally provided with a unique public and private key pair and a unique equipment ID when leaving a factory, are both signed by a private key of the factory and are both internally provided with a unique public key certificate; the public key certificate contains the public key of the equipment and the equipment identity information, is signed by a manufacturer, and is used for binding the equipment identity information and the equipment public key.
Specifically, the controlled device obtains the public key of the remote control device from the public key certificate of the remote control device, and then verifies the private key signature value by using the public key, so that the ID and the first variable of the remote control device can be obtained and are the same as the data in the sent request binding information, and if the ID and the first variable are the same, the verification is passed, otherwise, the verification fails, and the binding is rejected.
Similarly, when the message is an operation message, the controlled device is in communication connection with the remote control device before receiving the operation message. In the connection process, the controlled device receives connection request information sent by a remote control device, the connection request information includes identity information of the remote control device, and the controlled device verifying the identity information of the remote control device specifically includes:
1) verifying the validity of the private key signature value by using a public key prestored by the controlled equipment;
2) if the verification is passed, the connection request information is judged to be valid, otherwise, the connection request information is judged to be invalid.
The specific verification process is similar to the verification process of the request binding information, and is not described herein again.
Wherein, after determining that the connection request message is valid, the method includes: the controlled equipment and the remote control equipment negotiate to obtain a session key;
the operation information is encrypted through a cryptographic algorithm, the session key is used for encrypting an encryption key adopted by the cryptographic algorithm, the session key is obtained by renegotiation during each connection, and the cryptographic algorithm is a block encryption algorithm.
Specifically, since the session key is obtained through negotiation and cannot be obtained by a third party, the operation information cannot be forged and only a replay attack can be performed.
For example, after the controlled device a and the remote control device B are successfully connected, the controlled device a and the remote control device B negotiate to obtain a session key, the negotiation process adopts an SM2 key negotiation mechanism, then the operation information sent by the controlled device a and the remote control device B is encrypted through an AES block cipher algorithm, and the encryption key adopted by the cipher algorithm is encrypted through the session key.
S103: and when the verification is passed and the first preset relation is met, judging that the message is valid, otherwise, judging that the message is invalid.
Wherein when the verification passes and the first preset relationship is satisfied, the method further comprises:
and the controlled equipment replaces the second variable saved by the controlled equipment with the first variable.
For example, when the controlled device a verifies the identity information of the remote control device B and the first variable 2 is greater than the second variable 1, the first preset relationship is satisfied, and a changes the second variable it holds to 2.
Specifically, when the authentication is passed and the first preset relationship is satisfied, it is indicated that the identity information of the remote control device is legitimate and the operation information is not information that has been received before, so that it is possible to effectively combat a replay attack.
Wherein, when the message is the request binding information, after the determining that the message is valid, the method includes:
1) the controlled equipment stores the identity information of the remote control equipment so as to bind the remote control equipment;
2) and storing the grade information representing the priority level of the remote control equipment.
The level information is used for distinguishing the priority levels of different remote control devices for controlling the controlled devices when the controlled devices are bound with a plurality of remote control devices, the priority level of the remote control device bound first is higher than that of the remote control device bound later, the information of the remote control device bound later stored in the controlled devices can be managed, and the first remote control device bound with the controlled devices is guaranteed to be legal and safe, namely the remote control device with the highest priority level is guaranteed to be safe. Therefore, when the subsequent bound remote control equipment is used for malicious attack, the subsequent bound remote control equipment can be deleted by the remote control equipment with the highest priority level, so that the problem that legal remote control equipment is used for malicious attack is solved, and the communication safety is improved.
Specifically, for convenience of description, defining a first remote control device and a second remote control device, where the first remote control device has successfully implemented the binding with the controlled device, and storing the level information representing the priority level of the remote control device includes:
1) the controlled equipment receives connection request information sent by second remote control equipment, the identity information and the grade information of the second remote control equipment are stored in the controlled equipment, and the connection request information comprises the identity information of the remote control equipment;
2) judging the priority level of the first remote control device and the priority level of the second remote control device according to the grade information of the first remote control device and the second remote control device;
3) and when the priority level of the second remote control equipment is higher than that of the first remote control equipment, receiving the connection request of the second remote control equipment, preferentially processing the message of the second remote control equipment or disconnecting the first remote control equipment, and otherwise, suspending processing or discarding the connection request information of the second remote control equipment.
For example, if the remote control device a binds the controlled device C earlier than the remote control device B, the priority level of a is higher than that of B, and when a and B send information to C at the same time, C can preferentially process the information of a or directly disconnect B; if B is found to be a malicious attacker, A can delete the information of B stored in C, so that B can not control C any more, thereby preventing malicious attack.
In the above embodiment, the controlled device receives a message sent by the remote control device, verifies the identity information of the remote control device, and determines whether the first variable and the second variable stored in the controlled device satisfy a first preset relationship, and when the first variable and the second variable satisfy the first preset relationship after the verification, the information is determined to be valid, otherwise, the information is determined to be invalid. Because the first variable and the second variable satisfy a second preset relationship in an initial state before the message is sent, the first variable should be changed to satisfy the first preset relationship every time the remote control device sends the message, and when the first preset relationship is satisfied and the verification is passed, it is indicated that the identity of the remote control device is legal and the message is not the message that the controlled device has received, so the method is adopted; otherwise, the message is the message which is already received by the controlled device and possibly belongs to the situation of replay attack, the message is not processed, and whether the identity of the remote control device is legal or not is judged, so that the controlled device can be prevented from receiving the already received message, and the problem that the controlled device is easy to be attacked by replay is solved.
Referring to fig. 2, another embodiment of the method for secure communication according to the present invention includes the following steps:
s201: the method comprises the steps that a remote control device sends a message to a controlled device, wherein the message at least comprises identity information and a first variable of the remote control device;
the identity information of the remote control equipment is information capable of representing the unique identity of the remote control equipment, and the first variable is a count value and is used for recording the times of sending messages of the same type by the remote control equipment.
For example, the remote control device B sends a message a to the controlled device a, where the message a at least includes an ID number of B, a signature value obtained by signing the ID number with a private key of B, and a first variable, and if the message is request binding information, and the first variable in the request binding information is 2, then the first variable is 3 when binding is requested next time, and so on.
The identity information of the remote control device is used for being verified by the controlled device, the first variable is used for judging whether a first preset relation is met with a second variable stored in the controlled device, the first variable and the second variable meet the second preset relation in an initial state before the message is sent, and the first variable should be changed to meet the first preset relation every time the remote control device sends the message.
In a specific application, the first variable and the second variable are both count values, the first preset relationship indicates that the first variable is greater than the second variable, and the second preset relationship indicates that the first variable is equal to the second variable.
For example, before the remote control device B sends a message to the controlled device a, the first variable stored in B is the same as the second variable stored in a, for example, both are 2, and when B sends a message to a, 1 is added to the first variable and then the first variable is sent to a, so that the first variable 3 in the message received by B is greater than the second variable 2, and the first preset relationship is satisfied.
S202: the remote control equipment receives the identity verification of the controlled equipment and receives the judgment of the controlled equipment on the relationship between the first variable and the second variable;
the message type in the embodiment of the present invention is not limited, and when the message is request binding information, the identity information of the remote control device includes the ID of the remote control device, a private key signature value of a first variable, and a public key certificate of the remote control device; the public key certificate is used for verifying the validity of the private key signature value.
In another specific application, when the message is operation information, before the remote control device sends the message to the controlled device, the method includes:
sending connection request information to the controlled equipment, wherein the connection request information comprises identity information of the remote control equipment, and the identity information of the remote control equipment comprises the ID of the remote control equipment and a private key signature value of the ID of the remote control equipment; and the private key signature value is used for being verified by the controlled equipment by utilizing a pre-saved public key.
Wherein, after the remote control device sends the connection request message to the controlled device, the method includes:
negotiating with the controlled device to obtain a session key;
when the message is operation information, the operation information is encrypted through a cryptographic algorithm, the session key is used for encrypting an encryption key adopted by the cryptographic algorithm, and the session key is obtained by renegotiation during each connection.
Specifically, when the message is operation information, before the remote control device sends the message, it first sends connection request information to the controlled device, and after the connection is successful, the remote control device negotiates with the controlled device to obtain a session key; then, the operation information is encrypted by using a cryptographic algorithm, an encryption key adopted by the cryptographic algorithm is encrypted by using the session key, and finally, the operation information is sent. The operation information comprises the ID of the remote control equipment, a first variable and an operation instruction; the cryptographic algorithm may be any block encryption algorithm, and is not limited herein.
In the above embodiment, the remote control device sends a message to the controlled device, and receives the authentication of the controlled device and the judgment of the controlled device on the relationship between the first variable and the second variable. Because the first variable and the second variable satisfy the second preset relationship in the initial state before the message is sent, the first variable should be changed to satisfy the first preset relationship every time the remote control device sends the message, and when the remote control device passes the verification and the first variable and the second variable satisfy the first preset relationship, the identity of the remote control device is legal and the message is not the message already received by the controlled device, so by the method, the controlled device can be prevented from receiving the received message, and the problem that the controlled device is easily attacked by replay is solved.
Referring to fig. 3, fig. 3 is a schematic diagram of a controlled device 30 according to an embodiment of the present invention, and as shown in fig. 3, the controlled device 30 includes: a communication module 301, a verification module 302, and an output module 303.
The communication module 301 is configured to receive a message sent by a remote control device;
wherein the message comprises at least identity information of the remote control device and a first variable;
the verification module 302 is configured to verify the identity information of the remote control device and determine whether the first variable and the second variable stored in the controlled device 30 satisfy a first preset relationship;
the first variable and the second variable meet a second preset relationship in an initial state before the message is sent, and the first variable should change to meet the first preset relationship every time the remote control device sends the message;
the output module 303 is configured to output a verification result, and when the verification passes and the first preset relationship is satisfied, output a verification result that the message is valid, otherwise, output a verification result that the message is invalid.
The communication module 301 is connected to the verification module 302, and the verification module 302 is connected to the output module 303.
Specifically, the communication module 301 receives a message sent by the remote control device and transmits the message to the verification module 302; the verification module 302 verifies the identity information of the remote control device, determines whether the first variable and the second variable stored in the controlled device 30 satisfy a first preset relationship, and transmits the verification result and the determination result to the output module 303; the output module 303 outputs the verification result according to the received information.
Referring to fig. 4, fig. 4 is a schematic diagram of a remote control device 40 according to an embodiment of the present invention, and as shown in fig. 4, the remote control device 40 includes: a communication module 401 and a variable module 402 connected to each other.
The communication module 401 is configured to send a message to a controlled apparatus;
wherein the message comprises at least identity information of the remote control device 40 and a first variable; the identity information of the remote control device 40 is used for being verified by the controlled device and determining whether the first variable and a second variable stored in the controlled device satisfy a first preset relationship, and the first variable and the second variable satisfy a second preset relationship in an initial state before the message is sent.
The variable module 402 is configured to generate the first variable, so that the first variable changes to meet the first preset relationship every time the remote control device 40 sends the message.
Specifically, the variable module 402 transmits a first variable generated after the first variable changes to meet the first preset relationship to the communication module 401 before the remote control device 40 sends a message each time; the communication module 401 generates the message after receiving the first variable and transmits the message to the controlled device.
Referring to fig. 5, fig. 5 is a schematic diagram of a controlled device 50 according to an embodiment of the present invention, and as shown in fig. 5, the controlled device 50 includes: a communication circuit 501 and a processor 502 connected to each other.
The communication circuit 501 is used for receiving a message sent by a remote control device;
wherein the message comprises at least identity information of the remote control device and a first variable;
the processor 502 is configured to verify the identity information of the remote control device and determine whether the first variable and a second variable stored in the controlled device 50 satisfy a first preset relationship, where the first variable and the second variable satisfy a second preset relationship in an initial state before the message is sent, and the first variable should be changed to satisfy the first preset relationship every time the remote control device sends the message, and when the message passes the verification and satisfies the first preset relationship, output a verification result that the message is valid, and otherwise output a verification result that the message is invalid.
Specifically, the communication circuit 501 receives a message sent by the remote control device and transmits the message to the processor 502; the processor 502 verifies the identity information of the remote control device and determines whether the first variable and the second variable stored in the controlled device 50 satisfy a first preset relationship, and outputs a valid verification result of the message when the verification passes and the first preset relationship is satisfied, or outputs an invalid verification result of the message when the verification passes and the first preset relationship is not satisfied.
Referring to fig. 6, fig. 6 is a schematic diagram of an embodiment of a remote control device 60 according to the present invention, and as shown in fig. 6, the remote control device 60 includes: a communication circuit 601 and a processor 602 connected to each other.
The communication circuit 601 is configured to send a message to a controlled device;
wherein the message comprises at least identity information of the remote control device 60 and a first variable;
the processor 602 is configured to generate the first variable, so that the first variable changes to satisfy the first preset relationship every time the remote control device 60 sends the message.
Specifically, the processor 602 transmits a first variable generated after the first variable changes to meet the first preset relationship to the communication circuit 601 before the remote control device 60 sends a message each time; the communication circuit 601 generates the message after receiving the first variable and transmits the message to the controlled device.
According to the method, after the controlled equipment receives the message sent by the remote control equipment, the identity information of the remote control equipment is verified, whether a first preset relation is met between a first variable and a second variable is judged, the first variable and the second variable meet a second preset relation in an initial state before the message is sent, the first variable is required to change to meet the first preset relation every time the remote control equipment sends the message, and when the first preset relation is met after the verification is passed, the identity of the remote control equipment is legal, and the message is not the message already received by the controlled equipment, so that the problem that the controlled equipment is easily attacked by replay can be solved.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (18)

1. A method of secure communication, comprising:
the method comprises the steps that controlled equipment receives a message sent by remote control equipment, wherein the message at least comprises identity information and a first variable of the remote control equipment;
the controlled equipment verifies the identity information of the remote control equipment and judges whether a first variable and a second variable stored in the controlled equipment meet a first preset relationship or not, the first variable and the second variable meet a second preset relationship in an initial state before the message is sent, and the first variable should be changed to meet the first preset relationship every time the remote control equipment sends the message;
when the verification is passed and the first preset relation is met, judging that the message is valid, otherwise, judging that the message is invalid;
the first variable and the second variable are both count values, the first preset relationship means that the first variable is greater than the second variable, and the second preset relationship means that the first variable is equal to the second variable.
2. The method of claim 1, wherein when the first preset relationship is satisfied and verified, the method further comprises:
and the controlled equipment replaces the second variable saved by the controlled equipment with the first variable.
3. The method according to claim 1 or 2, wherein the message is a request for binding information, and the determining that the message is valid comprises:
the controlled equipment stores the identity information of the remote control equipment so as to bind the remote control equipment;
and storing the grade information representing the priority level of the remote control equipment.
4. The method of claim 3,
defining the remote control device as a first remote control device, and after storing the level information representing the priority level of the remote control device, the method comprises the following steps:
the controlled equipment receives connection request information sent by second remote control equipment, the identity information and the grade information of the second remote control equipment are stored in the controlled equipment, and the connection request information comprises the identity information of the remote control equipment;
judging the priority level of the first remote control device and the priority level of the second remote control device according to the grade information of the first remote control device and the second remote control device;
and when the priority level of the second remote control equipment is higher than that of the first remote control equipment, receiving the connection request of the second remote control equipment, preferentially processing the message of the second remote control equipment or disconnecting the first remote control equipment, and otherwise, suspending processing or discarding the connection request information of the second remote control equipment.
5. The method of claim 3, wherein the identity information of the remote control device comprises the remote control device ID, a private key signature value of the remote control device ID and a first variable, a public key certificate of the remote control device; the verifying the identity information of the remote control device by the controlled device specifically comprises:
acquiring a public key of the remote control equipment from a public key certificate of the remote control equipment;
and verifying the validity of the private key signature value by using the public key.
6. Method according to claim 1 or 2, characterized in that the message is operation information.
7. The method of claim 6,
before the controlled device receives the message sent by the remote control device, the method comprises the following steps:
the controlled equipment receives connection request information sent by remote control equipment, wherein the connection request information comprises identity information of the remote control equipment, and the identity information of the remote control equipment comprises a remote control equipment ID and a private key signature value of the remote control equipment ID; the verifying, by the controlled device, the identity information of the remote control device specifically includes:
verifying the validity of the private key signature value by using a public key prestored by the controlled equipment;
if the verification is passed, the connection request information is judged to be valid, otherwise, the connection request information is judged to be invalid.
8. The method of claim 7,
after the connection request message is determined to be valid, the method includes: the controlled equipment and the remote control equipment negotiate to obtain a session key;
the operation information is encrypted through a cryptographic algorithm, the session key is used for encrypting an encryption key adopted by the cryptographic algorithm, and the session key is obtained through renegotiation during each connection.
9. The method according to claim 8,
the cryptographic algorithm is a block cipher algorithm.
10. A method of secure communication, comprising:
the method comprises the steps that a remote control device sends a message to a controlled device, wherein the message at least comprises identity information and a first variable of the remote control device;
the identity information of the remote control equipment is used for being verified by the controlled equipment and judging whether a first variable and a second variable stored in the controlled equipment meet a first preset relationship or not, the first variable and the second variable meet a second preset relationship in an initial state before the message is sent, and the first variable should be changed to meet the first preset relationship every time the remote control equipment sends the message;
the first variable and the second variable are both count values, the first preset relationship means that the first variable is greater than the second variable, and the second preset relationship means that the first variable is equal to the second variable.
11. The method of claim 10, wherein the message is a request for binding information, and wherein the identity information of the remote control device comprises the remote control device ID, a private key signature value of the remote control device ID and a first variable, a public key certificate of the remote control device; the public key certificate is used for verifying the validity of the private key signature value.
12. The method of claim 10, wherein the message is operational information.
13. The method of claim 12,
before the remote control device sends a message to the controlled device, the method comprises the following steps:
sending connection request information to the controlled equipment, wherein the connection request information comprises identity information of the remote control equipment, and the identity information of the remote control equipment comprises the ID of the remote control equipment and a private key signature value of the ID of the remote control equipment; and the private key signature value is used for being verified by the controlled equipment by utilizing a pre-saved public key.
14. The method of claim 13,
after the remote control device sends a message to the controlled device, the method comprises the following steps:
negotiating with the controlled device to obtain a session key;
the operation information is encrypted through a cryptographic algorithm, the session key is used for encrypting an encryption key adopted by the cryptographic algorithm, and the session key is obtained through renegotiation during each connection.
15. A controlled device, comprising:
the remote control device comprises a communication module, a processing module and a processing module, wherein the communication module is used for receiving a message sent by the remote control device, and the message at least comprises identity information and a first variable of the remote control device;
a verification module, configured to verify identity information of the remote control device and determine whether the first variable and a second variable stored in the controlled device satisfy a first preset relationship, where the first variable and the second variable satisfy a second preset relationship in an initial state before the message is sent, and the first variable should be changed to satisfy the first preset relationship every time the remote control device sends the message; the first variable and the second variable are both count values, the first preset relationship means that the first variable is greater than the second variable, and the second preset relationship means that the first variable is equal to the second variable;
and the output module is used for outputting a verification result, outputting the effective verification result of the message when the verification is passed and the first preset relation is met, and otherwise, outputting the ineffective verification result of the message.
16. A remote control device, comprising:
the communication module and the variable module are connected with each other;
the communication module is used for sending a message to a controlled device, wherein the message at least comprises identity information of the remote control device and a first variable;
the identity information of the remote control device is used for being verified by the controlled device and judging whether the first variable and a second variable stored in the controlled device meet a first preset relationship or not, and the first variable and the second variable meet a second preset relationship in an initial state before the message is sent;
the variable module is configured to generate the first variable, so that the first variable changes to meet the first preset relationship every time the remote control device sends the message;
the first variable and the second variable are count values, the first preset relationship means that the first variable is larger than the second variable, and the second preset relationship means that the first variable is equal to the second variable.
17. A controlled device, comprising:
a communication circuit and a processor connected to each other;
the communication circuit is used for receiving a message sent by remote control equipment, wherein the message at least comprises identity information and a first variable of the remote control equipment;
the processor is configured to verify the identity information of the remote control device and determine whether a first preset relationship is satisfied between the first variable and a second variable stored in the controlled device, where the first variable and the second variable satisfy a second preset relationship in an initial state before the message is sent, and the first variable should be changed to satisfy the first preset relationship every time the remote control device sends the message, and when the message passes verification and satisfies the first preset relationship, output a verification result that the message is valid, and otherwise output a verification result that the message is invalid;
the first variable and the second variable are count values, the first preset relationship means that the first variable is larger than the second variable, and the second preset relationship means that the first variable is equal to the second variable.
18. A remote control device, comprising:
a communication circuit and a processor connected to each other;
the processor is configured to generate a first variable, and the first variable changes to satisfy a first preset relationship every time the communication circuit sends a message;
the communication circuit is used for sending the message to the controlled equipment, and the message at least comprises the identity information of the remote control equipment and a first variable;
the identity information of the remote control equipment is used for being verified by the controlled equipment and judging whether the first variable and a second variable stored in the controlled equipment meet a first preset relation or not, and the first variable and the second variable meet a second preset relation in an initial state before the message is sent;
the first variable and the second variable are both count values, the first preset relationship indicates that the first variable is greater than the second variable, and the second preset relationship indicates that the first variable is equal to the second variable.
CN201680010430.9A 2016-11-09 2016-11-09 Secure communication method, controlled device and equipment, remote control device and equipment Active CN107466466B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/105171 WO2018086004A1 (en) 2016-11-09 2016-11-09 Secure communication method, controlled apparatus and device, and remote-control apparatus and device

Publications (2)

Publication Number Publication Date
CN107466466A CN107466466A (en) 2017-12-12
CN107466466B true CN107466466B (en) 2020-05-05

Family

ID=60545133

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201680010430.9A Active CN107466466B (en) 2016-11-09 2016-11-09 Secure communication method, controlled device and equipment, remote control device and equipment

Country Status (2)

Country Link
CN (1) CN107466466B (en)
WO (1) WO2018086004A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108809645A (en) * 2018-07-24 2018-11-13 南方电网科学研究院有限责任公司 The method, apparatus and electrical power distribution automatization system of key agreement
CN109361682B (en) * 2018-11-12 2021-06-29 深圳鳍源科技有限公司 Communication method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009065356A1 (en) * 2007-11-19 2009-05-28 Huawei Technologies Co., Ltd. A method, system and network device for mutual authentication
CN102223630A (en) * 2010-04-14 2011-10-19 国民技术股份有限公司 Remote control system and method
CN103544830A (en) * 2012-07-11 2014-01-29 上海曜铂信息科技有限公司 Intelligent pairing method of infrared remote control device
CN104580464A (en) * 2015-01-08 2015-04-29 珠海格力电器股份有限公司 Intelligent home furnishing equipment control method, device and system
CN104717762A (en) * 2013-12-13 2015-06-17 上海科勒电子科技有限公司 Pairing method, primary terminal and slave terminal of wireless communication device
CN105704837A (en) * 2014-11-28 2016-06-22 华为终端(东莞)有限公司 Method and equipment for establishing wireless connection

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009065356A1 (en) * 2007-11-19 2009-05-28 Huawei Technologies Co., Ltd. A method, system and network device for mutual authentication
CN102223630A (en) * 2010-04-14 2011-10-19 国民技术股份有限公司 Remote control system and method
CN103544830A (en) * 2012-07-11 2014-01-29 上海曜铂信息科技有限公司 Intelligent pairing method of infrared remote control device
CN104717762A (en) * 2013-12-13 2015-06-17 上海科勒电子科技有限公司 Pairing method, primary terminal and slave terminal of wireless communication device
CN105704837A (en) * 2014-11-28 2016-06-22 华为终端(东莞)有限公司 Method and equipment for establishing wireless connection
CN104580464A (en) * 2015-01-08 2015-04-29 珠海格力电器股份有限公司 Intelligent home furnishing equipment control method, device and system

Also Published As

Publication number Publication date
WO2018086004A1 (en) 2018-05-17
CN107466466A (en) 2017-12-12

Similar Documents

Publication Publication Date Title
CN110380852B (en) Bidirectional authentication method and communication system
EP3529965B1 (en) System and method for configuring a wireless device for wireless network access
CN109600350B (en) System and method for secure communication between controllers in a vehicle network
KR101508497B1 (en) Data certification and acquisition method for vehicle
EP3613169B1 (en) Method for mutual symmetric authentication between a first application and a second application
WO2018127081A1 (en) Method and system for obtaining encryption key
CN103532713B (en) Sensor authentication and shared key production method and system and sensor
JP5845393B2 (en) Cryptographic communication apparatus and cryptographic communication system
KR101549034B1 (en) Method for guarantying the confidentiality and integrity of a data in Controller Area Networks
CN110020524B (en) Bidirectional authentication method based on smart card
CN103415008A (en) Encryption communication method and encryption communication system
CN110650478B (en) OTA method, system, device, SE module, program server and medium
KR101675332B1 (en) Data commincaiton method for vehicle, Electronic Control Unit and system thereof
CN113207322B (en) Communication method and communication device
KR101481403B1 (en) Data certification and acquisition method for vehicle
KR102219086B1 (en) HMAC-based source authentication and secret key sharing method and system for Unnamed Aerial vehicle systems
CN107466466B (en) Secure communication method, controlled device and equipment, remote control device and equipment
CN113221136B (en) AIS data transmission method, AIS data transmission device, electronic equipment and storage medium
WO2017020530A1 (en) Enhanced wlan certificate authentication method, device and system
CN110149205B (en) Method for protecting Internet of things terminal by using block chain
CN103986716A (en) Establishing method for SSL connection and communication method and device based on SSL connection
CN112995140B (en) Safety management system and method
CN114650173A (en) Encryption communication method and system
CN105828330B (en) Access method and device
CN107835196B (en) HDLC-based secure communication method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant