This application claims priority to Chinese Patent Application No. 201510766262.3, with the title of “DATA TRANSMITTING AND RECEIVING METHOD, TRANSMITTER, RECEIVER AND CAN BUS NETWORK”, filed on Nov. 11, 2015, which is hereby incorporated by reference in its entirety.
The present disclosure relates to communication technique, and more particularly to data transmitting and receiving methods, transmitter, receiver and CAN bus network.
Controller Area Network (CAN) bus protocol is a serial communication protocol of International Organization for Standardization (ISO). CAN bus may be in the scope of industrial field bus. Comparing with general communication bus, data communication via CAN bus may have significant performance of real-time and flexibility. Due to its good performance and unique design, CAN bus now attracts more and more attention, especially in the application in vehicle field.
A vehicle may consist of four systems: engine, chassis, vehicle body, and electronics. Each system may include a plurality Electronic Control Unit (ECU). It may be necessary for these ECUs to communicate with each other, and the communication may depend on a various kinds of bus protocol, which may include CAN bus.
CAN bus may be the most importance bus inside the vehicle body and may currently be the backbone network inside the vehicle. The CAN bus may connect modules such as engine control system, gear control system, auto-cruise control system, instrumentation and body control module. However, the inventors find that there are more and more attacks on the CAN bus, which may cause leakage of information and thereby there may be danger for safe driving.
The present disclosure provides data transmitting and receiving methods, transmitter, receiver and CAN bus network, which may solve the technical problem of leakage of information due to that the CAN bus may be vulnerable to attacks.
To achieve the above object, the embodiment of the present disclosure may provide the following technical solutions.
In the first aspect, the present disclosure provides a data transmitting method, including: acquiring a CAN bus message generated by an ECU; encrypting a data field in the CAN bus message to obtain a message to be transmitted; and transmitting the message to be transmitted on the CAN bus via broadcasting.
In the second aspect, the present disclosure provides a data receiving method, including: performing interception on the CAN bus to acquire an encrypted CAN bus message of an ECU; decrypting a data field in the encrypted CAN bus message to obtain a message to be transmitted; and transmitting the message to be transmitted to the ECU.
In the third aspect, the present disclosure provides a transmitter including: an ECU interface configured to acquire the CAN bus message generated by an ECU; an encrypting module configured to encrypt a data field in the CAN bus message to obtain a message to be transmitted; and a bus interface configured to transmit the message to be transmitted on the CAN bus via broadcasting.
In the fourth aspect, the present disclosure provides a receiver including: an intercepting module configured to perform interception on the CAN bus to acquire an encrypted CAN bus message of an ECU; a decrypting module configured to decrypt a data field in the encrypted CAN bus message to obtain a message to be transmitted; and a transmitting module configured to transmit the message to be transmitted to the ECU.
In the fifth aspect, the present disclosure provides a transmitter, including: one or more processors; a memory; and one or more programs stored in the memory and configured to perform operations when executed by the one or more processors, wherein the operations include: acquiring a CAN bus message generated by an ECU; encrypting a data field in the CAN bus message to obtain a message to be transmitted; and transmitting the message to be transmitted on a CAN bus via broadcasting.
In the sixth aspect, the present disclosure provides a receiver, including: one or more processors; a memory; and one or more programs stored in the memory and configured to perform operations when executed by the one or more processors, wherein the operations include: performing interception on a CAN bus to acquire an encrypted CAN bus message of an ECU; decrypting a data field in the encrypted CAN bus message to obtain a message to be transmitted; and transmitting the message to be transmitted to the ECU.
In the seventh aspect, the present disclosure provides a CAN bus network including: the transmitter as described above, the receiver as described above, an ECU, and a CAN bus, wherein the transmitter may be connected with the ECU and the CAN bus respectively, and the receiver may be connected with the ECU and the CAN bus respectively.
The data transmitting and receiving methods, transmitter, receiver and CAN bus network may enhance the security of CAN bus messages and solve the technical problem of leakage of information due to that the CAN bus may be vulnerable to attacks by encrypting the data field in the CAN bus message and thereby the data field may be transmitted in cipher-text during transmission. The reason is because that in the related art, the CAN bus messages are always transmitted in plain-text and thus the CAN bus messages may be intercepted, hacked or counterfeited. More particularly, when the counterfeited messages appear on the CAN bus, vehicle braking may be caused, the gear box and engine may be out of control, which may threaten the safe in driving. With the technical solution of the present embodiment, such accidents may be avoided.
The above description is merely the general description of the technical solutions of the present disclosure. To better understanding of the technical means of the present disclosure, it may be possible to implement according to the contents of the present disclosure. In the following, embodiments may be described for better understanding of above and other objects, technical features and advantages of the present disclosure.
Various kinds of other advantages and benefits may be obvious to one skilled in the art based on the following detailed description of the preferable embodiments. Drawings may be only used to illustrate the preferable embodiments, but not the limitation on the present disclosure. Same reference symbol may refer to same components throughout the drawings. In the drawing:
In the following, detailed description may be made on exemplary embodiments of the present disclosure. Although drawings show the exemplary embodiments of the present disclosure, it should be noted that, the present disclosure may be implemented in various kinds of forms without being limited by the embodiments described here. On the contrary, these embodiments are provided for more complete understanding of the present disclosure and to completely convey the scope of the present disclosure to skilled in the art.
Generally, a CAN message may consist of seven different Bit Fields: SOF (Start of), Arbitration Field, Control Field, Data Field, Cyclic Redundancy Check (CRC) field, ACK field and EOF (End of).
However, there are more and more attacks on the CAN bus, which may cause leakage of information and thereby there may be danger for safe driving. The reason is because that in the related art, the CAN bus messages are always transmitted in plain-text and thus the CAN bus messages may be intercepted, hacked or counterfeited. More particularly, when the counterfeited messages appear on the CAN bus, vehicle braking may be caused, the gear box and engine may be out of control, which may threaten the safe in driving. With the technical solution of the present embodiment, such accidents may be avoided.
In the following, detailed description may be made on the data transmitting and receiving methods, transmitter, receiver and CAN bus network of the embodiments of the present disclosure in connection with drawings.
Step 201, acquiring a CAN bus message generated by an ECU.
More particularly, the structure of a CAN bus message may be as shown in
Step 202, encrypting a data field in the CAN bus message to obtain a message to be transmitted.
More particularly, the data field in the CAN bus message may be encrypted with a symmetry encryption algorithm, for example, Advanced Encryption Standard (AES).
Furthermore, the data field in the CAN bus message may include an encryption indication bit and a data bit. The encryption indication bit may be configured to indicate whether or not the message is encrypted, wherein the data bit may be configured to carry data. Therefore, before step 202, the method may further include confirming that the CAN bus message is encrypted according to the indication of the encryption indication bit of the data field in the CAN bus message. As a possible implementation, the encryption indication bit may be the first bit. For example, if the value of the encryption indication bit is 0, it means that the message is not encrypted, and step 202 may be not performed; and if the value of the encryption indication bit is 1, it means the message is encrypted and step 202 may be performed. In step 202, the data bit in the data field in the message may be encrypted.
Step 203, transmitting the message to be transmitted on the CAN bus via broadcasting.
More particularly, when data is transmitted at one node of the CAN bus, the data may be broadcast to all nodes in the network in a form of message. Each node may intercept the data no matter whether or not this message is intended to be transmitted to itself and compare the identification of itself and the value of the Arbitration Field of the message with respect to the message obtained by interception. If they are same, it means that the message obtained by interception is intended to be transmitted to itself. If they are different, it means that the message obtained by interception is not intended to be transmitted to itself.
Furthermore, before step 203, the method may further include performing validation check on the message to be transmitted according to the Arbitration Field and CRC field in the message to be transmitted.
More particularly, CRC series may be obtained by performing calculation according to the SOF, Arbitration Field, Control Field, Data Field of a frame and the value of the CRC field in the message may be compared with the calculated CRC series to obtain a comparison result. Furthermore, the RTR bit in the Arbitration Field should be “dominance” in the data frame, but should be “implicit” in a remote frame, which is a mark for distinguish data frame and remote frame. After the check and the message to be transmitted is confirmed, the message may be transmitted.
The present embodiment may enhance the security of CAN bus messages and solve the technical problem of leakage of information due to that the CAN bus may be vulnerable to attacks by encrypting the data field in the CAN bus message and thereby the data field may be transmitted in cipher-text during transmission. The reason is that in the related art, the CAN bus messages are always transmitted in plain-text and thus the CAN bus messages may be intercepted, hacked or counterfeited. More particularly, when the counterfeited messages appear on the CAN bus, vehicle braking may be caused, the gear box and engine may be out of control, which may threaten the safe in driving. With the technical solution of the present embodiment, such accidents may be avoided.
Step 301, performing interception on the CAN bus to acquire an encrypted CAN bus message of ECU.
More particularly, interception may be performed on the CAN bus and an encrypted CAN bus message whose value of Arbitration Field is same as the identification code of the ECU may be acquired. The reason is that when data is transmitted at one node of the CAN bus, the data may be broadcast to all nodes in the network in a form of message. Each node may intercept the data no matter whether or not this message is intended to be transmitted to itself and compare the identification of itself and the value of the Arbitration Field of the message with respect to the message obtained by interception. If they are same, it means that the message obtained by interception is intended to be transmitted to itself. If they are different, it means that the message obtained by interception is not intended to be transmitted to itself.
Step 302, decrypting a data field in the encrypted CAN bus message to obtain a message to be transmitted.
More particularly, the data field in the CAN bus message may be decrypted with a symmetry encryption algorithm same as the algorithm provided in the encrypting step, for example, Advanced Encryption Standard (AES).
It should be noted that, the encryption mentioned in each embodiment of the present disclosure may use asymmetry algorithm in additional to the symmetry algorithm. There is no limitation in each embodiment of the present disclosure.
Furthermore, the data field in the CAN bus message may include an encryption indication bit and a data bit. The encryption indication bit may be configured to indicate whether or not the message is encrypted, wherein the data bit may be configured to carry data. Therefore, before step 302, the method may further include confirming that the CAN bus message is encrypted according to the indication of the encryption indication bit of the data field in the CAN bus message. As a possible implementation, the encryption indication bit may be the first bit. For example, if the value of the encryption indication bit is 0, it means that the message is not encrypted, and step 302 may be not performed; and if the value of the encryption indication bit is 1, it means the message is encrypted and step 302 may be performed. In step 302, the data bit in the data field in the message may be decrypted.
Step 303, transmitting the message to be transmitted to the ECU.
More particularly, ECU may receive the message to be transmitted and then perform corresponding operations according to the data field in the message to be transmitted.
The present embodiment may enhance the security of CAN bus messages and solve the technical problem of leakage of information due to that the CAN bus may be vulnerable to attacks by encrypting the data field in the CAN bus message and thereby the data field may be transmitted in cipher-text during transmission. The reason is that in the related art, the CAN bus messages are always transmitted in plain-text and thus the CAN bus messages may be intercepted, hacked or counterfeited. More particularly, when the counterfeited messages appear on the CAN bus, vehicle braking may be caused, the gear box and engine may be out of control, which may threaten the safe in driving. With the technical solution of the present embodiment, such accidents may be avoided. Furthermore, only the CAN bus message of ECU related to the safety in driving in the CAN bus network may be encrypted, and thus the transmission efficiency of CAN bus messages may be improved while ensuring safety, and the cost for CAN bus may be reduced.
The encrypting module 42 may be configured to encrypt a data field in the CAN bus message acquired by the ECU interface 41 to obtain a message to be transmitted.
More particularly, the encrypting module 42 may encrypt the data field in the CAN bus message with a symmetry encryption algorithm, for example, Advanced Encryption Standard (AES).
The bus interface 43 may be configured to transmit the message to be transmitted acquired by the encrypting module 42 on the CAN bus via broadcasting.
More particularly, when data is transmitted at one node of the CAN bus, the bus interface 43 may broadcast the data to all nodes in the network in a form of message. Each node may intercept the data no matter whether or not this message is intended to be transmitted to itself and compare the identification of itself and the value of the Arbitration Field of the message with respect to the message obtained by interception. If they are same, it means that the message obtained by interception is intended to be transmitted to itself. If they are different, it means that the message obtained by interception is not intended to be transmitted to itself.
The present embodiment may enhance the security of CAN bus messages and solve the technical problem of leakage of information due to that the CAN bus may be vulnerable to attacks by encrypting the data field in the CAN bus message and thereby the data field may be transmitted in cipher-text during transmission. The reason is that in the related art, the CAN bus messages are always transmitted in plain-text and thus the CAN bus messages may be intercepted, hacked or counterfeited. More particularly, when the counterfeited messages appear on the CAN bus, vehicle braking may be caused, the gear box and engine may be out of control, which may threaten the safe in driving. With the technical solution of the present embodiment, such accidents may be avoided.
The checking module 44 may be configured to perform validation check on the message to be transmitted according to the Arbitration Field and CRC Field in the message to be transmitted acquired by the encrypting module 42.
Furthermore, the data field in the CAN bus message may include an encryption indication bit and a data bit. The encryption indication bit may indicate whether or not the message is encrypted, wherein the data bit may carry data.
As a possible implementation, the encryption indication bit may be the first bit. For example, if the value of the encryption indication bit is 0, it means that the message is not encrypted, and it is unnecessary for the encrypting module 42 to perform encryption; and if the value of the encryption indication bit is 1, it means the message is encrypted and encrypting module 42 may encrypt the message. In encrypting module 42, the data bit in the data field in the message may be encrypted.
The transmitter 40 may further include a judging module 45. The judging module 45 may be configured to confirm whether or not the CAN bus message needs to be encrypted according to the indication of the encryption indication bit of the data field in the CAN bus message acquired by the ECU interface 41.
More particularly, if the CAN bus message confirms that the CAN bus message is encrypted according to the indication of encryption indicating bit in the data field in the CAN bus message, and the CAN bus message may be transmitted to the encrypting module 42; otherwise, the CAN bus message may be transmitted to the bus interface 43 via the checking module 44.
As a possible implementation, if the value of the encryption indication bit is 0, it means that the message is not encrypted, and the judging module 45 may transmit the CAN bus message to the bus interface 43; and if the value of the encryption indication bit is 1, it means the message is encrypted and the judging module 45 may transmit the CAN bus message to the encrypting module 43 and in the encrypting module 42 the data bit in the data field in the message may be encrypted.
Accordingly, the encrypting module 42 may be further configured to encrypt the data bit in the CAN bus message with AES encryption method.
The present embodiment may enhance the security of CAN bus messages and solve the technical problem of leakage of information due to that the CAN bus may be vulnerable to attacks by encrypting the data field in the CAN bus message and thereby the data field may be transmitted in cipher-text during transmission. The reason is that in the related art, the CAN bus messages are always transmitted in plain-text and thus the CAN bus messages may be intercepted, hacked or counterfeited. More particularly, when the counterfeited messages appear on the CAN bus, vehicle braking may be caused, the gear box and engine may be out of control, which may threaten the safe in driving. With the technical solution of the present embodiment, such accidents may be avoided. Furthermore, only the CAN bus message of ECU related to the safety in driving in the CAN bus network may be encrypted, and thus the transmission efficiency of CAN bus messages may be improved while ensuring safety, and the cost for CAN bus may be reduced.
The intercepting module 61 may be configured to perform interception on the CAN bus to acquire an encrypted CAN bus message of an ECU.
More particularly, the intercepting module 61 may perform interception on the CAN bus and acquire an encrypted CAN bus message whose value of Arbitration Field is same as the identification code of the ECU. The reason is that when data is transmitted at one node of the CAN bus, the data may be broadcast to all nodes in the network in a form of message. Each node may intercept the data no matter whether or not this message is intended to be transmitted to itself and compare the identification of itself and the value of the Arbitration Field of the message with respect to the message obtained by interception. If they are same, it means that the message obtained by interception is intended to be transmitted to itself. If they are different, it means that the message obtained by interception is not intended to be transmitted to itself.
The decrypting module 62 may be configured to decrypt the data field in the encrypted CAN bus message to obtain a message to be transmitted.
More particularly, the data field in the CAN bus message may be decrypted with a symmetry encryption algorithm same as the algorithm provided in the encrypting step, for example, Advanced Encryption Standard (AES).
The transmitting module 63 may be configured to transmit the message to be transmitted acquired by decryption by the decrypting module 62 to the ECU.
More particularly, ECU may receive the message to be transmitted and then perform corresponding operations according to the data field in the message to be transmitted.
The present embodiment may enhance the security of CAN bus messages and solve the technical problem of leakage of information due to that the CAN bus may be vulnerable to attacks by encrypting the data field in the CAN bus message and thereby the data field may be transmitted in cipher-text during transmission. The reason is that in the related art, the CAN bus messages are always transmitted in plain-text and thus the CAN bus messages may be intercepted, hacked or counterfeited. More particularly, when the counterfeited messages appear on the CAN bus, vehicle braking may be caused, the gear box and engine may be out of control, which may threaten the safe in driving. With the technical solution of the present embodiment, such accidents may be avoided.
As a possible implementation, the encryption indication bit may be the first bit. For example, if the value of the encryption indication bit is 0, it means that the message is not encrypted, and it is unnecessary for the decrypting module 62 to perform decryption; and if the value of the encryption indication bit is 1, it means the message is encrypted and the decrypting module 62 may decrypt the message. In the decrypting module 62, the data bit in the data field in the message may be decrypted.
Accordingly, the receiver 60 may further include a judging module 64. The judging module 45 may be configured to confirm whether or not the CAN bus message is encrypted according to the indication of the encryption indication bit of the data field in the CAN bus message acquired by the intercepting module 61.
As a possible implementation, if the value of the encryption indication bit is 0, it means that the message is not encrypted, and the judging module 64 may transmit the encrypted CAN bus message to the transmitting module 63; and if the value of the encryption indication bit is 1, it means the message is encrypted and the judging module 45 may transmit the encrypted CAN bus message to the decrypting module 62 and in the decrypting module 62, the data bit in the data field in the message may be decrypted.
Accordingly, the decrypting module 62 may be further configured to decrypt the data bit in the CAN bus message with AES encryption method.
The present embodiment may enhance the security of CAN bus messages and solve the technical problem of leakage of information due to that the CAN bus may be vulnerable to attacks by encrypting the data field in the CAN bus message and thereby the data field may be transmitted in cipher-text during transmission. The reason is that in the related art, the CAN bus messages are always transmitted in plain-text and thus the CAN bus messages may be intercepted, hacked or counterfeited. More particularly, when the counterfeited messages appear on the CAN bus, vehicle braking may be caused, the gear box and engine may be out of control, which may threaten the safe in driving. With the technical solution of the present embodiment, such accidents may be avoided. Furthermore, only the CAN bus message of ECU related to the safety in driving in the CAN bus network may be encrypted, and thus the transmission efficiency of CAN bus messages may be improved while ensuring safety, and the cost for CAN bus may be reduced.
The transmitter 40 may be connected with the ECU 80 and the CAN bus respectively. The receiver 60 may be connected with the ECU 80 and the CAN bus respectively.
It should be noted that,
Only the CAN bus message of ECU related to the safety in driving in the CAN bus network may be encrypted, and thus the transmission efficiency of CAN bus messages may be improved while ensuring safety, and the cost for CAN bus may be reduced.
Furthermore, the transmitter 40 and receiver 60 may be integrated into the communication interface 81, and may be in a separate way. The above integrated units may be implemented in hardware or in a form of unit of hardware with software functions.
One skilled in the art would appreciate that all or a part of the steps for implementing the foregoing method embodiments may be implemented by hardware related to program instructions. Foregoing programs may be stored in computer-readable storage medium, and upon being executed, such programs may perform the steps including foregoing method embodiments; and examples of foregoing storage medium include ROM, RAM, CD-ROM, a magnetic tape, and the other types of storage mediums which may store the program codes.
It should be noted that the foregoing embodiments are merely used to illustrate the technical solution of the present disclosure, and not to limit the present disclosure. Although the present disclosure has been described in detail with reference to the foregoing embodiments, one skilled in the art would understand that the technical solutions recited in the foregoing embodiments may be modified or all or a part of the technical features may be replaced equally. These modifications and replacements are not intended to make corresponding technical solution depart from the scope of the technical solution of embodiments of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
201510766262.3 | Nov 2015 | CN | national |