Communication relay device, communication network, and communication relay method

A communication relay device that is situated between a corresponding communication node and a bus in a communication network in which a plurality of communication nodes mutually perform a data communication through the bus. A storage configured to store therein pieces of identification information that are likely to be included in data transmitted by the corresponding communication node. A processor configured to perform first authentication processing between the communication relay device and a management device that is connected to the bus, and to perform second authentication processing according to a result of comparing identification information included in data transmitted by the corresponding communication node with the pieces of identification information stored in the storage. A transceiver configured to report, to the management device, a result of the second authentication processing when the first authentication processing has been successful.

CROSS-REFERENCE TO RELATED APPLICATION

This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2015-146621, filed on Jul. 24, 2015, the entire contents of which are incorporated herein by reference.

FIELD

The embodiments discussed herein are related to a control of a communication between communication devices.

BACKGROUND

A network technology that is called a CAN (controller area network) may be used for performing transmission and reception of data between devices that are used for anon-board network of a vehicle or a factory automation of a vehicle. A system in which the CAN is used includes a plurality of ECUs (electronic control unit). The ECUs communicate with one another by performing transmission and reception of a message. A message that is used for a CAN communication includes identification information (ID) on the message. Further, each of the ECUs has stored therein an ID of a message to be received. A message is broadcast, and each of the ECUs receives a message that includes a set ID but discards a message that includes an ID that is not set to be received.

With respect to a network that is a CAN, a technology is known that rewrites data of a vehicle control device that controls a vehicle. A vehicle is equipped with a device for controlling transmission of data used for rewriting, the device monitoring a transmission state of data transmitted to a CAN bus and transmitting, to the CAN bus, a data frame of data used for rewriting according to the monitored transmission state of data (see, for example, Patent document 1).

A technology is known that permits a vehicle to perform authentication processing so as to determine the validity of an external device such as a maintenance device, which makes an access to an electronic control device of the vehicle. According to a result of the determination, the vehicle determines a range in which the maintenance device is allowed to access the electronic control device. This inhibits the external device from making an unwanted access to the electronic control device of the vehicle (see, for example, Patent document 2).

A technology is known that suppresses the occurrence of an inconvenient event that may be caused due to a communication performed between an external device and an in-vehicle communication system. An indirect route is provided as a communication route that leads to the in-vehicle communication system. The indirect route is provided with a switch that connects an upstream and a downstream or blocks a connection between them. The switch is controlled to connect to the indirect route when an indirect-route connecting request is received from an allowable external tool, and to block the indirect route in other cases (see, for example, Patent document 3).

A vehicle control device is known that detects a malicious message transmitted to an on-board communication network at a lower processing load. With respect to a message to be transmitted, the device performs message-related processing including a validity determination on the basis of whether an identifier included in the message to be transmitted is consistent with an identifier of the device. While performing the message-related processing with respect to a message transmitted by another control device, the device performs control so as not to perform the message-related processing with respect to a message transmitted by itself (see, for example, Patent document 4).

Patent document 2: International Publication Pamphlet No. WO 2009/147734

SUMMARY

A communication relay device that is situated between a corresponding communication node and a bus in a communication network in which a plurality of communication nodes mutually perform a data communication through the bus. A storage configured to store therein pieces of identification information that are likely to be included in data transmitted by the corresponding communication node. A processor configured to perform a first authentication processing between the communication relay device and a management device that is connected to the bus, and to perform a second authentication processing according to a result of comparing identification information included in data transmitted by the corresponding communication node with the pieces of identification information stored in the storage. A transceiver configured to report, to the management device, a result of the second authentication processing when the first authentication processing has been successful.

DESCRIPTION OF EMBODIMENTS

It is assumed that, in a CAN, a certain communication node (ECU) has been replaced by a malicious third party with another communication node (ECU). The replacement communication node transmits data that has a spoofing ID, that is, a message that has an ID to be transmitted by a different communication node, and the data arrives at all communication nodes. A communication node which was supposed to receive an ID that was spoofed by the spoofing ID receives this data, which may result in causing an unintended actuation.

A method is considered as protection against the above-described attack, the method including registering, in each communication node, IDs which the communication node itself is likely to transmit and comparing an ID included in received data with the registered IDs. When data received from a different communication node includes one of the IDs which a certain communication node is likely to transmit, the certain communication node can recognize that a malicious communication node has replaced one of the other communication nodes and spoofs the certain communication node.

However, in the above-described protection, it is possible to detect the existence of a replaced communication node, but not possible to identify the communication node that has been replaced. It is preferably possible to confirm which of the communication nodes has been replaced, preferably as integrated information.

In one aspect, it is an object of the present invention to provide a method that makes it possible to identify a communication node that has been maliciously replaced.

FIG. 1is a diagram that illustrates an example of a CAN that includes a plurality of ECUs each provided with a detector. A system1001includes a CAN101and ECUs111(111ato111f). The ECUs111ato111gare connected to one another through the CAN101. This permits the ECUs to mutually perform transmission and reception of a message. The ECUs111ato111fare provided, in their interfaces connected to the CAN101, with detectors112a(corresponding to the ECU111a) to112f(corresponding to the ECU111f), respectively. The detector holds an ID of a message transmitted by the ECU as a whitelist. In this case, each of the ECUs can transmit a plurality of types of messages, and an ID is set that corresponds to each type of a message. It is assumed that different ECUs do not transmit messages having the same ID in the system1001. The detector detects an anomaly when it receives a message that includes one of the IDs of a plurality of types of messages that are likely to be transmitted by its ECU. Further, the detector can detect that there exists an anomaly in the system1001when it receives one of the IDs of a plurality of types of messages that are likely to be transmitted by an ECU.

