WO2018056054A1 - 通信システム、中継装置、通信装置及び通信方法 - Google Patents

通信システム、中継装置、通信装置及び通信方法 Download PDF

Info

Publication number
WO2018056054A1
WO2018056054A1 PCT/JP2017/032072 JP2017032072W WO2018056054A1 WO 2018056054 A1 WO2018056054 A1 WO 2018056054A1 JP 2017032072 W JP2017032072 W JP 2017032072W WO 2018056054 A1 WO2018056054 A1 WO 2018056054A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
shared information
update
communication
received
Prior art date
Application number
PCT/JP2017/032072
Other languages
English (en)
French (fr)
Inventor
友洋 水谷
Original Assignee
株式会社オートネットワーク技術研究所
住友電装株式会社
住友電気工業株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社オートネットワーク技術研究所, 住友電装株式会社, 住友電気工業株式会社 filed Critical 株式会社オートネットワーク技術研究所
Priority to US16/335,179 priority Critical patent/US20190349389A1/en
Priority to DE112017004752.8T priority patent/DE112017004752T5/de
Priority to CN201780053753.0A priority patent/CN109661797B/zh
Publication of WO2018056054A1 publication Critical patent/WO2018056054A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/123Applying verification of the received information received data contents, e.g. message integrity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/14Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms
    • H04L9/16Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms the keys or algorithms being changed during operation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40267Bus for use in transportation systems
    • H04L2012/40273Bus for use in transportation systems the transportation system being a vehicle
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Definitions

  • the present invention relates to a communication system, a relay device, a communication device, and a communication method configured so that a relay device relays communication between a plurality of communication lines.
  • a message authenticator In recent years, for example, in a network mounted on a vehicle, a message authenticator (MAC) is used as a countermeasure for preventing unauthorized message transmission to the network due to connection of an unauthorized communication device or hijacking of a regular communication device.
  • Sending and receiving messages using Message (Authentication Code) has been proposed.
  • the MAC is generated from the encryption key shared by the legitimate communication device and the information to be transmitted, and has the same value when the combination of the encryption key and the transmission information is the same. For this reason, the method using the MAC has no effect on a replay attack in which a regular message transmitted and received in the past is acquired and the acquired message is retransmitted.
  • Measures to invalidate past regular messages can be taken against the message replay attack by, for example, incorporating periodically changing information into the MAC generation calculation.
  • each communication device in a network generates a MAC using a check value, transmits a message including the MAC, and includes a reproduction value and a check value reproduced from the MAC included in the received message.
  • a communication system that determines whether a message is correct by comparison is described.
  • the check values of the respective communication devices are synchronized based on a message that includes content for instructing update of the check value.
  • the check value synchronization method using a specific message performed in the communication device described in Patent Document 1 is a communication system having a configuration in which a plurality of communication devices that transmit and receive messages are connected to one common communication line. It can be operated without problems. However, in a communication system configured such that a plurality of communication lines are connected via a relay device such as a gateway or a router, and the communication lines connected to each communication line asynchronously transmit and receive messages, a message for synchronizing check values. If there is a delay or collision in the relay, there is a possibility that the synchronization may be temporarily shifted.
  • the present invention has been made in view of such circumstances, and an object of the present invention is to share information whose value can change in a configuration in which communication between a plurality of communication lines is relayed by a relay device. It is an object of the present invention to provide a communication system, a relay device, a communication device, and a communication method that enable transmission and reception of used messages.
  • the communication system is a communication system in which one or a plurality of communication devices are connected to a communication line, and a relay device relays communication between the plurality of communication lines.
  • the communication device and the relay device are shared A storage unit that stores information; a message generation unit that generates a message using the shared information; a message transmission unit that transmits a message generated by the message generation unit to another device; and a message from another device
  • Each of the communication device and the relay device includes: a message receiving unit to receive; and a determination unit that determines whether the message received by the message receiving unit is correct based on the shared information.
  • An update command transmission unit configured to transmit an update command for updating the shared information to another device, and the communication device and the relay device are configured to update the shared information.
  • an instruction in the case where an instruction is received, it further includes an update unit that updates the shared information stored in the storage unit, and the communication device or the relay device until the predetermined period has elapsed since the update of the shared information.
  • the determination unit determines that the message is a valid message.
  • the communication system when the relay device receives a message generated using the shared information before the update until a predetermined period elapses after the update of the shared information. Is modified to a message using the updated shared information, and the message modified by the message modification unit is relayed.
  • the message generated by the message generation unit includes update state information indicating an update state of the shared information, and the determination unit is included in the shared information and the received message. Whether the message is correct or not is determined based on the update state information.
  • the update state information is information whose value changes according to a predetermined rule according to the update command.
  • the communication system according to the present invention is characterized in that the update state information is a toggle bit whose value is inverted in accordance with the update command.
  • the message generated by the message generation unit includes a message authenticator generated based on the shared information and information included in the message, and the determination unit receives Whether the message is correct or not is determined based on the information and message authenticator included in the received message and the shared information stored in the storage unit.
  • the relay device stores shared information shared with the communication device in the relay device that relays communication between a plurality of communication lines each connected to one or more communication devices.
  • a storage unit a message receiving unit that receives a message generated using the shared information from the communication device; a determination unit that determines whether the message received by the message receiving unit is correct based on the shared information;
  • An update unit that updates the shared information stored in the storage unit, and a message generated using the shared information before the update until a predetermined period elapses after the update of the shared information, the message And a message correction unit for correcting the message to a message using the updated shared information.
  • a communication device is connected to at least a communication line to which a relay device is connected, and is shared by the relay device in a communication device that communicates with the communication line and the relay device.
  • a storage unit that stores information; a message generation unit that generates a message using the shared information; a message transmission unit that transmits a message generated by the message generation unit to another device; and a message from another device.
  • a determination unit for determining whether the message received by the message receiving unit is correct based on the shared information, and an update command for the shared information transmitted from another device
  • An update unit that updates the shared information stored in the storage unit, and the shared information before the update is updated until a predetermined period elapses after the update of the shared information.
  • the communication method is the communication method in which one or a plurality of communication devices are connected to a communication line, and a relay device to which the plurality of communication lines are connected relays communication between the communication lines.
  • the device and the relay device store the shared information, generate a message using the shared information and transmit it to another device, determine whether the message received from the other device is correct or not based on the shared information, At least one of the communication device and the relay device transmits an update command for updating the shared information to another device, and the communication device and the relay device receive the update command when the update command is received.
  • shared information is updated, and the communication device or the relay device receives a message generated using the shared information before the update until a predetermined period elapses after the update of the shared information , And judging the message and legitimate messages.
  • the communication system has a configuration in which one or a plurality of communication devices are connected to one communication line, such a plurality of communication lines are connected to a relay device, and the relay device relays communication between the communication lines. is there.
  • the protocol of communication performed on each communication line is not necessarily the same protocol, and a relay device may convert and relay communication between different protocols.
  • a hierarchical system configuration in which a plurality of relay devices are connected to a higher-level relay device may be employed.
  • the communication device and the relay device included in the communication system store shared information, and generate and transmit a message to another device and determine whether the message received from the other device is correct or not. To do.
  • the shared information stored in the communication device and the relay device is variable and is updated by an update command transmitted by at least one of the communication device and the relay device included in the communication system. That is, an update command transmitted by one device is transmitted through the network and received by the communication device and the relay device, and the communication device and the relay device that have received the update command update the shared information stored therein.
  • the shared information may be updated at a predetermined cycle such as 1 second, 1 minute, 1 hour, 1 day, or 1 week. For example, if the communication system is mounted on the vehicle, the vehicle ignition signal is updated. It may be performed every time an event occurs, such as every time when is turned on.
  • the update command transmitted by one device may cause a collision or delay when transmitting or relaying between communication lines. Therefore, the relay apparatus of the communication system according to the present invention receives the message generated using the shared information before the update and the shared information after the update until a predetermined period elapses from the timing when the shared information is updated. Both the messages generated by using them are treated as legitimate messages and are subject to relay. Alternatively, the communication device of the communication system according to the present invention may use the message generated using the shared information before the update and the shared information after the update until a predetermined period elapses from the timing of updating the shared information. Both of the messages generated by using and are received as legitimate messages.
  • the timing for updating the shared information can be the timing at which its own shared information is updated or the timing at which the update command is transmitted, and in the case of a device that receives the update command. Can be the timing at which the update command is received or the timing at which its own shared information is updated.
  • the message generated using the shared information before update and the updated shared information are displayed. It is possible to transmit / receive to / from the generated message. Therefore, even in a communication system configured to relay communication between a plurality of communication lines, a message transmission / reception using shared information whose value changes can be realized.
  • the relay device when the relay device receives a message generated using the shared information before update, the relay device corrects the message to a message using the updated shared information and relays the message. As a result, the relay destination communication apparatus can receive a message using the updated shared information. For this reason, the communication apparatus does not need to perform a process of handling a message using the shared information before update received before the predetermined period has passed since the update of the shared information as a valid message.
  • update status information indicating the update status of the shared information is included in the message.
  • the update state information may be information whose value changes according to a predetermined rule according to the update command, for example, a toggle bit whose value is inverted according to the update command.
  • a device that transmits a message generates a message authenticator based on the shared information and information included in the message to be transmitted, and transmits a message including this message authenticator to another device.
  • the device that has received the message determines whether the message authenticator included in the received message is correct based on the information included in the received message and the shared information stored by the user, and determines whether the received message is correct.
  • both the message generated using the shared information before the update and the message generated using the updated shared information until the predetermined period elapses after the update of the shared information. Can be transmitted / received using shared information whose value can change in a system configuration in which communication between a plurality of communication lines is relayed by a relay device.
  • FIG. 1 is a block diagram showing a configuration of a communication system according to Embodiment 1.
  • FIG. 4 is a schematic diagram for explaining a configuration of a message transmitted and received in the communication system according to Embodiment 1.
  • FIG. It is a schematic diagram for demonstrating the problem which arises by the shift
  • FIG. 10 is a schematic diagram illustrating a first example of message transmission / reception and shared information update by the communication system according to Embodiment 2.
  • FIG. 10 is a schematic diagram illustrating a first example of message transmission / reception and shared information update by the communication system according to Embodiment 2.
  • FIG. 10 is a schematic diagram illustrating a first example of message transmission / reception and shared information update by the communication system according to Embodiment 2.
  • FIG. 10 is a schematic diagram illustrating a first example of message transmission / reception and shared information update by the communication system according to Embodiment 2.
  • FIG. 10 is a schematic diagram illustrating a first example of message transmission / reception and shared information update by the communication system according to Embodiment 2.
  • FIG. 10 is a schematic diagram illustrating a first example of message transmission / reception and shared information update by the communication system according to Embodiment 2.
  • FIG. 10 is a schematic diagram illustrating a second example of message transmission / reception and shared information update by the communication system according to Embodiment 2.
  • FIG. 10 is a schematic diagram illustrating a first example of message transmission / reception and shared information update by the communication system according to Embodiment 2.
  • FIG. 10 is a schematic diagram illustrating a second example of message transmission / reception and shared information update by the communication system according to Embodiment 2.
  • FIG. 10 is a schematic diagram illustrating a second example of message transmission / reception and shared information update by the communication system according to Embodiment 2.
  • FIG. 10 is a schematic diagram illustrating a second example of message transmission / reception and shared information update by the communication system according to Embodiment 2.
  • FIG. 10 is a schematic diagram illustrating a second example of message transmission / reception and shared information update by the communication system according to Embodiment 2.
  • FIG. 1 is a block diagram showing a configuration of a communication system according to the first embodiment.
  • a plurality of ECUs (Electronic Control Units) 2 mounted on a vehicle 1 communicate with each other via communication lines 1 a and 1 b and a gateway 4 arranged in the vehicle 1.
  • the gateway 4 corresponds to a relay device
  • the ECU 2 corresponds to a communication device.
  • the system configuration is such that two ECUs 2 are connected to the communication line 1a in the vehicle, three ECUs 2 are connected to the communication line 1b, and the two communication lines 1a and 1b are connected to the gateway 4, When the gateway 4 relays communication between the communication lines 1a and 1b, all the ECUs 2 can transmit / receive data to / from other ECUs 2.
  • the ECU 2 includes, for example, an ECU that controls the operation of the engine of the vehicle 1, an ECU that controls the locking / unlocking of the door, an ECU that controls the turning on / off of the light, an ECU that controls the operation of the airbag, and an ABS (Antilock Various ECUs such as an ECU for controlling the operation of the Brake System may be included.
  • Each ECU 2 is connected to a communication line 1a or 1b arranged in the vehicle 1, and can transmit and receive data to and from another ECU 2 and the gateway 4 via the communication lines 1a and 1b.
  • the gateway 4 is connected to a plurality of communication lines 1a and 1b constituting the in-vehicle network of the vehicle 1 and performs a process of relaying data transmission / reception between the communication lines.
  • the gateway 4 has two communication lines 1a and 1b, that is, a first communication line 1a to which two ECUs 2 are connected, and a second communication line 1b to which three ECUs 2 are connected. Is connected.
  • the gateway 4 relays data by transmitting data received from one of the communication lines 1a and 1b to the other communication lines 1a and 1b.
  • the ECU 2 and the gateway 4 perform communication in accordance with a CAN (Controller Area Network) communication protocol.
  • the CAN authentication protocol adopted in the communication system according to the present embodiment introduces a message authenticator (MAC) technique.
  • the message transmitted by the ECU 2 and the gateway 4 is attached with a MAC, and the ECU 2 and the gateway 4 that have received the message determine whether the received message is valid by determining whether the MAC attached to the message is correct or not. Make a decision.
  • MAC message authenticator
  • FIG. 2 is a schematic diagram for explaining a configuration of messages transmitted and received in the communication system according to the first embodiment.
  • FIG. 2 shows only 8 bytes of a data field included in a message transmitted / received by the CAN communication protocol, and other fields such as an arbitration field and a control field are not shown.
  • the data field of a message transmitted / received by the CAN communication protocol is composed of a series of 8-byte (64-bit) binary information.
  • the first 1 bit is a toggle bit
  • the subsequent 31 bits are MAC
  • the subsequent 32 bits are data.
  • the 32-bit data from the 5th byte to the 8th byte is information that a certain ECU 2 should transmit to another ECU 2, for example.
  • the 31-bit MAC is generated based on 32-bit data, an encryption key shared by the ECU 2 and the gateway 4, and shared information.
  • the 1-bit toggle bit is information used for update processing of shared information shared by the ECU 2 and the gateway 4 and is a bit that is inverted by 0/1 each time the update processing is performed.
  • the ECU 2 generates a MAC based on the information to be transmitted and the stored encryption key and shared information, and generates a data field in which the toggle bit and the MAC are attached to the data (information to be transmitted).
  • the other fields constituting the CAN communication protocol message may be generated by the ECU 2 in accordance with a normal CAN communication protocol procedure.
  • the ECU 2 determines whether or not the shared information update processing is correctly performed based on the value of the toggle bit of the data field included in the received message.
  • the ECU 2 When the shared information update process is correctly performed, the ECU 2 generates a MAC based on the encryption key and the shared information stored by itself, and the 32-bit data included in the received message, and the generated MAC and the received It is determined whether the received message is valid based on whether the MAC included in the message matches.
  • the shared information that the ECU 2 and the gateway 4 have is updated at a predetermined timing.
  • the gateway 4 generates new shared information for update at a predetermined timing, updates the shared information stored in the gateway 4 to new shared information, and updates the generated shared information together with the update command. It transmits to ECU2.
  • the ECU 2 that has received the update command updates the shared information by replacing the shared information stored in the ECU 2 with new shared information added to the update command.
  • the gateway 4 transmits an update command simultaneously to the two communication lines 1a and 1b. For example, when a message collision occurs in one communication line 1a or 1b, one update command is transmitted. Transmission may be delayed. When a delay occurs in transmission of the update command, a time zone in which the value of the shared information differs between the ECU 2 connected to the communication line 1a and the ECU 2 connected to the communication line 1b.
  • FIG. 3 is a schematic diagram for explaining a problem caused by a shift in shared information.
  • the gateway 4 generates new shared information (described as “shared information (new)” in the figure) for update, and communicates an update command with the new shared information.
  • shared information new
  • the gateway 4 may transmit the update command to the communication line 1a. This is not possible and the transmission of the update command is delayed.
  • the message transmitted by the ECU 2a is attached with the MAC generated using the old shared information before update (described as “shared information (old)” in the figure). In the message "Message (old)").
  • the ECU 2b connected to the communication line 1b that has received the update command from the gateway 4 updates the shared information by replacing the old shared information stored therein with the new shared information attached to the update command ( In the figure, “shared information (old) ⁇ (new)”).
  • the gateway 4 transmits an update command to the communication line 1a after the message transmission of the ECU 2a is completed.
  • the ECU 2a that has received the update command updates the shared information by replacing the old shared information stored in the ECU 2a with new shared information attached to the update command.
  • the gateway 4 relays the message by transmitting the message from the ECU 2a received on the communication line 1a to the communication line 1b.
  • the message relayed at this time is a message to which a MAC generated using old shared information before update is added.
  • the ECU 2b that has received this message does not match the MAC generated using the new shared information stored by itself and the MAC attached to the received message, and the received message is not a valid message. Is determined.
  • the gateway 4 that has received the message with the MAC generated using the old shared information before update from the ECU 1 a relays this message to the ECU 2 b. In this case, whether the MAC is correct or not is determined.
  • the gateway 4 determines whether the MAC of the message received from the ECU 1a is correct or not, it is determined that the message with the MAC generated using the old shared information before the update is not a valid message in the gateway 4, and the ECU 2b Relay to is not done.
  • FIG. 4 is a schematic diagram for explaining a method for solving a problem caused by misalignment of shared information. 4 is the same as that shown in the upper part of FIG.
  • the gateway 4 updates the shared information when receiving a message with the MAC generated using the old shared information before update from the ECU 1a due to the shift of the shared information. This message is regarded as a legitimate message for relay until a predetermined period elapses. However, if the gateway 4 simply relays the received message, the relay destination ECU 2b determines that this message is not valid as shown in the lower part of FIG. Therefore, the gateway 4 according to the present embodiment generates the MAC generated using the old shared information before update attached to the received message using the new shared information after update stored in itself. The message to be replaced with the MAC is corrected, and the corrected message is relayed to the ECU 2b.
  • the gateway 4 is valid for both the message with the MAC generated using the old shared information before the update and the message with the MAC generated using the new shared information after the update.
  • the predetermined period accepted as a message is determined in advance at the design stage of the communication system. For example, for the predetermined period, the maximum time during which the update command transmitted by the gateway 4 may be delayed can be set.
  • the gateway 4 has to update the old shared information before the update and the new shared information after the update until at least a predetermined period elapses after the update of the shared information.
  • One piece of shared information needs to be stored.
  • the gateway 4 needs to determine which shared information is used to generate the MAC attached to the received message. For this reason, in the communication system according to the present embodiment, a toggle bit is attached to the message as information for determining which shared information before and after the MAC is generated.
  • the toggle bit is a bit whose value is inverted every time update processing is performed.
  • the gateway 4 determines whether the MAC attached to the received message is correct using the old shared information before update, and performs the above-described message correction when the MAC is valid. That is, when the value of the toggle bit managed by the gateway 4 matches the value of the toggle bit attached to the received message, the gateway 4 uses the new shared information after the MAC attached to the received message is updated. If it is determined that the value of the toggle bit does not match, it can be determined that the MAC attached to the received message is generated using old shared information before update.
  • FIG. 5 is a schematic diagram for explaining the relationship between the toggle bit and whether the message can be relayed.
  • the gateway 4 relays only a message with the toggle bit value of 0 as a valid message, and the value of the toggle bit managed by itself. Is 1, only the message with the toggle bit value 1 is relayed as a valid message.
  • the gateway 4 does both the message with the toggle bit value of 0 and the message with the toggle bit value of 1 regardless of the value of the toggle bit managed by itself. Is processed as a valid message.
  • the gateway 4 receives a message with a toggle bit different from the value of the toggle bit managed by itself until the predetermined period Ta elapses after the update process, the gateway 4 Relay is performed after the MAC value is corrected.
  • FIG. 6 is a block diagram showing the configuration of the ECU 2.
  • the ECU 2 includes a processing unit 21, a storage unit 22, a communication unit 23, and the like.
  • the processing unit 21 is configured by using an arithmetic processing unit such as a CPU (Central Processing Unit) or an MPU (Micro-Processing Unit), and stores a program stored in the storage unit 22 or a ROM (Read Only Memory) (not shown).
  • Various arithmetic processes are performed by reading and executing.
  • the content of the program executed by the processing unit 21 is different for each ECU 2.
  • the storage unit 22 is configured by using a non-volatile memory element such as a flash memory or an EEPROM (Electrically Erasable Programmable Read Only Memory).
  • the storage unit 22 stores an encryption key 22a and shared information 22b as information for generating a MAC attached to a message to be transmitted.
  • the encryption key 22a is information for performing encryption and decryption using, for example, a shared key method, and is information that all the ECUs 2 and gateways 4 included in the communication system have in common.
  • the shared information 22b is information that all the ECUs 2 and the gateways 4 included in the communication system have in common, but the shared information 22b is information that is updated relatively frequently.
  • the communication unit 23 is connected to the communication line 1a or 1b configuring the in-vehicle network, and transmits and receives data according to the CAN communication protocol.
  • the communication unit 23 converts the data provided from the processing unit 21 into an electrical signal and outputs the signal to the communication line 1a or 1b to transmit the data, and also obtains the potential of the communication line 1a or 1b by sampling.
  • the data is received by, and the received data is given to the processing unit 21.
  • the processing unit 21 of the ECU 2 executes a program stored in the storage unit 22 or the ROM, so that the message generation unit 21a, the message determination unit 21b, the update processing unit 21c, and the like are software. Realized as a functional block.
  • the message generation unit 21 a performs a predetermined encryption operation using this information, the encryption key 22 a and the shared information 22 b stored in the storage unit 22.
  • To generate a MAC The message generation unit 21a generates a data field including the value of the toggle bit managed by itself, the generated MAC, and information (data) to be transmitted to another ECU 2, and combines the data field with the arbitration field, the control field, and the like.
  • this message is transmitted to the communication lines 1 a and 1 b and received by the other ECU 2.
  • the value of the toggle bit is stored in the storage unit 22, for example, and is inverted every time the shared information 22b is updated.
  • the message determination unit 21b determines whether or not the message received by the communication unit 23 is a valid message.
  • the message determination unit 21b generates a confirmation MAC by performing a predetermined encryption operation using the data included in the received message, the encryption key 22a and the shared information 22b stored in the storage unit 22. Note that the encryption operation by the message generation unit 21a and the encryption operation by the message determination unit 21b are the same processing.
  • the message determination unit 21b compares the MAC included in the received message with the MAC generated by itself, determines that the received message is valid when both MACs match, and when both MACs do not match It is determined that the received message is not valid. In the present embodiment, the message determination unit 21b of the ECU 2 does not use the toggle bit included in the received message.
  • the update processing unit 21c performs a process of updating the shared information 22b stored in the storage unit 22 when the communication unit 23 receives an update command transmitted from the gateway 4.
  • the update command transmitted by the gateway 4 can be, for example, a message in which new shared information is stored as data field data, and a MAC generated using old shared information before update is attached.
  • the message determination unit 21b determines whether or not it is a valid update command in the same manner as a normal message.
  • the update processing unit 21c updates the shared information by overwriting the shared information 22b stored in the storage unit 22 with the new shared information included in the update command. .
  • FIG. 7 is a block diagram showing the configuration of the gateway 4.
  • the gateway 4 includes a processing unit 41, a storage unit 42, two communication units 43, and the like.
  • the processing unit 41 is configured using, for example, an arithmetic processing device such as a CPU or an MPU, and performs various arithmetic processing by reading and executing a program stored in the storage unit 42 or a ROM (not shown).
  • the processing unit 41 performs processing necessary for relaying message transmission / reception between the communication lines 1a and 1b of the in-vehicle network, update processing of shared information, and the like.
  • the storage unit 42 is configured using a nonvolatile memory element such as a flash memory or an EEPROM.
  • the storage unit 42 stores the same encryption key 42a and shared information 42b as the encryption key 22a and shared information 22b stored in the storage unit 22 by the ECU 2.
  • the storage unit 42 of the gateway 4 stores the old shared information 42c before update together with the shared information 42b currently used for message transmission / reception.
  • the storage unit 42 may store a program executed by the processing unit 41, data necessary for executing the program, data generated in the course of processing of the processing unit 41, and the like.
  • the two communication units 43 are respectively connected to the communication lines 1a and 1b constituting the in-vehicle network, and transmit and receive data according to the CAN communication protocol.
  • the communication unit 43 converts the data provided from the processing unit 41 into an electrical signal and outputs the signal to the communication lines 1a and 1b to transmit information and to sample and acquire the potential of the communication lines 1a and 1b.
  • the data is received by, and the received data is given to the processing unit 41.
  • the processing unit 41 executes a program stored in the storage unit 42 or the ROM or the like, whereby a message generation unit 41a, a message determination unit 41b, an update processing unit 41c, an update command transmission unit 41d, and a message correction unit 41e.
  • a message generation unit 41a is substantially the same as the process performed by the message generation unit 21a of the ECU 2. That is, when there is information to be transmitted to another device, the message generation unit 41a performs a predetermined encryption operation using this information, the encryption key 42a and the shared information 42b stored in the storage unit 42. To generate a MAC.
  • the message generation unit 41a generates a data field including the value of the toggle bit managed by itself, the generated MAC, and information (data) to be transmitted to another device, and combines the data field with the arbitration field, the control field, and the like. To generate a message for transmission.
  • the message generation unit 41a By giving the message generated by the message generation unit 41a to the communication unit 43, the message is transmitted to the communication lines 1a and 1b and received by the ECU 2 connected to the communication lines 1a and 1b.
  • the value of the toggle bit is stored in the storage unit 42, for example, and is inverted every time the shared information 42b is updated.
  • the process performed by the message determination unit 41b is substantially the same as the process performed by the message determination unit 21b of the ECU 2. That is, the message determination unit 41b determines whether or not the message received by the communication unit 43 is a valid message.
  • the message determination unit 41b generates a confirmation MAC by performing a predetermined encryption operation using the data included in the received message, the encryption key 42a stored in the storage unit 42, and the shared information 42b or 42c. To do.
  • the message determination unit 41b compares the MAC included in the received message with the MAC generated by itself, and determines that the received message is valid when both MACs match, and when both MACs do not match. It is determined that the received message is not valid.
  • the gateway 4 is also valid for the message with the MAC generated using the old shared information before the update until the predetermined period elapses after the update of the shared information 42b. Accept as a message. For this reason, the message determination unit 41b of the gateway 4 updates the updated new information stored in the storage unit 42 according to the value of the toggle bit included in the received message until the predetermined period elapses after the update of the shared information 42b. It is determined which of the shared information 42b and the old shared information 42c before update is used to generate the confirmation MAC. That is, when the toggle bit value included in the received message matches the toggle bit value stored in the storage unit 42, the message determination unit 41 b uses the updated new shared information 42 b stored in the storage unit 42.
  • a confirmation MAC is generated to determine whether the received message is correct.
  • the message determination unit 41b stores the old shared information before update stored in the storage unit 42.
  • a confirmation MAC is generated using 42c, and whether the received message is correct or not is determined. Note that after a predetermined period has elapsed since the update of the shared information 42b, the message determination unit 41b determines that the toggle bit value included in the received message does not match the toggle bit value stored in the storage unit 42. It may be determined that the received message is not valid.
  • the update processing unit 41c determines whether or not the timing for updating the shared information included in the ECU 2 and the gateway 4 included in the communication system has been reached.
  • the update processing unit 41c may be configured to determine that the update timing has been reached when a predetermined period such as 1 second, 1 minute, 1 hour, 1 day, or 1 week has elapsed since the previous update process, For example, when the ignition switch of the vehicle 1 is switched from the off state to the on state, it may be determined that the update timing has been reached, or another timing may be determined as the update timing.
  • the update processing unit 41c generates new shared information when it is determined that the timing for performing the update process has been reached.
  • the update processing unit 41c generates a random number using, for example, a predetermined random number generation algorithm, and generates shared information based on the random number.
  • the update processing unit 41c updates the shared information 42b by storing the new shared information 42b stored in the storage unit 42 as the old shared information 42c and storing the generated shared information as the new shared information 42b in the storage unit 42. To do.
  • the update command transmission unit 41d transmits an update command for causing the ECU 2 connected to the communication lines 1a and 1b to perform update processing when the update processing unit 41c performs update processing of its own device. The process of transmitting from 43 is performed.
  • the update command transmission unit 41d uses the new shared information generated by the update processing unit 41c as data, and updates the message with the MAC generated using the old shared information 42c before update stored in the storage unit 42. As a result, an update command is simultaneously transmitted from the two communication units 43 to all the ECUs 2.
  • the message correction unit 41e receives a message in which the value of the toggle bit included in the message does not match the value of the toggle bit stored in the storage unit 42 until the predetermined period elapses after the update of the shared information.
  • the message determination unit 41b determines that the message is a legitimate message
  • a process of correcting the toggle bit and MAC of the received message is performed.
  • the message correction unit 41e inverts the value of the toggle bit included in the received message.
  • the message correction unit 41e generates a new MAC based on the data included in the received message, the encryption key 22a stored in the storage unit 42, and the new shared information 22b after the update, and is included in the received message.
  • the received message is modified by exchanging the generated MAC with a newly generated MAC.
  • the message corrected by the message correction unit 41e is transmitted from the communication unit 43 different from the communication unit 43 that received the original message, and relayed to the ECU 2.
  • FIG. 8 is a flowchart showing a procedure of message transmission processing performed by the ECU 2.
  • the processing unit 21 of the ECU 2 starts the following message transmission process when information transmission to another ECU 2 becomes necessary.
  • the message generation unit 21a of the processing unit 21 reads the encryption key 22a stored in the storage unit 22 (step S1) and reads the shared information 22b stored in the storage unit 22 (step S2).
  • the message generator 21a generates a MAC using the information to be transmitted to the other ECU 2, the encryption key 22a read in step S1, and the shared information 22b read in step S2 (step S3).
  • the message generation unit 21a generates a message including the toggle bit stored in the storage unit 22, the MAC generated in step S3, and information to be transmitted to another ECU 2 (step S4).
  • the processing unit 21 sends the message generated by the message generating unit 21a to the communication unit 23, thereby transmitting a message to another ECU 2 (step S5), and ends the process.
  • FIG. 9 is a flowchart showing a procedure of message reception processing performed by the ECU 2.
  • the processing unit 21 of the ECU 2 determines whether or not the communication unit 23 has received a message from another ECU 2 or the gateway 4 (step S11). When the message is not received (S11: NO), the processing unit 21 stands by until the message is received. When a message is received (S11: YES), the message determination unit 21b of the processing unit 21 acquires data included in the received message (step S12). The message determination unit 21b reads the encryption key 22a stored in the storage unit 22 (step S13) and reads the shared information 22b stored in the storage unit 22 (step S14).
  • the message determination unit 21b generates a confirmation MAC using the data acquired in step S12, the encryption key 22a read in step S13, and the shared information 22b read in step S14 (step S15). Moreover, the message determination part 21b acquires MAC contained in a received message (step S16).
  • the message determination unit 21b determines whether or not the confirmation MAC generated in step S15 matches the MAC acquired in step S16 (step S17). If both MACs match (S17: YES), the message determination unit 21b determines that the received message is a valid message (step S18). The processing unit 21 performs an appropriate process according to the content of data included in the received message (step S19), and ends the message receiving process. On the other hand, when both MACs do not match (S17: NO), the message determination unit 21b determines that the received message is an invalid message (step S20). The processing unit 21 performs error processing and the like (step S21), and ends the message reception process.
  • FIG. 10 is a flowchart illustrating a procedure of shared information update processing performed by the ECU 2.
  • the processing unit 21 of the ECU 2 determines whether or not the communication unit 23 has received an update command from the gateway 4 (step S31). When the update command has not been received (S31: NO), the processing unit 21 stands by until the update command is received. When the update command is received (S31: YES), the processing unit 21 determines whether or not the received update command is a valid update command (step S32). The determination as to whether or not the update command is valid is performed by the same process as the determination as to whether or not the received message shown in the message reception process of FIG. 9 is valid. The details will be omitted.
  • the update processing unit 21c of the processing unit 21 acquires the shared information included in the update command (step S33).
  • the update processing unit 21c updates the acquired shared information by overwriting the shared information 22b stored in the storage unit 22 (step S34), and ends the update process. If the received update command is not a valid update command (S32: NO), the processing unit 21 performs error processing or the like (step S35), and ends the update process without updating the shared information 22b.
  • FIG. 11 is a flowchart showing a procedure of update processing performed by the gateway 4.
  • processing is performed using an “update processing flag” that holds a value of 0 or 1.
  • This flag can be realized using a storage area such as a register of the processing unit 41, for example.
  • the value of the update processing flag is set to 1 during a period from when the shared information is updated until a predetermined period elapses, and 0 is set during other periods.
  • the update processing unit 41c of the processing unit 41 of the gateway 4 initializes the value of the update processing flag to 0 (step S41).
  • the update processing unit 41c determines whether or not the timing for performing a predetermined update process has been reached (step S42). If the timing for performing the update process has not been reached (S42: NO), the update processing unit 41c waits until the timing for performing the update process is reached.
  • the update processing unit 41c stores the shared information 42b of the storage unit 42 used at that time in the storage unit 42 as the old shared information 42c before the update. (Step S43).
  • the update processing unit 41c generates new shared information by, for example, a method of generating a random number (Step S44).
  • the update processing unit 41c stores the generated shared information in the storage unit 42 as new shared information 42b after the update (Step S45). At this time, the update processing unit 41 c inverts the value of the toggle bit stored in the storage unit 42.
  • the processing unit 41 sets the value of the update processing flag to 1 (step S46).
  • the processing unit 41 starts counting a predetermined period from the update of the shared information using its own timer function or the like (step S47).
  • the update command transmission unit 41d of the processing unit 41 generates an update command including the new shared information generated in step S44 (step S48).
  • the update command transmission unit 41d transmits the generated update command to all the communication units 43 (step S49).
  • the processing unit 41 determines whether or not a predetermined period has elapsed from the start of timing in step S47 (step S50). When the predetermined period has not elapsed (S50: NO), the processing unit 41 waits until the predetermined period elapses. When the predetermined period has elapsed (S50: YES), the processing unit 41 finishes counting the predetermined period (step S51). The processing unit 41 sets the value of the update process flag to 0 (step S52), and ends the update process.
  • Step S61 determines whether any of the communication units 43 has received a message.
  • S61: NO the processing unit 41 waits until the message is received.
  • the message determination unit 41b of the processing unit 41 acquires the value of the toggle bit included in the received message (step S62).
  • the message determination unit 41b compares the toggle bit value acquired in step S62 with the toggle bit value stored in the storage unit 42, and determines whether or not both toggle bits match (step S63). . If the toggle bits match (S63: YES), since the MAC attached to this received message is generated using the new shared information after the update, the message determination unit 41b stores it in the storage unit 42.
  • the updated new shared information 42b is read (step S64).
  • the message determination unit 41b determines whether or not the received message is valid based on the updated new shared information 42b read in step S64 (step S65). When it is determined that the received message is valid (S65: YES), the processing unit 41 relays the message by transmitting the received message in the communication unit 43 different from the communication unit 43 that has received the message. (Step S66), and the relay process ends. If it is determined that the received message is not valid (S65: NO), the processing unit 41 performs error processing or the like (step S68), and ends the relay process without relaying the message.
  • the message determination unit 41b determines whether or not the value of the update processing flag is 0 (step S67). When the value of the update processing flag is 0 (S67: YES), this received message is not attached with the MAC generated using the new shared information after the update, and a predetermined period from the update of the shared information Therefore, the processing unit 41 determines that the received message is not valid, performs error processing (step S68), and ends the relay process without relaying the message.
  • the message determination unit 41b reads out the old shared information 42c before update stored in the storage unit 42 (step S71). The message determination unit 41b determines whether or not the received message is valid based on the old shared information 42c before update read in step S71 (step S72).
  • the message correction unit 41e of the processing unit 41 reads the updated new shared information 42b stored in the storage unit 42 (step S73).
  • the message correction unit 41e generates a new MAC based on the data included in the received message and the encryption key 22a stored in the storage unit 42 using the updated new shared information 42b read in step S73.
  • Step S74 The message correction unit 41e corrects the message by inverting the toggle bit of the received message and replacing the MAC of the received message with the MAC generated in step S74 (step S75).
  • the processing unit 41 relays the message by transmitting the message corrected in step S75 in the communication unit 43 different from the communication unit 43 that has received the message (step S76), and ends the relay process. If it is determined that the received message is not valid (S72: NO), the processing unit 41 performs error processing (step S77) and ends the relay process without relaying the message.
  • a plurality of ECUs 2 are connected to one communication line 1a, 1b, a plurality of such communication lines 1a, 1b are connected to the gateway 4, and the gateway 4
  • communication between the communication lines 1a and 1b is relayed.
  • the ECU 2 and the gateway 4 included in the communication system store shared information, and use the stored shared information to generate and transmit a message to another device and to determine whether the message received from the other device is correct or not. Do it.
  • the shared information stored in the ECU 2 and the gateway 4 is variable information and is updated by an update command transmitted by the gateway 4.
  • the update command transmitted by the gateway 4 is received by the ECU 2 via the communication lines 1a and 1b, and the ECU 2 that has received the update command updates the shared information stored therein.
  • the shared information may be updated periodically for a predetermined period such as 1 second, 1 minute, 1 hour, 1 day, or 1 week.
  • the ignition switch of the vehicle 1 is switched from the off state to the on state. It may be performed every time an event occurs, such as every time.
  • the update command transmitted by the gateway 4 may cause a collision or delay during transmission or when relaying between the communication lines 1a and 1b. Therefore, the gateway 4 of the communication system according to the present embodiment includes a message generated using the old shared information before the update and a time after the update until the predetermined period elapses from the timing of updating the shared information. Both messages generated using new shared information are treated as legitimate messages and are relayed.
  • the update timing of the shared information that is the starting point of the predetermined period can be, for example, the timing at which the shared information 42b stored in its own storage unit 42 is updated, the timing at which the update command to the ECU 2 is transmitted, or the like.
  • the update command transmitted by the gateway 4 is generated using the old shared information before update in a certain period until all ECUs 2 receive the update command and perform update processing. And a message generated using the updated new shared information can be transmitted and received. Therefore, even in a communication system having a configuration in which the gateway 4 relays communication between the plurality of communication lines 1a and 1b, message transmission and reception using shared information whose values change can be realized.
  • the gateway 4 when the gateway 4 according to the present embodiment receives a message generated using the old shared information before the update from the update of the shared information until the predetermined period elapses, the gateway 4 updates the message. The message is corrected and relayed using new shared information later. As a result, the relay destination ECU 2 can receive a message using the updated new shared information.
  • a toggle bit is included in the message as update state information indicating the update state of the shared information.
  • the gateway 4 can easily determine whether the received message uses old shared information before update or uses new shared information after update. .
  • the ECU 2 generates a MAC based on the data to be transmitted, the encryption key 22a and the shared information 22b stored in the storage unit 22, and transmits a message including this MAC to the other ECU 2.
  • the ECU 2 that has received the message generates a confirmation MAC based on the data included in the received message, the encryption key 22a and the shared information 22b stored in the storage unit 22, and compares the generated MAC with the MAC included in the received message.
  • whether the received message is correct or not is determined.
  • the reliability of messages transmitted and received in the communication system can be increased, and the resistance against retransmission attacks can be increased by adding the MAC using the updated shared information.
  • the gateway 4 generates the shared information and transmits the update command.
  • the present invention is not limited to this, and any one of the plurality of ECUs 2 included in the communication system may A configuration may be employed in which generation and update instructions are transmitted.
  • the configuration may be such that all the ECUs 2 and the gateways 4 generate the shared information according to the same rule, such that the shared information is a counter value and the ECU 2 increases or decreases the counter in response to reception of the update command.
  • the MAC-attached message is transmitted and received.
  • the information that the ECU 2 should transmit is encrypted and the message with the toggle bit is transmitted and received. It is good also as a structure.
  • the update status information attached to the message may not be a toggle bit, and may be information whose value changes according to some rule, such as a counter value that increases or decreases each time update processing is performed. Furthermore, it may be configured such that the update status information such as a toggle bit is not attached to the message.
  • the gateway 4 does not update the message received during the predetermined period after the update of the shared information. It can be configured to perform both correctness determination of a message using new shared information and correctness determination of a message using old shared information before update.
  • the communication system according to the present embodiment is a system mounted on the vehicle 1, the communication system is not limited to this, and may be a communication system other than the vehicle.
  • the communication device may be various devices having a communication function other than the ECU 2, and the relay device may be various devices having a relay function other than the gateway 4.
  • each ECU 2 includes a message using the old shared information before the update and a message using the new shared information after the update until a predetermined period has elapsed since the update of the shared information. Is received as valid.
  • the gateway 4 may be configured to relay this message without determining whether the received message is correct or not, or until the predetermined period elapses from the update of the shared information, the old shared information before the update is stored. The used message and the message using the new shared information after the update may be received as valid and relayed without correcting the message.
  • the communication system according to Embodiment 2 has a configuration in which a plurality of communication protocols are mixed and a plurality of relay devices are connected in a hierarchical manner.
  • FIG. 14 is a block diagram showing a configuration of a communication system according to the second embodiment.
  • the communication system according to Embodiment 2 is configured to include a plurality of DCUs (Domain Control Units) 200 to 204 as relay apparatuses and a plurality of ECUs 203a to 203l as communication apparatuses.
  • DCUs Domain Control Units
  • the communication system includes a network that performs communication at a communication speed of 1 Gbps using an Ethernet (registered trademark) communication protocol, a network that performs communication at a communication speed of 100 Mbps using an Ethernet (registered trademark) communication protocol, A network that performs communication at a communication speed of 2 Mbps by a CAN-FD communication protocol is mixed.
  • the communication system according to Embodiment 2 has a hierarchical structure in which four DCUs 201 to 204 are connected to one DCU 200, and a plurality of ECUs are connected to each DCU 201 to 204.
  • One DCU 200 and four DCUs 201 to 204 are connected to each other via individual communication lines, and communicate at a communication speed of 1 Gbps using an Ethernet (registered trademark) communication protocol.
  • the four DCUs 201 to 204 of the communication system according to the second embodiment can be connected to six communication lines for connecting one or a plurality of ECUs separately from the communication lines connected to the DCU 200. .
  • a plurality of communication lines connected to the DCUs 201 to 204 may have different communication protocols.
  • the DCU 203 is connected with three communication lines corresponding to the CAN-FD communication protocol with a communication speed of 2 Mbps and three communication lines corresponding to the Ethernet (registered trademark) communication protocol with a communication speed of 100 Mbps.
  • Three ECUs 203a to 203c are connected to the first communication line corresponding to the CAN communication protocol, ECUs 203d to 203f are connected to the second communication line, and ECUs 203g to 203i are connected to the third communication line.
  • the ECU 203j is connected to the fourth communication line corresponding to the Ethernet (registered trademark) communication standard, the ECU 203k is connected to the fifth communication line, and the ECU 203l is connected to the sixth communication line.
  • a plurality of ECUs are similarly connected to the other DCUs 201, 202, and 204, but the illustration is omitted.
  • the ECU 230j transmits a message
  • this message is received by the DCU 203.
  • the DCU 203 performs a process of relaying the received message, determines the relay destination of this message based on the content of the message received from the ECU 230j (for example, data or header information), and sets the relay destination as the communication line determined as the relay destination.
  • the DCUs 200 to 201 that have received the message do not necessarily have to relay this message to all the communication lines, but to the communication line on which the ECU that requires this message exists.
  • the message may be relayed to it.
  • the DCUs 201 to 204 transmit this message to the DCU 200 to the target ECU via the DCU 200 and the other DCUs 201 to 204. Send a message.
  • all the DCUs 200 to 204 and the ECUs 203a to 203l store the shared information in the storage unit, and the DCU 200 starts the update process of the shared information at a predetermined timing. That is, the DCU 200 generates new shared information, updates the shared information stored in its own storage unit, and transmits a shared information update command to the other DCUs 201 to 204. Receiving the update command from the DCU 200, each of the DCUs 201 to 204 updates the shared information stored in its storage unit, and transmits the shared information update command to the six communication lines to which the ECU is connected. For example, the ECUs 203a to 203l that have received the update command from the DCU 203 update the shared information stored in its own storage unit.
  • the message with the MAC generated using the old shared information before the update and the new after the update until the predetermined period has passed since the update of the shared information The DCUs 200 to 204 perform a process of receiving and relaying, as a valid message, a message to which the MAC generated using the shared information is attached. At this time, if the DCUs 200 to 204 receive a message with the MAC generated using the old shared information before the update, the DCU 200 to 204 uses the new shared information after the update for the MAC of the message. A message correction process for replacing the generated MAC is performed, and the corrected message is relayed.
  • FIGS. 15 to 19 are schematic diagrams showing a first example of message transmission / reception and shared information update by the communication system according to the second embodiment, and FIG. 15 to FIG. It is.
  • FIG. 15 shows a situation where the DCU 200 has started the update process of the shared information at the timing when the update process is performed.
  • the DCU 200 performs a process of updating the shared information that is generated using the new shared information and stored in the DCU 200 itself.
  • the DCU 200 has not yet transmitted an update command, and the shared information stored in the other DCUs 201 to 204 and the ECUs 203a to 203l is old shared information before update.
  • the ECU 203j sends a message with the MAC generated using the old shared information before update (indicated by a dashed line arrow in the figure, the same in the following drawings), and this message is sent to the DCU 203. Received.
  • the DCU 203 that has received the message from the ECU 203j determines that this message is valid based on the MAC included in the received message, and relays this message to the DCU 200 and the ECUs 203a to 203c. Therefore, a message is transmitted to the communication line to which each device is connected. Note that the determination by the DCU 203 at this time is performed using old shared information before update.
  • the message relayed by the DCU 203 is received by the DCU 200 and the ECUs 203a to 203c.
  • the DCU 200 transmits a shared information update command to the DCUs 201 to 204 at a slight delay from the message transmission by the DCU 203 (indicated by broken arrows in the figure, the same in the following drawings).
  • the DCUs 201 to 204 that have received the shared information update command from the DCU 200 perform update processing, and the shared information stored in the DCUs 201 to 204 is updated to new shared information provided from the DCU 200.
  • the DCU 200 determines that the message with the MAC generated using the old shared information before update received from the DCU 203 is received between the update of the shared information and the elapse of a predetermined period. Then, the MAC is generated using the new shared information after the update, and the message is corrected by exchanging with the MAC included in the received message.
  • the DCUs 201 to 204 that have finished updating the shared information update the shared information with respect to all the communication lines connected to the DCUs 201 to 204 (except the communication line to which the DCU 200 is connected). Is being sent all at once.
  • the ECUs 203a to 203l that have received the shared information update command from the DCU 203 start the update process.
  • the DCU 200 that has completed the correction of the message transmits the corrected message to the DCU 202 (indicated by an alternate long and two short dashes arrow in the figure, the same in the following drawings).
  • the message transmitted from the DCU 200 is a message to which the MAC generated using the new shared information after the update is attached, and the DCU 202 that receives this message is in a state where the update process has been completed.
  • the correctness of the received message can be determined using the new shared information after update stored.
  • the DCU 202 that has determined that the message from the DUC 200 is valid relays this message.
  • the update of the shared information has been completed. Therefore, the ECU that has received the message from the DCU 202 can determine whether the received message is correct by using the new shared information after update stored in the ECU.
  • FIG. 20 to 23 are schematic diagrams showing a second example of message transmission / reception and shared information update by the communication system according to the second embodiment.
  • FIG. 20 to FIG. It is.
  • the second example is a situation similar to the first example, but the DCU 200 that has completed the update process earlier than the DCU 203 receives the message with the MAC generated using the old shared information before the update from the ECU 203j.
  • the update command is received by the DCU 203.
  • the DCU 200 that has completed the update process transmits a shared information update command to the DCUs 201 to 204 all at once, and the update process is started in the DCUs 201 to 204 that have received this command.
  • the ECU 203j transmits to the DCU 203 a message with the MAC generated using the old shared information before update.
  • the message transmitted from the ECU 203j is received by the DCU 203.
  • the DCUs 201 to 204 that have completed the update processing of the shared information simultaneously transmit a shared information update command to the ECU.
  • the ECU that has received the update command from the DCUs 201 to 204 starts an update process for the shared information stored in the ECU.
  • the DCU 203 receives the message with the MAC generated using the old shared information before update received from the ECU 203j before the predetermined period elapses from the update of the shared information.
  • the message is corrected by generating a MAC using the updated new shared information and exchanging it with the MAC included in the received message.
  • the DCU 203 that has completed the correction of the message transmits the corrected message to the DCU 200 and the ECUs 203a to 203c.
  • the message transmitted from the DCU 203 is a message with the MAC generated using the new shared information after the update, and the DCU 200 and the ECUs 203a to 203c that receive this message have finished the update process. Therefore, the correctness of the received message can be determined using the new shared information after update stored in itself.
  • the communication system according to the second embodiment having the above configuration is a communication system employing a so-called domain architecture. Even in the communication system configured as described above, the same function as that of the gateway 4 of the communication system according to the first embodiment, that is, the old shared information before the update until the predetermined period elapses after the update of the shared information. Since the DCUs 200 to 204 have a function of determining both the used message and the message using the updated new shared information as valid messages, message transmission / reception using the shared information whose value changes can be realized.
  • the DCUs 200 to 204 as relay devices use the message using the old shared information before the update and the new shared information after the update until the predetermined period elapses after the presence information is updated.
  • the present invention is not limited to this.
  • the ECUs 203a to 203l may be configured to have this function.
  • the configuration of the communication system, the transmission timing of the message or the update command, and the like shown in FIGS. 14 to 23 are examples, and are not limited thereto.

