This application claims priority to Japanese Patent Application No. 2023-040826 filed on Mar. 15, 2023 incorporated herein by reference in its entirety.
The present disclosure relates to a distribution server that distributes update data of software for an in-vehicle device.
Japanese Unexamined Patent Application Publication No. 2004-326689 (JP 2004-326689 A) describes a system in which update data of software for an in-vehicle device is distributed via a wireless communication network.
In order to prevent eavesdropping and tampering, it is necessary to encrypt and distribute the update data. In a common key encryption method by using the same encryption key for encryption and decryption of the update data, in order to ensure secrecy of the update data, a communication path with a possibility of eavesdropping cannot be used for sharing the encryption key. In contrast, when the distribution server and a vehicle share the encryption key by a session key method, data to be distributed may be different for each vehicle.
According to an aspect of the present disclosure, a distribution server distributes update data of software for an in-vehicle device to vehicles via a wireless communication network. The distribution server includes a processor. The processor is configured to distribute the update data encrypted with a common key to the vehicles. The processor is configured to transmit the common key encrypted by a session key method to each of the vehicles.
The distribution server has an effect that the distribution of the update data of the software for the in-vehicle device to the vehicles can be executed securely and easily.
Features, advantages, and technical and industrial significance of exemplary embodiments of the present disclosure will be described below with reference to the accompanying drawings, in which like signs denote like elements, and wherein:
Hereinafter, a first embodiment of a distribution server will be described in detail with reference to
The vehicle 10 to which the distribution server 20 distributes the update data includes an over-the-air (OTA) master 11 that manages update of the software for the in-vehicle device 16. The OTA master 11 is configured as an electronic control unit including a processor 12, a storage unit 13, and a communication module 14. The processor 12 is a processing circuit that executes a program, thereby performing processing for managing software update. The storage unit 13 is a storage that stores a program and data for managing the software update. The communication module 14 is a device for performing communication with outside of the vehicle via a mobile communication network and the like. The OTA master 11 is connected to the in-vehicle device 16 of which software is to be updated via an in-vehicle network 15. Examples of the in-vehicle device 16 include various electronic control units, communication devices, sensors, and the like. The OTA master 11 is also one of the in-vehicle devices 16, and the OTA master 11 may be subject to update of the software due to the update data distributed by the distribution server 20.
The distribution server 20 is installed in an OTA center. The OTA center is a facility provided with equipment for distributing the update data of the software for the in-vehicle device 16 to the vehicle 10 via the wireless communication network. The distribution server 20 is the server device including a processor 21 and a storage unit 22. The storage unit 22 is a storage that stores a program and data for distributing the update data. The processor 21 is a processing circuit that reads and executes a program from the storage unit 22. The distribution server 20 is configured to perform communication with the OTA master 11 of the vehicle 10 via the mobile communication network and the like. Also, the distribution server 20 is configured to be able to perform the distribution of data to the vehicle 10 via a content distribution network (CDN) 23.
Then, the distribution server 20 executes a sharing process for sharing the common key A with each vehicle 10 to which the update data is to be distributed. The distribution server 20 executes the sharing process for each of the vehicles 10. During the sharing process, the distribution server 20 generates a key pair of a public key B and a private key C (S3). Also, in the sharing process, the distribution server 20 requests the OTA master 11 of the vehicle 10 to start the sharing process (S4). In response to this request, the OTA master 11 generates a key pair of a public key D and a private key E (S5). Then, the distribution server 20 and the OTA master 11 exchange the public keys B, D with each other (S6).
Next, the distribution server 20 generates an encryption key F by using the private key C generated by itself and the public key D received from the OTA master 11 (S7). Also, the OTA master 11 generates an encryption key F by using the private key E generated by itself and the public key B received from the distribution server 20 (S8). The generation of the key pairs in S3, S5 and the generation of the encryption keys Fin S7, S8 are performed according to a Diffie-Hellman key exchange (DHE) method or an elliptic curve Diffie-Hellman key exchange (ECDHE) method. DHE represents temporary Diffie-Hellman key sharing. ECDHE represents temporary elliptic curve Diffie-Hellman key sharing. Therefore, the encryption key F generated by each of S7, S8 is the same.
Thereafter, the distribution server 20 encrypts the common key A with the encryption key F (S9) and transmits the encrypted common key A to the OTA master 11 (S10). The OTA master 11 obtains the common key A by decrypting the encrypted common key A by using the encryption key F (S11). Thus, the sharing process of the common key A is completed. The encryption key F is used only to transmit the common key A once. Therefore, the encryption of the common key A by the distribution server 20 is performed by the session key method.
The distribution server 20 distributes the update data that is encrypted in S2 to each vehicle 10 via the content distribution network 23 (S13). The OTA master 11 decrypts the encrypted update data by using the common key A (S14) and updates the software for the in-vehicle device 16 (S15).
The action and effect of the present embodiment will be described. The distribution server 20 distributes the update data of the software for the in-vehicle device 16 to the vehicles 10 via the wireless communication network. At the time of the distribution, the distribution server 20 distributes the update data that is encrypted with the common key A to the vehicles 10. Further, the distribution server 20 transmits the common key A that is encrypted by the session key method to each of the vehicles 10.
In the present embodiment, since the update data that is encrypted with the same common key A is distributed to all of the vehicles 10 to which the update data is to be distributed, it is not necessary to encrypt the update data for each of the vehicles 10. In addition, distribution data to each vehicle 10 is the same. Therefore, a load of the distribution server 20 for encrypting the update data and traffic of a communication network for distributing the update data can be reduced. Note that in the present embodiment, it is necessary to encrypt and transmit the common key A for each of the vehicles 10. However, since data of the common key A is smaller than data of the update data, the load of the distribution server 20 for the encryption and an increase in the traffic of the communication network for the transmission are limited. Further, in the present embodiment, the common key A that is encrypted by the session key method is transmitted to the vehicle 10. Therefore, it is possible to secure a forward secrecy of the common key A and thus a forward secrecy of the update data that is encrypted by the common key A as well. As described above, the distribution server 20 of the present embodiment has an effect that the distribution of the update data of the software for the in-vehicle device 16 to the vehicles 10 can be executed securely and easily.
According to the distribution server 20 of the present embodiment described above, the following effects can be further achieved. (1) Since the forward secrecy of the update data can be ensured, a line having the possibility of being eavesdropped can be used for the distribution of the update data.
(2) The distribution server 20 uses a different key as the common key A for each distribution of the update data. Therefore, the secrecy of the common key A is increased. (3) The distribution server 20 performs the distribution of the encrypted update data via the content distribution network 23. Therefore, the load of the distribution server 20 that is required for the distribution of the update data and the traffic of a communication line that is used for the distribution can be suppressed.
Next, a second embodiment of the distribution server 20 will be described in detail with reference to
As described above, the distribution server 20 executes the encryption of the common key A by using the encryption key F shared with the vehicle 10 via the exchange of the public keys B, D by the session key method. The distribution server 20 of the present embodiment is configured to execute the key exchange of the public keys B, D with a digital signature.
Then, the distribution server 20 verifies whether the public key D has been transmitted from a correct party by using the received digital signature SB (S55). Then, the distribution server 20 executes subsequent processing only when it is verified that a transmission source is correct. The distribution server 20, in this case, generates the encryption key F by using the private key C generated by itself and the public key D received from the OTA master 11 (S56). Then, the distribution server 20 encrypts the common key A with the encryption key F (S57) and transmits the encrypted common key A to the OTA master 11 (S58).
Similarly, the OTA master 11 verifies whether the public key B has been transmitted from a correct party by using the received digital signature SA (S59). Then, the OTA master 11 executes subsequent processing only when it is verified that the transmission source is correct. The OTA master 11, in this case, generates the encryption key F by using the private key E generated by itself and the public key B received from the distribution server 20 (S60). Then, the OTA master 11 decrypts the common key A received from the distribution server 20 by using the encryption key F (S61).
Verifying the digital signatures SA, SB is performed, for example, as follows. In advance, the distribution server 20 and each of the vehicles 10 are provided with the key pair of the public key and the private key in accordance with a public key method such as Rivest Shamir Adleman (RSA). The distribution server 20 stores its own private key V and a public key Y of each vehicle 10. Also, the OTA master 11 of each vehicle 10 stores its own private key W and a public key X of the distribution server 20.
In the sharing process of the common key A, the distribution server 20 calculates a hash value of the public key B to be exchanged with the OTA master 11. Then, the distribution server 20 generates the digital signature SA obtained by encrypting the hash value with the private key V. When the OTA master 11 receives the digital signature SA together with the public key B, the OTA master 11 decrypts the digital signature SA by using the public key X of the distribution server 20. Then, the OTA master 11 calculates the hash value of the public key B and determines that the transmission source of the public key B is correct when the value matches the value obtained by decrypting the digital signature SA.
Similarly, the OTA master 11 calculates a hash value of the public key D to be exchanged with the distribution server 20. Then, the OTA master 11 generates the digital signature SB obtained by encrypting the value with the private key V. When the distribution server 20 receives the digital signature SB together with the public key D, the distribution server 20 decrypts the digital signature SB by using the public key Y of the corresponding vehicle 10. Then, the distribution server 20 calculates the hash value of the public key D and determines that the transmission source of the public key D is correct when the value matches the value obtained by decrypting the digital signature SB. Note that calculation of each of the hash values is performed by using the same hash function.
In the distribution server 20 of the present embodiment, it is possible to verify exchange partners of the public keys B, D in the sharing process of the common key A. This makes the sharing process resistant to man-in-the-middle attack due to spoofing.
The above embodiments can be implemented with the following modifications. The above embodiments and the following modifications can be combined with each other within a technically consistent range to be implemented.
It is also possible to execute the sharing process of the common key A at a time different from that in
The encryption of the common key A may be executed by using the session key method other than a key sharing by the DHE method or the ECDHE method. The distribution of the update data may be performed without using the content distribution network 23.
In the above embodiment, the common key A is changed every distribution of the update data, but the common key A may be changed at another timing, such as at a regular interval. The distribution server 20 may be constituted by a plurality of server devices, and the server devices may perform the distribution of the update data by dividing a work.
A distribution server that distributes update data of software for an in-vehicle device to vehicles via a wireless communication network, wherein the distribution server executes: distribution of the update data encrypted with a common key to the vehicles, and transmission of the common key encrypted by a session key method to each of the vehicles.
The distribution server according to appendix 1, wherein the distribution server uses a different key as the common key for each distribution of the update data.
The distribution server according to appendix 1 or 2, wherein the distribution server distributes the update data via the content distribution network.
The distribution server according to any one of appendixes 1 to 3, wherein the distribution server encrypts the common key using an encryption key shared with each of the vehicles via key exchange by the session key method and executes the key exchange with a digital signature.
The distribution server according to any one of appendixes 1 to 4, wherein the distribution server encrypts the common key by the session key method using an encryption key shared by using a DHE method or a ECDHE method.
Number | Date | Country | Kind |
---|---|---|---|
2023-040826 | Mar 2023 | JP | national |