A system1002is an example of a system in which the ECU111bof the system1001has been maliciously replaced by someone with an ECU111g. The CAN101, the ECU111a, and the ECUs111cto111fin the system1002are similar to those in the system1001. A message that includes one of the IDs of a plurality of types of messages that are likely to be transmitted by the ECU111ais transmitted to the ECU111g. When the ECU111gtransmits the message, the message arrives at the ECU111a, and the ECUs111cto111f. Then, the detector112aof the ECU111acan detect an anomaly because the message that includes one of the IDs of the plurality of types of messages that are likely to be transmitted by its ECU111ais received.

In the system1002ofFIG. 1, when receiving a message that includes one of the IDs of the plurality of types of messages that the ECU111aitself is likely to transmit, the ECU111acan detect that one of the ECUs111in the system1002has been replaced by someone. However, in the system1002ofFIG. 1, it is possible to detect that one of the ECUs111has been replaced by someone, but it is still not possible to identify the ECU111(hereinafter also referred to as a “communication node”) that has been replaced.

A threat such as a malicious replacement or a falsification of an ECU exists in a vehicular network (CAN). Authentication performed between ECUs may permit a problem due to such a threat to be solved. However, in order for ECUs to perform authentication with respect to one another, an ECU needs to be modified so as to include a function for authentication, with the result that the ECU will not be applicable without any change with respect to a CAN. Thus, a vehicular network is needed that can protect against the threat without modifying an ECU.

Thus, according to the embodiments of the present invention, an authentication function is provided in a child device, not in an ECU. However, it is not possible to identify the ECU that has been maliciously replaced just by providing the authentication function in the child device. Therefore, a parent device is connected to a plurality of child devices through a CAN, and a function of a child-parent authentication that is performed between a parent device and a child device is introduced. One ECU is connected to each child device. The child device allows only data from a correspondingly connected (preregistered) ECU to pass through to the CAN. Accordingly, a whitelist of an ID corresponding to a message transmitted by the correspondingly connected ECU is registered. Further, the child device may be provided with information on a transmission period of a message that is transmitted from an ECU.

With respect to data from the ECU, when data that has an ID other than IDs registered in a whitelist arrives, or when a message arrives at a timing other than those in a transmission period of a message, the child device determines that the ECU is anomalous. When it determines that there exists an anomaly, the child device reports to the parent device by use of an ID that is not used by any ECU. This prevents an attack (a replacement or a falsification of an ECU) on a vehicular network, which permits a management device to identify the communication node that has been maliciously replaced.

FIGS. 2A and 2Bare diagrams that illustrate an example of a system according to a first embodiment. A system2000includes a CAN210, ECUs201(201ato201f), child devices202(202ato202f) and a parent device220. The child devices are connected to one another through the CAN210. The CAN210is, for example, a CAN bus. Further, the parent device220is also communicatively connected to the child devices through the CAN210. The ECUs201ato201fare associated with the child devices202a(corresponding to the ECU201a) to202f(corresponding to the ECU201f), respectively, and are communicatively connected to one another through the CAN210. A child device202is communicatively connected to an ECU201on a one-to-one basis through the CAN210.

FIG. 2Billustrates a functional portion including the parent device220and the child device202bthat are included in the system2000ofFIG. 2A. The child device202bincludes a CAN transceiver231, a storage232, a first authentication unit233, a second authentication unit234, a controller235, and a CAN transceiver236. Each of the child devices202ato202fexcept for the child device202bis similar to the child device202b. The CAN transceiver231is a communication interface that is used when the child device202bcommunicates with another child device or the parent device220through the CAN210. The CAN transceiver236is a communication interface that is used when the child device202bcommunicates with the ECU201bthat is set in association with the child device202bitself. The storage232stores therein, as a whitelist, IDs of a plurality of types of messages that are likely to be transmitted by an ECU201. The whitelist registers therein an ID that corresponds to a message transmitted by an ECU that is preset on a one-to-one basis with a child device202. The first authentication unit233communicates with the parent device220, so as to perform processing of an authentication between the parent device220and the child device202b. The second authentication unit234performs processing of authentication between the ECU201bthat is correspondingly connected to the child device202band the child device202b. The controller235controls processing performed by, for example, the first authentication unit233and the second authentication unit234. An arrow illustrated in the child device202bofFIG. 2Bindicates a flow of data.

The parent device220includes a CAN transceiver221, a first authentication unit222, a storage223, and a controller224. The CAN transceiver221is a communication interface that is used when the parent device220communicates with the child devices202ato202fthrough the CAN210. The first authentication unit222performs a child-parent authentication between itself and the first authentication unit233of the child device202. The storage223stores therein a result of an authentication between the parent device220and the child device202and a result of an authentication between an ECU201corresponding to a child device202and the child device202. The controller224controls processing performed by, for example, the first authentication unit222.

An example of processing performed by the parent device220and the child device202baccording to the first embodiment will now be described in turn.