Abstract

値が変化し得る共有情報を用いたメッセージの送受信を可能とする通信システム、中継装置、通信装置及び通信方法を提供する。 一又は複数の通信装置が接続された複数の通信線の間の通信を中継装置が中継する。通信装置及び中継装置は、共有情報を記憶し、共有情報を用いたメッセージを生成し、生成したメッセージを他の装置へ送信すると共に、他の装置からのメッセージを受信し、共有情報に基づいて受信したメッセージの正否を判定する。通信装置及び中継装置のうちの少なくとも1つの装置は、共有情報を更新させる更新命令を他の装置へ送信する。通信装置及び中継装置は、更新命令を受信した場合に、記憶した共有情報を更新する。通信装置又は中継装置は、共有情報の更新から所定期間が経過するまでの間、更新前の共有情報を用いて生成されたメッセージを受信した場合に、このメッセージを正当なメッセージと判定する。

Description

通信システム、中継装置、通信装置及び通信方法
 本発明は、複数の通信線間の通信を中継装置が中継する構成の通信システム、中継装置、通信装置及び通信方法に関する。
 近年、例えば車両に搭載されたネットワークにおいて、不正な通信装置の接続又は正規の通信装置の乗っ取り等によってネットワークに対する不正なメッセージ送信が行われることを防止するための対応策として、メッセージ認証子(MAC:Message Authentication Code)を用いたメッセージ送受信を行うことが提案されている。ただしMACは、正規の通信装置が共有する暗号鍵と送信する情報とから生成され、暗号鍵と送信情報との組み合わせが同じ場合には同じ値となる。このためMACを用いる方法では、過去にネットワーク上を送受信された正規のメッセージを取得し、取得したメッセージを再送する再送攻撃に対して効果がなかった。
 メッセージの再送攻撃に対して、例えば定期的に変化する情報などをMAC生成の演算に組み込むことによって、過去の正規メッセージを無効化する対応策がとり得る。ただしこの対応策を実現するためには、ネットワーク中の複数の通信装置が定期的に変化する情報を共有する必要があり、複数の通信装置が共有情報を同期して変化させる必要がある。
 特許文献1には、ネットワーク中の各通信装置が、チェック値を用いてMACを生成してこのMACを含むメッセージを送信し、受信したメッセージに含まれるMACから再生した再生値とチェック値との比較によりメッセージの正否を判定する通信システムが記載されている。特許文献1に記載の通信システムでは、チェック値の更新を指示する内容を含むメッセージに基づいて、各通信装置のチェック値が同期される。
