COMMUNICATION DEVICE, VEHICLE, COMMUNICATION METHOD, AND PROGRAM

The communication device addresses misdiagnosis of communication states by evaluating authentication failures across multiple messages to distinguish between normal and abnormal states, ensuring accurate communication status determination.

JP7552623B2Active Publication Date: 2024-09-18TOYOTA JIDOSHA KK
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2022003365
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2022-01-12
Publication Date
2024-09-18
Estimated Expiration
2042-01-12

AI Technical Summary

Technical Problem

Existing vehicle communication devices fail to accurately determine whether authentication failures are due to communication abnormalities or issues with individual communication devices, leading to potential misdiagnosis of communication states.

Method used

The communication device employs a system where authentication failures for a predetermined number of messages are evaluated before determining a communication abnormality, distinguishing between normal and abnormal states, and discarding messages that fail authentication to prevent erroneous state determination.

Benefits of technology

This approach prevents the erroneous classification of communication states as abnormal, even when authentication fails for some data, by differentiating between normal and abnormal states and discarding failed messages, thereby maintaining accurate communication status assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007552623000004
    Figure 0007552623000004
  • Figure 0007552623000011
    Figure 0007552623000011
  • Figure 0007552623000009
    Figure 0007552623000009
Patent Text Reader

Abstract

To suppress erroneous determination of a communication abnormal state even when authentication fails in a portion of data received from a plurality of communication devices.SOLUTION: A communication device comprises: a reception unit which receives a message given with authentication information generated by other communication devices from each of other communication devices; an authentication unit which authenticates the message on the basis of the authentication information given to the message for each message received by the reception unit; and a determination unit which determines the state as a communication abnormal state when the authentication less than a prescribed frequency in the plurality of times of authentication performed by the authentication unit fails for each of the plurality of corresponding messages for each of other communication devices or each type of message, and does not determine the state as the communication abnormal state when the authentication equal to or greater than the prescribed frequency in the plurality of times of authentication performed by the authentication unit fails for each of the plurality of corresponding messages.SELECTED DRAWING: Figure 4
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a communication device, a vehicle, a communication method, and a program. [Background technology]

[0002] Patent document 1 discloses a vehicle communication device that receives first data and second data different from the first data, generates third data based on the received first data and an encryption key, compares the second data with the third data, and authenticates the first data if the two match. If the results of the comparison performed multiple times for the data received within a predetermined period after the vehicle is started show a mismatch between the second data and the third data, the device is determined to be in an abnormal state, and if the results of the multiple comparisons include a match, the device is determined to be in an operating state. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Patent Publication No. 2021-083005 Summary of the Invention [Problem to be solved by the invention]

[0004] In the vehicle communication device of Patent Document 1, if authentication fails for some of the data received from multiple communication devices, there is a risk that appropriate action cannot be taken because it is not possible to determine whether authentication fails for all data received from only some of the communication devices, or whether authentication fails for some of the data regardless of the communication device.

[0005] Therefore, the present invention aims to provide a communication device, a vehicle, a communication method, and a program that can prevent erroneous judgment of a communication abnormality state even if authentication fails for some of the messages received from multiple communication devices. [Means for solving the problem]

[0006] The communication device described in claim 1 includes a receiving unit that receives, from each of other communication devices, a message to which authentication information generated by the other communication device is attached; an authentication unit that authenticates each of the messages received by the receiving unit based on the authentication information attached to the message; and a judgment unit that, for each of the other communication devices or for each type of message, determines that a communication abnormality state exists if authentication fails less than a predetermined number of times among multiple authentications performed by the authentication unit for each of a corresponding plurality of messages, and does not determine that a communication abnormality state exists if authentication fails the predetermined number or more times among the multiple authentications performed by the authentication unit for each of a corresponding plurality of messages.

[0007] In the communication device according to claim 1, a receiving unit receives, from each of the other communication devices, a message to which authentication information generated by the other communication devices is attached. Then, an authentication unit authenticates each of the messages received by the receiving unit based on the authentication information attached to the message. Then, a determination unit determines, for each of the other communication devices or for each type of message, that a communication abnormality exists when authentication fails less than a predetermined number of times among the multiple authentications performed by the authentication unit for each of the corresponding multiple messages, and does not determine that a communication abnormality exists when authentication fails the predetermined number of times or more among the multiple authentications performed by the authentication unit for each of the corresponding multiple messages.

[0008] When authentication fails less than a predetermined number of times among the multiple authentications performed by the authentication unit for one of the other communication devices or for each of the multiple messages corresponding to one of the message types, it is possible to consider that there is an abnormality in the other communication device and determine that there is no communication abnormality such as hacking. Therefore, according to the communication device, even if authentication fails for part of the data received from the multiple communication devices, it is possible to prevent erroneous determination of a communication abnormality state.

[0009] The communication device of claim 2 is the communication device of claim 1, wherein the message has identification information indicating a type of the message, and the judgment unit judges that a communication abnormality state exists if, for each of the plurality of messages having the identification information, among the plurality of authentications performed by the authentication unit, a predetermined number of times have failed, and does not judge that a communication abnormality state exists if, among the plurality of authentications performed by the authentication unit for each of the plurality of messages having the identification information, a predetermined number of times or more have failed.

[0010] In the communication device described in claim 2, if the authentication unit fails to perform a predetermined number of authentications on each of a plurality of messages having one identification information indicating a type of message, it is possible to determine that there is an abnormality in another communication device and that there is no communication abnormality such as hacking.