(A1) A message is transmitted from the ECU201bto the child device202b.

(A2) The CAN transceiver236of the child device202breceives the message transmitted from the ECU201b.

(A3) The second authentication unit234starts performing processing of an authentication of the ECU201b. The second authentication unit234determines whether an ID included in the received message is included in a whitelist that is held by the storage232. In this case, it is assumed that the ECU201bhas still not been maliciously replaced with an ECU201′. Thus, the ID included in the message received from the ECU201bis held in the whitelist of the storage232, so the second authentication unit234determines that the authentication of the ECU201bhas been successful. The child device202performs the processes of (A1) to (A3) repeatedly.

(A4) The first authentication unit233of the child device202bstarts performing processing of a child-parent authentication between the child device202band the parent device220. The child-parent authentication may be performed regularly. The child-parent authentication is performed as preprocessing for reporting, to the parent device220, a result of the authentication performed by the second authentication unit234. In particular, the CAN transceiver231reports, to the parent device220, a request for performing a child-parent authentication.

(A5) The first authentication unit222of the parent device220performs a child-parent authentication in response to the request. The first authentication unit222successfully performs a child-parent authentication between the child device202band the parent device220. The CAN transceiver221reports a result of the child-parent authentication to the child device202b. The result of the child-parent authentication is stored by the controller224of the parent device220in the storage223.

(A6) When there are no problems with the child-parent authentication, the CAN transceiver231reports, to the parent device220, the result of the child-parent authentication (successful) between the child device202band the ECU201b.

(A7) The authentication result transmitted from the child device202bis stored in the storage223by a control performed by the controller224of the parent device220.

The processes of (A1) to (A7) are performed by each of the child devices202ato202fand the parent device220. As a result, the parent device220can collect a result of a child-parent authentication between the parent device220and each of the child devices202ato202fand a result of an authentication between the child device202and the ECU201corresponding to each of the child devices202ato202f. The CAN transceiver231may operate as a report unit of the child device202. The processing performed by the CAN transceiver231is controlled by, for example, the controller235. The processing performed by the CAN transceiver221is controlled by, for example, the controller224. The ECU201may be a communication node. The number of ECUs201and the number of child devices202are not limited to those in the system2000ofFIG. 2.

Here, it is assumed that the ECU201bhas been maliciously replaced with the ECU201′. An example of processing performed by the parent device220and the child device202bwhen the ECU201bin the system2000has been replaced with the malicious ECU201′ will now be described in turn. It is assumed that the ECU201′ transmits a message that includes an ID different from that of a message to be transmitted by the ECU201bbecause the ECU201′ is a malicious replacement ECU.

(B1) A message is transmitted from the ECU201′ to the child device202.

(B2) The CAN transceiver236of the child device202breceives the message transmitted from the ECU201′.

(B3) The second authentication unit234starts performing processing of an authentication of the ECU201′. The second authentication unit234determines whether an ID included in the received message is included in a whitelist that is held by the storage232. The ID included in the message received from the ECU201′ is not held in the whitelist of the storage232, so the second authentication unit234determines that the authentication of the ECU201′ has been unsuccessful.

(B4) The first authentication unit233of the child device202bstarts performing processing of a child-parent authentication between the child device202band the parent device220. The child-parent authentication may be performed regularly. The child-parent authentication is performed as preprocessing for reporting, to the parent device220, a result of the authentication (unsuccessful) performed by the second authentication unit234. In particular, the CAN transceiver231reports, to the parent device220, a request for performing a child-parent authentication.

(B5) The first authentication unit222of the parent device220performs a child-parent authentication in response to the request. The first authentication unit222successfully performs a child-parent authentication between the child device202band the parent device220. The CAN transceiver221reports a result of the child-parent authentication to the child device202b. The result of the child-parent authentication is stored by the controller224of the parent device220in the storage223.

(B6) When there are no problems with the child-parent authentication, the CAN transceiver231reports, to the parent device220the result of the child-parent authentication (unsuccessful) between the child device202band the ECU201′.

(B7) The authentication result (unsuccessful) transmitted from the child device202bis stored in the storage223by a control performed by the controller224of the parent device220.

When an ECU201has been maliciously replaced, a child device202(202ato202f) that communicates with a malicious ECU201′ performs the processes of (B1) to (B7). The parent device220can collect, from each of the child devices202ato202f, a result of an authentication of whether a corresponding ECU201that is connected to the child device202itself has been maliciously replaced. Thus, the parent device220can identify the ECU201(communication node) that has been maliciously replaced by collecting the authentication results. In other words, the child device202detects the ECU201that has been maliciously replaced, and reports the maliciously replaced ECU to the parent device220. This permits the parent device220to identify the malicious ECU. The controller224of the parent device220may report an anomaly to a user by, for example, displaying, on a screen, the ECU201′ that is determined to be a malicious replacement. Further, the controller224of the parent device220may report to a system located outside the system2000that there exists a malicious replacement ECU201′. The system2000includes the child devices202and the parent device220, but the child device202may be referred to as a “relay device”, and the parent device220may be referred to as a “management device” that manages the relay device and the ECU.

