WO2015186829A1 - 送信ノード、受信ノード、通信ネットワークシステム、メッセージ作成方法およびコンピュータプログラム - Google Patents

送信ノード、受信ノード、通信ネットワークシステム、メッセージ作成方法およびコンピュータプログラム Download PDF

Info

Publication number
WO2015186829A1
WO2015186829A1 PCT/JP2015/066378 JP2015066378W WO2015186829A1 WO 2015186829 A1 WO2015186829 A1 WO 2015186829A1 JP 2015066378 W JP2015066378 W JP 2015066378W WO 2015186829 A1 WO2015186829 A1 WO 2015186829A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
transmission
data
authentication code
node
Prior art date
Application number
PCT/JP2015/066378
Other languages
English (en)
French (fr)
Inventor
竹森 敬祐
Original Assignee
Kddi株式会社
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 Kddi株式会社 filed Critical Kddi株式会社
Publication of WO2015186829A1 publication Critical patent/WO2015186829A1/ja

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60RVEHICLES, VEHICLE FITTINGS, OR VEHICLE PARTS, NOT OTHERWISE PROVIDED FOR
    • B60R16/00Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for
    • B60R16/02Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements
    • B60R16/023Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements for transmission of signals between vehicle parts or subsystems
    • 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

Definitions

  • the present invention relates to a transmission node, a reception node, a communication network system, a message creation method, and a computer program.
  • a CAN Controller Area Network
  • ECUs Electronic Control Units
  • technologies described in Non-Patent Documents 1 and 2 and Patent Document 1 are known as technologies that enable message authentication in the CAN.
  • Non-Patent Document 1 when an authentic ECU detects an impersonation message assigned with its own ID in response to an attack that transmits an impersonation message from a fake ECU connected to the CAN, By sending a message notifying the abnormality with the ID, the abnormality is notified to the receiving ECU.
  • Non-Patent Document 2 the information stored in the error correction (Cyclic Redundancy Check: CRC) field in the CAN frame is changed to MAC (Message Authentication Code).
  • CRC Cyclic Redundancy Check
  • the CAN frame is transmitted by dividing into four, storing each in the CRC field (16 bits) in the four CAN frames from the (N + 4) th to the (N + 7) th.
  • the MAC is obtained from the CRC field in the N + 4th to N + 7th CAN frames, and the Nth is determined by whether or not it matches the MAC generated from the data fields in the Nth to N + 3th CAN frames. To N + 3th CAN frames are determined. Thereby, when the MAC obtained from the CRC field and the MAC calculated from the data field are different, it can be determined that any of the Nth to N + 3th CAN frames is invalid.
  • the transmitting node that has transmitted the main message transmits a MAC message including the MAC generated from the data field and CANID of the main message and the counter value corresponding to the CANID.
  • the receiving node that has received the main message generates a MAC from the data field and CANID included in the main message and the counter value corresponding to the CANID, and determines whether the MAC matches the MAC included in the received MAC message.
  • AKIRA YOSHIOKA ET AL “Kosei Shomei Kino o Motsu Shanai Tsushin Protocol no Teian” SYMPOSIUM ON MULTIMEDIA, DISTRIBUTED, COOPERATIVE ANDMOBILE SYSTEMS (DICOM02008) RONBUNSHU 1 2008 1
  • RFC 2104 HMAC Keyed-Hashing Message Authentication, [Search May 26, 2014], Internet ⁇ URL: http://www.rfc-editor.org/rfc/rfc2104.txt>
  • RFC 2104 HMAC Hashing with key for message authentication, [Search May 26, 2014], Internet ⁇ URL: http://www.ipa.go.jp/security/rfc/RFC2104JA.html> Keisuke Takemori, Hideaki Kawabata, Ayumu Kubota, “Secure Boot with ARM + SIM / UIM”, IEICE, Symposium on Cryptography and Information Security (SCIS2014), 1
  • Non-Patent Document 1 an abnormality cannot be reported when a real ECU that monitors communication is removed.
  • the prior art described in Non-Patent Document 2 in order to confirm the validity of the Nth to N + 3th CAN frames, it is necessary to wait until the N + 4th to N + 7th CAN frames are received. , It takes time to confirm the validity. For this reason, it is not suitable particularly when real-time control is required.
  • the MAC message since the MAC message is transmitted separately from the main message, the communication amount is more than doubled.
  • the present invention has been made in consideration of such circumstances, and can improve message inspection performance in a communication network system in which a transmission node that transmits a message and a reception node that receives the message are connected. It is an object to provide a transmission node, a reception node, a communication network system, a message creation method, and a computer program.
  • One aspect of the present invention is the transmission node in a communication network system in which a transmission node that transmits a message and a reception node that receives the message are connected, and divides input transmission data and divides the transmission data And a message authentication code generated using the divided transmission data, a transmission unit that separately stores each set of data in a message to be transmitted, and using the divided transmission data And a message authentication code generation unit that generates a message authentication code stored in a data part of the message to be transmitted together with the divided transmission data.
  • the transmission node preferably further includes a transmission counter unit that holds a transmission counter value that is incremented by a predetermined count value each time the message is transmitted, and the message authentication code generation unit includes Using the divided transmission data and the held transmission counter value, generate a message authentication code stored in the data part in the message to be transmitted together with the divided transmission data, Transmission that has been increased by the predetermined count value due to the transmission of the message storing the first transmission data out of the first transmission data and the second transmission data that are transmission data obtained by dividing the input transmission data A message authentication code stored in a data part of the message to be transmitted together with the second transmission data with a counter value It is preferred to use the product.
  • the message authentication code generation unit uses only upper extracted bits for a predetermined number of extracted bits in the bit string of the transmission counter value for generation of the message authentication code.
  • the transmission unit is configured to specify, for the message to be transmitted, a portion specified by a value of a predetermined lower bit other than the upper extracted bits in a bit sequence of the transmission counter value among a bit sequence of the generated message authentication code It is preferable to store only the bit string.
  • the transmission node according to one aspect of the present invention preferably further includes a secret information storage unit that stores the same secret information as the secret information held by the reception node, and the message authentication code generation unit includes the secret information. Is preferably used to generate the message authentication code.
  • One aspect of the present invention is the reception node in a communication network system in which a transmission node that transmits a message and a reception node that receives the message are connected, and the count used in the transmission node every time the message is received Message authentication using a reception counter unit that holds a reception counter value that is incremented by a predetermined count value that is the same as the value, reception data acquired from the data unit in the received message, and the stored reception counter value It is a receiving node that includes a message authentication code checking unit that generates a code and checks whether the generated message authentication code matches the message authentication code acquired from the received message.
  • the message authentication code checking unit uses only the higher-order extracted bits for a predetermined number of extracted bits in the bit string of the reception counter value to generate the message authentication code, and Among the received message authentication codes, only a partial bit string specified by a value of a predetermined lower bit other than the upper extracted bits in the bit string of the reception counter value matches the message authentication code acquired from the received message. It is preferable to make it an object of inspection.
  • the message authentication code checking unit increases the reception counter value by the count value in the generated message authentication code when the result of the check is inconsistent.
  • the reception counter unit sets the value of the lower bit that matches the result of the recheck to the value of the lower bit of the reception counter value held by itself.
  • the receiving node according to one aspect of the present invention preferably further includes a secret information storage unit that stores the same secret information as the secret information held by the transmitting node, and the message authentication code checking unit includes the secret information. Is preferably used to generate the message authentication code.
  • One aspect of the present invention provides a message authentication code inspection unit that inspects a message authentication code by using the above-described transmission node, reception data acquired from a data part in a message received from the transmission node, and a message authentication code.
  • a communication network system having a receiving node One embodiment of the present invention is a communication network system including the transmission node and the reception node.
  • One embodiment of the present invention is a communication network system including the transmission node and the reception node.
  • the transmitting node and the receiving node have the same secret information, and the transmitting node and the receiving node use the secret information for generating a message authentication code. preferable.
  • One aspect of the present invention is a message creation method of the transmission node in a communication network system in which a transmission node that transmits a message and a reception node that receives the message are connected, and the transmission node receives input transmission data. And transmitting each of a set of the divided transmission data and a message authentication code generated using the divided transmission data in a data portion in the message to be transmitted separately, and A message creation step including a message authentication code generation step in which a transmission node generates a message authentication code stored in a data part of the message to be transmitted together with the divided transmission data using the divided transmission data Is the method.
  • One embodiment of the present invention divides input transmission data into a computer of the transmission node in a communication network system in which a transmission node that transmits a message and a reception node that receives the message are connected, and transmits the divided transmission data.
  • a message authentication code generating step for generating a message authentication code stored in a data part of the message to be transmitted together with the divided transmission data.
  • the present invention it is possible to improve the message inspection performance in a communication network system in which a transmitting node that transmits a message and a receiving node that receives the message are connected.
  • 1 is a block diagram showing a communication network system according to a first embodiment of the present invention. It is a block diagram which shows MCU_2 (node) which concerns on 1st Embodiment of this invention. It is a block diagram which shows the data frame which concerns on 1st Embodiment of this invention. It is a figure which shows the procedure of the transmission process which concerns on 1st Embodiment of this invention. It is a figure which shows the procedure of the reception process which concerns on 1st Embodiment of this invention. It is a figure which shows the procedure of the reception process which concerns on 1st Embodiment of this invention. It is a block diagram which shows the communication network system which concerns on 2nd Embodiment of this invention.
  • FIG. 1 is a block diagram showing a communication network system 1 according to the first embodiment of the present invention.
  • a communication network system 1 has a plurality of MCUs (Micro Computing Units) _2.
  • the MCU_2 is composed of a CPU (Central Processing Unit) and a memory, and is a kind of computer.
  • Each MCU_2 is used as an electronic control unit (ECU) that controls equipment in the vehicle.
  • ECU electronice control unit
  • MCU_2 is connected to the CAN communication bus 3.
  • the communication bus 3 transmits messages exchanged between the MCU_2.
  • Each MCU_2 transmits and receives messages to and from each other via the communication bus 3.
  • CAN a message is transmitted in a predetermined frame format.
  • MCU_2 functions as a node (communication device) in CAN.
  • the MCU_2 has a function of a transmitting node that transmits a message and a function of a receiving node that receives the message.
  • each of the three MCU_2 is assigned ID1, ID2, and ID3 as identifiers (IDs) in the CAN.
  • FIG. 2 is a block diagram showing MCU_2 (node) according to the first embodiment of the present invention.
  • MCU_2 includes a transmission unit 111, a reception unit 112, a frame reception processing unit 113, a MAC (message authentication code) generation unit 114, a counter unit 115, a MAC (message authentication code) inspection unit 116, and a secret information storage unit 117. Is provided.
  • FIG. 3 is a configuration diagram illustrating a data frame according to the first embodiment of the present invention.
  • the numbers in parentheses shown in each field indicate the number of bits of information stored in the field.
  • the configuration of the data frame shown in FIG. 3 is partly changed with respect to the configuration of the standard format data frame in CAN.
  • the information stored in the CRC field (CRC part) in the data frame is changed to a message authentication code (MAC).
  • MAC message authentication code
  • the portions other than the CRC portion in the data frame are unchanged from the standard format in CAN.
  • the data frame according to the present embodiment shown in FIG. 3 is referred to as a CAN frame.
  • the transmission unit 111 receives data such as transmission data stored in the CAN frame.
  • the transmission unit 111 transmits a CAN frame in which the input data is stored in a corresponding part in the CAN frame to the communication bus 3.
  • the transmission data is stored in a data field (Data Field) in FIG.
  • the frame reception processing unit 113 performs reception processing on the CAN frame received from the communication bus 3 by the reception unit 112.
  • the MAC generation unit 114 generates a MAC based on transmission data or the like stored in the data part in the CAN frame.
  • the counter unit 115 has a function as a transmission counter unit and a function as a reception counter unit. As a function of the transmission counter unit, the counter unit 115 holds a transmission counter value that is incremented by a predetermined count value each time a CAN frame is transmitted by the transmission unit 111. In this embodiment, the count value is 1. Therefore, the counter unit 115 holds a transmission counter value that is incremented by 1 each time a CAN frame is transmitted by the transmission unit 111. This transmission counter value is incremented by 1 every time its own MCU_2 (node) transmits a CAN frame.
  • the counter unit 115 holds a reception counter value that is incremented by the same predetermined count value as the transmission counter unit every time the CAN frame is received by the reception unit 112.
  • the count value is 1. Therefore, the counter unit 115 holds a reception counter value that is incremented by 1 each time a CAN frame is received by the reception unit 112.
  • This reception counter value is provided for each ID in the CAN frame.
  • the ID is an ID assigned to MCU_2 (node) that transmitted the CAN frame, and is stored in the ID field (ID part) in FIG.
  • the counter unit 115 since there are three MCU_2 (IDs are ID1, ID2, and ID3, respectively), as shown in FIG. 2, the counter unit 115 includes each of the three MCU_2 (each ID is ID). 3 counter values (ID1 counter value, ID2 counter value, ID3 counter value) corresponding to (ID1, ID2, ID3) are held.
  • the counter value corresponding to the ID of its own MCU_2 is the transmission counter value
  • the counter value corresponding to the ID of the other MCU_2 is the reception counter value.
  • the ID1 counter value is a transmission counter value
  • the ID2 counter value is a reception counter value corresponding to ID2
  • the ID3 counter value is a reception counter value corresponding to ID3.
  • the MAC checking unit 116 checks the MAC acquired from the CAN frame received from the communication bus 3 by the receiving unit 112.
  • the secret information storage unit 117 stores the same secret information in each MCU_2. This secret information is safely set in MCU_2 when MCU_2 is manufactured.
  • FIG. 4 is a diagram showing a procedure of transmission processing according to the first embodiment of the present invention.
  • the transmission process in FIG. 4 is started when a CAN frame transmitted from the transmission unit 111 is created.
  • Step S111 The MAC generation unit 114 acquires a transmission counter value from the counter unit 115. From the bit string of the acquired transmission counter value (the number of bits is L), the MAC generation unit 114 converts only upper bits corresponding to a predetermined number of extracted bits (L ⁇ n bits) into upper extracted bits (the number of bits is “ Ln ”).
  • Step S112 The MAC generation unit 114 uses the transmission data stored in the data part in the CAN frame, the higher-order extracted bits acquired in step S111, and the secret information stored in the secret information storage unit 117. To generate a MAC. For example, a hash value is calculated as the MAC.
  • An example of a hash value calculation method is SHA-256. The hash value calculation method is described in Non-Patent Documents 3 and 4, for example.
  • Step S113 The MAC generation unit 114 extracts a bit string (15 bits) stored in the CRC part in the CAN frame from the MAC bit string (MAC value) generated in step S112.
  • This extracted bit string is specified by a value of a predetermined lower bit (the number of bits is n) other than the upper extracted bits in the bit string (the number of bits is L) of the transmission counter value acquired in step S111. .
  • the value of the lower bit (the number of bits is n) is “3”.
  • a part (15 bits) specified by the value “3” is extracted from the bit string of the MAC value.
  • the CRC part in the CAN frame is 15 bits
  • 15 bits specified by the value “3” are extracted from the bit string of the MAC value as information stored in the CRC part.
  • a section of 15 bits is defined for the bit string of the MAC value, and the lower bits of the transmission counter value (the number of bits is n) indicating which section of 15 bits is stored in the CRC part in the CAN frame.
  • the value is specified.
  • K sections one section is 15 bits according to the total number of bits of the MAC value are defined.
  • the transmission unit 111 stores transmission data (used for MAC generation in step S112) in the data unit for the CAN frame, and CRCs the 15-bit bit sequence extracted from the bit sequence of the MAC value in step S113. Store in the department.
  • the transmission unit 111 transmits the CAN frame to the communication bus 3.
  • the counter unit 115 increments and holds the transmission counter value by 1 by transmitting the CAN frame.
  • FIGS. 5 and 6 are diagrams showing the procedure of the reception process according to the first embodiment of the present invention.
  • the reception process in FIG. 5 is started when the reception unit 112 receives a CAN frame.
  • Step S ⁇ b> 121) The MAC checking unit 116 acquires a reception counter value corresponding to the ID stored in the ID part in the CAN frame received by the receiving unit 112 from the counter unit 115. From the bit string (the number of bits is L) of the acquired reception counter value, the MAC checking unit 116 converts only the upper bits corresponding to a predetermined number of extracted bits (L ⁇ n bits) into upper extracted bits (the number of bits is “ Ln ”). The method for acquiring the higher-order extracted bits is the same as the processing (step S111) of the MAC generation unit 114 described above.
  • Step S122 The MAC checking unit 116 receives the received data acquired from the data part in the CAN frame received by the receiving unit 112, the upper extracted bit acquired in step S121, and the secret stored in the secret information storage unit 117. The information is used to generate a MAC.
  • This MAC value (calculated MAC value) is calculated by the same calculation method as the MAC generation unit 114 described above (for example, calculation of a hash value by SHA-256).
  • Step S123 The MAC inspection unit 116 extracts the inspection target bit string (15 bits) to be inspected from the MAC bit string (calculated MAC value) generated in Step S122.
  • the method for extracting the bit string to be inspected is the same as the method for extracting the bit string (15 bits) stored in the CRC part in the CAN frame (step S113) in the MAC generation unit 114 described above. That is, the bit string to be inspected is a predetermined lower bit (the bit number is n) other than the upper extracted bit in the bit string (the bit number is L) of the reception counter value acquired in step S121 among the bit string of the calculated MAC value. Is a part (15 bits) specified by the value of In the example shown in FIG. 5, the value of the lower bit (the number of bits is n) is “3”. As a result, a part (for 15 bits) specified by the value “3” is extracted from the bit string of the calculated MAC value.
  • the information stored in the CRC part (15 bits) in the CAN frame is checked for a match between the check target bit string (15 bits) extracted from the bit string of the calculated MAC value. For this reason, similarly to the transmission process described above, a 15-bit section is defined for the bit string of the calculated MAC value, and the 15 bits of which section are used as the inspection target bit string are the lower bits (the number of bits) of the reception counter value. Is n). In the example of FIG. 5, K sections (one section is 15 bits) corresponding to the total number of bits of the calculated MAC value are defined.
  • the MAC checking unit 116 receives the MAC value (received MAC value (15 bits)) obtained from the CRC part in the CAN frame received by the receiving unit 112 and the inspection target bit string (15 bits) extracted from the bit string of the calculated MAC value. Is matched.
  • the MAC inspection unit 116 notifies the frame reception processing unit 113 of the inspection pass.
  • the frame reception processing unit 113 performs a predetermined reception process on the CAN frame normally received on the CAN frame received by the reception unit 112.
  • the MAC inspection unit 116 notifies the counter unit 115 of the inspection pass.
  • the counter unit 115 increases the corresponding reception counter value by 1 and holds it.
  • the reception counter value to be counted is a reception counter value corresponding to the ID stored in the ID portion in the CAN frame received by the reception unit 112.
  • the MAC inspection unit 116 performs the re-inspection process shown in FIG.
  • the reinspection process will be described with reference to FIG.
  • Step S131 The MAC checking unit 116 extracts a recheck target bit string (15 bits) to be rechecked from the bit string of the calculated MAC value generated in Step S122.
  • This re-examination target bit string extraction process is the same as the above-described inspection target bit string extraction process, but uses a value (increase reception counter value) obtained by increasing the reception counter value acquired in step S121. Specifically, first, 1 is added to the reception counter value acquired in step S121.
  • bit string of the calculated MAC value a part (15 bits) specified by the value of the lower bits (the number of bits is n) in the bit string of the increased reception counter value, which is a value obtained by adding 1 to this reception counter value Min) as a re-inspection target bit string.
  • the MAC checking unit 116 determines whether the extracted recheck target bit string matches the received MAC value. If the result of this determination is inconsistent, a value obtained by adding 1 to the current increased reception counter value is set as a new increased reception counter value. Then, among the bit string of the calculated MAC value, a part (15 bits) specified by the value of the lower bits (the number of bits is n) in the bit string of the new increased reception counter value is replaced with a new bit string to be rechecked Extract as Next, it is determined whether or not the extracted new bit string to be rechecked matches the received MAC value. This re-examination is repeated until the determination results are coincident.
  • the re-examination is completed up to the end section of the bit string of the calculated MAC value (the section specified by the lower bit value “K ⁇ 1”). This is because the value of the lower bits is carried and the value of the upper extracted bits used to generate the calculated MAC value changes.
  • the lower bit value is raised.
  • the calculated MAC value is recalculated using the higher-order extracted bits, and the recalculated new calculated MAC value is used to determine a match with the received MAC value as in the above-described recheck.
  • Step S132 When the re-inspection target bit string matches the received MAC value as a result of the re-inspection in Step S131, the MAC inspection unit 116 indicates to the counter unit 115 the low-order bits related to the re-inspection bit string Notify the value and instruct counter synchronization.
  • the counter unit 115 changes the value of the lower bit (the number of bits is n) of the corresponding reception counter value to the notified lower bit value.
  • This reception counter value to be synchronized with the counter is a reception counter value corresponding to the ID stored in the ID portion in the CAN frame received by the reception unit 112. Thereby, the transmission counter value of the transmission node corresponding to the ID and the reception counter value corresponding to the ID of the reception node are synchronized.
  • the value of the lower bits (the number of bits is n) in the reception counter value acquired in step S121 is “3”.
  • the inspection target bit string identified by this value “3” did not match the received MAC value.
  • the portion specified by the value “4” of the lower bits (the number of bits is n) in the bit string of the increased reception counter value obtained by adding 1 to the reception counter value acquired in step S121 is set as a recheck target bit string.
  • a match with the received MAC value is determined.
  • even the recheck target bit string specified by the value “4” does not match the received MAC value.
  • the part specified by the value “5” of the lower bits (the number of bits is n) in the bit string of the new increased reception counter value obtained by adding 1 to the current increased reception counter value is set as the recheck target bit string.
  • a match with the received MAC value is determined.
  • the recheck target bit string specified by the value “5” matches the received MAC value.
  • the counter unit 115 changes the value of the lower bit (the number of bits is n) of the corresponding reception counter value from “3” to “5”.
  • the MAC inspection unit 116 notifies the frame reception processing unit 113 of the inspection failure when the reinspection target bit string and the received MAC value do not match even if the reinspection is repeated a predetermined number of times. As a result, the frame reception processing unit 113 discards the CAN frame received by the reception unit 112. This is because it is considered that an attack for transmitting a communication error or a spoofed message has occurred. Note that if the inspection fails, the MAC inspection unit 116 does not notify the counter unit 115 of the inspection pass. Thereby, the counter unit 115 does not increase the reception counter value with respect to the reception counter value corresponding to the ID stored in the ID part in the CAN frame received by the reception unit 112.
  • the receiving node determines that a replay attack has occurred when a CAN frame having the same MAC value is continuously received twice or more in a CAN frame having the same ID. In this case, for the CAN frame of the ID, a measure for not performing the reception process is given.
  • the MAC generated using the transmission data stored in the data portion of the CAN frame is stored in the CRC portion.
  • the CAN frame is inspected using the MAC generated using the received data acquired from the data portion of the received CAN frame and the MAC acquired from the CRC portion of the CAN frame. .
  • the transmission data and the MAC can be received in the same CAN frame, the immediacy of the inspection can be realized.
  • the CAN frame inspection fails in the MAC generated by the transmitting node that does not have the secret information. Thereby, the reliability with respect to the inspection of the CAN frame is improved.
  • the stored MAC value is different for each CAN frame to be transmitted. Thereby, a replay attack in which the same CAN frame is repeatedly transmitted can be easily detected.
  • the transmission node since the transmission node generates the MAC using the transmission data of the data part in the CAN frame, it is possible to detect falsification of the transmission data at the reception node.
  • the upper extracted bits of the counter value are used for generating the MAC, and which part of the MAC is stored in the CRC unit is determined by the lower bits other than the upper extracted bits of the counter value. For this reason, in the MAC recheck, it is not necessary to recalculate the MAC until the carry of the lower bits occurs, and the recheck can be repeated while changing the recheck target bit string from the same MAC. it can. Thereby, the amount of calculation at the time of inspection can be reduced and it can contribute to shortening of inspection time.
  • the probability that a further hash value collision will occur is 1/32768, so the probability that a hash value collision will occur continuously becomes very small.
  • the MAC is stored in the CRC portion in the CAN frame, but may be stored in the data portion.
  • storing in the head part or the last part of a data part is mentioned.
  • storing in the last part is considered to have less influence on the existing usage of the data part.
  • the size of the data part is 64 bits, it is possible to increase the part stored in the CAN frame in the generated MAC as compared with the CRC part (15 bits).
  • the portion of the generated MAC that is stored in the CAN frame is increased, the size of the transmission data is reduced by that amount. Therefore, the size of the MAC stored in the data portion is allowed to be affected by the MAC collision. It is preferable to keep it as small as possible.
  • the CRC function can be utilized by storing the CRC in the CRC part.
  • FIG. 7 is a block diagram showing a communication network system according to the second embodiment of the present invention.
  • a communication network system 1 shown in FIG. 7 is mounted on a vehicle.
  • a plurality of MCU_2-a and 2-b are connected to the CAN communication bus 3.
  • three MCU_2-a and 2-b are connected to the communication bus 3 for convenience of explanation.
  • each of the three MCU_2-a, 2-b is given an identifier (ID) in the CAN
  • ID-1 is assigned to the MCU_2-a
  • each MCU_2-b is assigned ID2, ID3.
  • ID identifier
  • MCU_2-a operates as a master in the process of authenticating MCU_2-b connected to the communication bus 3.
  • MCU_2-a is referred to as "master MCU_2-a”.
  • MCU_2-b is referred to as “end MCU_2-b”.
  • MCU_2-a and 2-b are referred to as “MCU_2” when they are not particularly distinguished.
  • MCU_2 has CPU_10, flash memory (flash memory) 11, RAM (random access memory) _12, boot loader (boot loader) 13, and secure element (secure element) 14.
  • the secure element 14 includes a secure RAM_21, a secure ROM (Read Only Memory) _22, a verification unit 23, and an encryption processing unit 24.
  • CPU_10 implement
  • the flash memory 11 stores a computer program executed by the CPU_10 and a signature for the computer program.
  • RAM_12 stores data. The RAM_12 becomes an execution area when the CPU_10 executes the computer program.
  • the boot loader 13 performs a boot process when the MCU_2 is powered on.
  • the boot loader 13 is in ROM so that the contents of the boot process cannot be changed.
  • the secure element 14 is configured as a safe element that cannot be accessed from outside the secure element 14 with respect to data held inside the secure element 14.
  • the secure RAM_21 is a temporary storage area for data held inside the secure element 14.
  • the secure RAM_21 is configured not to be accessible from outside the secure element 14.
  • the secure ROM_22 stores a key used inside the secure element 14.
  • the secure ROM_22 is configured not to be accessible from outside the secure element 14. A key is securely written in advance in the secure ROM_22 when the MCU_2 is manufactured.
  • the verification unit 23 performs the program validity verification process in the boot process by the boot loader 13 using the signature verification key held in the secure ROM_22.
  • the verification unit 23 uses the secure RAM_21 as a temporary storage area in the program validity verification process.
  • the cryptographic processing unit 24 performs cryptographic processing on information exchanged between its own MCU_2 and another MCU_2 using the cryptographic key held in the secure ROM_22.
  • the encryption process is an encryption process or a decryption process.
  • the cryptographic processing unit 24 uses the secure RAM_21 as a temporary storage area in the cryptographic processing.
  • FIG. 8 is a sequence chart of the boot process according to the present embodiment. The process of FIG. 8 is started when the MCU_2 is powered on.
  • Step S ⁇ b> 1 The boot loader 13 reads a computer program and a signature from the flash memory 11. Next, the boot loader 13 calculates a hash value of the read computer program.
  • Step S ⁇ b> 2 The boot loader 13 transmits the calculated hash value and the signature read from the flash memory 11 to the secure element 14.
  • Step S3 In the secure element 14, the verification unit 23 verifies the match between the value included in the signature received from the boot loader 13 and the hash value received from the boot loader 13, using the signature verification key held in the secure ROM_22. To do. In this verification process, the secure RAM_21 is used as a temporary storage area for data in the verification process. When the verification is successful, the secure element 14 notifies the boot loader 13 of the verification success.
  • Step S4 When the boot loader 13 receives the notification of the verification success from the secure element 14, the boot loader 13 loads the computer program read from the flash memory 11 in Step S1 into the RAM_12. Thereby, CPU_10 can execute the computer program loaded in RAM_12.
  • step S2 when there is no verification success notification from the secure element 14 (for example, the boot loader 13 does not receive a verification success notification from the secure element 14 even after a predetermined time has passed since the transmission of step S2,
  • the computer program read from the flash memory 11 in step S1 is not loaded into the RAM_12. In this case, the boot loader 13 stops the activation of MCU_2.
  • each MCU_2 has a secure boot (Secure Operating) that verifies the validity of the computer program of the MCU_2 (for example, an operating system (OS)) when the MCU_2 is activated. Boot) is realized.
  • the secure boot is described in Non-Patent Document 5, for example.
  • FIG. 9 is a sequence chart of encryption processing according to the present embodiment.
  • the process of FIG. 9 is started by a predetermined opportunity.
  • a case where a random number as secret information is safely notified from the master MCU_2-a to the end MCU_2-b will be described as an example.
  • Data transmission / reception between the master MCU_2-a and the end MCU_2-b is performed via the communication bus 3.
  • Step S11 The master MCU_2-a transmits the initial random number held in its own RAM_12 to the end MCU_2-b as a challenge.
  • the master MCU_2-a passes the initial random number transmitted as a challenge to the end MCU_2-b to its own secure element 14.
  • Step S12 The end MCU_2-b passes the initial random number, which is the challenge received from the master MCU_2-a, to its own secure element 14.
  • the encryption processing unit 24 of the end MCU_2-b encrypts the passed initial random number using the secret key Ks held in its own secure ROM_22.
  • the secure RAM_21 of the end MCU_2-b is used as a temporary storage area for data in the encryption process.
  • the end MCU_2-b transmits encrypted data Ks (initial random number), which is an encrypted initial random number, as a response to the master MCU_2-a.
  • Step S13 The master MCU_2-a passes the encrypted data Ks (initial random number), which is a response received from the end MCU_2-b, to its own secure element 14.
  • the encryption processing unit 24 of the master MCU_2-a decrypts the received encrypted data Ks (initial random number) using the public key Kp of the corresponding end MCU_2-b held in its own secure ROM_22.
  • the encryption processing unit 24 of the master MCU_2-a verifies a match between the decrypted data obtained by the decryption and the initial random number transmitted to the end MCU_2-b as a challenge in step S11.
  • the secure RAM_21 of the master MCU_2-a is used as a temporary storage area for data in the decryption processing and verification processing. Based on the success of the verification, it can be determined that the authentication of the end MCU_2-b is successful.
  • the encryption processing unit 24 of the master MCU_2-a If the verification is successful, the encryption processing unit 24 of the master MCU_2-a generates a random number that is secret information, and the generated random number is disclosed to the corresponding end MCU_2-b held in its own secure ROM_22. Encrypt using key Kp.
  • the secure RAM_21 of the master MCU_2-a is used as a temporary storage area for data in the random number generation processing and encryption processing.
  • the master MCU_2-a transmits encrypted data Kp (random number), which is encrypted secret information (random number), to the end MCU_2-b.
  • the end MCU_2-b passes the encrypted data Kp (random number) received from the master MCU_2-a to its own secure element 14.
  • the encryption processing unit 24 of the end MCU_2-b decrypts the passed encrypted data Kp (random number) using the secret key Ks held in its own secure ROM_22.
  • the secure RAM_21 of the end MCU_2-b is used as a temporary storage area for data in the decryption process.
  • a random number which is secret information is acquired from the encrypted data Kp (random number). The acquired random number is securely held in the secure RAM_21 of the end MCU_2-b.
  • encryption processing (encryption processing) of information exchanged between the MCU_2 (between the master MCU_2-a and the end MCU_2-b in the above-described example) by the encryption processing by the secure element 14. Security processing and decryption processing) are performed safely. Thereby, the safety
  • the master MCU_2-a can authenticate the end MCU_2-b by a challenge / response based on the cryptographic processing. Then, secret information can be securely transmitted from the master MCU_2-a to the authenticated end MCU_2-b based on the encryption processing. This secret information can be used as the secret information in the first embodiment described above. In the example described above, a random number that is secret information is securely transmitted from the master MCU_2-a to the end MCU_2-b.
  • FIG. 10 is a sequence chart for explaining the MAC generation processing and the MAC inspection processing according to the present embodiment.
  • a random number as secret information is securely transmitted from the master MCU_2-a to the authenticated end MCU_2-b.
  • the master MCU_2-a and the end MCU_2-b store the random number, which is the secret information, in the secure RAM_21.
  • the secure RAM_21 safely holds the random number (secret information) as the secret information storage unit 117 in the first embodiment described above.
  • the transmission side MCU_2 operates as a transmission node.
  • the transmitting MCU_2 may be the master MCU_2-a or the end MCU_2-b.
  • the receiving side MCU_2 operates as a receiving node.
  • the receiving MCU_2 may be the master MCU_2-a or the end MCU_2-b.
  • the transmission side MCU_2 holds a transmission counter value and transmission data in the RAM_12.
  • the receiving side MCU_2 holds the reception counter value in the RAM_12.
  • the process of FIG. 10 is started when a CAN frame transmitted from the transmission side MCU_2 is created.
  • Step S21 The transmission side MCU_2 passes the transmission data and the transmission counter value from the RAM_12 to the secure RAM_21.
  • the secure element 14 of the transmission side MCU_2 generates a MAC by using a random number (secret information), transmission data, and a transmission counter value held in the secure RAM_21.
  • This MAC generation method is the same as in the first embodiment described above. However, the MAC is generated safely in the secure RAM_21.
  • a 15-bit bit string (CRC portion extracted MAC bit string) extracted from the MAC value bit string as a result of the MAC generation is passed from the secure RAM_21 to the RAM_12.
  • Step S22 For the CAN frame, the transmission side MCU_2 stores the transmission data transferred from the RAM_12 to the secure RAM_21 in step S21 in the data part, and the CRC part extraction MAC passed from the secure RAM_21 to the RAM_12 in step S21. The bit string is stored in the CRC part.
  • the transmitting side MCU_2 transmits the CAN frame to the communication bus 3. This CAN frame is received by the receiving MCU_2 via the communication bus 3.
  • Step S23 The receiving MCU_2 holds the CAN frame received from the communication bus 3 in the RAM_12.
  • the receiving MCU_2 passes the received data acquired from the data part in the CAN frame held in the RAM_12 and the received MAC value acquired from the CRC part to the secure RAM_21. Further, the receiving side MCU_2 passes the reception counter value corresponding to the ID stored in the ID part in the CAN frame held in the RAM_12 from the RAM_12 to the secure RAM_21.
  • the secure element 14 of the receiving MCU_2 generates a MAC using a random number (secret information), received data, and a received counter value held in the secure RAM_21.
  • This MAC generation method is the same as in the first embodiment described above. However, the MAC is generated safely in the secure RAM_21.
  • a 15-bit inspection target bit string is extracted from the bit string of the calculated MAC value.
  • the secure element 14 of the receiving MCU_2 determines whether the received MAC value held in the secure RAM_21 matches the check target bit string. If the result of this determination is inconsistent, re-examination is performed as in the first embodiment described above.
  • a MAC is generated and inspected using a random number (secret information) securely held in the secure RAM_21. Thereby, the reliability with respect to the inspection of the CAN frame is improved.
  • one MCU_2 has the function of the transmission node and the function of the reception node.
  • one MCU_2 may have only the function of the transmission node, or one MCU_2 may have only the function of the receiving node.
  • one MCU_2 may be configured as one semiconductor device. By making one MCU_2 into one chip as one semiconductor integrated circuit, safety is further improved.
  • an eSIM embedded Subscriber Identity Module
  • SIM Subscriber Identity Module
  • eSIM and SIM are a kind of computer, and a desired function is realized by a computer program.
  • a cryptographic processing chip having tamper resistance may be used as the secure element.
  • a cryptographic processing chip having tamper resistance for example, a cryptographic processing chip called TPM (Trusted Platform Module) is known. About TPM, it describes in the nonpatent literature 6, for example.
  • the above-described embodiment can be applied to, for example, an automobile, a motorbike, a railway vehicle, and the like as a vehicle.
  • the communication network system mounted on the vehicle has been described as an example of the communication network system according to the present invention.
  • the communication network system according to the present invention can be applied to various fields. Is possible.
  • MCU_2 may be applied as a computer that controls home appliances, and the MCU_2 of each home appliance may be connected via a home network.
  • the MCU_2 may be applied as a smart meter, and the MCU_2 of each smart meter may be connected via a communication network.
  • FIG. 11 is a configuration diagram showing a data frame in a CAN standard format.
  • FIG. 12 is a block diagram showing a data frame in the CAN extended format.
  • the CAN data frame is described in Non-Patent Document 7, for example.
  • the numbers in parentheses shown in each field indicate the number of bits of information stored in the field.
  • the MAC is stored in a data field (Data Field) in the data frame.
  • Data Field data field
  • data of up to 8 bytes can be stored in the data portion.
  • the MAC is stored in a predetermined location in the data part. For example, storing in the head part or the last part of a data part is mentioned. However, storing in the last part is considered to have less influence on the existing usage of the data part.
  • FIG. 13 is an explanatory diagram showing a message creation method according to an embodiment of the present invention.
  • the data length of the MAC stored in the data part is 4 bytes. Therefore, the maximum data length of transmission data that can be stored in the data portion is 4 bytes. For this reason, when the data length of the transmission data exceeds 4 bytes, the transmission data is divided, a MAC is generated for each divided transmission data, and each of the divided transmission data and MAC sets is separated. Are stored in the data portion of the data frame.
  • the transmission data is 8 bytes as shown in FIG.
  • the transmission data is input to both the transmission unit 111 and the MAC generation unit 114 shown in FIG.
  • the processing in FIG. 13 is started.
  • the transmission unit 111 divides the input 8-byte transmission data into first transmission data and second transmission data of 4 bytes each. For example, among the input 8-byte transmission data, the upper 4 bytes are set as the first transmission data, and the lower 4 bytes are set as the second transmission data.
  • the MAC generation unit 114 divides the input 8-byte transmission data into 4-byte first transmission data and second transmission data in the same manner as the transmission unit 111.
  • Step S202 The MAC generation unit 114 generates a 4-byte first MAC using the 4-byte first transmission data.
  • This first MAC generation method is the same as the MAC generation method of the first embodiment shown in FIG. 4 described above.
  • the transmission data used for the MAC calculation in step S112 in FIG. 4 is the first transmission data.
  • the bit string (extracted value) extracted from the MAC bit string calculated using the first transmission data in step S112 is 4 bytes. This 4-byte extracted value is the first MAC.
  • Step S203 The transmission unit 111 stores the first transmission data and the first MAC in the data part of the first data frame.
  • the transmission unit 111 transmits the first data frame to the communication bus 3.
  • the counter unit 115 increases the transmission counter value by 1 by transmission of the first data frame and holds it.
  • Step S204 The MAC generation unit 114 generates a 4-byte second MAC using the 4-byte second transmission data.
  • This second MAC generation method is the same as the MAC generation method of the first embodiment shown in FIG. 4 described above. However, with respect to the transmission data and the higher-order extracted bits used in the calculation of the MAC in step S112 in FIG. This is a transmission counter value increased by 1 by transmission of one data frame. Further, in step S113 of FIG. 4, the bit string (extracted value) extracted from the MAC bit string calculated using the second transmission data in step S112 is 4 bytes. This 4-byte extracted value is the second MAC.
  • Step S205 The transmission unit 111 stores the second transmission data and the second MAC in the data part of the second data frame.
  • the transmission unit 111 transmits the second data frame to the communication bus 3.
  • the counter unit 115 increases the transmission counter value by 1 by transmission of the second data frame and holds it.
  • the transmission data and the MAC can be stored in the data portion of the data frame while the MAC data length is maintained at a predetermined length (for example, 4 bytes).
  • a predetermined length for example, 4 bytes.
  • the first data frame and the second data frame in which the first transmission data and the second transmission data divided from the input one transmission data are separately stored are attached with the same label. You may notify a node that one transmission data is comprised from the transmission data in each data part of the 1st data frame and 2nd data frame which attached the same label.
  • both the transmission unit 111 and the MAC generation unit 114 each divide the input transmission data into the first transmission data and the second transmission data.
  • the input transmission data may be divided into first transmission data and second transmission data, and the first transmission data and the second transmission data may be supplied to the MAC generation unit 114.
  • the MAC generation method according to the first embodiment shown in FIG. 4 described above is used as a MAC generation method to be stored in the data frame.
  • a method may be used.
  • the MAC generation method described in Non-Patent Document 8 may be used.
  • the data length of the MAC stored in the data frame may be determined for each pair of the transmission node and the reception node. In this case, the data length of the MAC stored in the data frame is set for each pair of the transmission node and the reception node.
  • MCU_2 is used as an electronic control unit (ECU) that controls equipment in the automobile.
  • Information for controlling devices in the vehicle is transmitted and received between ECUs (MCU_2) using data frames.
  • the data length of the MAC stored in the data frame is determined for each set of ECUs (MCU_2) for transmitting and receiving the information.
  • the data length of the MAC stored in the data frame exchanged between the ECU (MCU_2) and the communication partner ECU (MCU_2) is determined according to the importance of the control function of the ECU (MCU_2). For example, the higher the importance, the longer the MAC data length.
  • the MAC may not be stored in the data frame exchanged between the ECU (MCU_2) and the communication partner ECU (MCU_2).
  • the data length of the MAC stored in the data frame may be determined according to the maximum data length of the transmission data transmitted and received using the data frame.
  • the data length of the MAC to be stored in the data frame is determined within the range of the empty size of the data portion when transmission data having the maximum data length is stored in the data portion. In this case, since the transmission data and the MAC having the maximum data length can be stored in the data portion, it is not necessary to divide the transmission data and transmit it in separate data frames.
  • MAC For example, a hash value is calculated.
  • An example of a hash value calculation method is SHA-256.
  • CMAC CodeMAC
  • CMAC is a MAC based on a common key encryption.
  • a computer program for realizing the above-described function of MCU_2 may be recorded on a computer-readable recording medium, and the program recorded on the recording medium may be read by the computer and executed.
  • the “computer-readable recording medium” means a flexible disk, a magneto-optical disk, a ROM, a writable nonvolatile memory such as a flash memory, a portable medium such as a DVD (Digital Versatile Disk), and a built-in computer.
  • a storage device such as a hard disk.
  • the “computer-readable recording medium” means a volatile memory (for example, DRAM (Dynamic Random) inside a computer that becomes a server or a client when a program is transmitted through a network such as the Internet or a communication line such as a telephone line. Access Memory)) is also included, which holds a program for a certain period of time.
  • the program may be transmitted from a computer storing the program in a storage device or the like to another computer via a transmission medium or by a transmission wave in the transmission medium.
  • the “transmission medium” for transmitting the program refers to a medium having a function of transmitting information, such as a network (communication network) such as the Internet or a communication line (communication line) such as a telephone line.
  • the program may be for realizing a part of the functions described above. Further, the program may be a so-called difference file (difference program) that can realize the above-described functions in combination with a program already recorded in the computer.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mechanical Engineering (AREA)
  • Small-Scale Networks (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Communication Control (AREA)

Abstract

 送信ノードは、入力された送信データを分割し、分割された送信データと当該分割された送信データを使用して生成されたメッセージ認証コードとの組の各々を別々に送信するメッセージ中のデータ部に格納する送信部と、分割された送信データを使用して、当該分割された送信データと共に送信するメッセージ中のデータ部に格納されるメッセージ認証コードを生成するメッセージ認証コード生成部と、を備える。

Description

送信ノード、受信ノード、通信ネットワークシステム、メッセージ作成方法およびコンピュータプログラム
 本発明は、送信ノード、受信ノード、通信ネットワークシステム、メッセージ作成方法およびコンピュータプログラムに関する。
 本願は、2014年6月5日に日本に出願された特願2014-116917号および2015年2月23日に日本に出願された特願2015-033103号に基づき優先権を主張し、その内容をここに援用する。
 従来、車両に搭載される通信ネットワークの一つとして知られているCAN(Controller Area Network)が、車両内の各種ECU(Electronic Control Unit)間の通信に用いられている。そのCANにおいてメッセージの認証を可能にする技術として、例えば非特許文献1,2、特許文献1に記載の技術が知られている。
 非特許文献1に記載の従来技術では、CANに接続された偽のECUからなりすましメッセージを発信する攻撃に対して、本物のECUが、自己のIDが付与されたなりすましメッセージを検知すると、自己のIDを付与した異常を知らせるメッセージを発信することで、受信側ECUに対して異常を報知している。
 非特許文献2に記載の従来技術では、CANフレーム中の誤り訂正(Cyclic Redundancy Check:CRC)フィールドに格納する情報をMAC(Message Authentication Code)に変更している。この従来技術では、送信側は、N番目からN+3番目までの4つのCANフレーム中のデータフィールドのデータ(64×4=256ビット)から64ビットのMACを生成し、該MACを16ビットずつに4分割して、N+4番目からN+7番目までの4つのCANフレーム中のCRCフィールド(16ビット)にそれぞれ格納して各CANフレームを送信する。受信側では、N+4番目からN+7番目までのCANフレーム中のCRCフィールドからMACを取得し、N番目からN+3番目までのCANフレーム中のデータフィールドから生成されるMACと一致するか否かによってN番目からN+3番目までのCANフレームが正当であるか否かを判断する。これにより、CRCフィールドから得られるMACと、データフィールドから算出されるMACとが異なる場合には、N番目からN+3番目までのCANフレームのいずれかが不正であると判断できる。
 特許文献1に記載の技術では、各ECUにおいてCANIDごとにメッセージが送信された回数をカウントする。そして、メインメッセージを送信した送信ノードは、メインメッセージのデータフィールドおよびCANIDと、CANIDに対応するカウンタ値とから生成したMACを含むMACメッセージを送信する。メインメッセージを受信した受信ノードは、メインメッセージに含まれるデータフィールドおよびCANIDと、CANIDに対応するカウンタ値とからMACを生成して、受信したMACメッセージに含まれるMACと一致するかを判断する。
国際公開第2013/065689号
畑正人、田邉正人、吉岡克成、大石和臣、松本勉、"不正送信阻止:CANではそれが可能である"、情報処理学会、コンピュータセキュリティシンポジウム(CSS2011)、pp.624-629、2011年10月. AKIRA YOSHIOKA ET AL.: "Kosei Shomei Kino o Motsu Shanai Tsushin Protocol no Teian" SYMPOSIUM ON MULTIMEDIA, DISTRIBUTED, COOPERATIVE ANDMOBILE SYSTEMS (DICOM02008) RONBUNSHU vol. 2008, no. 1, 02 July 2008, pages 1270 - 1275 RFC 2104 HMAC: Keyed-Hashing for Message Authentication、[2014年5月26日検索]、インターネット<URL:http://www.rfc-editor.org/rfc/rfc2104.txt> RFC 2104 HMAC:メッセージ認証のための鍵付ハッシング、[2014年5月26日検索]、インターネット<URL:http://www.ipa.go.jp/security/rfc/RFC2104JA.html> 竹森敬祐、川端秀明、窪田歩、"ARM+SIM/UIMによるセキュアブート"、電子情報通信学会、暗号と情報セキュリティシンポジウム(SCIS2014)、1B1-2、2014年1月. Trusted Computing Group、[2015年2月18日検索]、インターネット<URL:http://www.trustedcomputinggroup.org/> "CAN通信におけるデータ送信の仕組みとは?"、[2015年2月18日検索]、インターネット<URL:http://monoist.atmarkit.co.jp/mn/articles/0807/09/news140.html> AUTOSAR、"Specification of Module Secure Onboard Communication AUTOSAR Release 4.2.1"、[2015年2月18日検索]、インターネット<URL:http://www.autosar.org/fileadmin/files/releases/4-2/software-architecture/communication-stack/standard/AUTOSAR_SWS_SecureOnboardCommunication.pdf>
 しかし、上述した非特許文献1に記載の従来技術では、通信を監視する本物のECUが取り外された場合に異常を報知できない。また、非特許文献2に記載の従来技術では、N番目からN+3番目までのCANフレームの正当性を確認するためには、N+4番目からN+7番目までのCANフレームを受信するまで待たなければならないので、該正当性の確認に時間がかかる。このため、特にリアルタイム制御が求められる場合には適していない。また、特許文献1に記載の従来技術では、メインメッセージとは別にMACメッセージを送信するので通信量が2倍以上になる。さらに、メインメッセージの認証を行うためには、MACメッセージを受信するまで待たなければならないので、該認証に時間がかかる。このため、CANの通信帯域の圧迫と即時性の低下という問題がある。
 本発明は、このような事情を考慮してなされたものであり、メッセージを送信する送信ノードと該メッセージを受信する受信ノードとが接続される通信ネットワークシステムにおけるメッセージ検査性能を向上させることができる、送信ノード、受信ノード、通信ネットワークシステム、メッセージ作成方法およびコンピュータプログラムを提供することを課題とする。
 本発明の一態様は、メッセージを送信する送信ノードと前記メッセージを受信する受信ノードとが接続される通信ネットワークシステムにおける前記送信ノードであり、入力された送信データを分割し、分割された送信データと当該分割された送信データを使用して生成されたメッセージ認証コードとの組の各々を別々に前記送信するメッセージ中のデータ部に格納する送信部と、前記分割された送信データを使用して、当該分割された送信データと共に前記送信するメッセージ中のデータ部に格納されるメッセージ認証コードを生成するメッセージ認証コード生成部とを備えた送信ノードである。
 本発明の一態様の送信ノードは、前記メッセージの送信毎に所定のカウント値だけ増加させる送信カウンタ値を保持する送信カウンタ部をさらに備えていることが好ましく、前記メッセージ認証コード生成部は、前記分割された送信データと前記保持されている送信カウンタ値とを使用して、当該分割された送信データと共に前記送信するメッセージ中のデータ部に格納されるメッセージ認証コードを生成するものであって、前記入力された送信データが分割された送信データである第1送信データと第2送信データとのうち、前記第1送信データが格納されたメッセージの送信により前記所定のカウント値だけ増加された送信カウンタ値を前記第2送信データと共に前記送信するメッセージ中のデータ部に格納されるメッセージ認証コードの生成に使用することが好ましい。
 本発明の一態様の送信ノードにおいて、前記メッセージ認証コード生成部は、前記送信カウンタ値のビット列のうち所定の抽出ビット数分の上位抽出ビットのみを前記メッセージ認証コードの生成に使用することが好ましく、前記送信部は、前記送信するメッセージに対して、前記生成されたメッセージ認証コードのビット列うち、前記送信カウンタ値のビット列のうち前記上位抽出ビット以外の所定の下位ビットの値で特定される一部分のビット列のみを格納することが好ましい。
 本発明の一態様の送信ノードは、前記受信ノードで保持される秘密情報と同じ秘密情報を記憶する秘密情報記憶部をさらに備えていることが好ましく、前記メッセージ認証コード生成部は、前記秘密情報を前記メッセージ認証コードの生成に使用することが好ましい。
 本発明の一態様は、メッセージを送信する送信ノードと前記メッセージを受信する受信ノードとが接続される通信ネットワークシステムにおける前記受信ノードであり、前記メッセージの受信毎に前記送信ノードで使用されるカウント値と同じ所定のカウント値だけ増加させる受信カウンタ値を保持する受信カウンタ部と、前記受信したメッセージ中のデータ部から取得した受信データと前記保持されている受信カウンタ値とを使用してメッセージ認証コードを生成し、該生成したメッセージ認証コードと前記受信したメッセージから取得したメッセージ認証コードとが一致するかを検査するメッセージ認証コード検査部とを備えた受信ノードである。
 本発明の一態様の受信ノードにおいて、前記メッセージ認証コード検査部は、前記受信カウンタ値のビット列のうち所定の抽出ビット数分の上位抽出ビットのみを前記メッセージ認証コードの生成に使用し、前記生成したメッセージ認証コードのうち、前記受信カウンタ値のビット列のうち該上位抽出ビット以外の所定の下位ビットの値で特定される一部分のビット列のみを、前記受信したメッセージから取得したメッセージ認証コードとの一致の検査の対象にすることが好ましい。
 本発明の一態様の受信ノードにおいて、前記メッセージ認証コード検査部は、前記検査の結果が不一致である場合に、前記生成したメッセージ認証コードのうち、前記受信カウンタ値に前記カウント値だけ増加させた値における前記下位ビットの値で特定される一部分のビット列のみを前記一致の再検査の対象にすることが好ましい。
 本発明の一態様の受信ノードにおいて、前記受信カウンタ部は、前記再検査の結果が一致である前記下位ビットの値を、自己が保持する受信カウンタ値の前記下位ビットの値にすることが好ましい。
 本発明の一態様の受信ノードは、前記送信ノードで保持される秘密情報と同じ秘密情報を記憶する秘密情報記憶部をさらに備えていることが好ましく、前記メッセージ認証コード検査部は、前記秘密情報を前記メッセージ認証コードの生成に使用することが好ましい。
 本発明の一態様は、上記の送信ノードと、前記送信ノードから受信したメッセージ中のデータ部から取得した受信データとメッセージ認証コードとを使用してメッセージ認証コードを検査するメッセージ認証コード検査部を備えた受信ノードとを有する通信ネットワークシステムである。
 本発明の一態様は、上記の送信ノードと、上記の受信ノードとを有する通信ネットワークシステムである。
 本発明の一態様は、上記の送信ノードと、上記の受信ノードとを有する通信ネットワークシステムである。
 本発明の一態様の通信ネットワークシステムにおいて、前記送信ノードと前記受信ノードとが同じ秘密情報を有し、前記送信ノードと前記受信ノードとが前記秘密情報をメッセージ認証コードの生成に使用することが好ましい。
 本発明の一態様は、メッセージを送信する送信ノードと前記メッセージを受信する受信ノードとが接続される通信ネットワークシステムにおける前記送信ノードのメッセージ作成方法であり、前記送信ノードが、入力された送信データを分割し、分割された送信データと当該分割された送信データを使用して生成されたメッセージ認証コードとの組の各々を別々に前記送信するメッセージ中のデータ部に格納する送信ステップと、前記送信ノードが、前記分割された送信データを使用して、当該分割された送信データと共に前記送信するメッセージ中のデータ部に格納されるメッセージ認証コードを生成するメッセージ認証コード生成ステップとを含むメッセージ作成方法である。
 本発明の一態様は、メッセージを送信する送信ノードと前記メッセージを受信する受信ノードとが接続される通信ネットワークシステムにおける前記送信ノードのコンピュータに、入力された送信データを分割し、分割された送信データと当該分割された送信データを使用して生成されたメッセージ認証コードとの組の各々を別々に前記送信するメッセージ中のデータ部に格納する送信ステップと、前記分割された送信データを使用して、当該分割された送信データと共に前記送信するメッセージ中のデータ部に格納されるメッセージ認証コードを生成するメッセージ認証コード生成ステップと、を実行させるためのコンピュータプログラムである。
 本発明によれば、メッセージを送信する送信ノードと該メッセージを受信する受信ノードとが接続される通信ネットワークシステムにおけるメッセージ検査性能を向上させることができるという効果が得られる。
本発明の第1実施形態に係る通信ネットワークシステムを示すブロック図である。 本発明の第1実施形態に係るMCU_2(ノード)を示すブロック図である。 本発明の第1実施形態に係るデータフレームを示す構成図である。 本発明の第1実施形態に係る送信処理の手順を示す図である。 本発明の第1実施形態に係る受信処理の手順を示す図である。 本発明の第1実施形態に係る受信処理の手順を示す図である。 本発明の第2実施形態に係る通信ネットワークシステムを示すブロック図である。 本発明の第2実施形態に係るブート処理のシーケンスチャートである。 本発明の第2実施形態に係る暗号処理のシーケンスチャートである。 本発明の第2実施形態に係るMAC生成処理およびMAC検査処理を説明するためのシーケンスチャートである。 CANの標準フォーマットのデータフレームを示す構成図である。 CANの拡張フォーマットのデータフレームを示す構成図である。 本発明の一実施形態に係るメッセージ作成方法を示す説明図である。
 以下、図面を参照し、本発明の実施形態について説明する。
[第1実施形態]
 本実施形態では、本発明に係る通信ネットワークシステムの一態様として、車両に搭載される通信ネットワークシステムとしてのCANを例に挙げて説明する。図1は、本発明の第1実施形態に係る通信ネットワークシステム1を示すブロック図である。
 図1において、通信ネットワークシステム1は、複数のMCU(Micro Computing Unit)_2を有する。MCU_2は、CPU(Central Processing Unit:中央演算処理装置)及びメモリ等から構成されるものであって、コンピュータの一種である。MCU_2は、自己のCPUがコンピュータプログラムを実行することにより、該コンピュータプログラムに該当する機能を実現する。各MCU_2は、車両内の機器を制御する電子制御ユニット(ECU)として利用される。
 MCU_2はCANの通信バス3に接続されている。本実施形態では、説明の便宜上、通信ネットワークシステム1は3台のMCU_2を有するものとし、該3台のMCU_2が通信バス3に接続されている。通信バス3は、各MCU_2の間で交換されるメッセージを伝送する。各MCU_2は、通信バス3を介して、相互にメッセージを送受する。CANでは、所定のフレーム形式でメッセージの伝送が行われる。MCU_2は、CANにおけるノード(通信装置)として機能する。本実施形態では、MCU_2は、メッセージを送信する送信ノードの機能と該メッセージを受信する受信ノードの機能とを有する。図1中に示されるように、3台の各MCU_2には、CANにおける識別子(ID)として、ID1、ID2、ID3がそれぞれ付与されている。
 図2は、本発明の第1実施形態に係るMCU_2(ノード)を示すブロック図である。
 図2において、MCU_2は、送信部111と受信部112とフレーム受信処理部113とMAC(メッセージ認証コード)生成部114とカウンタ部115とMAC(メッセージ認証コード)検査部116と秘密情報記憶部117を備える。
 送信部111は、所定のフレーム形式のメッセージを通信バス3に送信する。受信部112は、該所定のフレーム形式のメッセージを通信バス3から受信する。
 図3は、本発明の第1実施形態に係るデータフレームを示す構成図である。図3のデータフレームにおいて、各フィールド中に示されるカッコ内の数字は、当該フィールドに格納される情報のビット数を示している。
 図3に示されるデータフレームの構成は、CANにおける標準フォーマットのデータフレームの構成に対して、一部変更している。本実施形態では、データフレーム中のCRCフィールド(CRC部)に格納する情報をメッセージ認証コード(MAC)に変更する。該データフレームにおいてCRC部以外の部分は、CANにおける標準フォーマットから変更なしである。以下、図3に示される本実施形態に係るデータフレームのことをCANフレームと称する。
 再び図2を参照すると、送信部111には、CANフレームに格納する送信データ等のデータが入力される。送信部111は、該入力されたデータをCANフレーム中の該当部分に格納したCANフレームを、通信バス3へ送信する。送信データは、図3中のデータフィールド(Data Field:データ部)に格納される。フレーム受信処理部113は、受信部112により通信バス3から受信されたCANフレームについての受信処理を行う。MAC生成部114は、CANフレーム中のデータ部に格納される送信データ等に基づいてMACを生成する。
 カウンタ部115は、送信カウンタ部としての機能と、受信カウンタ部としての機能とを有する。カウンタ部115は、送信カウンタ部の機能として、送信部111によるCANフレームの送信毎に所定のカウント値だけ増加させる送信カウンタ値を保持する。本実施形態では、該カウント値は1とする。したがって、カウンタ部115は、送信部111によるCANフレームの送信毎に1だけ増加させる送信カウンタ値を保持する。この送信カウンタ値は、自己のMCU_2(ノード)がCANフレームを送信する毎に1ずつ増やされる。
 カウンタ部115は、受信カウンタ部の機能として、受信部112によるCANフレームの受信毎に送信カウンタ部と同じ所定のカウント値だけ増加させる受信カウンタ値を保持する。本実施形態では、該カウント値は1となる。したがって、カウンタ部115は、受信部112によるCANフレームの受信毎に1だけ増加させる受信カウンタ値を保持する。この受信カウンタ値は、CANフレーム中のID毎に設けられる。該IDは、CANフレームを送信したMCU_2(ノード)に付与されているIDであり、図3中のIDフィールド(ID部)に格納される。
 本実施形態では、3台のMCU_2(IDがそれぞれ、ID1、ID2、ID3である)が存在するので、図2に示されるように、カウンタ部115は該3台の各MCU_2(各IDであるID1、ID2、ID3)に対応する3つのカウンタ値(ID1カウンタ値、ID2カウンタ値、ID3カウンタ値)を保持する。カウンタ部115において、自己のMCU_2のIDに対応するカウンタ値が送信カウンタ値であり、他のMCU_2のIDに対応するカウンタ値が受信カウンタ値である。例えば、ID1のMCU_2においては、ID1カウンタ値が送信カウンタ値であり、ID2カウンタ値がID2に対応する受信カウンタ値であり、ID3カウンタ値がID3に対応する受信カウンタ値である。
 MAC検査部116は、受信部112により通信バス3から受信されたCANフレームから取得されたMACについての検査を行う。秘密情報記憶部117は、各MCU_2において同じ秘密情報を記憶する。この秘密情報は、MCU_2の製造時などに、安全に、MCU_2に設定される。
 次に、本実施形態に係るMCU_2(ノード)の動作を説明する。
[送信ノードの動作]
 まず図4を参照して、MCU_2の送信ノードとしての動作を説明する。図4は、本発明の第1実施形態に係る送信処理の手順を示す図である。図4の送信処理は、送信部111から送信されるCANフレームを作成する際に開始される。
(ステップS111)MAC生成部114は、カウンタ部115から送信カウンタ値を取得する。MAC生成部114は、該取得した送信カウンタ値のビット列(ビット数がLである)から、所定の抽出ビット数分(L-nビット分)の上位ビットのみを上位抽出ビット(ビット数が「L-n」である)として取得する。
(ステップS112)MAC生成部114は、CANフレーム中のデータ部に格納される送信データと、ステップS111で取得した上位抽出ビットと、秘密情報記憶部117に記憶されている秘密情報とを使用して、MACを生成する。MACとして、例えば、ハッシュ(Hash)値を算出する。ハッシュ値の算出方法として、例えば、SHA-256が挙げられる。なお、ハッシュ値の算出方法については、例えば非特許文献3,4に記載されている。
(ステップS113)MAC生成部114は、ステップS112で生成したMACのビット列(MAC値)から、CANフレーム中のCRC部に格納するビット列(15ビット)を抽出する。この抽出されるビット列は、ステップS111で取得した送信カウンタ値のビット列(ビット数がLである)のうち上位抽出ビット以外の所定の下位ビット(ビット数がnである)の値で特定される。図4に示される例では、該下位ビット(ビット数がnである)の値は「3」である。これにより、MAC値のビット列中において、該値「3」で特定される一部分(15ビット分)を抽出する。
 本実施形態においてCANフレーム中のCRC部は15ビットであるので、該CRC部に格納する情報として、MAC値のビット列から値「3」で特定される15ビット分を抽出している。このため、MAC値のビット列に対して15ビットずつの区間を定め、どの区間の15ビットをCANフレーム中のCRC部に格納するのかを、送信カウンタ値の下位ビット(ビット数がnである)の値で特定している。なお、図4の例では、MAC値の総ビット数に応じたK個の区間(1区間は15ビット)が定められている。
 送信部111は、CANフレームに対して、送信データ(ステップS112でMAC生成に使用されたもの)をデータ部に格納し、ステップS113でMAC値のビット列中から抽出された15ビットのビット列をCRC部に格納する。送信部111は、該CANフレームを通信バス3へ送信する。カウンタ部115は、該CANフレームの送信により送信カウンタ値を1だけ増加させて保持する。
 以上が送信ノードの動作の説明である。
[受信ノードの動作]
 次に図5、図6を参照して、MCU_2の受信ノードとしての動作を説明する。図5、図6は、本発明の第1実施形態に係る受信処理の手順を示す図である。図5の受信処理は、受信部112によりCANフレームを受信した際に開始される。
(ステップS121)MAC検査部116は、受信部112により受信したCANフレーム中のID部に格納されているIDに対応する受信カウンタ値を、カウンタ部115から取得する。MAC検査部116は、該取得した受信カウンタ値のビット列(ビット数がLである)から、所定の抽出ビット数分(L-nビット分)の上位ビットのみを上位抽出ビット(ビット数が「L-n」である)として取得する。この上位抽出ビットの取得方法は、上述したMAC生成部114の処理(ステップS111)と同じである。
(ステップS122)MAC検査部116は、受信部112により受信したCANフレーム中のデータ部から取得した受信データと、ステップS121で取得した上位抽出ビットと、秘密情報記憶部117に記憶されている秘密情報とを使用して、MACを生成する。
 このMACの値(算出MAC値)は、上述したMAC生成部114と同じ算出方法(例えば、SHA-256によるハッシュ値の算出)で算出される。
(ステップS123)MAC検査部116は、ステップS122で生成したMACのビット列(算出MAC値)から、検査の対象にする検査対象ビット列(15ビット)を抽出する。この検査対象ビット列の抽出方法は、上述したMAC生成部114での、CANフレーム中のCRC部に格納するビット列(15ビット)の抽出方法(ステップS113)と同様である。つまり、該検査対象ビット列は、算出MAC値のビット列のうち、ステップS121で取得した受信カウンタ値のビット列(ビット数がLである)のうち上位抽出ビット以外の所定の下位ビット(ビット数がnである)の値で特定される一部分(15ビット分)である。図5に示される例では、該下位ビット(ビット数がnである)の値は「3」である。これにより、算出MAC値のビット列中において、該値「3」で特定される一部分(15ビット分)を抽出する。
 本実施形態では、CANフレーム中のCRC部(15ビット)に格納されている情報と、算出MAC値のビット列から抽出された検査対象ビット列(15ビット)との一致を検査する。このため、上述した送信処理と同様に、算出MAC値のビット列に対して15ビットずつの区間を定め、どの区間の15ビットを検査対象ビット列とするのかを、受信カウンタ値の下位ビット(ビット数がnである)の値で特定している。なお、図5の例では、算出MAC値の総ビット数に応じたK個の区間(1区間は15ビット)が定められている。
 MAC検査部116は、受信部112により受信したCANフレーム中のCRC部から取得したMAC値(受信MAC値(15ビット))と、算出MAC値のビット列から抽出された検査対象ビット列(15ビット)とが一致するか否かを判定する。
 該判定の結果、受信MAC値と検査対象ビット列とが一致である場合には、MAC検査部116は、フレーム受信処理部113に対して、検査合格を通知する。これにより、フレーム受信処理部113は、受信部112により受信したCANフレームに対して、正常に受信したCANフレームに対する所定の受信処理を行う。また、MAC検査部116は、カウンタ部115に対して、検査合格を通知する。これにより、カウンタ部115は、該当する受信カウンタ値を1だけ増加させて保持する。このカウント対象の受信カウンタ値は、受信部112により受信したCANフレーム中のID部に格納されているIDに対応する受信カウンタ値である。
 一方、該判定の結果、受信MAC値と検査対象ビット列とが不一致である場合には、MAC検査部116は、図6に示される再検査処理を行う。以下、図6を参照して該再検査処理を説明する。
(ステップS131)MAC検査部116は、ステップS122で生成した算出MAC値のビット列から、再検査の対象にする再検査対象ビット列(15ビット)を抽出する。この再検査対象ビット列の抽出処理は、上述した検査対象ビット列の抽出処理と同様であるが、ステップS121で取得した受信カウンタ値を増加させた値(増加受信カウンタ値)を使用する。具体的には、まず、ステップS121で取得した受信カウンタ値に1を加える。次に、算出MAC値のビット列のうち、この受信カウンタ値に1を加算した値である増加受信カウンタ値のビット列における下位ビット(ビット数がnである)の値で特定される一部分(15ビット分)を、再検査対象ビット列として抽出する。
 MAC検査部116は、該抽出した再検査対象ビット列と受信MAC値との一致を判定する。この判定の結果が不一致である場合には、現在の増加受信カウンタ値に対してさらに1を加算した値を新たな増加受信カウンタ値とする。そして、算出MAC値のビット列のうち、この新たな増加受信カウンタ値のビット列における下位ビット(ビット数がnである)の値で特定される一部分(15ビット分)を、新たな再検査対象ビット列として抽出する。次に、該抽出された新たな再検査対象ビット列と受信MAC値との一致を判定する。この再検査は、判定の結果が一致となるまで繰り返される。但し、算出MAC値のビット列の端の区間(下位ビットの値「K-1」で特定される区間)までで当該再検査は終了とする。この理由は、下位ビットの値が桁上げされて、算出MAC値の生成に使用される上位抽出ビットの値が変わるからである。
 したがって、算出MAC値のビット列のうち、下位ビットの値「K-1」で特定される区間まで検査を行っても、受信MAC値と一致とならない場合には、下位ビットの値の桁上げ後の上位抽出ビットを使用して算出MAC値を再計算し、該再計算した新たな算出MAC値を使用して、上述した再検査と同様に、受信MAC値との一致の判定を行う。
(ステップS132)MAC検査部116は、ステップS131の再検査の結果、再検査対象ビット列と受信MAC値とが一致した場合に、カウンタ部115に対して、当該再検査対象ビット列に係る下位ビットの値を通知してカウンタ同期を指示する。カウンタ部115は、該カウンタ同期の指示により、該当する受信カウンタ値の下位ビット(ビット数がnである)の値を、通知された下位ビットの値に変更する。このカウンタ同期対象の受信カウンタ値は、受信部112により受信したCANフレーム中のID部に格納されているIDに対応する受信カウンタ値である。これにより、当該IDに対応する送信ノードの送信カウンタ値と、本受信ノードの当該IDに対応する受信カウンタ値との同期が取られることになる。
 図6に示される例では、ステップS121で取得した受信カウンタ値における下位ビット(ビット数がnである)の値は「3」である。この値「3」で特定された検査対象ビット列では受信MAC値と不一致であった。このため、ステップS121で取得した受信カウンタ値に1を加算した増加受信カウンタ値のビット列における下位ビット(ビット数がnである)の値「4」で特定される部分を再検査対象ビット列として、受信MAC値との一致を判定する。図6の例では、該値「4」で特定された再検査対象ビット列でも、受信MAC値と不一致であった。このため、現在の増加受信カウンタ値に1を加算した新たな増加受信カウンタ値のビット列における下位ビット(ビット数がnである)の値「5」で特定される部分を再検査対象ビット列として、受信MAC値との一致を判定する。図6の例では、該値「5」で特定された再検査対象ビット列では、受信MAC値と一致であった。これにより、カウンタ部115において該当する受信カウンタ値の下位ビット(ビット数がnである)の値が「3」から「5」に変更される。
 MAC検査部116は、所定回数だけ再検査を繰り返しても、再検査対象ビット列と受信MAC値とが不一致である場合には、フレーム受信処理部113に対して、検査不合格を通知する。これにより、フレーム受信処理部113は、受信部112により受信したCANフレームを破棄する。これは、通信エラー、又はなりすましメッセージを発信する攻撃が発生したと考えられるからである。なお、検査不合格の場合、MAC検査部116は、カウンタ部115に対して、検査合格を通知しない。これにより、カウンタ部115は、受信部112により受信したCANフレーム中のID部に格納されているIDに対応する受信カウンタ値に対して、受信カウンタ値の増加を行わない。
 なお、受信ノードは、同一IDのCANフレームにおいて、同じMAC値を有するCANフレームを2回以上連続して受信した場合には、リプレイ攻撃が発生したと判断する。
 この場合、当該IDのCANフレームについては、受信処理を行わないようにする対処が挙げられる。
 以上が受信ノードの動作の説明である。
 本実施形態によれば、送信ノードから送信されるCANフレームには、当該CANフレームのデータ部に格納される送信データを使用して生成されたMACがCRC部に格納される。そして、受信ノードでは、受信したCANフレームのデータ部から取得した受信データを使用して生成したMACと、当該CANフレームのCRC部から取得したMACとを使用して、当該CANフレームの検査を行う。これにより、送信ノードから、送信データのCANフレームとは別にMACのCANフレームを送信する必要がないので、MACのCANフレームによりCANの通信帯域が圧迫される問題を解消できる。さらに、送信データとMACを同じCANフレームで受信できるので、検査の即時性を実現できる。
 さらに、送信ノードと受信ノードとで共通の秘密情報を使用してMACが生成されるので、該秘密情報を有さない送信ノードが生成したMACではCANフレームの検査が不合格となる。これにより、CANフレームの検査に対する信頼性が向上する。
 また、生成されたMACのビット列のうち、送信カウンタ値の下位ビットで特定される区間をCANフレームに格納することにより、送信されるCANフレーム毎に格納されているMAC値が異なる。これにより、同じCANフレームを繰り返し送信するリプレイ攻撃を容易に検出できる。また、送信ノードではCANフレーム中のデータ部の送信データを使用してMACを生成するので、受信ノードで送信データの改竄を検出できる。
 また、本実施形態では、MACの生成にはカウンタ値の上位抽出ビットを使用し、カウンタ値の上位抽出ビット以外の下位ビットによって、該MACのどの部分をCRC部に格納するのかを決める。このため、MACの再検査において、該下位ビットの桁上げが発生するまでは、MACの再計算を行う必要がなく、同じMACの中から再検査対象ビット列を変えながら再検査を繰り返し行うことができる。これにより、検査時の演算量を低減でき、検査時間の短縮に寄与できる。
 また、本実施形態によれば、CANの既存のフレーム形式に対する変更が少ないという効果も得られる。
 なお、本実施形態では、生成されたMACのうち一部分のみをCANフレーム中のCRC部に格納することから、MAC同士の衝突が発生する可能性がある。例えば、ハッシュ値の衝突は「1/2」の15乗(=1/32768)で発生する可能性がある。しかしながら、もしハッシュ値の衝突が発生しても、さらに次のハッシュ値の衝突が発生する確率はまた1/32768であるため、連続してハッシュ値の衝突が発生する確率は非常に小さくなる。例えば、同じ送信データを有する複数のCANフレーム(各CANフレームのMACは異なる)を連続して送信すれば、該複数のCANフレームのいずれかではMAC(ハッシュ値)の衝突が発生せず、正常に受信できると考えられるので、ハッシュ値の衝突による通信品質への影響は少ないと考えられる。
 また、上述した実施形態では、CANフレーム中のCRC部にMACを格納したが、データ部に格納するようにしてもよい。例えば、データ部の先頭部分又は最後方部分に格納することが挙げられる。但し、最後方部分に格納する方が、データ部の既存の使用方法に対する影響が少ないと考えられる。また、データ部のサイズは64ビットであるので、CRC部(15ビット)に比して、生成されたMACのうちCANフレームに格納する部分を多くできる。但し、生成されたMACのうちCANフレームに格納する部分を多くすると、その分だけ、送信データのサイズが小さくなるので、データ部に格納するMACのサイズは、MACの衝突による影響が許容される程度に小さく抑えることが好ましい。なお、データ部にMACを格納する場合には、CRC部にはCRCを格納することにより、CRC機能を活用できる。
[第2実施形態]
 第2実施形態は、上述した第1実施形態において、MCU_2が秘密情報を安全に保持するための構成例である。図7は、本発明の第2実施形態に係る通信ネットワークシステムを示すブロック図である。図7に示される通信ネットワークシステム1は車両に搭載される。図7に示される通信ネットワークシステム1において、CANの通信バス3には、複数のMCU_2-a,2-bが接続されている。第2実施形態においても、上述した第1実施形態と同様に、説明の便宜上、3台のMCU_2-a,2-bが通信バス3に接続されているとする。図7中に示されるように、3台の各MCU_2-a,2-bには、CANにおける識別子(ID)として、MCU_2-aにはID1が付与され、各MCU_2-bにはID2、ID3がそれぞれ付与されている。
 MCU_2-aは、通信バス3に接続されるMCU_2-bを認証する処理においてマスタとして動作する。以下、MCU_2-aのことを「マスタMCU_2-a」と称する。また、MCU_2-bのことを「エンドMCU_2-b」と称する。また、MCU_2-a,2-bを特に区別しないときは「MCU_2」と称する。
 次に、図7を参照して、マスタMCU_2-aとエンドMCU_2-bの構成を説明する。マスタMCU_2-aとエンドMCU_2-bとは同様の構成であるので、以下、MCU_2として、マスタMCU_2-aとエンドMCU_2-bの構成を説明する。
 MCU_2は、CPU_10と、フラッシュメモリ(flash memory)11と、RAM(ランダムアクセスメモリ)_12と、ブートローダ(boot loader)13と、セキュアエレメント(secure element)14を有する。セキュアエレメント14は、セキュアRAM_21と、セキュアROM(Read Only Memory:リードオンリメモリ)_22と、検証部23と、暗号処理部24を有する。
 CPU_10は、コンピュータプログラムを実行することにより、車両内の機器を制御するECUとしての機能およびCANにおけるノードとして機能を実現する。フラッシュメモリ11は、CPU_10で実行されるコンピュータプログラムと該コンピュータプログラムについての署名とを記憶する。RAM_12はデータを記憶する。RAM_12は、CPU_10がコンピュータプログラムを実行する際の実行領域となる。
 ブートローダ13は、MCU_2の電源投入によりブート処理を行う。ブートローダ13は、該ブート処理の内容を変更できないようにROM化されている。
 セキュアエレメント14は、セキュアエレメント14内部で保持されるデータに対してセキュアエレメント14外部からアクセスできない安全な要素として構成される。セキュアRAM_21は、セキュアエレメント14内部で保持されるデータの一時記憶領域である。セキュアRAM_21に対してセキュアエレメント14外部からはアクセスできないように構成される。セキュアROM_22は、セキュアエレメント14内部で使用される鍵を記憶する。セキュアROM_22に対してセキュアエレメント14外部からはアクセスできないように構成される。セキュアROM_22には、MCU_2の製造時などに、予め安全に鍵が書き込まれる。
 検証部23は、ブートローダ13によるブート処理におけるプログラム正当性検証処理を、セキュアROM_22に保持される署名検証鍵を使用して行う。検証部23は、該プログラム正当性検証処理において、セキュアRAM_21を一時記憶領域として使用する。
 暗号処理部24は、自己のMCU_2と他のMCU_2との間で交換される情報についての暗号処理を、セキュアROM_22に保持される暗号鍵を使用して行う。該暗号処理は、暗号化処理または復号化処理である。暗号処理部24は、該暗号処理において、セキュアRAM_21を一時記憶領域として使用する。
 次に、図8を参照して、本実施形態に係るブート処理を説明する。図8は、本実施形態に係るブート処理のシーケンスチャートである。MCU_2の電源投入により図8の処理が開始される。
(ステップS1)ブートローダ13が、フラッシュメモリ11からコンピュータプログラムと署名とを読み込む。次いで、ブートローダ13が、該読み込んだコンピュータプログラムのハッシュ(hash)値を算出する。
(ステップS2)ブートローダ13が、該算出したハッシュ値と、フラッシュメモリ11から読み込んだ署名とをセキュアエレメント14へ送信する。
(ステップS3)セキュアエレメント14において検証部23が、セキュアROM_22に保持される署名検証鍵を使用して、ブートローダ13から受信した署名に含まれる値とブートローダ13から受信したハッシュ値との一致を検証する。この検証処理では、セキュアRAM_21が、検証処理におけるデータの一時記憶領域として使用される。該検証が成功した場合には、セキュアエレメント14はブートローダ13へ検証成功を通知する。
(ステップS4)ブートローダ13は、セキュアエレメント14から検証成功の通知を受信した場合に、ステップS1でフラッシュメモリ11から読み込んだコンピュータプログラムをRAM_12へロードする。これにより、CPU_10はRAM_12にロードされたコンピュータプログラムを実行することができる。
 一方、ブートローダ13は、セキュアエレメント14からの検証成功の通知がない場合には(例えば、ステップS2の送信後から所定時間が経過してもセキュアエレメント14から検証成功の通知を受信しなかったり、セキュアエレメント14から検証失敗の通知を受信したりした場合)、ステップS1でフラッシュメモリ11から読み込んだコンピュータプログラムをRAM_12へロードしない。この場合、ブートローダ13がMCU_2の起動を停止する。
 上述した本実施形態に係るブート処理によれば、セキュアエレメント14による署名検証によって、CPU_10で実行されるコンピュータプログラムの正当性検証が安全に行われる。これにより、CPU_10の実行領域であるRAM_12には正しいコンピュータプログラムがロードされ、該RAM_12にロードされたコンピュータプログラムをCPU_10が実行することにより、MCU_2が正常に起動する。よって、本実施形態に係る通信ネットワークシステム1では、MCU_2の個々において、MCU_2の起動時に当該MCU_2のコンピュータプログラム(例えば、オペレーティングシステム(Operating System:OS)など)の正当性を検証するセキュアブート(Secure Boot)が実現される。なお、セキュアブートについては、例えば非特許文献5に記載されている。
 次に、図9を参照して、本実施形態に係る暗号処理を説明する。図9は、本実施形態に係る暗号処理のシーケンスチャートである。所定の契機により図9の処理が開始される。
 ここでは、秘密の情報である乱数を、マスタMCU_2-aからエンドMCU_2-bへ安全に通知する場面を例に挙げて説明する。なお、マスタMCU_2-aとエンドMCU_2-bとの間のデータの送受は通信バス3を介して行われる。
(ステップS11)マスタMCU_2-aが、自己のRAM_12に保持される初期乱数をチャレンジとしてエンドMCU_2-bへ送信する。また、マスタMCU_2-aは、該エンドMCU_2-bへチャレンジとして送信した初期乱数を、自己のセキュアエレメント14へ渡す。
(ステップS12)エンドMCU_2-bは、マスタMCU_2-aから受信したチャレンジである初期乱数を、自己のセキュアエレメント14に渡す。エンドMCU_2-bの暗号処理部24は、渡された初期乱数を、自己のセキュアROM_22に保持される秘密鍵Ksを使用して暗号化する。この暗号化処理では、エンドMCU_2-bのセキュアRAM_21が、暗号化処理におけるデータの一時記憶領域として使用される。次いで、エンドMCU_2-bは、暗号化された初期乱数である暗号化データKs(初期乱数)をレスポンスとしてマスタMCU_2-aへ送信する。
(ステップS13)マスタMCU_2-aは、エンドMCU_2-bから受信したレスポンスである暗号化データKs(初期乱数)を、自己のセキュアエレメント14に渡す。マスタMCU_2-aの暗号処理部24は、渡された暗号化データKs(初期乱数)を、自己のセキュアROM_22に保持される該当エンドMCU_2-bの公開鍵Kpを使用して復号化する。次いで、マスタMCU_2-aの暗号処理部24は、該復号化により得られた復号化データと、ステップS11でチャレンジとしてエンドMCU_2-bへ送信された初期乱数との一致を検証する。それら復号化処理および検証処理では、マスタMCU_2-aのセキュアRAM_21が、復号化処理および検証処理におけるデータの一時記憶領域として使用される。該検証の成功により、当該エンドMCU_2-bの認証が成功したと判断できる。
 該検証が成功した場合には、マスタMCU_2-aの暗号処理部24は、秘密の情報である乱数を生成し、生成した乱数を、自己のセキュアROM_22に保持される該当エンドMCU_2-bの公開鍵Kpを使用して暗号化する。それら乱数生成処理および暗号化処理では、マスタMCU_2-aのセキュアRAM_21が、乱数生成処理および暗号化処理におけるデータの一時記憶領域として使用される。次いで、マスタMCU_2-aは、暗号化された秘密の情報(乱数)である暗号化データKp(乱数)をエンドMCU_2-bへ送信する。
 エンドMCU_2-bは、マスタMCU_2-aから受信した暗号化データKp(乱数)を、自己のセキュアエレメント14に渡す。エンドMCU_2-bの暗号処理部24は、渡された暗号化データKp(乱数)を、自己のセキュアROM_22に保持される秘密鍵Ksを使用して復号化する。この復号化処理では、エンドMCU_2-bのセキュアRAM_21が、復号化処理におけるデータの一時記憶領域として使用される。該復号化処理によって暗号化データKp(乱数)から、秘密の情報である乱数が取得される。該取得された乱数は、エンドMCU_2-bのセキュアRAM_21で安全に保持される。
 上述した本実施形態に係る暗号処理によれば、セキュアエレメント14による暗号処理によって、MCU_2間(上述した例ではマスタMCU_2-aとエンドMCU_2-bの間)で交換される情報の暗号処理(暗号化処理、復号化処理)が安全に行われる。これにより、MCU_2間で交換される情報の安全性が保たれる。
 さらに、当該暗号処理に基づいたチャレンジ・レスポンスによって、マスタMCU_2-aがエンドMCU_2-bの確かな認証を行うことができる。そして、マスタMCU_2-aから認証済みのエンドMCU_2-bに対して、当該暗号処理に基づいて秘密の情報を安全に送信することができる。この秘密の情報は、上述した第1実施形態における秘密情報として利用できる。上述した例では、マスタMCU_2-aからエンドMCU_2-bに対して、安全に、秘密の情報である乱数が伝達される。
 次に、図10を参照して、本実施形態に係るMAC生成処理およびMAC検査処理を説明する。図10は、本実施形態に係るMAC生成処理およびMAC検査処理を説明するためのシーケンスチャートである。
 上述した図9に係る暗号処理によって、マスタMCU_2-aから認証済みのエンドMCU_2-bに対して、秘密の情報である乱数が安全に送信されている。マスタMCU_2-a及びエンドMCU_2-bは、該秘密の情報である乱数をセキュアRAM_21に格納する。このセキュアRAM_21は、上述した第1実施形態における秘密情報記憶部117として、該乱数(秘密情報)を安全に保持する。
 図10において、送信側MCU_2は送信ノードとして動作する。送信側MCU_2はマスタMCU_2-aであってもよく、又は、エンドMCU_2-bであってもよい。受信側MCU_2は受信ノードとして動作する。受信側MCU_2はマスタMCU_2-aであってもよく、又は、エンドMCU_2-bであってもよい。送信側MCU_2は、RAM_12に送信カウンタ値および送信データを保持している。受信側MCU_2は、RAM_12に受信カウンタ値を保持している。図10の処理は、送信側MCU_2から送信されるCANフレームを作成する際に開始される。
(ステップS21)送信側MCU_2は、RAM_12からセキュアRAM_21へ、送信データおよび送信カウンタ値を渡す。送信側MCU_2のセキュアエレメント14は、セキュアRAM_21に保持される、乱数(秘密情報)と送信データと送信カウンタ値を使用して、MACの生成を行う。このMACの生成方法は、上述した第1実施形態と同様である。但し、該MACの生成は、セキュアRAM_21において安全に行われる。このMACの生成の結果としてMAC値のビット列中から抽出された15ビットのビット列(CRC部用抽出MACビット列)は、セキュアRAM_21からRAM_12へ渡される。
(ステップS22)送信側MCU_2は、CANフレームに対して、ステップS21でRAM_12からセキュアRAM_21へ渡した送信データをデータ部に格納し、ステップS21でセキュアRAM_21からRAM_12へ渡されたCRC部用抽出MACビット列をCRC部に格納する。送信側MCU_2は、該CANフレームを通信バス3へ送信する。このCANフレームは、通信バス3を介して受信側MCU_2で受信される。
(ステップS23)受信側MCU_2は、通信バス3から受信したCANフレームをRAM_12に保持する。受信側MCU_2は、RAM_12に保持されるCANフレーム中のデータ部から取得した受信データとCRC部から取得した受信MAC値とをセキュアRAM_21へ渡す。さらに、受信側MCU_2は、RAM_12に保持されるCANフレーム中のID部に格納されているIDに対応する受信カウンタ値を、RAM_12からセキュアRAM_21へ渡す。
 次いで、受信側MCU_2のセキュアエレメント14は、セキュアRAM_21に保持される、乱数(秘密情報)と受信データと受信カウンタ値を使用して、MACの生成を行う。このMACの生成方法は、上述した第1実施形態と同様である。但し、該MACの生成は、セキュアRAM_21において安全に行われる。このMACの生成の結果として算出MAC値のビット列中から15ビットの検査対象ビット列が抽出される。次いで、受信側MCU_2のセキュアエレメント14は、セキュアRAM_21に保持される受信MAC値と検査対象ビット列との一致を判定する。この判定の結果が不一致である場合には、上述した第1実施形態と同様に再検査が行われる。
 上述したように本実施形態によれば、セキュアRAM_21に安全に保持される乱数(秘密情報)を使用してMACの生成および検査が行われる。これにより、CANフレームの検査に対する信頼性が向上する。
 以上、本発明の実施形態について図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、本発明の要旨を逸脱しない範囲の設計変更等も含まれる。
 例えば、上述した実施形態では、1台のMCU_2が送信ノードの機能と受信ノードの機能とを有したが、1台のMCU_2が送信ノードの機能のみを有してもよく、又は、1台のMCU_2が受信ノードの機能のみを有してもよい。
 また、一つのMCU_2が一つの半導体装置として構成されてもよい。一つのMCU_2が一つの半導体集積回路としてワンチップ化されることにより、安全性がさらに向上する。
 また、セキュアエレメントとして、例えば、無線通信に使用されるeSIM(Embedded Subscriber Identity Module)又はSIM(Subscriber Identity Module)を使用してもよい。eSIMおよびSIMは、コンピュータの一種であり、コンピュータプログラムによって所望の機能を実現する。又は、セキュアエレメントとして、耐タンパー性(Tamper Resistant)のある暗号処理チップを使用してもよい。耐タンパー性のある暗号処理チップとして、例えば、TPM(Trusted Platform Module)と呼ばれる暗号処理チップが知られている。TPMについては、例えば非特許文献6に記載されている。
 また、上述した実施形態は、車両として、例えば、自動車、原動機付自転車、鉄道車両等に適用可能である。
 また、上述した実施形態では、本発明に係る通信ネットワークシステムの一態様として、車両に搭載される通信ネットワークシステムを例に挙げて説明したが、本発明に係る通信ネットワークシステムは様々な分野に適用可能である。例えば、家電製品を制御するコンピュータとしてMCU_2を適用し、宅内の各家電製品のMCU_2を宅内ネットワークで接続するように構成してもよい。また、スマートメーターとしてMCU_2を適用し、各スマートメーターのMCU_2を通信ネットワークで接続するように構成してもよい。
[メッセージ作成方法の実施形態]
 本発明の一実施形態に係るメッセージ作成方法を説明する。本実施形態では、メッセージの例として、CANのデータフレームを挙げて説明する。図11はCANの標準フォーマットのデータフレームを示す構成図である。図12はCANの拡張フォーマットのデータフレームを示す構成図である。CANのデータフレームについては、例えば非特許文献7に記載される。図11及び図12のデータフレームにおいて、各フィールド中に示されるカッコ内の数字は、当該フィールドに格納される情報のビット数を示している。
 本実施形態では、データフレーム中のデータ部(Data Field:データフィールド)に、MACを格納する。図11の標準フォーマット及び図12の拡張フォーマットにおいて、データ部には最大8バイトのデータを格納できる。MACは、データ部内の所定の場所に格納される。例えば、データ部の先頭部分又は最後方部分に格納することが挙げられる。
 但し、最後方部分に格納する方が、データ部の既存の使用方法に対する影響が少ないと考えられる。
 次に図13を参照して、本実施形態に係るデータフレーム作成方法を説明する。図13は、本発明の一実施形態に係るメッセージ作成方法を示す説明図である。図13では、データ部に格納するMACのデータ長の例として4バイトとする。したがって、データ部に格納できる送信データのデータ長は最大4バイトである。このため、送信データのデータ長が4バイト超である場合には、送信データを分割し、分割された送信データ毎にMACを生成し、分割された送信データとMACとの組の各々を別々にデータフレームのデータ部に格納する。
 ここでは、図13に示されるように、送信データは8バイトであるとする。送信データは図2に示される送信部111とMAC生成部114との両方に入力される。送信データが送信部111及びMAC生成部114に入力されると、図13の処理が開始される。
(ステップS201)送信部111は、入力された8バイトの送信データを、4バイトずつの第1送信データと第2送信データとに分割する。例えば、入力された8バイトの送信データのうち、上位4バイトを第1送信データとし、下位4バイトを第2送信データとする。MAC生成部114は、送信部111と同じ方法で、入力された8バイトの送信データを、4バイトずつの第1送信データと第2送信データとに分割する。
(ステップS202)MAC生成部114は、4バイトの第1送信データを使用して、4バイトの第1MACを生成する。この第1MACの生成方法は、上述した図4に示される第1実施形態のMAC生成方法と同じである。但し、図4のステップS112においてMACの計算に使用される送信データは第1送信データである。また、図4のステップS113において、ステップS112で第1送信データを使用して算出されたMACのビット列から抽出されるビット列(抽出値)は4バイトである。この4バイトの抽出値が第1MACである。
(ステップS203)送信部111は、第1データフレームのデータ部に、第1送信データと第1MACとを格納する。送信部111は、第1データフレームを通信バス3へ送信する。カウンタ部115は、該第1データフレームの送信により送信カウンタ値を1だけ増加させて保持する。
(ステップS204)MAC生成部114は、4バイトの第2送信データを使用して、4バイトの第2MACを生成する。この第2MACの生成方法は、上述した図4に示される第1実施形態のMAC生成方法と同じである。但し、図4のステップS112においてMACの計算に使用される送信データと上位抽出ビットとに関して、送信データは第2送信データであり、上位抽出ビットの取得元の送信カウンタ値は上記ステップS203の第1データフレームの送信により1だけ増加された送信カウンタ値である。また、図4のステップS113において、ステップS112で第2送信データを使用して算出されたMACのビット列から抽出されるビット列(抽出値)は4バイトである。この4バイトの抽出値が第2MACである。
(ステップS205)送信部111は、第2データフレームのデータ部に、第2送信データと第2MACとを格納する。送信部111は、第2データフレームを通信バス3へ送信する。カウンタ部115は、該第2データフレームの送信により送信カウンタ値を1だけ増加させて保持する。
 上述したデータフレーム作成方法によれば、MACのデータ長を所定の長さ(例えば4バイト)に保ちつつ、データフレームのデータ部に送信データとMACとを格納することができる。これにより、メッセージを送信する送信ノードと該メッセージを受信する受信ノードが接続される通信ネットワークシステムにおけるメッセージ検査性能を向上させることができるという効果が得られる。
 なお、入力された一の送信データから分割された第1送信データと第2送信データとの各々が別々に格納された第1データフレームと第2データフレームとに同じラベルを付けることにより、受信ノードに対して、同じラベルが付された第1データフレームと第2データフレームとの各データ部内の送信データから一の送信データが構成されることを通知してもよい。
 また、上述したデータフレーム作成方法では、送信部111とMAC生成部114との両方が各々、入力された送信データを第1送信データと第2送信データとに分割したが、送信部111が、入力された送信データを第1送信データと第2送信データとに分割し、第1送信データと第2送信データとをMAC生成部114へ供給してもよい。
 また、上述したデータフレーム作成方法では、データフレームに格納するMACの生成方法として、上述した図4に示される第1実施形態のMAC生成方法を使用したがこれに限定されず、他のMAC生成方法を使用してもよい。例えば、非特許文献8に記載されるMAC生成方法を使用してもよい。
 また、データフレームに格納するMACのデータ長は、送信ノードと受信ノードとの組毎に決めてもよい。この場合、送信ノードと受信ノードとの組毎に、データフレームに格納するMACのデータ長が設定される。
 例えば、図1に示される通信ネットワークシステム1が自動車に搭載され、MCU_2が自動車内の機器を制御する電子制御ユニット(ECU)として利用されるとする。自動車内の機器を制御するための情報はデータフレームを使用してECU(MCU_2)間で送受される。該情報の送受のECU(MCU_2)の組毎に、データフレームに格納するMACのデータ長を決める。例えば、ECU(MCU_2)が有する制御機能の重要度に応じて、当該ECU(MCU_2)と通信相手のECU(MCU_2)との間で交換するデータフレームに格納するMACのデータ長を決める。例えば、該重要度が高いほどにMACのデータ長を長くする。なお、ECU(MCU_2)が有する制御機能の重要度が低い場合、当該ECU(MCU_2)と通信相手のECU(MCU_2)との間で交換するデータフレームにはMACを格納しないようにしてもよい。
 又は、ECU(MCU_2)の組毎に、データフレームを使用して送受する送信データの最大データ長に応じて、データフレームに格納するMACのデータ長を決めてもよい。
 例えば、最大データ長の送信データをデータ部に格納した場合のデータ部の空きサイズの範囲内で、データフレームに格納するMACのデータ長を決める。この場合、データ部には最大データ長の送信データとMACとが格納できるので、送信データを分割して別々のデータフレームで送信する必要がない。
[MACの例]
 MACとして、例えば、ハッシュ(Hash)値を算出することが挙げられる。ハッシュ値の算出方法として、例えば、SHA-256が挙げられる。又は、MACとして、例えば、CodeMAC(CMAC)を算出することが挙げられる。CMACは共通鍵暗号ベースのMACである。
 また、上述したMCU_2の機能を実現するためのコンピュータプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータに読み込ませ、実行するようにしてもよい。
 また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、フラッシュメモリ等の書き込み可能な不揮発性メモリ、DVD(Digital Versatile Disk)等の可搬媒体、コンピュータに内蔵されるハードディスク等の記憶装置のことをいう。
 さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムが送信された場合のサーバやクライアントとなるコンピュータ内部の揮発性メモリ(例えばDRAM(Dynamic Random Access Memory))のように、一定時間プログラムを保持しているものも含むものとする。
 また、上記プログラムは、このプログラムを記憶装置等に格納したコンピュータから、伝送媒体を介して、あるいは、伝送媒体中の伝送波により他のコンピュータに伝送されてもよい。ここで、プログラムを伝送する「伝送媒体」は、インターネット等のネットワーク(通信網)や電話回線等の通信回線(通信線)のように情報を伝送する機能を有する媒体のことをいう。
 また、上記プログラムは、前述した機能の一部を実現するためのものであっても良い。
 さらに、上記プログラムは、前述した機能をコンピュータにすでに記録されているプログラムとの組み合わせで実現できるもの、いわゆる差分ファイル(差分プログラム)であっても良い。
1…通信ネットワークシステム
2,2-a,2-b…MCU
3…通信バス
10…CPU
11…フラッシュメモリ
12…RAM
13…ブートローダ
14…セキュアエレメント
21…セキュアRAM
22…セキュアROM
23…検証部
24…暗号処理部
111…送信部
112…受信部
113…フレーム受信処理部
114…MAC(メッセージ認証コード)生成部
115…カウンタ部
116…MAC(メッセージ認証コード)検査部
117…秘密情報記憶部

Claims (15)

  1.  メッセージを送信する送信ノードと前記メッセージを受信する受信ノードとが接続される通信ネットワークシステムにおける前記送信ノードであり、
     入力された送信データを分割し、分割された送信データと前記分割された送信データを使用して生成されたメッセージ認証コードとの組の各々を別々に前記送信するメッセージ中のデータ部に格納する送信部と、
     前記分割された送信データを使用して、前記分割された送信データと共に前記送信するメッセージ中のデータ部に格納されるメッセージ認証コードを生成するメッセージ認証コード生成部と、
     を備えた送信ノード。
  2.  前記メッセージの送信毎に所定のカウント値だけ増加させる送信カウンタ値を保持する送信カウンタ部をさらに備え、
     前記メッセージ認証コード生成部は、
     前記分割された送信データと前記保持されている送信カウンタ値とを使用して、前記分割された送信データと共に前記送信するメッセージ中のデータ部に格納されるメッセージ認証コードを生成するものであって、
     前記入力された送信データが分割された送信データである第1送信データと第2送信データとのうち、前記第1送信データが格納されたメッセージの送信により前記所定のカウント値だけ増加された送信カウンタ値を前記第2送信データと共に前記送信するメッセージ中のデータ部に格納されるメッセージ認証コードの生成に使用する、
     請求項1に記載の送信ノード。
  3.  前記メッセージ認証コード生成部は、前記送信カウンタ値のビット列のうち所定の抽出ビット数分の上位抽出ビットのみを前記メッセージ認証コードの生成に使用し、
     前記送信部は、前記送信するメッセージに対して、前記生成されたメッセージ認証コードのビット列うち、前記送信カウンタ値のビット列のうち前記上位抽出ビット以外の所定の下位ビットの値で特定される一部分のビット列のみを格納する、
     請求項2に記載の送信ノード。
  4.  前記受信ノードで保持される秘密情報と同じ秘密情報を記憶する秘密情報記憶部をさらに備え、
     前記メッセージ認証コード生成部は、前記秘密情報を前記メッセージ認証コードの生成に使用する、
     請求項1から3のいずれか1項に記載の送信ノード。
  5.  メッセージを送信する送信ノードと前記メッセージを受信する受信ノードとが接続される通信ネットワークシステムにおける前記受信ノードであり、
     前記メッセージの受信毎に前記送信ノードで使用されるカウント値と同じ所定のカウント値だけ増加させる受信カウンタ値を保持する受信カウンタ部と、
     前記受信したメッセージ中のデータ部から取得した受信データと前記保持されている受信カウンタ値とを使用してメッセージ認証コードを生成し、前記生成したメッセージ認証コードと前記受信したメッセージから取得したメッセージ認証コードとが一致するかを検査するメッセージ認証コード検査部と、
     を備えた受信ノード。
  6.  前記メッセージ認証コード検査部は、前記受信カウンタ値のビット列のうち所定の抽出ビット数分の上位抽出ビットのみを前記メッセージ認証コードの生成に使用し、前記生成したメッセージ認証コードのうち、前記受信カウンタ値のビット列のうち前記上位抽出ビット以外の所定の下位ビットの値で特定される一部分のビット列のみを、前記受信したメッセージから取得したメッセージ認証コードとの一致の検査の対象にする、
     請求項5に記載の受信ノード。
  7.  前記メッセージ認証コード検査部は、前記検査の結果が不一致である場合に、前記生成したメッセージ認証コードのうち、前記受信カウンタ値に前記カウント値だけ増加させた値における前記下位ビットの値で特定される一部分のビット列のみを前記一致の再検査の対象にする、
     請求項6に記載の受信ノード。
  8.  前記受信カウンタ部は、前記再検査の結果が一致である前記下位ビットの値を、自己が保持する受信カウンタ値の前記下位ビットの値にする、
     請求項7に記載の受信ノード。
  9.  前記送信ノードで保持される秘密情報と同じ秘密情報を記憶する秘密情報記憶部をさらに備え、
     前記メッセージ認証コード検査部は、前記秘密情報を前記メッセージ認証コードの生成に使用する、
     請求項5から8のいずれか1項に記載の受信ノード。
  10.  請求項1に記載の送信ノードと、
     前記送信ノードから受信したメッセージ中のデータ部から取得した受信データとメッセージ認証コードとを使用してメッセージ認証コードを検査するメッセージ認証コード検査部を備えた受信ノードと、
     を有する通信ネットワークシステム。
  11.  請求項2に記載の送信ノードと、請求項5に記載の受信ノードと、を有する通信ネットワークシステム。
  12.  請求項3に記載の送信ノードと、請求項6から8のいずれか1項に記載の受信ノードと、を有する通信ネットワークシステム。
  13.  前記送信ノードと前記受信ノードとが同じ秘密情報を有し、前記送信ノードと前記受信ノードとが前記秘密情報をメッセージ認証コードの生成に使用する、
     請求項10から12のいずれか1項に記載の通信ネットワークシステム。
  14.  メッセージを送信する送信ノードと前記メッセージを受信する受信ノードとが接続される通信ネットワークシステムにおける前記送信ノードのメッセージ作成方法であり、
     前記送信ノードが、入力された送信データを分割し、分割された送信データと前記分割された送信データを使用して生成されたメッセージ認証コードとの組の各々を別々に前記送信するメッセージ中のデータ部に格納する送信ステップと、
     前記送信ノードが、前記分割された送信データを使用して、前記分割された送信データと共に前記送信するメッセージ中のデータ部に格納されるメッセージ認証コードを生成するメッセージ認証コード生成ステップと、
     を含むメッセージ作成方法。
  15.  メッセージを送信する送信ノードと前記メッセージを受信する受信ノードとが接続される通信ネットワークシステムにおける前記送信ノードのコンピュータに、
     入力された送信データを分割し、分割された送信データと前記分割された送信データを使用して生成されたメッセージ認証コードとの組の各々を別々に前記送信するメッセージ中のデータ部に格納する送信ステップと、
     前記分割された送信データを使用して、前記分割された送信データと共に前記送信するメッセージ中のデータ部に格納されるメッセージ認証コードを生成するメッセージ認証コード生成ステップと、
     を実行させるためのコンピュータプログラム。
PCT/JP2015/066378 2014-06-05 2015-06-05 送信ノード、受信ノード、通信ネットワークシステム、メッセージ作成方法およびコンピュータプログラム WO2015186829A1 (ja)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
JP2014116917 2014-06-05
JP2014-116917 2014-06-05
JP2015033103A JP6190404B2 (ja) 2014-06-05 2015-02-23 受信ノード、メッセージ受信方法およびコンピュータプログラム
JP2015-033103 2015-02-23

Publications (1)

Publication Number Publication Date
WO2015186829A1 true WO2015186829A1 (ja) 2015-12-10

Family

ID=54766895

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2015/066378 WO2015186829A1 (ja) 2014-06-05 2015-06-05 送信ノード、受信ノード、通信ネットワークシステム、メッセージ作成方法およびコンピュータプログラム

Country Status (2)

Country Link
JP (1) JP6190404B2 (ja)
WO (1) WO2015186829A1 (ja)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018029905A1 (ja) * 2016-08-10 2018-02-15 Kddi株式会社 データ提供システム、データ保安装置、データ提供方法、及びコンピュータプログラム
JP2019126007A (ja) * 2018-01-19 2019-07-25 東芝デジタルソリューションズ株式会社 電子機器、メッセージ送信方法およびプログラム
CN111052670A (zh) * 2017-09-01 2020-04-21 三菱电机株式会社 加密装置、解密装置、加密方法、解密方法、加密程序和解密程序
CN113474230A (zh) * 2019-02-25 2021-10-01 罗伯特·博世有限公司 安全系统和用于运行安全系统的方法
CN113519142A (zh) * 2019-03-01 2021-10-19 三菱电机株式会社 从站装置及从站程序
US20220350929A1 (en) * 2021-04-29 2022-11-03 Infineon Technologies Ag System for an improved safety and security check

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6199335B2 (ja) * 2014-06-05 2017-09-20 Kddi株式会社 通信ネットワークシステム及びメッセージ検査方法
JP6921034B2 (ja) * 2018-05-22 2021-08-18 日立Astemo株式会社 車載ネットワークへの不正メッセージ注入防止技術
DE102019117229A1 (de) * 2019-06-26 2020-12-31 Infineon Technologies Ag Kommunikationsvorrichtung und -verfahren zum authentifizieren einer nachricht

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005167942A (ja) * 2003-12-05 2005-06-23 Denso Corp 通信システム及びパケット構造
JP2007288514A (ja) * 2006-04-17 2007-11-01 Renesas Technology Corp メッセージ認証子生成装置、メッセージ認証子検証装置、及びメッセージ認証システム
WO2009137621A1 (en) * 2008-05-09 2009-11-12 Qualcomm Incorporated Network helper for authentication between a token and verifiers
JP2010011400A (ja) * 2008-06-30 2010-01-14 National Institute Of Advanced Industrial & Technology 共通鍵方式の暗号通信システム
WO2013128317A1 (en) * 2012-03-01 2013-09-06 Nds Limited Anti-replay counter measures

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6199335B2 (ja) * 2014-06-05 2017-09-20 Kddi株式会社 通信ネットワークシステム及びメッセージ検査方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005167942A (ja) * 2003-12-05 2005-06-23 Denso Corp 通信システム及びパケット構造
JP2007288514A (ja) * 2006-04-17 2007-11-01 Renesas Technology Corp メッセージ認証子生成装置、メッセージ認証子検証装置、及びメッセージ認証システム
WO2009137621A1 (en) * 2008-05-09 2009-11-12 Qualcomm Incorporated Network helper for authentication between a token and verifiers
JP2010011400A (ja) * 2008-06-30 2010-01-14 National Institute Of Advanced Industrial & Technology 共通鍵方式の暗号通信システム
WO2013128317A1 (en) * 2012-03-01 2013-09-06 Nds Limited Anti-replay counter measures

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
LIN, C.-W. ET AL.: "Cyber-Security for the Controller Area Network (CAN) Communication Protocol", 2012 INTERNATIONAL CONFERENCE ON CYBER SECURITY, 2012, pages 1 - 7, XP032429508 *
NILSSON, D.K. ET AL.: "Efficient In-Vehicle Delayed Data Authentication Based on Compound Message Authentication Codes", IEEE 68TH VEHICULAR TECHNOLOGY CONFERENCE, vol. 2008, 2008, pages 1 - 5, XP055234774 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018029905A1 (ja) * 2016-08-10 2018-02-15 Kddi株式会社 データ提供システム、データ保安装置、データ提供方法、及びコンピュータプログラム
US11212109B2 (en) 2016-08-10 2021-12-28 Kddi Corporation Data provision system, data security device, data provision method, and computer program
CN111052670A (zh) * 2017-09-01 2020-04-21 三菱电机株式会社 加密装置、解密装置、加密方法、解密方法、加密程序和解密程序
CN111052670B (zh) * 2017-09-01 2024-02-09 三菱电机株式会社 加密装置、解密装置、加密方法、解密方法和计算机能读取的存储介质
JP2019126007A (ja) * 2018-01-19 2019-07-25 東芝デジタルソリューションズ株式会社 電子機器、メッセージ送信方法およびプログラム
CN113474230A (zh) * 2019-02-25 2021-10-01 罗伯特·博世有限公司 安全系统和用于运行安全系统的方法
CN113519142A (zh) * 2019-03-01 2021-10-19 三菱电机株式会社 从站装置及从站程序
US20220350929A1 (en) * 2021-04-29 2022-11-03 Infineon Technologies Ag System for an improved safety and security check
US11861046B2 (en) * 2021-04-29 2024-01-02 Infineon Technologies Ag System for an improved safety and security check

Also Published As

Publication number Publication date
JP2016012912A (ja) 2016-01-21
JP6190404B2 (ja) 2017-08-30

Similar Documents

Publication Publication Date Title
JP6199335B2 (ja) 通信ネットワークシステム及びメッセージ検査方法
JP6190404B2 (ja) 受信ノード、メッセージ受信方法およびコンピュータプログラム
CN110493197B (zh) 一种登录处理方法及相关设备
CN103246842B (zh) 用于验证和数据加密的方法和设备
US9838870B2 (en) Apparatus and method for authenticating network devices
EP2506488B1 (en) Secure dynamic on-chip key programming
US11283626B2 (en) Apparatus and methods for distributed certificate enrollment
EP3832980B1 (en) Method for data transmission, battery management system, and storage medium
WO2016019790A1 (zh) 一种安装包的校验方法、客户端、服务器及系统
JP5827692B2 (ja) バインドされたデータカード及び移動ホストの認証方法、装置及びシステム
CN103546289A (zh) 一种基于USBKey的安全传输数据的方法及系统
US20180204004A1 (en) Authentication method and apparatus for reinforced software
JP2016152623A (ja) 操作から保護する方法
CN104836784A (zh) 一种信息处理方法、客户端和服务器
JP6408536B2 (ja) 通信システム、通信装置、サーバ装置、通信方法、及びコンピュータプログラム
JP6188633B2 (ja) コンピュータシステム、コンピュータ、半導体装置、情報処理方法およびコンピュータプログラム
CN105871858A (zh) 一种保证数据安全的方法及系统
JP6454917B2 (ja) 通信ネットワークシステム及びメッセージ検査方法
CN108242997B (zh) 安全通信的方法与设备
CN114329522A (zh) 一种私钥保护方法、装置、系统及存储介质
KR101224956B1 (ko) 데이터 자동 암복호화 방법 및 장치
JP6188673B2 (ja) 受信ノード、メッセージ検査方法、及びコンピュータプログラム
CN113872769B (zh) 基于puf的设备认证方法、装置、计算机设备及存储介质
CN116566744B (zh) 数据处理方法和安全校验系统
KR20180069425A (ko) 세션키를 이용한 생체 인증 방법 및 이를 실행하는 사용자 단말과 검증 서버

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: 15802828

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15802828

Country of ref document: EP

Kind code of ref document: A1