[0011] The communication device of claim 3 is the communication device of claim 1 or 2, further including a discarding unit that discards messages that have failed authentication, and an information processing unit that performs information processing according to the message, wherein the information processing unit detects a communication disruption based on a reception status of the message, and when the communication disruption is detected, the judgment unit judges that a communication abnormality state exists if authentication has failed less than a predetermined number of times among the multiple authentications performed by the authentication unit for each of a corresponding plurality of messages for the message type corresponding to the detected communication disruption, and does not judge that a communication abnormality state exists if authentication has failed the predetermined number or more times among the multiple authentications performed by the authentication unit for each of the corresponding plurality of messages.

[0012] In the communication device according to claim 3, when the discarding unit discards the message that has failed authentication, the information processing unit detects a communication disruption based on the reception status of the discarded message. Then, when the communication disruption is detected, the determination unit determines that the communication is abnormal if the authentication fails less than a predetermined number of times among the multiple authentications performed by the authentication unit for each of the corresponding multiple messages for the type of message corresponding to the detected communication disruption, and does not determine that the communication is abnormal if the authentication fails the predetermined number of times or more among the multiple authentications performed by the authentication unit for each of the corresponding multiple messages.

[0013] Therefore, by discarding a message that has failed authentication, even if a communication disruption is detected, if the authentication fails a predetermined number of times or more among the multiple authentications performed by the authentication unit for each of the multiple corresponding messages for the type of message corresponding to the detected communication disruption, the communication device does not determine that a communication abnormality exists. Therefore, according to the communication device, even if a message that has failed authentication is discarded, it is possible to prevent erroneous determination of a communication abnormality.

[0014] The communication device described in claim 4 is a communication device described in any one of claims 1 to 3, wherein the authentication unit authenticates the message based on an encryption key stored in a memory and the authentication information assigned to the message, and the judgment unit judges that the encryption key of the other communication device is in an abnormal state if the authentication fails more than the predetermined number of times among the multiple authentications performed by the authentication unit for each of the corresponding multiple messages.

[0015] In the communication device according to claim 4, the determination unit determines that the encryption key of the other communication device is in an abnormal state when, for each of the other communication devices or for each type of message, the authentication fails the predetermined number of times or more among the multiple authentications performed by the authentication unit for each of the corresponding multiple messages. Therefore, the communication device can determine that the encryption key of the other communication device is in an abnormal state.

[0016] The communication device according to claim 5 is the communication device according to any one of claims 1 to 4, wherein the determination unit determines that a communication abnormality has occurred when some of a plurality of authentications performed by the authentication unit for each of the corresponding plurality of messages has failed; When all of the plurality of authentications performed by the authentication unit for each of the corresponding plurality of messages fail, it is not determined that the communication is in an abnormal state.

[0017] In the communication device described in claim 5, when some of the multiple authentications performed by the authentication unit for each of the corresponding multiple messages fail, the judgment unit judges that a communication abnormality state exists, and when all of the multiple authentications performed by the authentication unit for each of the corresponding multiple messages fail, the judgment unit does not judge that a communication abnormality state exists.

[0018] A vehicle according to a sixth aspect of the present invention includes a plurality of the communication devices according to any one of the first to fifth aspects of the present invention.

[0019] A communication method according to claim 7, in which a receiving unit receives from each of other communication devices a message to which authentication information generated by the other communication device is attached, an authentication unit authenticates each of the messages received by the receiving unit based on the authentication information attached to the message, and a judgment unit judges, for each of the other communication devices or for each type of message, that a communication abnormality state exists if authentication fails less than a predetermined number of times among multiple authentications performed by the authentication unit for each of a corresponding plurality of messages, and does not judge that a communication abnormality state exists if authentication fails the predetermined number or more times among the multiple authentications performed by the authentication unit for each of a corresponding plurality of messages.

[0020] In the communication method according to claim 7, a receiving unit receives a message from each of the other communication devices, the message having authentication information generated by the other communication device attached thereto, and an authenticating unit authenticates each of the messages received by the receiving unit based on the authentication information attached to the message.

[0021] Then, if the judgment unit fails to authenticate less than a predetermined number of times among the multiple authentications performed by the authentication unit for each of the corresponding multiple messages for each of the other communication devices or for each type of message, it judges that a communication abnormality state exists, and if the judgment unit fails to authenticate more than the predetermined number of times among the multiple authentications performed by the authentication unit for each of the corresponding multiple messages, it does not judge that a communication abnormality state exists.

[0022] As described above, according to this communication method, even if authentication has failed for some of the data received from a plurality of communication devices, it is possible to prevent erroneous determination of a communication abnormality state.

[0023] The program described in claim 8 is a program for causing a computer to execute a process of receiving, from each of other communication devices, a message to which authentication information generated by the other communication device is attached, authenticating each of the received messages based on the authentication information attached to the message, determining that a communication abnormality state exists if, for each of a plurality of corresponding messages, for each of the other communication devices or for each of the message types, authentication fails less than a predetermined number of times, and not determining that a communication abnormality state exists if, for each of a plurality of corresponding messages, authentication fails the predetermined number or more times.

[0024] The program according to claim 8 causes a computer to execute the following process: The computer receives, from each of the other communication devices, a message to which authentication information generated by the other communication devices is attached, and for each of the received messages, the computer authenticates the message based on the authentication information attached to the message.

[0025] The computer determines that a communication abnormality exists if, for each of the other communication devices or each of the message types, authentication fails less than a predetermined number of times among the multiple authentications performed on each of the corresponding multiple messages, and does not determine that a communication abnormality exists if, for each of the corresponding multiple messages, authentication fails more than the predetermined number of times among the multiple authentications performed on each of the corresponding multiple messages.