FIG. 3is a diagram that illustrates an example of a hardware configuration. Both the parent device220and the child device202are realized by pieces of hardware illustrated inFIG. 3. The child device202includes a CAN transceiver301, a CAN controller302, and a processing circuit303. The processing circuit303includes a processor304and a memory305.

The CAN transceiver301performs processing for the child device202to communicate with another device through a CAN network. The CAN controller302extracts, for example, data and an ID in a received message. The CAN controller302outputs the data to the processor304. The processor304is any processing circuit. The processor reads a program stored in the memory305to perform processing.

In the parent device220, the CAN transceiver221is realized by the CAN transceiver301and the CAN controller302. The processor304operates as the first authentication unit222and the controller224. The memory305operates as the storage223.

The CAN transceiver231and the CAN transceiver236of the child device202are realized by the CAN transceiver301and the CAN controller302. The processor304operates as the first authentication unit233, the second authentication unit234, and the controller235. The memory305operates as the storage232.

<Example of System Using Challenge and Response Method According to First Embodiment>

Referring to the example of the system2000illustrated inFIG. 2B, an example of the processing performed by the child device202and the parent device220using the challenge and response method will now be described in turn. It is assumed that the ECU201bincludes, in a message, one of the three IDs that are 0x123, 0x456, and 0x789, and transmits the message. It is assumed that the child device202and the parent device220hold a common key and an associated algorithm for authentication. It is sufficient if the common key and the algorithm for authentication are held in the storage223and the storage232. In the following processing, a “report” refers to a broadcast communication.

(C1) The ECU201btransmits, to the child device202b, a message that includes one of the three IDs that are 0x123, 0x456, and 0x789.

(C2) The CAN236of the child device202breceives the message transmitted from the ECU201b.

(C3) The second authentication unit234starts performing processing of an authentication of the ECU201b. The second authentication unit234determines whether an ID included in the received message is included in a whitelist that is held by the storage232. The whitelist holds the three IDs that are 0x123, 0x456, and 0x789. The second authentication unit234compares the ID included in the received message with the IDs held in the whitelist and determines that the authentication of the ECU201bhas been successful. The child device202performs the processes of (C1) to (C3) repeatedly.

(C4) The first authentication unit233of the child device202bstarts performing processing of a child-parent authentication between the child device202band the parent device220. The child-parent authentication may be performed regularly. For example, an authentication in the challenge and response method is used as the child-parent authentication. The child-parent authentication is performed as preprocessing for reporting, to the parent device220, a result of the authentication performed by the second authentication unit234. The child device makes a request for the parent device to start a challenge and response authentication. The first authentication unit222of the parent device generates a random number used for an authentication in the challenge and response method in response to an authentication request (including an ID that identifies the child device202b(for example, 0x2)) received from the child device. The CAN transceiver221reports, to the parent device220b, a message including the random number, an ID for a child-parent authentication (for example, 0x777), and the ID that identifies the child device202b(for example, 0x2). This message is a “challenge” when authentication in the challenge and response method is performed.

(C5) When receiving the message including the ID for a child-parent authentication (0x777), the first authentication unit233of the child device202bencrypts the random number included in the message using the random number and the common key held by the child device202b. After this, the encrypted random number is referred to as an “encrypted text”, and the algorithm for authentication is used to generate the encrypted text. The CAN transceiver231reports, to the parent device220, a message including the encrypted text, the ID for a child-parent authentication (0x777), and the ID that identifies the child device202b(0x2). This message is a “response” when authentication in the challenge and response method is performed. Further, the first authentication unit233of the child device202bgenerates a random number and transmits, to the parent device220, a message including the generated random number and an ID that identifies the child device202itself. Furthermore, the generated random number is encrypted by use of the common key and the result is held.

(C6) The first authentication unit222of the parent device220determines whether an encrypted text that is anticipated from the random number generated by the process of (C4) and the held common key is identical to the encrypted text included in the message that has been received as a response. When the encrypted texts are identical, the first authentication unit222of the parent device220determines that there are no problems with the child-parent authentication.

(C7) The first authentication unit222of the parent device220extracts the random number and the ID identifying the child device202from the encrypted text included in the message received as a response. The first authentication unit222generates an encrypted text using the random number extracted from the message received as a response and the common key.

(C8) The CAN transceiver221reports, to the child device202b, a message that includes the encrypted text, the ID for a child-parent authentication (0x777), and the ID that identifies the child device202b(0x2).

(C9) The first authentication unit233of the child device220determines whether the encrypted text generated in (C5) is identical to the encrypted text reported by the parent device220in (C8). When the encrypted texts are identical, the first authentication unit233of the child device202bdetermines that there are no problems with the child-parent authentication. The authentication result is reported to the parent device. This report may be encrypted.

In (C4) to (C9), a child-parent authentication that authenticates both the parent device and the child device is started by the parent device side. However, the authentication may be started by the child device side. Further, a process in which the parent device authenticates the child device without authenticating both the parent device and the child device is also acceptable. Likewise, a process in which the child device authenticates the parent device without authenticating both the parent device and the child device is also acceptable.

(C10) The first authentication unit222of the parent device220obtains the authentication result transmitted from the child device202band decrypts the authentication result transmitted from the child device202b(when they are encrypted).

(C11) The authentication results transmitted from the child device202bis stored in the storage223by a control performed by the controller224of the parent device220.