国際公開番号WO2013/175633
 特許文献1に記載の通信装置にて行われる特定のメッセージを用いたチェック値の同期方法は、メッセージを送受信する複数の通信装置が1つの共通の通信線に接続された構成の通信システムにおいては問題なく運用され得る。しかしながら、複数の通信線がゲートウェイ又はルータ等の中継装置を介して接続され、各通信線に接続された通信線が非同期にメッセージの送受信を行う構成の通信システムにおいては、チェック値を同期させるメッセージの中継に遅延又は衝突等が発生することによって、一時的に同期にズレが生じる虞がある。
 本発明は、斯かる事情に鑑みてなされたものであって、その目的とするところは、複数の通信線間の通信が中継装置にて中継される構成において、値が変化し得る共有情報を用いたメッセージの送受信を可能とする通信システム、中継装置、通信装置及び通信方法を提供することにある。
 本発明に係る通信システムは、一又は複数の通信装置が通信線に接続され、複数の前記通信線の間の通信を中継装置が中継する通信システムにおいて、前記通信装置及び前記中継装置は、共有情報を記憶する記憶部と、前記共有情報を用いたメッセージを生成するメッセージ生成部と、前記メッセージ生成部が生成したメッセージを他の装置へ送信するメッセージ送信部と、他の装置からのメッセージを受信するメッセージ受信部と、前記共有情報に基づいて前記メッセージ受信部が受信したメッセージの正否を判定する判定部とをそれぞれ有し、前記通信装置及び前記中継装置のうちの少なくとも1つの装置は、前記共有情報を更新させる更新命令を他の装置へ送信する更新命令送信部を有し、前記通信装置及び前記中継装置は、前記更新命令を受信した場合に、前記記憶部に記憶された共有情報を更新する更新部を更に有し、前記通信装置又は前記中継装置は、前記共有情報の更新から所定期間が経過するまでの間、更新前の共有情報を用いて生成されたメッセージを受信した場合に、該メッセージを前記判定部が正当なメッセージと判定することを特徴とする。
 また、本発明に係る通信システムは、前記中継装置が、前記共有情報の更新から所定期間が経過するまでの間、更新前の共有情報を用いて生成されたメッセージを受信した場合に、該メッセージを更新後の共有情報を用いたメッセージに修正するメッセージ修正部を有し、前記メッセージ修正部が修正したメッセージを中継することを特徴とする。
 また、本発明に係る通信システムは、前記メッセージ生成部が生成するメッセージには、前記共有情報の更新状態を示す更新状態情報を含み、前記判定部は、前記共有情報及び受信したメッセージに含まれる更新状態情報に基づいてメッセージの正否を判定することを特徴とする。
 また、本発明に係る通信システムは、前記更新状態情報が、前記更新命令に応じて値が所定の規則で変化する情報であることを特徴とする。
 また、本発明に係る通信システムは、前記更新状態情報が、前記更新命令に応じて値が反転するトグルビットであることを特徴とする。
 また、本発明に係る通信システムは、前記メッセージ生成部が生成するメッセージには、前記共有情報と前記メッセージに含まれる情報とに基づいて生成されたメッセージ認証子を含み、前記判定部は、受信したメッセージに含まれる情報及びメッセージ認証子と、記憶部に記憶された前記共有情報とに基づいて前記メッセージの正否を判定することを特徴とする。
 また、本発明に係る中継装置は、それぞれに一又は複数の通信装置が接続された複数の通信線間の通信を中継する中継装置において、前記通信装置との間で共有する共有情報を記憶する記憶部と、前記共有情報を用いて生成されたメッセージを前記通信装置から受信するメッセージ受信部と、前記共有情報に基づいて前記メッセージ受信部が受信したメッセージの正否を判定する判定部と、前記記憶部に記憶された共有情報を更新する更新部と、前記共有情報の更新から所定期間が経過するまでの間、更新前の共有情報を用いて生成されたメッセージを受信した場合に、該メッセージを更新後の共有情報を用いたメッセージに修正するメッセージ修正部とを備えることを特徴とする。
 また、本発明に係る通信装置は、少なくとも中継装置が接続された通信線に接続され、前記通信線及び前記中継装置を介して通信を行う通信装置において、前記中継装置との間で共有する共有情報を記憶する記憶部と、前記共有情報を用いたメッセージを生成するメッセージ生成部と、前記メッセージ生成部が生成したメッセージを他の装置へ送信するメッセージ送信部と、他の装置からのメッセージを受信するメッセージ受信部と、前記共有情報に基づいて前記メッセージ受信部が受信したメッセージの正否を判定する判定部と、他の装置から送信される前記共有情報の更新命令を受信した場合に、前記記憶部に記憶された共有情報を更新する更新部とを有し、前記共有情報の更新から所定期間が経過するまでの間、更新前の共有情報を用いて生成されたメッセージを受信した場合に、該メッセージを前記判定部が正当なメッセージと判定することを特徴とする。
 また、本発明に係る通信方法は、通信線に一又は複数の通信装置が接続され、複数の前記通信線が接続された中継装置が前記通信線間の通信を中継する通信方法において、前記通信装置及び前記中継装置が、共有情報を記憶し、前記共有情報を用いたメッセージを生成して他の装置へ送信し、他の装置から受信したメッセージの正否を前記共有情報に基づいて判定し、前記通信装置及び前記中継装置のうちの少なくとも1つの装置が、前記共有情報を更新させる更新命令を他の装置へ送信し、前記通信装置及び前記中継装置が、前記更新命令を受信した場合に前記共有情報を更新し、前記通信装置又は前記中継装置が、前記共有情報の更新から所定期間が経過するまでの間、更新前の共有情報を用いて生成されたメッセージを受信した場合に、該メッセージを正当なメッセージと判定することを特徴とする。
 本発明において通信システムは、一つの通信線に一又は複数の通信装置が接続され、このような複数の通信線が中継装置に接続されて、中継装置が通信線間の通信を中継する構成である。各通信線にて行われる通信のプロトコルは、必ずしも同じプロトコルでなくてよく、異なるプロトコル間の通信を中継装置が変換して中継してよい。また、複数の中継装置が更に上位の中継装置に接続される階層的なシステム構成が採用されてもよい。
 通信システムに含まれる通信装置及び中継装置は、共有情報を記憶しており、他の装置へのメッセージの生成及び送信と、他の装置から受信したメッセージの正否判定とを、記憶した共有情報を用いて行う。通信装置及び中継装置が記憶する共有情報は可変であり、通信システムに含まれる通信装置及び中継装置のうちの少なくとも1つの装置が送信する更新命令によって更新される。即ち、1つの装置が送信した更新命令がネットワークを伝わって通信装置及び中継装置にて受信され、更新命令を受信した通信装置及び中継装置が自身の記憶する共有情報を更新する。なお共有情報の更新は、例えば1秒、1分、1時間、1日又は1週間等の所定周期で行ってもよく、また例えば通信システムが車両に搭載されるものであれば車両のイグニッション信号がオン状態へ変化する毎など、何らかのイベント発生毎に行ってもよい。
 1つの装置が送信する更新命令は、送信の際又は通信線間を中継される際等に衝突又は遅延等が発生する可能性がある。そこで本発明に係る通信システムの中継装置は、共有情報の更新を行うタイミングから所定の期間が経過するまでの間、更新前の共有情報を用いて生成されたメッセージと、更新後の共有情報を用いて生成されたメッセージとの両方を正当のメッセージとして扱い、中継の対象とする。又は、本発明に係る通信システムの通信装置は、共有情報の更新を行うタイミングから所定の期間が経過するまでの間、更新前の共有情報を用いて生成されたメッセージと、更新後の共有情報を用いて生成されたメッセージとの両方を正当なメッセージとして受信する。なお共有情報の更新を行うタイミングは、更新命令を送信する装置の場合、自身の共有情報を更新したタイミング又は更新命令を送信したタイミング等とすることができ、更新命令を受信する装置の場合には、更新命令を受信したタイミング又は自身の共有情報を更新したタイミング等とすることができる。
 これにより、1つの装置が送信した更新命令が通信システムに含まれる全ての装置で受信されるまでの一定の期間において、更新前の共有情報を用いて生成されたメッセージと更新後の共有情報を用いて生成されたメッセージとが送受信可能となる。よって複数の通信線間の通信を中継装置が中継する構成の通信システムであっても、値が変化する共有情報を用いたメッセージ送受信を実現できる。
 また本発明において中継装置は、更新前の共有情報を用いて生成されたメッセージを受信した場合には、このメッセージを更新後の共有情報を用いたメッセージに修正して中継する。これにより中継先の通信装置は、更新された共有情報を用いたメッセージを受信することができる。このため通信装置は、共有情報の更新から所定期間が経過するまでに受信した更新前の共有情報を用いたメッセージを正当なメッセージとして扱う処理を行う必要がなくなる。
 また本発明においては、共有情報の更新状態を示す更新状態情報をメッセージに含める。更新状態情報は、更新命令に応じて値が所定の規則で変化する情報、例えば更新命令に応じて値が反転するトグルビットとすることができる。このような更新状態情報をメッセージに含めることによって、中継装置及び通信装置は、受信したメッセージが更新前の共有情報を用いたものであるか、又は、更新後の共有情報を用いたものであるかを容易に判断することが可能となる。
 また本発明において、メッセージ送信を行う装置は、共有情報と送信するメッセージに含まれる情報とに基づいてメッセージ認証子を生成し、このメッセージ認証子を含むメッセージを他の装置へ送信する。メッセージを受信した装置は、受信メッセージに含まれる情報と自信が記憶する共有情報とに基づいて受信メッセージに含まれるメッセージ認証子の正否を判定し、受信メッセージの正否を判定する。これにより通信システムにて送受信されるメッセージの信頼性を高めることができると共に、更新される共有情報を用いたメッセージ認証子が付されることで再送攻撃に対する耐性を高めることができる。
 本発明による場合は、共有情報の更新から所定の期間が経過するまでの間、更新前の共有情報を用いて生成されたメッセージと、更新後の共有情報を用いて生成されたメッセージとの両方を正当のメッセージとして扱うことにより、複数の通信線間の通信が中継装置にて中継されるシステム構成において、値が変化し得る共有情報を用いたメッセージの送受信を行うことができる。