[0026] As described above, according to the program, even if authentication has failed for some of the data received from a plurality of communication devices, it is possible to prevent erroneous determination of an abnormal communication state. Effect of the Invention

[0027] According to the present invention, even if authentication has failed for some of the data received from a plurality of communication devices, it is possible to prevent erroneous determination of a communication abnormality state. [Brief description of the drawings]

[0028] [Figure 1] 1 is a diagram showing a schematic configuration of a vehicle communication system according to an embodiment; [Diagram 2] 2 is a block diagram showing a hardware configuration of an ECU according to the embodiment; FIG. [Diagram 3] FIG. 2 is a block diagram showing an example of a configuration of a storage according to an embodiment. [Figure 4] FIG. 2 is a block diagram illustrating an example of a functional configuration of a CPU according to the embodiment. [Diagram 5] FIG. 2 is a diagram for explaining the flow of data in a transmitting side and a receiving side ECU. [Figure 6] FIG. 13 is a diagram illustrating an example of a verification result list. [Figure 7] 10 is a flowchart showing a process flow in a transmitting ECU. [Figure 8] 10 is a flowchart showing a flow of an abnormality determination process in a receiving ECU. [Figure 9] 10 is a flowchart showing a flow of an abnormality recording process in a receiving ECU. [Figure 10] 11 is a flowchart showing a flow of a communication interruption recording process in a receiving ECU. [Figure 11] 13 is a flowchart showing a flow of an attack detection recording process in a receiving ECU. [Figure 12] 4 is a flowchart showing a flow of diagnostic processing in the diagnostic device. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0029] (Communications Systems) Fig. 1 is a block diagram showing a schematic configuration of a vehicle communication system 12 according to an embodiment. As shown in Fig. 1, the vehicle communication system 12 according to this embodiment includes a plurality of ECUs (Electronic Control Units) 10, which are communication devices, and a bus 14, which is a communication path connecting the plurality of ECUs 10 together. The vehicle communication system 12 according to this embodiment is formed as a network that connects the ECUs 10 provided in a vehicle 11, for example.

[0030] FIG. 1 illustrates three ECUs 10, namely, ECU 10A, ECU 10B, and ECU 10C. ECU 10A, ECU 10B, and ECU 10C correspond to slave ECUs, and the illustration of the ECU 10 corresponding to the master ECU is omitted. In the following description, ECU 10A and ECU 10B are described as ECUs 10 on the transmitting side that transmit communication frames, and ECU 10C is described as ECU 10 on the receiving side that receives communication frames. Note that the bus 14 may be connected to more ECUs 10 than the ECUs 10A, 10B, and 10C. In addition, the vehicle communication system 12 of the present embodiment employs a bus-type bus structure, but may employ a star-type, ring-type, or line-type (daisy chain connection) bus structure without being limited thereto.

[0031] The vehicle communication system 12 of this embodiment employs a CAN (Controller Area Network) protocol or a CAN-FD (CAN With Flexible Data Rate) protocol, which has a faster communication speed than the CAN protocol, as a communication method for communication between the ECUs 10. Note that the communication method is not limited to this, and a LAN standard such as Ethernet (registered trademark) may also be employed.

[0032] (ECU) 2, the ECU 10 of the present embodiment includes a microcontroller 20 and a CAN transceiver 30. The microcontroller 20 includes a central processing unit (CPU) 22, a read only memory (ROM) 24, a random access memory (RAM) 26, and a CAN controller 28.

[0033] The CPU 22 is a central processing unit that executes various programs and controls each part. That is, the CPU 22 reads out the programs from the ROM 24 and executes the programs using the RAM 26 as a working area. In this embodiment, an execution program 100 is stored in the ROM 24 (see FIG. 3).

[0034] The ROM 24 stores various programs and various data.

[0035] The RAM 26 temporarily stores programs and data as a working area.

[0036] The storage 27 stores various programs and various data. As shown in FIG. 3, the storage 27 stores an execution program 100, key data 110, message data 120, code data 130, and an authentication result list 140. The key data 110 stores data of an encryption key 52 (see FIG. 5) for generating a message authentication code (MAC). The message data 120 stores a message 62 (see FIG. 5) transmitted or received by the ECU 10. The code data 130 stores a diagnostic trouble code (DTC) indicating a device failure and a record of behavior (Rob) code indicating a communication abnormality. The device failure may be stored in a format other than the DTC, and the communication abnormality may be stored in a code format other than the Rob code. The authentication result list 140 stores an authentication result of authenticating a message for each message ID.

[0037] The CAN controller 28 realizes functions related to the CAN protocol and the CAN-FD protocol, such as communication arbitration and error checking.

[0038] The CAN transceiver 30 is connected to the microcontroller 20 and the bus 14, and has the function of transmitting communication frames input from the microcontroller 20 to the bus 14, and inputting communication frames transferred by the bus 14 to the microcontroller 20.

[0039] Fig. 4 is a block diagram showing an example of a functional configuration of the ECU 10. As shown in Fig. 4, the ECU 10 has a transmitting unit 200, a receiving unit 210, a generating unit 220, an authenticating unit 230, a discarding unit 240, a determining unit 250, and an information processing unit 260. Each functional configuration is realized by the CPU 22 reading out and executing an execution program 100 stored in the ROM 24.

[0040] The transmitting unit 200 has a function of transmitting a communication frame to another ECU 10 .

[0041] The receiving unit 210 has a function of receiving a communication frame from another ECU 10. The transmitting unit 200 and the receiving unit 210 of this embodiment are controlled based on the communication method of the CAN protocol or the CAN-FD protocol. Therefore, the communication frame includes communication data 60. As shown in Fig. 5, the communication data 60 includes a message 62 and a MAC 64 generated from the message 62. In addition, the message 62 has a CANID as a message ID indicating the type of the message 62.