The processes of (C1) to (C11) are performed by each of the child devices202ato202fand the parent device220. As a result, the parent device220can collect a result of a child-parent authentication between the parent device220and each of the child devices202ato202fand a result of an authentication between the child device202and the ECU201corresponding to each of the child devices202ato202f.

Next, it is assumed that the ECU201bhas been maliciously replaced with the ECU201′. An example of processing performed by the parent device220and the child device202bwhen the ECU201bin the system2000has been replaced with the malicious ECU201′ will now be described in turn. The ECU201′ transmits a message including an ID that is 0x111 and tries to have other ECUs201operate erroneously.

(D1) A message is transmitted from the ECU201′ to the child device202.

(D2) The CAN transceiver236of the child device202breceives the message transmitted from the ECU201′.

(D3) The second authentication unit234starts performing processing of an authentication of the ECU201′. The second authentication unit234determines whether an ID 0x111 included in the received message is included in a whitelist (including 0x123, 0x456, and 0x789) that is held by the storage232. The ID 0x111 included in the message received from the ECU201′ is not held in the whitelist (including 0x123, 0x456, and 0x789) of the storage232, so the second authentication unit234determines that the authentication of the ECU201′ has been unsuccessful.

(D4) In response to an authentication request (including an ID that identifies the child device202b(for example, 0x2)) received from the child device, the first authentication unit222of the parent device starts performing processing of a child-parent authentication between the parent device and the child device202b. For example, an authentication in the challenge and response method is used as the child-parent authentication. The child-parent authentication may be performed regularly. The child-parent authentication is performed as preprocessing for reporting, to the parent device220, a result of the authentication (unsuccessful) performed by the second authentication unit234. The first authentication unit222of the parent device generates a random number used for an authentication in the challenge and response method. The CAN transceiver221reports, to the child device202b, a message (a challenge) including the random number, an ID for a child-parent authentication (for example, 0x777), and the ID that identifies the child device202b(for example, 0x2).

(D5) When receiving the message including the ID for a child-parent authentication (0x777), the first authentication unit233of the child device202bencrypts the random number included in the message using the random number and the common key held by the child device202b. The CAN transceiver231reports, to the parent device220, a message (a response) including the encrypted text, the ID for a child-parent authentication (0x777), and the ID that identifies the child device202b(0x2). Further, the first authentication unit233of the child device202bgenerates a random number and transmits, to the parent device220, a message including the generated random number and an ID that identifies the child device202itself. Furthermore, the generated random number is encrypted by use of the common key and the result is held.

(D6) The first authentication unit222of the parent device220determines whether an encrypted text that is anticipated from the random number generated by the process of (D4) and the held common key is identical to the encrypted text included in the message that has been received as a response. When the encrypted texts are identical, the first authentication unit222of the parent device220determines that there are no problems with the child-parent authentication.

(D7) The first authentication unit222of the parent device220extracts the random number and the ID identifying the child device202from the encrypted text included in the message received as a response. The first authentication unit222generates an encrypted text using the random number extracted from the message received as a response and the common key.

(D8) The CAN transceiver221reports, to the child device202b, a message that includes the encrypted text, the ID for a child-parent authentication (0x777), and the ID that identifies the child device202b(0x2).

(D9) The first authentication unit233of the child device220determines whether the encrypted text generated in (D5) is identical to the encrypted text reported by the parent device220in (D8). When the encrypted texts are identical, the first authentication unit233of the child device202bdetermines that there are no problems with the child-parent authentication. The authentication result is reported to the parent device. This report may be encrypted.

In (D4) to (D9), a child-parent authentication that authenticates both the patent device and the child device is started by the parent device side. However, the authentication may be started by the child device side. Further, a process in which the parent device authenticates the child device without authenticating both the parent device and the child device is also acceptable. Likewise, a process in which the child device authenticates the parent device without authenticating both the parent device and the child device is also acceptable.

(D10) The first authentication unit222of the parent device220obtains the transmitted result of the authentication performed by the second authentication unit234of the child device202bby performing decryption (when it is encrypted).

(D11) The authentication result transmitted from the child device202bis stored in the storage223by a control performed by the controller224of the parent device220.

When an ECU201has been maliciously replaced, a child device202(202ato202f) that communicates with a malicious ECU201′ performs the processes of (D1) to (D11). The parent device220can collect, from each of the child devices202ato202f, a result of an authentication of whether a corresponding ECU201that is connected to the child device202itself has been maliciously replaced. Thus, the parent device220can identify the ECU201(communication node) that has been maliciously replaced by collecting the authentication results. In other words, the child device202detects by itself the ECU201that has been maliciously replaced, which permits the parent device220to identify the maliciously replaced ECU201. In the child-parent authentication in the challenge and the response method, the child device202bside may generate a random number and only authenticate the parent device, or both the parent device220and the child device202bmay generate random numbers and authenticate mutually.