実施の形態1に係る通信システムの構成を示すブロック図である。 実施の形態1に係る通信システムにて送受信されるメッセージの構成を説明するための模式図である。 共有情報のズレにより生じる問題点を説明するための模式図である。 共有情報のズレにより生じる問題点の解決法を説明するための模式図である。 トグルビットとメッセージの中継可否との関係を説明するための模式図である。 ECUの構成を示すブロック図である。 ゲートウェイの構成を示すブロック図である。 ECUが行うメッセージ送信処理の手順を示すフローチャートである。 ECUが行うメッセージ受信処理の手順を示すフローチャートである。 ECUが行う共有情報の更新処理の手順を示すフローチャートである。 ゲートウェイが行う更新処理の手順を示すフローチャートである。 ゲートウェイが行うメッセージ中継処理の手順を示すフローチャートである。 ゲートウェイが行うメッセージ中継処理の手順を示すフローチャートである。 実施の形態2に係る通信システムの構成を示すブロック図である。 実施の形態2に係る通信システムによるメッセージ送受信及び共有情報更新の第1例を示す模式図である。 実施の形態2に係る通信システムによるメッセージ送受信及び共有情報更新の第1例を示す模式図である。 実施の形態2に係る通信システムによるメッセージ送受信及び共有情報更新の第1例を示す模式図である。 実施の形態2に係る通信システムによるメッセージ送受信及び共有情報更新の第1例を示す模式図である。 実施の形態2に係る通信システムによるメッセージ送受信及び共有情報更新の第1例を示す模式図である。 実施の形態2に係る通信システムによるメッセージ送受信及び共有情報更新の第2例を示す模式図である。 実施の形態2に係る通信システムによるメッセージ送受信及び共有情報更新の第2例を示す模式図である。 実施の形態2に係る通信システムによるメッセージ送受信及び共有情報更新の第2例を示す模式図である。 実施の形態2に係る通信システムによるメッセージ送受信及び共有情報更新の第2例を示す模式図である。
(実施の形態1)
 図1は、実施の形態1に係る通信システムの構成を示すブロック図である。本実施の形態に係る通信システムは、車両1に搭載された複数のECU(Electronic Control Unit)2が、車両1内に配された通信線1a,1b及びゲートウェイ4を介して相互に通信を行うシステムである。本実施の形態に係る通信システムは、ゲートウェイ4が中継装置に相当し、ECU2が通信装置に相当する。また図示の例では、車内の通信線1aに2つのECU2が接続され、通信線1bに3つのECU2が接続され、2本の通信線1a,1bがゲートウェイ4に接続されたシステム構成であり、ゲートウェイ4が通信線1a,1b間の通信を中継することによって、全てのECU2が他のECU2との間でデータの送受信を行うことができる。
 ECU2は、例えば車両1のエンジンの動作を制御するECU、ドアのロック/アンロックを制御するECU、ライトの点灯/消灯を制御するECU、エアバッグの動作を制御するECU、及び、ABS(Antilock Brake System)の動作を制御するECU等の種々のECUが含まれ得る。各ECU2は、車両1に配された通信線1a又は1bに接続され、通信線1a,1bを介して他のECU2及びゲートウェイ4との間でデータの送受信を行うことができる。
 ゲートウェイ4は、車両1の車内ネットワークを構成する複数の通信線1a,1bが接続され、通信線間のデータの送受信を中継する処理を行う。図1に示す例においては、ゲートウェイ4には2つの通信線1a,1b、即ち2つのECU2が接続された第1の通信線1a、及び、3つのECU2が接続された第2の通信線1bが接続されている。ゲートウェイ4は、いずれかの通信線1a,1bから受信したデータを他の通信線1a,1bへ送信することによって、データの中継を行う。
 本実施の形態に係る通信システムでは、ECU2及びゲートウェイ4がCAN(Controller Area Network)の通信プロトコルに従った通信を行っている。ただし、本実施の形態に係る通信システムにて採用されるCANの通信プロトコルには、メッセージ認証子(MAC)の技術が導入されている。ECU2及びゲートウェイ4が送信するメッセージにはMACが付され、メッセージを受信したECU2及びゲートウェイ4はメッセージに付されたMACの正否を判定することによって、受信メッセージが正当なものであるか否かの判定を行う。
 図2は、実施の形態1に係る通信システムにて送受信されるメッセージの構成を説明するための模式図である。なお図2には、CANの通信プロトコルにて送受信されるメッセージに含まれるデータフィールドの8バイト分のみを示し、これ以外のアービトレーションフィールド及びコントロールフィールド等のフィールドについては図示を省略してある。CANの通信プロトコルにて送受信されるメッセージのデータフィールドは、8バイト(64ビット)の2値情報の連なりで構成されている。実施の形態1に係る通信システムにて送受信されるメッセージのデータフィールドは、先頭の1ビットをトグルビットとし、続く31ビットをMACとし、以降の32ビットをデータとしている。
 5バイト目から8バイト目までの32ビットのデータは、例えばあるECU2が他のECU2に対して送信すべき情報である。31ビットのMACは、32ビットのデータと、ECU2及びゲートウェイ4が共有している暗号鍵及び共有情報に基づいて生成されるものである。1ビットのトグルビットは、ECU2及びゲートウェイ4が共有する共有情報の更新処理に用いられる情報であり、更新処理が行われる毎に0/1が反転するビットである。ECU2は、送信すべき情報と記憶している暗号鍵及び共有情報とに基づいてMACを生成し、トグルビット及びMACをデータ(送信すべき情報)に付したデータフィールドを生成する。CANの通信プロトコルのメッセージを構成する他のフィールドについては、ECU2は通常のCANの通信プロトコルの手順に従って生成すればよい。
 メッセージを受信したECU2は、受信メッセージに含まれるデータフィールドのトグルビットの値に基づいて共有情報の更新処理が正しく行われているか否かを判定する。共有情報の更新処理が正しく行われている場合、ECU2は、自身が記憶する暗号鍵及び共有情報と、受信メッセージに含まれる32ビットのデータとに基づいてMACを生成し、生成したMACと受信メッセージに含まれるMACとが一致するか否かに基づいて、受信メッセージが正当なものであるか否かを判定する。
 本実施の形態に係る通信システムでは、ECU2及びゲートウェイ4が有する共有情報が所定のタイミングで更新される。本実施の形態においては、ゲートウェイ4が所定のタイミングで更新用の新たな共有情報を生成し、自身が記憶する共有情報を新たな共有情報に更新すると共に、生成した共有情報を更新命令と共に全ECU2へ送信する。更新命令を受信したECU2は、自身が記憶している共有情報を、更新命令に付された新たな共有情報に置き換えることによって、共有情報を更新する。このときにゲートウェイ4は、更新命令を2つの通信線1a,1bに同時的に送信するが、例えば一方の通信線1a又は1bにてメッセージの衝突などが発生した場合などに、一方の更新命令の送信が遅延する可能性がある。更新命令の送信に遅延が発生した場合、通信線1aに接続されたECU2と、通信線1bに接続されたECU2とでは共有情報の値が異なる時間帯が生じる。
 図3は、共有情報のズレにより生じる問題点を説明するための模式図である。なお本図及び次図においては、車両1に搭載された複数のECU2について、通信線1aに接続されているものをECU2aとし、通信線1bに接続されているものをECU2bとして区別している。図3上段に示すように、例えばゲートウェイ4が更新のために新たな共有情報(図中において「共有情報(新)」と記載する)を生成し、新たな共有情報を付した更新命令を通信線1a及び1bへ同時的に送信しようとしたとする。しかし、通信線1aに接続されたECU2aが、ゲートウェイ4による更新命令の送信よりもわずかに早く、メッセージの送信を行っていた場合、ゲートウェイ4は通信線1aへの更新命令の送信を行うことができず、更新命令の送信が遅延される。このときにECU2aが送信するメッセージは、更新前の古い共有情報(図中において「共有情報(旧)」と記載する)を用いて生成されたMACが付されている(このようなメッセージを図中において「メッセージ(旧)」と記載する)。またゲートウェイ4からの更新命令を受信した通信線1bに接続されたECU2bは、自身が記憶する古い共有情報を、更新命令に付された新たな共有情報に置き換えることで、共有情報を更新する(図中において「共有情報(旧)→(新)」と記載する)。
 図3下段に示すように、ゲートウェイ4は、ECU2aのメッセージ送信が終了した後、通信線1aへ更新命令を送信する。更新命令を受信したECU2aは、自身が記憶する古い共有情報を、更新命令に付された新たな共有情報に置き換えることで、共有情報を更新する。またゲートウェイ4は、通信線1aにて受信したECU2aからのメッセージを通信線1bへ送信することによって、メッセージの中継を行う。しかしながらこのときに中継されるメッセージは、更新前の古い共有情報を用いて生成されたMACが付されたメッセージである。このため、このメッセージを受信したECU2bは、自身が記憶している新たな共有情報を用いて生成したMACと、受信メッセージに付されたMACとが一致せず、受信メッセージを正当なメッセージではないと判定する。
 なお図3に示す例では、ECU1aから更新前の古い共有情報を用いて生成されたMACが付されたメッセージを受信したゲートウェイ4が、このメッセージをECU2bへ中継しているが、これはゲートウェイ4にてMACの正否を判定しない場合である。ゲートウェイ4がECU1aから受信したメッセージのMACの正否を判定する場合、更新前の古い共有情報を用いて生成されたMACが付されたメッセージは、ゲートウェイ4において正当なメッセージではないと判定され、ECU2bへの中継は行われない。ゲートウェイ4が受信メッセージのMACを判定するか否かに応じて結果に若干の差異が生じるが、いずれの場合であっても共有情報のズレにより更新前の古い共有情報を用いて生成されたMACが付されたメッセージは、正当なメッセージではないと判定される。
 図4は、共有情報のズレにより生じる問題点の解決法を説明するための模式図である。なお図4の上段に示す図は、図3の上段に示したものと同じである。本実施の形態に係る通信システムにおいて、ゲートウェイ4は、共有情報のズレによりECU1aから更新前の古い共有情報を用いて生成されたMACが付されたメッセージを受信した場合、共有情報の更新を行ってから所定期間が経過するまでの間は、このメッセージを正当なメッセージとして中継の対象とする。ただし、ゲートウェイ4が受信メッセージを単に中継した場合、図3下段に示したように、中継先のECU2bにてこのメッセージは正当なものではないと判定される。そこで本実施の形態に係るゲートウェイ4は、受信メッセージに付されている更新前の古い共有情報を用いて生成されたMACを、自身が記憶している更新後の新しい共有情報を用いて生成したMACに置き換えるメッセージの修正を行い、修正後のメッセージをECU2bへ中継する。
 なお、更新前の古い共有情報を用いて生成されたMACが付されたメッセージ、及び、更新後の新たな共有情報を用いて生成されたMACが付されたメッセージの両方をゲートウェイ4が正当なメッセージとして受け付ける所定期間は、通信システムの設計段階などにおいて予め定められる。例えば所定期間は、ゲートウェイ4が送信する更新命令が遅延する可能性がある最大の時間を設定しておくことができる。
 また上記の処理を行うために、ゲートウェイ4は、少なくとも共有情報の更新を行ってから所定期間が経過するまでの間は、更新前の古い共有情報と、更新後の新たな共有情報との2つの共有情報を記憶しておく必要がある。またゲートウェイ4は、受信したメッセージに付されたMACが、いずれの共有情報を用いて生成されたものであるかを判断する必要がある。このために本実施の形態に係る通信システムでは、MACが更新前後のいずれの共有情報を用いて生成されたものであるかを判断するための情報として、メッセージにトグルビットを付している。
 トグルビットは、更新処理が行われる毎に値が反転されるビットである。トグルビットの値は、通信システムに含まれる装置毎に個別管理されている。例えば、初期値としてトグルビット=0で通信システムの通信が開始された場合、通信システム中の各ECU2及びゲートウェイ4は、トグルビットを0としたメッセージを生成して送信する。所定のタイミングにおいてゲートウェイ4が更新処理を開始し、新たな共有情報を生成して自身の共有情報を更新した場合、ゲートウェイ4が管理するトグルビットは1に変化する。その後、ゲートウェイ4が更新命令を送信し、この更新命令を受信したECU2は、自身の共有情報を更新すると共に、自身が管理するトグルビットを1に変化させる。
 よってゲートウェイ4は、例えば自身が管理するトグルビットの値が1であるのに対し、受信したメッセージに付されたトグルビットの値が0である場合、このメッセージは更新前の古い共有情報を用いて生成されたMACが付されている可能性があると判断できる。そこでゲートウェイ4は、更新前の古い共有情報を用いて受信メッセージに付されたMACの正否を判定し、MACが正当なものである場合に、上述のメッセージ修正を行う。即ちゲートウェイ4は、自身が管理するトグルビットの値と受信メッセージに付されたトグルビットの値とが一致する場合には、受信メッセージに付されたMACが更新後の新たな共有情報を用いて生成されたものと判断し、トグルビットの値が一致しない場合には、受信メッセージに付されたMACが更新前の古い共有情報を用いて生成されたものと判断することができる。
 図5は、トグルビットとメッセージの中継可否との関係を説明するための模式図である。基本的にゲートウェイ4は、自身が管理するトグルビットの値が0である場合には、トグルビットの値が0のメッセージのみを有効なメッセージとして中継処理を行い、自身が管理するトグルビットの値が1である場合には、トグルビットの値が1のメッセージのみを有効なメッセージとして中継処理を行う。ただし更新処理から所定期間Taが経過するまでの間は、ゲートウェイ4は、自身が管理するトグルビットの値に関わらず、トグルビットの値が0のメッセージ及びトグルビットの値が1のメッセージの両方を有効なメッセージとして中継処理を行う。なおゲートウェイ4は、更新処理から所定期間Taが経過するまでの間、自身が管理するトグルビットの値と異なる値のトグルビットが付されたメッセージを受信した場合には、受信メッセージのトグルビット及びMACの値を修正した後で中継を行う。
 図6は、ECU2の構成を示すブロック図である。なお本図においては、複数のECU2に共通の機能ブロックを抜き出して示しており、ECU2毎に異なる機能ブロックについては図示を省略している。本実施の形態に係るECU2は、処理部21、記憶部22及び通信部23等を備えて構成されている。処理部21は、例えばCPU(Central Processing Unit)又はMPU(Micro-Processing Unit)等の演算処理装置を用いて構成され、記憶部22又は図示しないROM(Read Only Memory)等に記憶されたプログラムを読み出して実行することにより、種々の演算処理を行う。なお処理部21にて実行されるプログラムは、ECU2毎にその内容が異なっている。
 記憶部22は、フラッシュメモリ又はEEPROM(Electrically Erasable Programmable Read Only Memory)等の不揮発性のメモリ素子を用いて構成されている。本実施の形態において記憶部22には、送信するメッセージに付すMACを生成するための情報として、暗号鍵22aと共有情報22bとが記憶されている。暗号鍵22aは、例えば共有鍵方式による暗号化及び復号を行うための情報であり、通信システムに含まれる全てのECU2及びゲートウェイ4が共通して有する情報である。共有情報22bも同様に通信システムに含まれる全てのECU2及びゲートウェイ4が共通して有する情報であるが、共有情報22bは比較的頻繁に更新される情報である。
 通信部23は、車内ネットワークを構成する通信線1a又は1bに接続され、CANの通信プロトコルに従ってデータの送受信を行う。通信部23は、処理部21から与えられたデータを電気信号に変換して通信線1a又は1bへ出力することによってデータを送信すると共に、通信線1a又は1bの電位をサンプリングして取得することによりデータを受信し、受信したデータを処理部21へ与える。
 また本実施の形態に係るECU2の処理部21には、記憶部22又はROM等に記憶されたプログラムが実行されることによって、メッセージ生成部21a、メッセージ判定部21b及び更新処理部21c等がソフトウェア的な機能ブロックとして実現される。メッセージ生成部21aは、他のECU2へ送信すべき情報が存在する場合に、この情報と、記憶部22に記憶された暗号鍵22a及び共有情報22bとを用いて所定の暗号化演算を行うことによりMACを生成する。メッセージ生成部21aは、自身が管理するトグルビットの値と、生成したMACと、他のECU2へ送信すべき情報(データ)とを含むデータフィールドを生成し、アービトレーションフィールド及びコントロールフィールド等と結合することによって送信用のメッセージを生成する。メッセージ生成部21aが生成したメッセージを通信部23へ与えることにより、このメッセージが通信線1a,1bへ送信され、他のECU2にて受信される。なおトグルビットの値は、例えば記憶部22に記憶され、共有情報22bが更新される毎に値が反転される。
 メッセージ判定部21bは、通信部23にて受信したメッセージが正当なメッセージであるか否かの判定を行う。メッセージ判定部21bは、受信メッセージに含まれるデータと、記憶部22に記憶された暗号鍵22a及び共有情報22bとを用いて所定の暗号化演算を行うことにより確認用のMACを生成する。なおメッセージ生成部21aによる暗号化演算と、メッセージ判定部21bによる暗号化演算とは同じ内容の処理である。メッセージ判定部21bは、受信メッセージに含まれるMACと、自身が生成したMACとを比較し、両MACが一致する場合に受信メッセージが正当なものであると判定し、両MACが一致しない場合に受信メッセージが正当なものではないと判定する。なお本実施の形態においては、ECU2のメッセージ判定部21bは、受信メッセージに含まれるトグルビットを使用しない。
 更新処理部21cは、ゲートウェイ4が送信する更新命令を通信部23にて受信した場合に、記憶部22に記憶された共有情報22bを更新する処理を行う。ゲートウェイ4が送信する更新命令は、例えばデータフィールドのデータとして新たな共有情報が格納され、更新前の古い共有情報を用いて生成したMACが付されたメッセージとすることができる。通信部23にて更新命令が受信された場合、通常のメッセージと同様に、メッセージ判定部21bにて正当な更新命令であるか否かの判定がなされる。正当な更新命令であると判定された場合、更新処理部21cは、更新命令に含まれる新たな共有情報を記憶部22に記憶された共有情報22bに上書きすることによって、共有情報の更新を行う。
 図7は、ゲートウェイ4の構成を示すブロック図である。本実施の形態に係るゲートウェイ4は、処理部41、記憶部42、及び、2つの通信部43等を備えて構成されている。処理部41は、例えばCPU又はMPU等の演算処理装置を用いて構成され、記憶部42又は図示しないROM等に記憶されたプログラムを読み出して実行することにより、種々の演算処理を行う。本実施の形態において処理部41は、車内ネットワークの通信線1a,1b間のメッセージ送受信を中継する処理、及び、共有情報の更新処理等に必要な演算処理を行う。
 記憶部42は、フラッシュメモリ又はEEPROM等の不揮発性のメモリ素子を用いて構成されている。記憶部42は、ECU2が記憶部22に記憶している暗号鍵22a及び共有情報22bと同様の暗号鍵42a及び共有情報42bを記憶している。また本実施の形態においてゲートウェイ4の記憶部42には、現時点でメッセージの送受信に用いている共有情報42bと共に、更新前の古い共有情報42cが記憶されている。また記憶部42は、処理部41が実行するプログラム及びこのプログラムの実行に必要なデータ、並びに、処理部41の処理の過程で生成されたデータなどを記憶してもよい。
 2つの通信部43は、車内ネットワークを構成する通信線1a,1bにそれぞれ接続され、CANの通信プロトコルに従ってデータの送受信を行う。通信部43は、処理部41から与えられたデータを電気信号に変換して通信線1a,1bへ出力することによって情報を送信すると共に、通信線1a,1bの電位をサンプリングして取得することによりデータを受信し、受信したデータを処理部41へ与える。
 また処理部41には、記憶部42又はROM等に記憶されたプログラムが実行されることによって、メッセージ生成部41a、メッセージ判定部41b、更新処理部41c、更新命令送信部41d及びメッセージ修正部41e等がソフトウェア的な機能ブロックとして実現される。メッセージ生成部41aが行う処理は、ECU2のメッセージ生成部21aが行う処理と略同じである。即ちメッセージ生成部41aは、他の装置へ送信すべき情報が存在する場合に、この情報と、記憶部42に記憶された暗号鍵42a及び共有情報42bとを用いて所定の暗号化演算を行うことによりMACを生成する。メッセージ生成部41aは、自身が管理するトグルビットの値と、生成したMACと、他の装置へ送信すべき情報(データ)とを含むデータフィールドを生成し、アービトレーションフィールド及びコントロールフィールド等と結合することによって送信用のメッセージを生成する。メッセージ生成部41aが生成したメッセージを通信部43へ与えることにより、このメッセージが通信線1a,1bへ送信され、この通信線1a,1bに接続されたECU2にて受信される。なおトグルビットの値は、例えば記憶部42に記憶され、共有情報42bが更新される毎に値が反転される。
 メッセージ判定部41bが行う処理は、ECU2のメッセージ判定部21bが行う処理と略同じである。即ちメッセージ判定部41bは、通信部43にて受信したメッセージが正当なメッセージであるか否かの判定を行う。メッセージ判定部41bは、受信メッセージに含まれるデータと、記憶部42に記憶された暗号鍵42aと、共有情報42b又は42cとを用いて所定の暗号化演算を行うことにより確認用のMACを生成する。メッセージ判定部41bは、受信メッセージに含まれるMACと、自身が生成したMACとを比較し、両MACが一致する場合に受信メッセージが正当なものであると判定し、両MACが一致しない場合に受信メッセージが正当なものではないと判定する。
 また本実施の形態においてゲートウェイ4は、上述のように共有情報42bの更新から所定期間が経過するまでの間は、更新前の古い共有情報を用いて生成したMACが付されたメッセージも正当なメッセージとして受け付ける。このためゲートウェイ4のメッセージ判定部41bは、共有情報42bの更新から所定期間が経過するまでの間、受信メッセージに含まれるトグルビットの値に応じて、記憶部42に記憶された更新後の新たな共有情報42b又は更新前の古い共有情報42cのいずれを用いて確認用のMACを生成するかを判断する。即ちメッセージ判定部41bは、受信メッセージに含まれるトグルビットの値が記憶部42に記憶されたトグルビットの値と一致する場合、記憶部42に記憶された更新後の新たな共有情報42bを用いて確認用のMACを生成し、受信メッセージの正否を判定する。これに対して、受信メッセージに含まれるトグルビットの値が記憶部42に記憶されたトグルビットの値と一致しない場合、メッセージ判定部41bは、記憶部42に記憶された更新前の古い共有情報42cを用いて確認用のMACを生成し、受信メッセージの正否を判定する。なお、共有情報42bの更新から所定期間が経過した後、メッセージ判定部41bは、受信メッセージに含まれるトグルビットの値が記憶部42に記憶されたトグルビットの値と一致しない場合には、この受信メッセージを正当なものではないと判定してよい。
 更新処理部41cは、通信システムに含まれるECU2及びゲートウェイ4が有する共有情報の更新を行うタイミングに至ったか否かを判断する。更新処理部41cは、例えば前回の更新処理から1秒、1分、1時間、1日又は1週間等の所定周期が経過した場合に更新を行うタイミングに至ったと判断する構成としてもよく、また例えば車両1のイグニッションスイッチがオフ状態からオン状態へ切り替えられた場合に更新を行うタイミングに至ったと判断する構成としてもよく、これ以外のタイミングを更新タイミングと判断する構成としてもよい。
 更新処理部41cは、更新処理を行うタイミングに至ったと判断した場合、新たな共有情報の生成を行う。更新処理部41cは、例えば所定の乱数発生アルゴリズムによって乱数を発生させ、この乱数に基づいて共有情報を生成する。更新処理部41cは、記憶部42に記憶された新たな共有情報42bを古い共有情報42cとし、生成した共有情報を新たな共有情報42bとして記憶部42に記憶することによって、共有情報42bを更新する。
 更新命令送信部41dは、更新処理部41cによる自装置の更新処理が行われた場合に、通信線1a,1bに接続されたECU2に対して更新処理を行わせるための更新命令を、通信部43から送信する処理を行う。更新命令送信部41dは、更新処理部41cが生成した新たな共有情報をデータとし、記憶部42に記憶された更新前の古い共有情報42cを用いて生成されたMACを付したメッセージを更新命令として、2つの通信部43から全てのECU2に対して更新命令を一斉送信する。
 メッセージ修正部41eは、共有情報の更新から所定期間が経過するまでの間、メッセージに含まれるトグルビットの値が記憶部42に記憶されたトグルビットの値と一致しないメッセージを受信し、この受信メッセージがメッセージ判定部41bにより正当なメッセージであると判定された場合に、受信メッセージのトグルビット及びMACを修正する処理を行う。このときにメッセージ修正部41eは、受信メッセージに含まれるトグルビットの値を反転する。またメッセージ修正部41eは、受信メッセージに含まれるデータと、記憶部42に記憶された暗号鍵22aと、更新後の新たな共有情報22bとに基づいて新たなMACを生成し、受信メッセージに含まれるMACを新たに生成したMACに交換することで、受信メッセージを修正する。メッセージ修正部41eが修正されたメッセージは、元のメッセージを受信した通信部43とは別の通信部43から送信され、ECU2へ中継される。
 図8は、ECU2が行うメッセージ送信処理の手順を示すフローチャートである。ECU2の処理部21は、他のECU2へ情報送信が必要となった場合に、以下のメッセージ送信処理を開始する。処理部21のメッセージ生成部21aは、記憶部22に記憶された暗号鍵22aを読み出すと共に(ステップS1)、記憶部22に記憶された共有情報22bを読み出す(ステップS2)。メッセージ生成部21aは、他のECU2へ送信すべき情報と、ステップS1にて読み出した暗号鍵22aと、ステップS2にて読み出した共有情報22bとを用いてMACを生成する(ステップS3)。メッセージ生成部21aは、記憶部22に記憶されたトグルビットと、ステップS3にて生成したMACと、他のECU2へ送信すべき情報とを含むメッセージを生成する(ステップS4)。処理部21は、メッセージ生成部21aが生成したメッセージを通信部23へ与えることにより、他のECU2へのメッセージ送信を行い(ステップS5)、処理を終了する。
 図9は、ECU2が行うメッセージ受信処理の手順を示すフローチャートである。ECU2の処理部21は、通信部23にて他のECU2又はゲートウェイ4からのメッセージを受信したか否かを判定する(ステップS11)。メッセージを受信していない場合(S11:NO)、処理部21は、メッセージを受信するまで待機する。メッセージを受信した場合(S11:YES)、処理部21のメッセージ判定部21bは、受信メッセージに含まれるデータを取得する(ステップS12)。メッセージ判定部21bは、記憶部22に記憶された暗号鍵22aを読み出すと共に(ステップS13)、記憶部22に記憶された共有情報22bを読み出す(ステップS14)。メッセージ判定部21bは、ステップS12にて取得したデータと、ステップS13にて読み出した暗号鍵22aと、ステップS14にて読み出した共有情報22bとを用いて確認用のMACを生成する(ステップS15)。またメッセージ判定部21bは、受信メッセージに含まれるMACを取得する(ステップS16)。
 メッセージ判定部21bは、ステップS15にて生成した確認用のMACと、ステップS16にて取得したMACとが一致するか否かを判定する(ステップS17)。両MACが一致する場合(S17:YES)、メッセージ判定部21bは、受信メッセージを正当なメッセージと判定する(ステップS18)。処理部21は、受信メッセージに含まれるデータの内容に応じた適宜の処理を行って(ステップS19)、メッセージ受信処理を終了する。これに対して、両MACが一致しない場合(S17:NO)、メッセージ判定部21bは、受信メッセージを正当でないメッセージと判定する(ステップS20)。処理部21は、エラー処理などを行い(ステップS21)、メッセージ受信処理を終了する。
 図10は、ECU2が行う共有情報の更新処理の手順を示すフローチャートである。ECU2の処理部21は、通信部23にてゲートウェイ4からの更新命令を受信したか否かを判定する(ステップS31)。更新命令を受信していない場合(S31:NO)、処理部21は、更新命令を受信するまで待機する。更新命令を受信した場合(S31:YES)、処理部21は、受信した更新命令が正当な更新命令であるか否かを判定する(ステップS32)。なお更新命令が正当なものであるか否かの判定は、図9のメッセージ受信処理にて示した受信メッセージが正当なものであるか否かの判定と同様の処理で行われるため、本図では詳細を省略する。
 受信した更新命令が正当な更新命令である場合(S32:YES)、処理部21の更新処理部21cは、更新命令に含まれる共有情報を取得する(ステップS33)。更新処理部21cは、取得した共有情報を、記憶部22に記憶された共有情報22bに対して上書きすることによって更新を行い(ステップS34)、更新処理を終了する。受信した更新命令が正当な更新命令出ない場合(S32:NO)、処理部21は、エラー処理などを行い(ステップS35)、共有情報22bを更新することなく、更新処理を終了する。
 図11は、ゲートウェイ4が行う更新処理の手順を示すフローチャートである。なお本処理においては、0又は1の値を保持する”更新処理フラグ”を用いて処理を行うが、このフラグは例えば処理部41のレジスタなどの記憶領域を用いて実現され得る。更新処理フラグは、共有情報の更新から所定期間が経過するまでの期間に値が1に設定され、それ以外の期間に0が設定される。まず、ゲートウェイ4の処理部41の更新処理部41cは、更新処理フラグの値を0に初期化する(ステップS41)。更新処理部41cは、所定の更新処理を行うタイミングに至ったか否かを判定する(ステップS42)。更新処理を行うタイミングに至っていない場合(S42:NO)、更新処理部41cは、更新処理を行うタイミングに至るまで待機する。
 更新処理を行うタイミングに至った場合(S42:YES)、更新処理部41cは、その時点で使用していた記憶部42の共有情報42bを、更新前の古い共有情報42cとして記憶部42に保存する(ステップS43)。更新処理部41cは、例えば乱数を発生させるなどの方法により、新たな共有情報を生成する(ステップS44)。更新処理部41cは、生成した共有情報を、記憶部42に更新後の新たな共有情報42bとして記憶する(ステップS45)。なおこのときに更新処理部41cは、記憶部42に記憶されたトグルビットの値を反転させる。
 次いで処理部41は、更新処理フラグの値を1に設定する(ステップS46)。処理部41は、自身のタイマ機能などを用いて、共有情報の更新からの所定期間の計時を開始する(ステップS47)。処理部41の更新命令送信部41dは、ステップS44にて生成した新たな共有情報を含む更新命令を生成する(ステップS48)。更新命令送信部41dは、生成した更新命令を、全ての通信部43にて送信する(ステップS49)。
 その後、処理部41は、ステップS47の計時開始から所定期間が経過したか否かを判定する(ステップS50)。所定期間が経過していない場合(S50:NO)、処理部41は、所定期間が経過するまで待機する。所定期間が経過した場合(S50:YES)、処理部41は、所定期間の計時を終了する(ステップS51)。処理部41は、更新処理フラグの値を0に設定し(ステップS52)、更新処理を終了する。
 図12及び図13は、ゲートウェイ4が行うメッセージ中継処理の手順を示すフローチャートである。なお本処理において用いる更新処理フラグは、図11の更新処理にて用いたものと同じものである。ゲートウェイ4の処理部41は、いずれかの通信部43にてメッセージを受信したか否かを判定する(ステップS61)。メッセージを受信していない場合(S61:NO)、処理部41は、メッセージを受信するまで待機する。
 いずれかの通信部43にてメッセージを受信した場合(S61:YES)、処理部41のメッセージ判定部41bは、受信メッセージに含まれるトグルビットの値を取得する(ステップS62)。メッセージ判定部41bは、ステップS62にて取得したトグルビットの値と、記憶部42に記憶されたトグルビットの値とを比較し、両トグルビットが一致するか否かを判定する(ステップS63)。トグルビットが一致する場合(S63:YES)、この受信メッセージに付されたMACは更新後の新たな共有情報を用いて生成されたものであるため、メッセージ判定部41bは、記憶部42に記憶された更新後の新たな共有情報42bを読み出す(ステップS64)。メッセージ判定部41bは、ステップS64にて読み出した更新後の新たな共有情報42bに基づいて、受信メッセージが正当なものであるか否かの判定を行う(ステップS65)。受信メッセージが正当なものであると判定した場合(S65:YES)、処理部41は、メッセージを受信した通信部43とは異なる通信部43にて、受信したメッセージを送信することによってメッセージを中継し(ステップS66)、中継処理を終了する。受信メッセージが正当なもの出ないと判定した場合(S65:NO)、処理部41は、エラー処理などを行い(ステップS68)、メッセージを中継することなく、中継処理を終了する。
 トグルビットが一致しない場合(S63:NO)、メッセージ判定部41bは、更新処理フラグの値が0であるか否かを判定する(ステップS67)。更新処理フラグの値が0である場合(S67:YES)、この受信メッセージは更新後の新たな共有情報を用いて生成されたMACが付されておらず、且つ、共有情報の更新から所定期間内でないため、処理部41は、受信メッセージが正当なものでないと判断し、エラー処理などを行って(ステップS68)、メッセージを中継することなく、中継処理を終了する。
 更新処理フラグの値が0でない場合(S67:NO)、即ち更新処理フラグの値が1である場合、この受信メッセージに付されたMACは更新前の古い共有情報を用いて生成されたものであるため、メッセージ判定部41bは、記憶部42に記憶された更新前の古い共有情報42cを読み出す(ステップS71)。メッセージ判定部41bは、ステップS71にて読み出した更新前の古い共有情報42cに基づいて、受信メッセージが正当なものであるか否かの判定を行う(ステップS72)。
 受信メッセージが正当なものであると判定した場合(S72:YES)、処理部41のメッセージ修正部41eは、記憶部42に記憶された更新後の新たな共有情報42bを読み出す(ステップS73)。メッセージ修正部41eは、ステップS73にて読み出した更新後の新たな共有情報42bを用いて、受信メッセージに含まれるデータと記憶部42に記憶された暗号鍵22aとに基づいて新たなMACを生成する(ステップS74)。メッセージ修正部41eは、受信メッセージのトグルビットを反転させると共に、受信メッセージのMACをステップS74にて生成したMACと入れ替えることによりメッセージを修正する(ステップS75)。処理部41は、メッセージを受信した通信部43とは異なる通信部43にて、ステップS75にて修正したメッセージを送信することでメッセージを中継し(ステップS76)、中継処理を終了する。また受信メッセージが正当なものでないと判定した場合(S72:NO)、処理部41は、エラー処理など行って(ステップS77)、メッセージを中継することなく、中継処理を終了する。
 以上の構成の本実施の形態に係る通信システムは、一つの通信線1a,1bに複数のECU2が接続され、このような複数の通信線1a,1bがゲートウェイ4に接続されて、ゲートウェイ4が通信線1a,1b間の通信を中継する構成である。通信システムに含まれるECU2及びゲートウェイ4は、共有情報を記憶しており、他の装置へのメッセージの生成及び送信と、他の装置から受信したメッセージの正否判定とを、記憶した共有情報を用いて行う。ECU2及びゲートウェイ4が記憶する共有情報は可変の情報であり、ゲートウェイ4が送信する更新命令により更新される。即ち、ゲートウェイ4が送信した更新命令が通信線1a,1bを介してECU2にて受信され、更新命令を受信したECU2が自身の記憶する共有情報を更新する。なお共有情報の更新は、例えば1秒、1分、1時間、1日又は1週間等の所定期間で周期的に行ってもよく、また例えば車両1のイグニッションスイッチがオフ状態からオン状態へ切り替えられる都度など、何らかのイベント発生毎に行ってもよい。
 ゲートウェイ4が送信する更新命令は、送信の際に又は通信線1a,1b間を中継される際等に、衝突又は遅延等が発生する可能性がある。そこで本実施の形態に係る通信システムのゲートウェイ4は、共有情報の更新を行うタイミングから所定の期間が経過するまでの間、更新前の古い共有情報を用いて生成されたメッセージと、更新後の新たな共有情報を用いて生成されたメッセージとの両方を正当なメッセージとして扱い、中継の対象とする。なお所定期間の起点となる共有情報の更新タイミングは、例えば自身の記憶部42に記憶された共有情報42bを更新したタイミング、又は、ECU2への更新命令を送信したタイミング等とすることができる。
 これにより本実施の形態に係る通信システムでは、ゲートウェイ4が送信した更新命令が全てのECU2で受信されて更新処理が行われるまでの一定の期間において、更新前の古い共有情報を用いて生成されたメッセージと、更新後の新たな共有情報を用いて生成されたメッセージとが送受信可能となる。よって複数の通信線1a,1b間の通信をゲートウェイ4が中継する構成の通信システムであっても、値が変化する共有情報を用いたメッセージ送受信を実現できる。
 また本実施の形態に係るゲートウェイ4は、共有情報の更新から所定期間が経過するまでの間に、更新前の古い共有情報を用いて生成されたメッセージを受信した場合には、このメッセージを更新後の新たな共有情報を用いてメッセージに修正して中継する。これにより中継先のECU2は、更新後の新たな共有情報を用いたメッセージを受信することができる。
 また本実施の形態に係る通信システムでは、共有情報の更新状態を示す更新状態情報として、トグルビットをメッセージに含める。これによりゲートウェイ4は、受信したメッセージが更新前の古い共有情報を用いたものであるか、又は、更新後の新たな共有情報を用いたものであるかを容易に判断することが可能となる。
 またECU2は、送信すべきデータと、記憶部22に記憶された暗号鍵22a及び共有情報22bとに基づいてMACを生成し、このMACを含むメッセージを他のECU2へ送信する。メッセージを受信したECU2は、受信メッセージに含まれるデータと、記憶部22に記憶された暗号鍵22a及び共有情報22bとに基づいて確認用のMACを生成し、受信メッセージに含まれるMACと比較することによって受信メッセージの正否を判定する。これにより通信システムにて送受信されるメッセージの信頼性を高めることができると共に、更新される共有情報を用いたMACが付されることで再送攻撃に対する耐性を高めることができる。
 なお本実施の形態においては、ゲートウェイ4が共有情報の生成及び更新命令の送信等を行う構成としたが、これに限るものではなく、通信システムに含まれる複数のECU2のいずれかが共有情報の生成及び更新命令の送信等を行う構成としてもよい。また共有情報の更新のためにゲートウェイ4からECU2へ新たな共有情報を送信する構成としたが、これに限るものではなくい。例えば共有情報をカウンタの値とし、更新命令の受信に応じてECU2がカウンタを増減させるなど、全てのECU2及びゲートウェイ4が同じ規則で共有情報を生成する構成であってもよい。
 また本実施の形態においては、MACを付したメッセージを送受信する構成としたが、これに限るものではなく、例えばECU2が送信すべき情報を暗号化したものにトグルビットを付したメッセージを送受信する構成としてもよい。またメッセージに付す更新状態情報はトグルビットでなくてもよく、例えば更新処理を行う毎に値が増減するカウンタ値など、何らかの規則により値が変化する情報であればよい。更にはメッセージにトグルビットなどの更新状態情報を付さない構成としてもよく、この場合にゲートウェイ4は共有情報の更新から所定期間が経過するまでの間に受信したメッセージに対して、更新後の新たな共有情報を用いたメッセージの正否判定と、更新前の古い共有情報を用いたメッセージの正否判定との両方を行う構成とすることができる。
 また本実施の形態に係る通信システムは、車両1に搭載されるシステムとしたが、これに限るものではなく、車載以外の通信システムであってよい。また通信装置はECU2以外の通信機能を有する種々の装置であってよく、中継装置はゲートウェイ4以外の中継機能を有する種々の装置であってよい。
 (変形例)
 また、共有情報の更新から所定期間が経過するまでの間、ゲートウェイ4が、更新前の古い共有情報を用いたメッセージと、更新後の新たな共有情報を用いたメッセージとを有効なものとして扱う構成としたが、これに限るものではない。
 変形例に係る通信システムでは、各ECU2が、共有情報の更新から所定期間が経過するまでの間、更新前の古い共有情報を用いたメッセージと、更新後の新たな共有情報を用いたメッセージとを有効なものとして受信する。この場合にゲートウェイ4は、受信したメッセージの正否判定を行わずにこのメッセージを中継する構成としてもよく、又は、共有情報の更新から所定期間が経過するまでの間、更新前の古い共有情報を用いたメッセージと、更新後の新たな共有情報を用いたメッセージとを有効なものとして受信し、メッセージの修正は行わずに中継する構成としてもよい。