[0042] The generation unit 220 has a function of generating a MAC64 from predetermined data using the encryption key 52. ​​The generation unit 220 in the transmitting ECU 10 generates a MAC64 by performing calculation processing based on the encryption key 52 and the sending data 50 input from a sensor or a communication device mounted on the vehicle 11. The generation unit 220 in the receiving ECU 10 generates a verification MAC66 by performing calculation processing based on the encryption key 52 and the message 62 received from the transmitting ECU 10. As the encryption key 52 in this embodiment, a common key common to the transmitting and receiving sides is used.

[0043] The authentication unit 230 has a function of authenticating each of the messages 62 received by the receiving unit 210. The authentication unit 230 compares the MAC 64 included in the received communication data 60 with a verification MAC 66 generated from the received message 62, and authenticates the message 62 if they match.

[0044] Authentication unit 230 stores the authentication result for each message 62 received by reception unit 210 in authentication result list 140. For example, each combination of a CANID and an authentication result is stored in authentication result list 140, as shown in FIG.

[0045] The discard unit 240 discards the message 62 that has failed authentication by the authentication unit 230. For example, the discard unit 240 deletes the message 62 that has failed authentication from the RAM 26 or the storage 27.

[0046] The judgment unit 250 has the function of judging whether the state is normal, communication abnormal, or key abnormal for each type of message 62 based on the authentication results performed by the authentication unit 230 for each of the corresponding multiple messages.

[0047] The normal state is a state indicating that there is no abnormality in the ECU 10 and that communication in the ECU 10 is normal. The communication abnormal state is a state indicating that there is no abnormality in the ECU 10 but that the ECU 10 is subject to a security attack such as hacking, or is information indicating that the communication function of the ECU 10 has failed. Note that a temporary communication failure may also be included as a failure of the communication function. The key abnormal state is a state indicating that there is an abnormality in the encryption key 52 of the ECU 10 that sent the message 62.

[0048] Specifically, for each CANID, based on the authentication results performed by the authentication unit 230 for each of the multiple messages 62 having that CANID, if some of the multiple authentications fail, the judgment unit 250 judges that a communication abnormality state has occurred, and if all of the multiple authentications fail, the judgment unit 250 does not judge that a communication abnormality state has occurred, but rather judges that a key abnormality state has occurred in the ECU 10 that sent the message 62 having that CANID.

[0049] More specifically, for each CANID, after starting the vehicle 11, the judgment unit 250 judges that the state is normal if all authentications are successful based on the results of a first predetermined number of authentications for the message 62 having that CANID, judges that the state is abnormal if at least a second predetermined number of authentications out of the first predetermined number of authentications are successful and some authentications fail, and judges that the state is abnormal in communication if all authentications fail, rather than judging that the state is abnormal in key for the ECU 10 that sent the message 62 having that CANID.

[0050] Here, the "first predetermined number of times" in this embodiment is a number of times equivalent to the time required from when the ECU 10 is started until the devices related to authentication (e.g., the generation unit 220 and the authentication unit 230) are ready. The "second predetermined number of times" is defined as follows. The probability that the message 62 is authenticated the second predetermined number of times due to a coincidence between the MAC 64 and the verification MAC 66 is set to a number of times lower than the failure rate of the D grade of the ASIL (Automotive Safety Integrity Level).

[0051] In addition, if authentication is successful less than the second predetermined number of times, the judgment unit 250 may not judge that a communication abnormality state exists, even if all authentications have not failed, but may instead judge that a key abnormality state exists for the ECU 10 that sent the message 62 having the CANID.

[0052] In addition, when a communication disruption is detected by the information processing unit 260 described later, the judgment unit 250 judges whether the type of message 62 corresponding to the detected communication disruption is in a normal state, a communication abnormal state, or a key abnormal state, based on multiple authentication results performed by the authentication unit 230.

[0053] Specifically, based on the authentication results performed by the authentication unit 230 for each of the multiple messages 62 having the same CANID as the message 62 in which the communication disruption was detected, if some of the multiple authentications fail, it is determined that a communication abnormality state has occurred, and if all of the multiple authentications fail, it is not determined that a communication abnormality state has occurred, but rather that a key abnormality state has occurred in the ECU 10 that sent the message 62 having the CANID.

[0054] More specifically, when a communication disruption is detected by the information processing unit 260, the judgment unit 250 judges that the state is normal if all authentications are successful based on the authentication results of a first predetermined number of times for the message 62 having the same CANID as the message 62 in which the communication disruption was detected, judges that the state is abnormal if at least a second predetermined number of authentications out of the first predetermined number of times are successful and some authentications fail, and judges that the state is abnormal in communication if all authentications fail, rather than judging that the state is abnormal in key for the ECU 10 that sent the message 62 having the CANID.

[0055] The information processing unit 260 has a function of processing messages 62 acquired from other ECUs 10 and sensors of each unit. For example, if the ECU 10 is a meter ECU that displays information about the vehicle 11, the information processing unit 260 can display information on the meter panel based on the received message 62. Furthermore, if the determination unit 250 determines that the key is in an abnormal state, the information processing unit 260 executes fail-safe processing for the key abnormal state. For example, if the ECU 10 is a meter ECU that displays information about the vehicle 11, and the message 62 of the CANID when it is determined that the key is in an abnormal state indicates information to be displayed on the meter panel, the information processing unit 260 can display predetermined information on the meter panel.