FIG. 4is a flowchart that illustrates an example of processing performed by the parent device according to the first embodiment. The first authentication unit222of the parent device220performs a parent-child authentication (Step S101). A result of the child-parent authentication is stored in the storage223by a control performed by the controller224of the parent device220(Step S102). The controller224determines whether there are any problems with the child-parent authentication (Step S103). When there are no problems with the child-parent authentication (NO in Step S103), the first authentication unit222of the parent device220obtains a result of an authentication between the ECU201and the child device202through the CAN transceiver221(Step S104). The result of the authentication between the ECU201and the child device202is stored in the storage223by a control performed by the controller224of the parent device220(Step S105). The controller224determines whether there are any problems with the authentication between the ECU201and the child device202(Step S106). When there is an anomaly in the child-parent authentication (YES in Step S103) or when there is an anomaly in the authentication between the ECU201and the child device202(YES in Step S106), the controller224reports that the parent device220has detected an anomaly in a device with which it can communicate (Step S107). When the process of Step S106or Step S107is terminated, the processing performed by the parent device220according to the first embodiment is terminated. The parent device220performs the processes of Steps S101to S107for each of the child devices202ato202f. Further, the processing is performed regularly.

FIG. 5is a flowchart that illustrates an example of processing performed by the child device according to the first embodiment. The CAN transceiver236receives a message transmitted from the ECU201(Step S201). The second authentication unit234of the child device202determines whether an ID included in the message is included in a whitelist that is held by the storage232(Step S202). The first authentication unit233of the child device202performs a child-parent authentication between the child device202and the parent device220(Step S203). When the child device needs to authenticate the parent device, the CAN transceiver231reports a result of the child-parent authentication to the parent device220(Step S204). The CAN transceiver231reports a result of the authentication between the ECU201and the child device202(a result obtained in Step S202) to the parent device220(Step S205). The processes of Step S204and Step S205may be performed in parallel or sequentially. The processing ofFIG. 5is performed every time the child device202receives a message from the ECU201.

In the processing ofFIG. 4and the processing ofFIG. 5, the parent device220can collect, from each of the child devices202ato202f, a result of an authentication of whether a corresponding ECU201that is connected to the child device202itself has been maliciously replaced. Thus, the parent device220can identify the ECU201(communication node) that has been maliciously replaced by collecting the authentication results. In other words, the child device202detects the ECU201that has been maliciously replaced, and reports the maliciously replaced ECU201to the parent device220so that the parent device220can identify it. The controller224of the parent device220may report an anomaly to a user by, for example, displaying, on a screen, a malicious replacement ECU201′. Further, the controller224of the parent device220may report to a system located outside the system2000that there exists a malicious replacement ECU201′.

FIG. 6is a diagram that illustrates examples of the child device and the parent device according to a second embodiment. A block configuration of the child device202and the parent device220of the second embodiment is similar to that of the child device202and the parent device220of the first embodiment inFIG. 2B. Thus, inFIG. 6, like reference numbers are used that represent the same elements as inFIG. 2B. In the child device202bofFIG. 6, an arrow that indicates a flow of data is different from that in the child device202bofFIG. 2B. In particular, in the child device202bofFIG. 2B, when a message from the ECU201is received, the second authentication unit234performs an authentication between the child device202and the ECU201, and then, the first authentication unit233performs a child-parent authentication. In the second embodiment, the order of the processing of authentication performed by the second authentication unit234and the processing of authentication performed by the first authentication unit233is different.

(E1) All of the devices (the parent device220and the child devices202) included in the system2000are powered on. When all of the devices (the parent device220and the child devices202) included in the system2000have been powered on, the first authentication unit222performs a child-parent authentication between each of the child devices202and the parent device220.

(E2) A result of the child-parent authentication between each of the child devices202and the parent device220is stored in the storage223by a control performed by the controller224of the parent device220.

(E3) When there is a message from the ECU201, a child device202which does not have any problems with the child-parent authentication starts receiving the message.

(E4) The message is transmitted from the ECU201bto the child device202b.

(E5) The CAN transceiver236of the child device202breceives the message transmitted from the ECU201b.

(E6) The second authentication unit234starts performing processing of an authentication of the ECU201b. The second authentication unit234determines whether an ID included in the received message is included in a whitelist that is held by the storage232. In this case, it is assumed that the ECU201bhas still not been maliciously replaced with an ECU201′. Thus, the ID included in the message received from the ECU201bis held in the whitelist of the storage232, so the second authentication unit234determines that the authentication of the ECU201bhas been successful.

(E7) The CAN transceiver231reports, to the parent device220, a result of the authentication of the ECU201bin the child device202b. The CAN transceiver231performs report processing by being controlled by the controller235. The result of the authentication of the ECU201bin the child device202bmay be reported to the parent device220in an encrypted state.

(E8) The authentication result (successful) transmitted from the child device202bis stored in the storage223by a control performed by the controller224of the parent device220.

The processes of (E1) and (E2) are performed when the parent device220and the child devices202are powered on, and a child-parent authentication is performed between each of the child devices202and the parent device220in the system. After that, the processes of (E4) to (E8) are repeatedly performed between a child device202and the parent device220. In this way, if a child-parent authentication is completed when powering on, it is possible to omit subsequent processing of a child-parent authentication that is performed every time processing of an authentication between an ECU201and a child device202is performed. Thus, compared with the system2000according to the first embodiment, the number of processings of a child-parent authentication can be reduced, which results in making a load of the parent device220lighter.

Here, it is assumed that the ECU201bhas been maliciously replaced with an ECU201′. It is assumed that the ECU201′ transmits a message that includes an ID that is different from that included in a message transmitted by the ECU201bbecause the ECU201′ is a malicious replacement ECU.