(実施の形態2)
 実施の形態2に係る通信システムは、複数の通信プロトコルが混在し、且つ、複数の中継装置が階層的に接続された構成である。図14は、実施の形態2に係る通信システムの構成を示すブロック図である。実施の形態2に係る通信システムは、中継装置として複数のDCU(Domain Control Unit)200~204と、通信装置として複数のECU203a~203lとを備えて構成されている。実施の形態2に係る通信システムは、イーサネット(登録商標)の通信プロトコルにより1Gbpsの通信速度で通信を行うネットワークと、イーサネット(登録商標)の通信プロトコルにより100Mbpsの通信速度で通信を行うネットワークと、CAN-FDの通信プロトコルにより2Mbpsの通信速度で通信を行うネットワークとが混在している。
 実施の形態2に係る通信システムでは、1つのDCU200に4つのDCU201~204が接続され、各DCU201~204に複数のECUが接続された階層構造をなしている。1つのDCU200と4つのDCU201~204とは、それぞれ個別の通信線を介して接続されており、イーサネット(登録商標)の通信プロトコルにより1Gbpsの通信速度で通信を行う。また実施の形態2に係る通信システムの4つのDCU201~204は、DCU200に接続される通信線とは別に、一又は複数のECUを接続するための6つの通信線がそれぞれ接続可能とされている。各DCU201~204に接続される複数の通信線は、通信プロトコルが異なるものが混在していてよい。
 図示の例においてDCU203には、通信速度が2MbpsのCAN-FDの通信プロトコルに対応した通信線が3つと、通信速度が100Mbpsのイーサネット(登録商標)の通信プロトコルに対応した通信線が3つ接続されている。CANの通信プロトコルに対応した第1の通信線には3つのECU203a~203cが接続され、第2の通信線にはECU203d~203fが接続され、第3の通信線にはECU203g~203iが接続されている。またイーサネット(登録商標)の通信規格に対応した第4の通信線にはECU203jが接続され、第5の通信線にはECU203kが接続され、第6の通信線にはECU203lが接続されている。他のDCU201,202及び204についても同様に複数のECUが接続されているが、図示を省略する。
 例えばECU230jがメッセージを送信した場合、このメッセージはDCU203にて受信される。DCU203は、受信したメッセージを中継する処理を行っており、ECU230jから受信したメッセージの内容(例えばデータ又はヘッダ情報等)に基づいてこのメッセージの中継先を決定し、中継先と決定した通信線に対してメッセージを送信する。なお実施の形態2に係る通信システムでは、メッセージを受信したDCU200~201は、このメッセージを必ずしもすべての通信線に対して中継する必要はなく、このメッセージを必要とするECUが存在する通信線に対してメッセージを中継すればよい。またDCU201~204は、受信メッセージを必要とするECUが自身に直接的には接続されていない場合、このメッセージをDCU200へ送信することによって、DCU200及び他のDCU201~204を介して目的のECUへメッセージを送信する。
 実施の形態2に係る通信システムでは、全てのDCU200~204及びECU203a~203lが記憶部に共有情報を記憶しており、DCU200が所定のタイミングで共有情報の更新処理を開始する。即ち、DCU200は新たな共有情報を生成して自身の記憶部に記憶された共有情報を更新すると共に、共有情報の更新命令を他のDCU201~204へ送信する。DCU200からの更新命令を受信したDCU201~204はそれぞれ、自身の記憶部に記憶された共有情報を更新すると共に、ECUが接続された6つの通信線に対して共有情報の更新命令を送信する。例えばDCU203からの更新命令を受信したECU203a~203lは、自身の記憶部に記憶された共有情報を更新する。
 また実施の形態2に係る通信システムでは、共有情報の更新から所定期間が経過するまでの間について、更新前の古い共有情報を用いて生成されたMACが付されたメッセージと、更新後の新たな共有情報を用いて生成されたMACが付されたメッセージとを正当なメッセージとして受信して中継する処理を、DCU200~204が行う。またこのときにDCU200~204は、更新前の古い共有情報を用いて生成されたMACが付されたメッセージを受信した場合には、このメッセージのMACを、更新後の新たな共有情報を用いて生成したMACに置き換えるメッセージ修正処理を行い、修正後のメッセージを中継する。
 図15~図19は、実施の形態2に係る通信システムによるメッセージ送受信及び共有情報更新の第1例を示す模式図であり、図15から図19へメッセージの送受信状況などを時系列的に示してある。図15は、更新処理を行うタイミングに至り、DCU200が共有情報の更新処理を開始した状況である。DCU200は、新たな共有情報を用いて生成し、自身が記憶している共有情報の更新処理を行う。図15に示す状況では、DCU200はまだ更新命令を送信しておらず、他のDCU201~204及びECU203a~203lが記憶している共有情報は、更新前の古い共有情報である。この状況において、ECU203jが更新前の古い共有情報を用いて生成されたMACが付されたメッセージ(図中において一点鎖線の矢印で示す、以下の図面において同じ)を送信し、このメッセージがDCU203にて受信されたものとする。
 次いで図16に示す状況では、ECU203jからのメッセージを受信したDCU203が、受信メッセージに含まれるMACに基づいてこのメッセージが正当なものであると判定し、このメッセージをDCU200及びECU203a~203cへ中継すべく、各装置が接続された通信線へメッセージを送信している。なおこのときのDCU203による判定は、更新前の古い共有情報を用いて行われる。DCU203が中継したメッセージは、DCU200及びECU203a~203cにて受信されている。またこのときに、DCU203によるメッセージの送信より少し遅れて、DCU200が共有情報の更新命令をDCU201~204へ一斉送信している(図中において破線の矢印で示す、以下の図面において同じ)。
 次いで図17に示す状況では、DCU200から共有情報の更新命令を受信したDCU201~204が更新処理を行い、各DCU201~204が記憶する共有情報がDCU200から与えられた新たな共有情報に更新される。またこのときにDCU200は、DCU203から受信した更新前の古い共有情報を用いて生成されたMACが付されたメッセージについて、共有情報の更新から所定期間が経過するまでの間に受信したものと判断し、更新後の新たな共有情報を用いてMACを生成し、受信メッセージに含まれるMACと交換することによって、メッセージ修正を行っている。
 次いで図18に示す状況では、共有情報の更新を終えたDCU201~204が、自身に接続された全ての通信線(ただしDCU200が接続された通信線を除く)に対して、共有情報の更新命令を一斉送信している。例えばDCU203から共有情報の更新命令を受信したECU203a~203lは、更新処理を開始する。またこのときに、メッセージの修正を完了したDCU200は、修正後のメッセージをDCU202へ送信している(図中において二点鎖線の矢印で示す、以下の図面において同じ)。このときDCU200から送信されるメッセージは更新後の新たな共有情報を用いて生成されたMACが付されたメッセージであり、このメッセージを受信するDCU202は更新処理を終えた状態であるため、自身が記憶している更新後の新たな共有情報を用いて受信メッセージの正否を判定することができる。
 次いで図19に示す状況では、DUC200からのメッセージを正当なものであると判定したDCU202が、このメッセージを中継している。またDCU201~204に接続されたECUでは共有情報の更新が完了している。よってDCU202からのメッセージを受信したECUは、自身が記憶している更新後の新たな共有情報を用いて、受信メッセージの正否を判定することができる。
 図20~図23は、実施の形態2に係る通信システムによるメッセージ送受信及び共有情報更新の第2例を示す模式図であり、図20から図23へメッセージの送受信状況などを時系列的に示してある。第2例は、第1例と似た状況ではあるが、ECU203jから更新前の古い共有情報を用いて生成されたMACが付されたメッセージをDCU203が受信するより早く、更新処理を完了したDCU200からの更新命令がDCU203にて受信される。
 図20に示す状況では、更新処理を完了したDCU200がDCU201~204へ共有情報の更新命令を一斉送信し、これを受信したDCU201~204にて更新処理が開始されている。このときにECU203jは、更新前の古い共有情報を用いて生成されたMACが付されたメッセージを、DCU203へ送信している。
 次いで図21に示す状況では、ECU203jが送信したメッセージがDCU203にて受信されている。またこのメッセージの受信後又は受信と同時期に、共有情報の更新処理を完了したDCU201~204が、ECUに対して共有情報の更新命令を一斉送信している。DCU201~204からの更新命令を受信したECUは、自身が記憶している共有情報の更新処理を開始する。
 次いで図22に示す状況では、DCU203は、ECU203jから受信した更新前の古い共有情報を用いて生成されたMACが付されたメッセージについて、共有情報の更新から所定期間が経過するまでの間に受信したものと判断し、更新後の新たな共有情報を用いてMACを生成し、受信メッセージに含まれるMACと交換することによって、メッセージ修正を行っている。
 次いで図23に示す状況では、メッセージの修正を完了したDCU203は、修正後のメッセージをDCU200及びECU203a~203cへ送信している。このときDCU203から送信されるメッセージは更新後の新たな共有情報を用いて生成されたMACが付されたメッセージであり、このメッセージを受信するDCU200及びECU203a~203cは更新処理を終えた状態であるため、自身が記憶している更新後の新たな共有情報を用いて受信メッセージの正否を判定することができる。
 以上の構成の実施の形態2に係る通信システムは、いわゆるドメインアーキテクチャを採用した通信システムである。このような構成の通信システムであっても、実施の形態1に係る通信システムのゲートウェイ4と同様の機能、即ち共有情報の更新から所定期間が経過するまでの間は更新前の古い共有情報を用いたメッセージと更新後の新たな共有情報を用いたメッセージとの両方を正当なメッセージと判定する機能をDCU200~204が備えることによって、値が変化する共有情報を用いたメッセージ送受信を実現できる。
 なお実施の形態2においては、中継装置であるDCU200~204が有情報の更新から所定期間が経過するまでの間は更新前の古い共有情報を用いたメッセージと更新後の新たな共有情報を用いたメッセージとの両方を正当なメッセージと判定する機能を備える構成としたが、これに限るものではない。実施の形態1の変形例にて説明したように、ECU203a~203lがこの機能を備える構成としてもよい。また図14~図23に示した通信システムの構成、メッセージ又は更新命令の送信タイミング等は、一例であって、これに限るものではない。
 1 車両
 1a,1b 通信線
 2、2a,2b ECU(通信装置)
 4 ゲートウェイ(中継装置)
 21 処理部
 21a メッセージ生成部
 21b メッセージ判定部(判定部)
 21c 更新処理部(更新部)
 22 記憶部
 22a 暗号鍵
 22b 共有情報
 23 通信部(メッセージ送信部、メッセージ受信部)
 41 処理部
 41a メッセージ生成部
 41b メッセージ判定部(判定部)
 41c 更新処理部(更新部)
 41d 更新命令送信部
 41e メッセージ修正部
 42 記憶部
 42a 暗号鍵
 42b 共有情報
 42c 共有情報
 43 通信部(メッセージ送信部、メッセージ受信部)
 200~204 DCU(中継装置)
 203a~203l ECU(通信装置)
 