[0056] Furthermore, information processing unit 260 detects a communication interruption of message 62 based on the reception status of message 62. For example, when discarding unit 240 discards multiple messages 62 having the same CANID that have failed authentication by authentication unit 230, information processing unit 260 detects a communication interruption of message 62.

[0057] (action) Next, in this embodiment, when communication data 60 is transmitted from ECU 10A and ECU 10B to ECU 10C, the flow of processing executed in each ECU 10 will be described with reference to the flowcharts of Figures 7 to 11. Note that similar processing can be executed when communication data 60 is transmitted from ECU 10B and ECU 10C to ECU 10A, and when communication data 60 is transmitted from ECU 10C and ECU 10A to ECU 10B.

[0058] In the transmitting ECU 10A and ECU 10B, the CPU 22 executes the processes based on the following steps.

[0059] 7, the CPU 22 acquires the sending data 50. The acquired sending data 50 becomes a message 62 having a CANID, which is included in the communication data 60 (see FIG. 5).

[0060] In step S102, the CPU 22 generates a MAC64 and assigns it to the message 62. That is, the CPU 22 performs arithmetic processing based on the transmission data 50 and the encryption key 52 to generate the MAC64, and assigns the generated MAC64 to the lower bits of the message 62 (see FIG. 5).

[0061] In step S104, the CPU 22 transmits the communication data 60 including the message 62 and the MAC 64 to the ECU 10 on the receiving side.

[0062] In step S106, the CPU 22 determines whether or not a predetermined time has elapsed. In the vehicle communication system 12 of this embodiment, the same communication data 60 is transmitted within the predetermined time to prevent the ECU 10 on the receiving side from missing the communication data 60. If the CPU 22 determines that the predetermined time has elapsed, the process returns to step S100. On the other hand, if the CPU 22 determines that the predetermined time has not elapsed, the process returns to step S104. That is, the process of transmitting the existing communication data 60 until the predetermined time has elapsed and transmitting new communication data 60 after the predetermined time has elapsed is repeated.

[0063] Subsequently, in the ECU 10C on the receiving side, the CPU 22 executes the abnormality determination process. The abnormality determination process shown in Fig. 8 is executed for each CAN ID, which is a message ID.

[0064] In step S110 of FIG. 8, the CPU 22 receives communication data 60 including a message 62 having a target CANID from the ECU 10 on the transmission side.

[0065] In step S112, the CPU 22 executes an authentication process. That is, the CPU 22 performs a calculation process based on the message 62 and the encryption key 52 to generate a verification MAC 66, and compares the verification MAC 66 with the MAC 64 included in the communication data 60 (see FIG. 5).

[0066] In step S114, the CPU 22 records the authentication result in step S112 in the authentication result list 140 together with the CANID.

[0067] In step S116, the CPU 22 determines whether or not the authentication process of the message 62 having the target CANID has been performed a first predetermined number of times or more since the start of the ECU 10. If the CPU 22 determines that the authentication process of the message 62 having the target CANID has been performed a first predetermined number of times or more since the start of the ECU 10, the process proceeds to step S118. On the other hand, if the CPU 22 determines that the authentication process of the message 62 having the target CANID has not been performed a first predetermined number of times or more since the start of the ECU 10, the process returns to step S110. In other words, the CPU 22 repeats receiving the communication data 60 until the authentication process of the message 62 having the target CANID has been performed a first predetermined number of times or more since the start of the ECU 10. The received communication data 60 is temporarily stored in the RAM 26 or the storage 27.

[0068] Thereafter, in steps S118 to S122, a state is determined based on the comparison result between MAC64 and verification MAC66.

[0069] In step S118, the CPU 22 determines whether or not all authentications of the message 62 having the target CANID are successful. That is, the CPU 22 determines whether or not the MAC 64 and the verification MAC 66 match each other in all authentication processes performed multiple times on the message 62 having the target CANID. If the CPU 22 determines that all authentications are successful, the process proceeds to step S128. In this case, the communication of the message 62 having the target CANID is determined to be normal. On the other hand, if the CPU 22 determines that all authentications are not successful, the process proceeds to step S120.

[0070] In step S120, the CPU 22 judges whether the authentication of the message 62 having the target CANID has been successful for a second predetermined number of times or more and includes failures. That is, the CPU 22 judges whether the authentication process for the message 62 having the target CANID has resulted in a second predetermined number of times or more where the MAC 64 and the verification MAC 66 match, and includes a case where the MAC 64 and the verification MAC 66 do not match. If the CPU 22 judges that the authentication of the message 62 having the target CANID has been successful for a second predetermined number of times or more and includes failures, the process proceeds to step S128. In this case, the communication of the message 62 having the target CANID is determined to be in an abnormal communication state. On the other hand, if the CPU 22 judges that the authentication of the message 62 having the target CANID has not been successful for a second predetermined number of times or more and does not include failures, that is, the authentication success is less than the second predetermined number of times, the process proceeds to step S122.

[0071] In step S122, the CPU 22 determines whether or not all authentications of messages 62 having the target CANID have failed. That is, the CPU 22 determines whether or not the MAC 64 and the verification MAC 66 do not match each other in all authentication processes performed multiple times on the message 62 having the target CANID. If the CPU 22 determines that all authentications of messages 62 having the target CANID have failed, the process proceeds to step S124. On the other hand, if the CPU 22 determines that all authentications have not failed, the process proceeds to step S128.

[0072] It should be noted that step S122 may be omitted. In this case, if it is determined in step S120 that the number of successful authentication attempts is less than the second predetermined number, the CPU 22 proceeds to step S124.

[0073] In step S124, the CPU 22 records in the RAM 26 the key abnormality state for the message 62 having the target CANID.