(E9) A message is transmitted from the ECU201′ to the child device202.

(E10) The CAN transceiver236of the child device202breceives the message transmitted from the ECU201′.

(E11) The second authentication unit234starts performing processing of an authentication of the ECU201′. The second authentication unit234determines whether an ID included in the received message is included in a whitelist that is held by the storage232. The ID included in the message received from the ECU201′ is not held in the whitelist of the storage232, so the second authentication unit234determines that the authentication of the ECU201′ has been unsuccessful.

(E12) The CAN transceiver231reports, to the parent device220, a result of the authentication (unsuccessful) between the child device202band the ECU201′. The result of the authentication of the ECU201bin the child device202bmay be reported to the parent device220in an encrypted state.

(E13) The authentication result (unsuccessful) transmitted from the child device202bis stored in the storage223by a control performed by the controller224of the parent device220.

When an ECU201has been maliciously replaced, a child device202(202ato202f) that communicates with a malicious ECU201′ and the parent device220perform the processes of (E9) to (E13). The parent device220can collect, from each of the child devices202ato202f, a result of an authentication of whether a corresponding ECU201that is connected to the child device202itself has been maliciously replaced. Thus, the parent device220can identify the ECU201(communication node) that has been maliciously replaced by collecting the authentication results. In other words, the child device202detects the ECU201that has been maliciously replaced, and reports the maliciously replaced ECU201to the parent device220so that the parent device220can identify it. The controller224of the parent device220may report an anomaly to a user by, for example, displaying, on a screen, a malicious replacement ECU201′. Further, the controller224of the parent device220may report to a system located outside the system2000that there exists a malicious replacement ECU201′. Moreover, in the processes of (E9) to (13), child-parent authentication processing is not performed when a result of an authentication between an ECU201and a child device202is reported to the parent device220. Thus, compared with the system2000according to the first embodiment, a load of the parent device220can be made lighter.

<Example of System Using Challenge and Response Method According to Second Embodiment>

Referring toFIG. 6, an example of the processing performed by the child device202and the parent device220using the challenge and response method will now be described in turn. It is assumed that the ECU201bincludes, in a message, one of the three IDs that are 0x123, 0x456, and 0x789, and transmits the message.

(F1) All of the devices (the parent device220and the child devices202) included in the system2000are powered on. When all of the devices (the parent device220and the child devices202) included in the system2000have been powered on, the parent device220starts performing processing of a child-parent authentication between itself and each of the child devices202. For example, an authentication in the challenge and response method is used as the child-parent authentication.

(F2) The first authentication unit222of the parent device220generates the same number of random numbers as the number of child devices202connected to the parent device220. A random number is used for an authentication in the challenge and response method. The generated random number includes an ID that corresponds to each of the child devices202. Thus, the generated random number is generated correspondingly to each of the child devices202. The CAN transceiver221reports, to a child device202, a message including the random number, an ID for a child-parent authentication (for example, 0x777), and an ID that identifies the child device202b(for example, 0x2). This message is a challenge when authentication in the challenge and response method is performed.

(F3) When receiving the message including the ID for a child-parent authentication (0x777), the first authentication unit233of the child device202encrypts the random number included in the message using the random number and the common key held by the child device202. The CAN transceiver231reports, to the parent device220, a message including the encrypted text, the ID for a child-parent authentication (0x777), and the ID that identifies the child device202b(0x2). This message is a response when authentication in the challenge and response method is performed.

(F4) The first authentication unit222of the parent device220determines whether an encrypted text that is anticipated from the random number generated by the process of (F2) and the held common key is identical to the encrypted text included in the message that has been received as a response. When the encrypted texts are identical, the first authentication unit222of the parent device220determines that there are no problems with the child-parent authentication. The first authentication unit233of the child device202generates a random number and transmits, to the parent device220, a message including the generated random number and an ID that identifies the child device202itself.

(F5) The first authentication unit222of the parent device220extracts the encrypted text, the random number and the ID identifying the child device202included in the message received as a response. The first authentication unit222determines whether the ID that identifies the child device202included in the message is identical to an ID that indicates the child device202that has transmitted the response. When the IDs are identical, the first authentication unit222of the parent device220generates an encrypted text using the random number extracted from the message received as a response and the common key.

(F6) The CAN transceiver221reports, to the child device202b, a message that includes the encrypted text, the ID for a child-parent authentication (0x777), and the ID that identifies the child device202b(0x2).

(F7) The first authentication unit233of the child device202determines whether the encrypted text generated in (F3) is identical to the encrypted text reported by the parent device220in (F6). When the encrypted texts are identical, the first authentication unit233of the child device202determines that there are no problems with the child-parent authentication. At the same time, the first authentication unit233of the child device202determines whether an ID that identifies a certain child device202included in the message reported by the parent device220in (F6) is the ID of the child device202itself. When the IDs are identical and when there are no problems with the child-parent authentication, the CAN transceiver231reports, to the parent device220, a message including a result of the child-parent authentication (no problem), the ID for a child-parent authentication (0x777), and the ID that identifies the child device202b(0x2). The child-parent authentication result may be encrypted.

(F8) The first authentication unit222of the parent device220obtains the transmitted result of the authentication performed by the second authentication unit234of the child device202bby performing decryption (when it is encrypted).