Claims (9)

  1.  一又は複数の通信装置が通信線に接続され、複数の前記通信線の間の通信を中継装置が中継する通信システムにおいて、
     前記通信装置及び前記中継装置は、
     共有情報を記憶する記憶部と、
     前記共有情報を用いたメッセージを生成するメッセージ生成部と、
     前記メッセージ生成部が生成したメッセージを他の装置へ送信するメッセージ送信部と、
     他の装置からのメッセージを受信するメッセージ受信部と、
     前記共有情報に基づいて前記メッセージ受信部が受信したメッセージの正否を判定する判定部と
     をそれぞれ有し、
     前記通信装置及び前記中継装置のうちの少なくとも1つの装置は、前記共有情報を更新させる更新命令を他の装置へ送信する更新命令送信部を有し、
     前記通信装置及び前記中継装置は、前記更新命令を受信した場合に、前記記憶部に記憶された共有情報を更新する更新部を更に有し、
     前記通信装置又は前記中継装置は、前記共有情報の更新から所定期間が経過するまでの間、更新前の共有情報を用いて生成されたメッセージを受信した場合に、該メッセージを前記判定部が正当なメッセージと判定すること
     を特徴とする通信システム。
  2.  前記中継装置は、前記共有情報の更新から所定期間が経過するまでの間、更新前の共有情報を用いて生成されたメッセージを受信した場合に、該メッセージを更新後の共有情報を用いたメッセージに修正するメッセージ修正部を有し、前記メッセージ修正部が修正したメッセージを中継すること
     を特徴とする請求項1に記載の通信システム。
  3.  前記メッセージ生成部が生成するメッセージには、前記共有情報の更新状態を示す更新状態情報を含み、
     前記判定部は、前記共有情報及び受信したメッセージに含まれる更新状態情報に基づいてメッセージの正否を判定すること
     を特徴とする請求項1又は請求項2に記載の通信システム。
  4.  前記更新状態情報は、前記更新命令に応じて値が所定の規則で変化する情報であること
     を特徴とする請求項3に記載の通信システム。
  5.  前記更新状態情報は、前記更新命令に応じて値が反転するトグルビットであること
     を特徴とする請求項4に記載の通信システム。
  6.  前記メッセージ生成部が生成するメッセージには、前記共有情報と前記メッセージに含まれる情報とに基づいて生成されたメッセージ認証子を含み、
     前記判定部は、受信したメッセージに含まれる情報及びメッセージ認証子と、記憶部に記憶された前記共有情報とに基づいて前記メッセージの正否を判定すること
     を特徴とする請求項1乃至請求項5のいずれか1つに記載の通信システム。
  7.  それぞれに一又は複数の通信装置が接続された複数の通信線間の通信を中継する中継装置において、
     前記通信装置との間で共有する共有情報を記憶する記憶部と、
     前記共有情報を用いて生成されたメッセージを前記通信装置から受信するメッセージ受信部と、
     前記共有情報に基づいて前記メッセージ受信部が受信したメッセージの正否を判定する判定部と、
     前記記憶部に記憶された共有情報を更新する更新部と、
     前記共有情報の更新から所定期間が経過するまでの間、更新前の共有情報を用いて生成されたメッセージを受信した場合に、該メッセージを更新後の共有情報を用いたメッセージに修正するメッセージ修正部と
     を備えることを特徴とする中継装置。
  8.  少なくとも中継装置が接続された通信線に接続され、前記通信線及び前記中継装置を介して通信を行う通信装置において、
     前記中継装置との間で共有する共有情報を記憶する記憶部と、
     前記共有情報を用いたメッセージを生成するメッセージ生成部と、
     前記メッセージ生成部が生成したメッセージを他の装置へ送信するメッセージ送信部と、
     他の装置からのメッセージを受信するメッセージ受信部と、
     前記共有情報に基づいて前記メッセージ受信部が受信したメッセージの正否を判定する判定部と、
     他の装置から送信される前記共有情報の更新命令を受信した場合に、前記記憶部に記憶された共有情報を更新する更新部と
     を有し、
     前記共有情報の更新から所定期間が経過するまでの間、更新前の共有情報を用いて生成されたメッセージを受信した場合に、該メッセージを前記判定部が正当なメッセージと判定すること
     を特徴とする通信装置。
  9.  通信線に一又は複数の通信装置が接続され、複数の前記通信線が接続された中継装置が前記通信線間の通信を中継する通信方法において、
     前記通信装置及び前記中継装置が、共有情報を記憶し、前記共有情報を用いたメッセージを生成して他の装置へ送信し、他の装置から受信したメッセージの正否を前記共有情報に基づいて判定し、
     前記通信装置及び前記中継装置のうちの少なくとも1つの装置が、前記共有情報を更新させる更新命令を他の装置へ送信し、
     前記通信装置及び前記中継装置が、前記更新命令を受信した場合に前記共有情報を更新し、
     前記通信装置又は前記中継装置が、前記共有情報の更新から所定期間が経過するまでの間、更新前の共有情報を用いて生成されたメッセージを受信した場合に、該メッセージを正当なメッセージと判定すること
     を特徴とする通信方法。
     