[0074] In step S126, the CPU 22 transitions to fail-safe processing for the message 62 having the target CANID in the event of a key abnormality.

[0075] In step S128, the CPU 22 ends recording of the authentication result for the message 62 having the target CANID, and ends the abnormality determination process.

[0076] After the abnormality determination process is executed for each CANID, the CPU 22 of the ECU 10C on the receiving side executes the abnormality recording process shown in FIG.

[0077] In step S130, the CPU 22 determines whether or not a key abnormality state is recorded for at least one CANID. If the result of the abnormality determination process indicates that a key abnormality state is recorded for at least one CANID, the process proceeds to step S132. On the other hand, if a key abnormality state is not recorded, the abnormality recording process is terminated.

[0078] In step S132, the CPU 22 stores the Rob code, that is, the CPU 22 stores a code indicating that an abnormality has occurred in communication.

[0079] In step S134, the CPU 22 causes the meter panel to display a message indicating that the key is in an abnormal state.

[0080] In step S136, the CPU 22 determines whether or not an abnormal key state has been recorded for all CANIDs. If the result of the abnormality determination process indicates that an abnormal key state has been recorded for all CANIDs, the process proceeds to step S138. On the other hand, if an abnormal key state has not been recorded for at least one CANID, the abnormality recording process is terminated.

[0081] In step S138, the key abnormality state of the ECU 10C itself is recorded in the storage 27, and the abnormality recording process is terminated.

[0082] Furthermore, when a communication interruption is detected, the abnormality determination process shown in Fig. 8 is executed for the same CANID as the message 62 in which the communication interruption was detected. Furthermore, the abnormality recording process shown in Fig. 9 is executed periodically.

[0083] In addition, in the ECU 10C on the receiving side, the CPU 22 executes a communication interruption recording process shown in Fig. 10. The communication interruption recording process is executed for each CANID, which is a message ID.

[0084] In step S140, CPU 22 determines whether or not communication data 60 including a message 62 having the target CANID has been received. If communication data 60 including a message 62 having the target CANID has been received, the process proceeds to step S142. On the other hand, if communication data 60 including a message 62 having the target CANID has not been received, the process proceeds to step S144.

[0085] In step S142, the CPU 22 clears the value of a communication disruption counter for recording communication disruption to 0, and returns to step S140.

[0086] In step S144, the CPU 22 increments the value of the communication interruption counter, and then the process proceeds to step S146.

[0087] In step S146, the CPU 22 judges whether the value of the communication disruption counter has reached the disruption threshold for detecting communication disruption. If the value of the communication disruption counter has not reached the disruption threshold, the process returns to step S140. On the other hand, if the value of the communication disruption counter has reached the disruption threshold, the process proceeds to step S148.

[0088] In step S148, CPU 22 determines whether or not a key abnormality state for message 62 having the target CANID is recorded in RAM 26. If the above abnormality determination process determines that a key abnormality state for message 62 having the target CANID is recorded in RAM 26, the process proceeds to step S150. On the other hand, if a key abnormality state for message 62 having the target CANID is not recorded in RAM 26, the process proceeds to step S152.

[0089] In step S150, the CPU 22 performs masking to prohibit recording of the communication interruption diagnosis, and ends the communication interruption recording process.

[0090] In step S152, the CPU 22 records the communication interruption diagnosis in the storage 27. In step S154, the CPU 22 executes a fail-safe process for when communication is interrupted for the message 62 having the target CANID, and ends the communication interruption recording process.

[0091] In addition, in the ECU 10C on the receiving side, the CPU 22 executes an attack detection recording process shown in Fig. 11. The attack detection recording process is executed for each CAN ID, which is a message ID.

[0092] In step S160, the CPU 22 receives communication data 60 including a message 62 having a target CANID, similar to step S110 above.

[0093] In step S162, the CPU 22 executes the authentication process in the same manner as in step S112.

[0094] In step S164, the CPU 22 determines whether or not the authentication in the authentication process in step S162 is successful. If the authentication in the authentication process in step S162 is successful, the process returns to step S160. On the other hand, if the authentication in the authentication process in step S162 is unsuccessful, the process proceeds to step S166.

[0095] In step S166, CPU 22 determines whether or not a key abnormality state for message 62 having the target CANID is recorded in RAM 26. If the above abnormality determination process determines that a key abnormality state for message 62 having the target CANID is recorded in RAM 26, the process proceeds to step S168. On the other hand, if a key abnormality state for message 62 having the target CANID is not recorded in RAM 26, the process proceeds to step S170.

[0096] In step S168, the CPU 22 performs masking to prohibit recording of the attack detection, and ends the attack detection recording process.

[0097] In step S170, the CPU 22 records the attack detection in the storage 27, and ends the attack detection recording process.

[0098] Furthermore, when an operator checks an abnormality state display on the meter panel of vehicle 11 during work at the dealer, as shown in Fig. 1 above, dealer diagnostic device 320 is connected to vehicle communication system 12 via diagnostic interface unit 310 of vehicle 11. Then, dealer diagnostic device 320 executes the diagnostic process shown in Fig. 12.

[0099] In step S200, the dealer diagnostic device 320 reads information indicating the vehicle state, including the Rob code, from the storage 27 of each ECU 10 of the vehicle 11.

[0100] In step S202, the dealer diagnostic device 320 determines whether or not the information read in step S200 includes a Rob code. If the information read in step S200 includes a Rob code, the process proceeds to step S206. If the information read in step S200 does not include a Rob code, the process proceeds to step S204.

[0101] In step S204, the dealer diagnostic device 320 determines that the abnormality is other than the key abnormal state, and ends the diagnostic process.