(F9) The authentication result transmitted from the child device202bis stored in the storage223by a control performed by the controller224of the parent device220.

(F10) When there is a message from the ECU201, a child device202which does not have any problem with the child-parent authentication starts receiving the message. The message is transmitted from the ECU201bto the child device202b.

(F11) The CAN transceiver236of the child device202breceives the message transmitted from the ECU201b.

(F12) The second authentication unit234starts performing processing of an authentication of the ECU201b. The second authentication unit234determines whether an ID included in the received message is included in a whitelist that is held by the storage232. In this case, it is assumed that the ECU201bhas still not been maliciously replaced with an ECU201′. Thus, the ID included in the message received from the ECU201bis held in the whitelist of the storage232, so the second authentication unit234determines that the authentication of the ECU201bhas been successful.

(F13) The CAN transceiver231reports, to the parent device220, a message including a result of the authentication of the ECU201bin the child device202b, the ID for a child-parent authentication (0x777), and the ID that identifies the child device202b(0x2). The result of the authentication of the ECU201bin the child device202bmay be regularly reported to the parent device220. The authentication result may be reported to the parent device220in an encrypted state.

(F14) The authentication result (successful) transmitted from the child device202bis stored in the storage223by a control performed by the controller224of the parent device220.

The processes of (F1) to (F9) are performed when the parent device220and the child devices202are powered on, and a child-parent authentication is performed between each of the child devices202and the parent device220in the system. After that, the processes of (F10) to (F14) are repeatedly performed between a child device202and the parent device220. In this way, if a child-parent authentication is completed when powering on, it is possible to omit subsequent processing of a child-parent authentication that is performed every time processing of an authentication between an ECU201and a child device202is performed. Thus, compared with the system2000according to the first embodiment, the number of processings of a child-parent authentication can be reduced, which results in making a load of the parent device220lighter.

Here, it is assumed that the ECU201bhas been maliciously replaced with an ECU201′. It is assumed that the ECU201′ transmits a message that includes an ID (0x111) that is different from an ID (0x123, 0x456, or 0x789) included in a message transmitted by the ECU201bbecause the ECU201′ is an ECU that has replaced maliciously.

(F15) A message is transmitted from the ECU201′ to the child device202.

(F16) The CAN transceiver236of the child device202breceives the message transmitted from the ECU201′.

(F17) The second authentication unit234starts performing processing of an authentication of the ECU201′. The second authentication unit234determines whether the ID 0x111 included in the received message is included in a whitelist (including 0x123, 0x456, and 0x789) that is held by the storage232. The ID 0x111 included in the message received from the ECU201′ is not held in the whitelist of the storage232, so the second authentication unit234determines that the authentication of the ECU201′ has been unsuccessful.

(F18) The CAN transceiver231reports, to the parent device220, a message including a result of the authentication of the ECU201bin the child device202b, the ID for a child-parent authentication (0x777), and the ID that identifies the child device202b(0x2). The authentication result may be reported in an encrypted state.

(F19) The authentication result (unsuccessful) transmitted from the child device202bis stored in the storage223by a control performed by the controller224of the parent device220.

In the process of (F13), a result of an authentication (successful) of the ECU201bin the child device202bis reported to the parent device220. However, when it is determined that the authentication of the ECU201bin the child device202bhas been unsuccessful, the child device220may report a result of the authentication to the parent device220.

When an ECU201has been maliciously replaced, a child device202(202ato202f) that communicates with a malicious ECU201′ performs the processes of (F15) to (F19). The parent device220can collect, from each of the child devices202ato202f, a result of an authentication of whether a corresponding ECU201that is connected to the child device202itself has been maliciously replaced. Thus, the parent device220can identify the ECU201(communication node) that has been maliciously replaced by collecting the authentication results. In other words, the child device202detects by itself the ECU201that has been maliciously replaced, which permits the parent device220to identify the maliciously replaced ECU201. In the child-parent authentication in the challenge and the response method, the parent device220side may generate a random number and authenticate the child device, or the child device202may generate a random number and authenticate the parent device.

FIG. 7is a flowchart that illustrates an example of processing performed by the child device according to the second embodiment. The first authentication unit233of the child device202performs a child-parent authentication in response to a request issued by the parent device220(Step S301). The CAN transceiver231reports a result of the child-parent authentication to the parent device220(Step S302). The CAN transceiver236receives a message transmitted from the ECU201(Step S303). The second authentication unit234determines whether an ID included in the message received from the ECU201is included in a whitelist that is held by the storage232(Step S304). When the ID included in the message received from the ECU201is included in the whitelist that is held by the storage232(YES in Step S304), the child device202repeats the processes from Step S303. When the ID included in the message received from the ECU201is not included in the whitelist that is held by the storage232(NO in Step S304), the CAN transceiver231reports to the parent device220that a malicious ECU201has been detected (Step S305). When the process of Step S305is terminated, the child device202terminates the processing.

When an ECU201has been maliciously replaced, the parent device220can collect, from each of the child devices202ato202f, a result of an authentication of whether a corresponding ECU201that is connected to the child device202itself has been maliciously replaced. Thus, the parent device220can identify the ECU201(communication node) that has been maliciously replaced by collecting the authentication results. In other words, the child device202detects by itself the ECU201that has been maliciously replaced, which permits the parent device220to identify the maliciously replaced ECU201.