PCT/JP2017/032072 2016-09-21 2017-09-06 通信システム、中継装置、通信装置及び通信方法 WO2018056054A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US16/335,179 US20190349389A1 (en) 2016-09-21 2017-09-06 Communication system, relay device, communication device and communication method
DE112017004752.8T DE112017004752T5 (de) 2016-09-21 2017-09-06 Kommunikationssystem, Relaisvorrichtung, Kommunikationsvorrichtung und Kommunkationsverfahren
CN201780053753.0A CN109661797B (zh) 2016-09-21 2017-09-06 通信系统、中继装置及通信方法

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2016-184503 2016-09-21
JP2016184503A JP6693368B2 (ja) 2016-09-21 2016-09-21 通信システム、中継装置及び通信方法

Publications (1)

Publication Number Publication Date
WO2018056054A1 true WO2018056054A1 (ja) 2018-03-29

Family

ID=61690952

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2017/032072 WO2018056054A1 (ja) 2016-09-21 2017-09-06 通信システム、中継装置、通信装置及び通信方法

Country Status (5)

Country Link
US (1) US20190349389A1 (ja)
JP (1) JP6693368B2 (ja)
CN (1) CN109661797B (ja)
DE (1) DE112017004752T5 (ja)
WO (1) WO2018056054A1 (ja)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11373520B2 (en) * 2018-11-21 2022-06-28 Industrial Technology Research Institute Method and device for sensing traffic environment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002290396A (ja) * 2001-03-23 2002-10-04 Toshiba Corp 暗号鍵更新システムおよび暗号鍵更新方法
WO2015170453A1 (ja) * 2014-05-08 2015-11-12 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ 車載ネットワークシステム、不正検知電子制御ユニット及び不正対処方法
JP2016100632A (ja) * 2014-11-18 2016-05-30 株式会社東芝 通信システム及び通信装置

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4665617B2 (ja) * 2005-06-10 2011-04-06 沖電気工業株式会社 メッセージ認証システム,メッセージ送信装置,メッセージ受信装置,メッセージ送信方法,メッセージ受信方法およびプログラム
WO2013175633A1 (ja) 2012-05-25 2013-11-28 トヨタ自動車 株式会社 通信装置、通信システム及び通信方法
DK2885904T3 (en) * 2012-08-03 2018-08-06 Onespan Int Gmbh PROCEDURE FOR USER-EASY AUTHENTICATION AND DEVICE USING A MOBILE APPLICATION FOR AUTHENTICATION
KR102166184B1 (ko) * 2012-11-30 2020-10-15 한국전자통신연구원 무선랜 시스템에서의 자원 할당 방법, 무선랜 시스템
JP6024564B2 (ja) * 2013-03-28 2016-11-16 株式会社オートネットワーク技術研究所 車載通信システム
US20150124704A1 (en) * 2013-11-06 2015-05-07 Qualcomm Incorporated Apparatus and methods for mac header compression
US10101716B2 (en) * 2014-12-04 2018-10-16 Belkin International, Inc. Autonomous, distributed, rule-based intelligence
US9577888B2 (en) * 2014-08-22 2017-02-21 Verizon Patent And Licensing Inc. Method and apparatus for verifying and managing a client system network and network devices
US10257159B2 (en) * 2014-12-04 2019-04-09 Belkin International, Inc. Methods, systems, and apparatuses for providing a single network address translation connection for multiple devices
JP6218184B2 (ja) * 2014-11-13 2017-10-25 日立オートモティブシステムズ株式会社 情報処理装置、メッセージ認証方法
US9407624B1 (en) * 2015-05-14 2016-08-02 Delphian Systems, LLC User-selectable security modes for interconnected devices
JP6484519B2 (ja) * 2015-07-15 2019-03-13 日立オートモティブシステムズ株式会社 ゲートウェイ装置およびその制御方法
US20190147431A1 (en) * 2017-11-16 2019-05-16 Blockmason Inc. Credit Protocol

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002290396A (ja) * 2001-03-23 2002-10-04 Toshiba Corp 暗号鍵更新システムおよび暗号鍵更新方法
WO2015170453A1 (ja) * 2014-05-08 2015-11-12 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ 車載ネットワークシステム、不正検知電子制御ユニット及び不正対処方法
JP2016100632A (ja) * 2014-11-18 2016-05-30 株式会社東芝 通信システム及び通信装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"Summary", SCIS 2016 SYMPOSIUM ON CRYPTOGRAPHY AND INFORMATION SECURITY, 22 January 2016 (2016-01-22), pages 1 - 6 *