[0102] In step S206, the dealer diagnostic device 320 performs key updating processing for each ECU 10 of the vehicle communication system 12.

[0103] In step S208, the dealer diagnostic device 320 restarts the vehicle communication system 12 of the vehicle 11. At this time, the abnormality determination process shown in FIG. 8 and the abnormality recording process shown in FIG. 9 are executed in each ECU 10.

[0104] Then, when a certain period of time has elapsed after the restart, the dealer diagnostic device 320 reads information indicating the vehicle state, including the Rob code, from the storage 27 of each ECU 10 of the vehicle communication system 12.

[0105] In step S210, the dealer diagnostic device 320 determines whether or not the information read in step S208 includes a Rob code. If the information read in step S208 includes a Rob code, the process returns to step S206. If the information read in step S200 does not include a Rob code, the diagnostic process ends.

[0106] (summary) When some of the authentications performed by the authentication unit 230 for each of a plurality of messages corresponding to one of the message types fail, the ECU 10 of the vehicle communication system 12 of this embodiment can determine that there is an abnormality in the encryption key of the other ECU 10 and that there is no communication abnormality such as hacking. Therefore, according to the ECU 10, even if authentication has failed for some of the data received from the plurality of ECUs 10, it is possible to prevent erroneous determination of a communication abnormality state.

[0107] Conventionally, there is a technique in which a slave ECU receives a message including a MAC generated using a correct encryption key from a master ECU having the correct encryption key, and performs MAC authentication to diagnose a fault in the slave ECU itself.

[0108] However, when communication is performed between slave ECUs, even if the encryption key of the other party is incorrect, this cannot be detected, and there is a risk that the ECU will be erroneously diagnosed as having a malfunction and recorded as an abnormality.

[0109] In the vehicle communication system 12 of this embodiment, if some of the multiple MAC authentications performed for each of the multiple messages fail, a communication abnormality state is recorded, and if all of the multiple MAC authentications fail, it is determined that the encryption key of the other ECU is in an abnormal key state, and the communication abnormality state is not recorded. In this way, if the encryption key of the other ECU is incorrect, all of the multiple MAC authentications fail, but in this case, it is possible to not record the communication abnormality state. For example, even if the encryption key of some ECU is forgotten to be updated, it is possible to not record the communication abnormality state.

[0110] Furthermore, when an unauthorized attack occurs, the security function prevents the attack and records the occurrence of the attack. However, when the ECU is not in a normal state, the security function unintentionally erroneously detects an attack. In this embodiment, erroneous detection by the security function when the ECU is not in a normal state is suppressed.

[0111] (remarks) In the above embodiment, a case has been described in which, for each CANID, if some of the authentications have failed based on the authentication results performed by the authentication unit 230 for each of the multiple messages 62 having the CANID, a communication abnormality state is determined, and if all of the authentications have failed, a key abnormality state of the ECU 10 that is the transmission source of the message 62 having the CANID is determined without determining a communication abnormality state. However, the present invention is not limited to this. For example, for each transmission source ECU 10, if some of the authentications have failed based on the authentication results performed by the authentication unit 230 for each of the multiple messages 62 received from the ECU 10, a communication abnormality state is determined, and if all of the authentications have failed, a key abnormality state of the ECU 10 is determined without determining a communication abnormality state. In this case, each ECU may hold in advance a correspondence relationship between the CANID and the transmission source ECU, and may perform a determination for each transmission source ECU 10 based on the authentication results performed by the authentication unit 230 for each of the multiple messages 62 having the CANID corresponding to the ECU 10.

[0112] In addition, various processes that the CPU 22 reads and executes software (programs) in the above embodiment may be executed by various processors other than the CPU. In this case, examples of the processor include a PLD (Programmable Logic Device) such as an FPGA (Field-Programmable Gate Array) whose circuit configuration can be changed after manufacture, and a dedicated electric circuit such as an ASIC (Application Specific Integrated Circuit) which is a processor having a circuit configuration designed exclusively for executing a specific process. In addition, the abnormality determination process and the abnormality recording process described above may be executed by one of these various processors, or may be executed by a combination of two or more processors of the same or different types (for example, a plurality of FPGAs, a combination of a CPU and an FPGA, etc.). In addition, the hardware structure of these various processors is, more specifically, an electric circuit that combines circuit elements such as semiconductor elements.

[0113] In the above embodiment, the program has been described as being stored (installed) in advance in a non-transitory recording medium that can be read by a computer. For example, the execution program 100 is stored in advance in the ROM 24. However, the present invention is not limited to this, and the execution program 100 may be provided in a form recorded in a non-transitory recording medium such as a CD-ROM (Compact Disc Read Only Memory), a DVD-ROM (Digital Versatile Disc Read Only Memory), or a USB (Universal Serial Bus) memory. The execution program 100 may also be downloaded from an external device via a network.

[0114] The process flow described in the above embodiment is merely an example, and unnecessary steps may be deleted, new steps may be added, or the process order may be changed without departing from the spirit of the invention. [Explanation of symbols]

[0115] 10 ECU (communication device) 11 Vehicles 12 Vehicle communication system 22 CPU 27 Storage 50 Sending Data 52 Encryption Key 60 Communication Data 62 Messages 66 Verification MAC 100 Executable Programs (Programs) 110 Key Data 140 Authentication Result List 200 Transmitter 210 Receiving unit 220 Generation part 230 Authentication Department 240 Destruction Division 250 Judgment section 260 Information Processing Section

Claims

1. A communication device, comprising: a receiving unit that receives, from the other communication device, a message to which authentication information generated by the other communication device is added; an authentication unit that authenticates each of the plurality of messages received by the receiving unit based on the authentication information attached to the message; if the authentication fails less than a predetermined number of times among the multiple authentications performed by the authentication unit for each of the multiple messages, it is determined that the communication between the communication device and the other communication device is in an abnormal state; a determination unit that does not determine that communication between the communication device and the other communication device is in an abnormal state when authentication fails a predetermined number of times or more among the multiple authentications performed by the authentication unit for each of the multiple messages; A communication device comprising:

2. A communication device, a receiving unit that receives a message, to which authentication information generated by each of the other communication devices is added, from each of the other communication devices; an authentication unit that authenticates each of the plurality of messages received by the receiving unit based on the authentication information attached to the message; determining that communication between the communication device and the plurality of other communication devices is in an abnormal state when a number of authentication failures for a predetermined type of message among the plurality of authentications performed by the authentication unit for each of the plurality of messages is less than a predetermined number; a determination unit that does not determine that communication between the communication device and the other communication devices is in an abnormal state when authentication failures for a predetermined type of message among the plurality of authentications performed by the authentication unit for each of the plurality of messages occur a predetermined number of times or more; A communication device comprising:

3. The message has identification information indicating a type of the message, The determination unit is For each of the identification information, When the authentication unit fails to authenticate each of the plurality of messages having the identification information less than a predetermined number of times, the communication is determined to be in an abnormal state; 3. The communication device according to claim 2, wherein if the authentication fails a predetermined number of times or more among the multiple authentications performed by the authentication unit for each of the multiple messages having the identification information, the communication is not determined to be in an abnormal state.

4. a discard unit for discarding the message that has failed authentication; and an information processing unit that executes information processing according to the message, The information processing unit detects a communication interruption based on a reception status of the message, When the communication interruption is detected, the determination unit Regarding the type of the message corresponding to the detected communication disruption, If the authentication fails less than a predetermined number of times among the multiple authentications performed by the authentication unit for each of the multiple messages, the communication is determined to be in an abnormal state; A communication device as described in any one of claims 1 to 3, wherein if the authentication performed by the authentication unit for each of the multiple messages fails a predetermined number of times or more, the communication is not determined to be in an abnormal state.

5. The authentication unit authenticates the message based on an encryption key stored in a memory and the authentication information assigned to the message; A communication device as described in any one of claims 1 to 4, wherein the judgment unit judges that the encryption key of the other communication device is in an abnormal state if multiple authentications performed by the authentication unit for each of the multiple messages fail more than a predetermined number of times.

6. the determination unit determines that communication is in an abnormal state when some of the multiple authentications performed by the authentication unit for each of the multiple messages have failed; 6. The communication device according to claim 1, wherein if all of the multiple authentications performed by the authentication unit for each of the multiple messages fail, the communication is not determined to be in an abnormal state.

7. A vehicle comprising a plurality of communication devices according to any one of claims 1 to 6.

8. A receiving unit receives a message from another communication device, the message including authentication information generated by the other communication device; an authentication unit authenticates each of the plurality of messages received by the receiving unit based on the authentication information assigned to the message; a determination unit, when the authentication fails less than a predetermined number of times among the plurality of authentications performed by the authentication unit for each of the plurality of messages, determining that the communication between the communication device and the other communication device is in an abnormal state; When the authentication fails a predetermined number of times or more among the plurality of authentications performed by the authentication unit for each of the plurality of messages, the communication between the communication device and the other communication device is not determined to be in an abnormal state. Communication methods.

9. a receiving unit receiving, from each of a plurality of other communication devices, a message to which authentication information generated in the other communication devices is attached; an authentication unit authenticates each of the plurality of messages received by the receiving unit based on the authentication information assigned to the message; a determination unit, when a number of times of authentication failures for a predetermined type of message among a plurality of authentications performed by the authentication unit for each of the plurality of messages is less than a predetermined number, determining that communication between the communication device and the plurality of other communication devices is in an abnormal state; When the number of times that authentication failures for a predetermined type of message among the plurality of authentications performed by the authentication unit for each of the plurality of messages is equal to or greater than the predetermined number, the communication between the communication device and the plurality of other communication devices is not determined to be in an abnormal state. Communication methods.

10. receiving a message from another communication device, the message including authentication information generated by the other communication device; authenticating each of the received messages based on the authentication information attached to the message; if authentication fails less than a predetermined number of times among a plurality of authentications performed on each of the plurality of messages, it is determined that communication between the communication device and the other communication device is in an abnormal state; If authentication fails a predetermined number of times or more among the plurality of authentications performed for each of the plurality of messages, the communication between the communication device and the other communication device is not determined to be in an abnormal state. A program that causes a computer to execute a process.

11. A method for receiving a message from each of a plurality of other communication devices, the message including authentication information generated by the other communication devices; authenticating each of the received messages based on the authentication information attached to the message; determining that communication between the communication device and the plurality of other communication devices is in an abnormal state when a number of times that authentication failures for a predetermined type of message among a plurality of authentications performed for each of the plurality of messages is less than a predetermined number; When the number of times that authentication failures for a predetermined type of message among the plurality of authentications performed for each of the plurality of messages is equal to or greater than the predetermined number, the communication between the communication device and the plurality of other communication devices is not determined to be in an abnormal state. A program that causes a computer to execute a process.

Citation Information

Patent Citations

  • Authentication processing method and device, storage medium, and electronic device

    EP3913853A1

  • System for game, device for game, and game control device

    JP2014124463A

  • Data communication device, data communication program, and data communication method

    JP2018032903A

  • Network system

    JP2020188314A

  • Vehicle communication device, communication abnormality determination method, and program

    JP2021083005A