Also Published As

Publication number Publication date
DE112017004752T5 (de) 2019-06-27
JP6693368B2 (ja) 2020-05-13
CN109661797A (zh) 2019-04-19
US20190349389A1 (en) 2019-11-14
CN109661797B (zh) 2021-07-20
JP2018050183A (ja) 2018-03-29

Similar Documents

Publication Publication Date Title
CN104717201B (zh) 网络装置以及网络系统
JP5770602B2 (ja) 通信システムにおけるメッセージ認証方法および通信システム
US20180091525A1 (en) On-vehicle communication system
JP6477281B2 (ja) 車載中継装置、車載通信システム及び中継プログラム
JP6899378B2 (ja) ネットワークノード
EP3038318B1 (en) Communication control apparatus, communication control method and communication control program
US11245535B2 (en) Hash-chain based sender identification scheme
JP6512023B2 (ja) 通信システム、送信ノード、及び受信ノード
WO2016009812A1 (ja) 通信システム、通信制御装置及び不正情報送信防止方法
JP6814549B2 (ja) 演算装置、認証システム、認証方法
JP2017121091A (ja) Ecu、及び車用ネットワーク装置
JP2013121070A (ja) 中継システム及び、当該中継システムを構成する中継装置、通信装置
WO2017026360A1 (ja) 通信システム
US20230037778A1 (en) Method and system for data exchange on a network to enhance security measures of the network, vehicle comprising such system
JP2018121220A (ja) 車載ネットワークシステム
JP6375962B2 (ja) 車載ゲートウェイ装置及び電子制御装置
WO2018056054A1 (ja) 通信システム、中継装置、通信装置及び通信方法
JP2018182767A (ja) Ecu、ネットワーク装置、及び車用ネットワーク装置
CN107624229B (zh) 用于在网络中产生机密或密钥的方法
JP2017130756A (ja) 中継装置
WO2020145086A1 (ja) 車載通信システム、車載通信制御装置、車載通信装置、通信制御方法及び通信方法
JP6683105B2 (ja) 通信システム
JP2013121071A (ja) 中継システム及び、当該中継システムを構成する中継装置、外部装置
JP2018050183A5 (ja)
JP6681755B2 (ja) 車両用通信網装置及び通信方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17852831

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17852831

Country of ref document: EP

Kind code of ref document: A1