The invention provides a method and a device for flashing an
upgrade package of a vehicle, and relates to the technical field of vehicles, in response to the condition that a supplier passes multiple authentications,
vulnerability scanning is performed on the
upgrade package uploaded by the supplier, if the
vulnerability scanning is not abnormal,
encryption processing is performed on the
upgrade package through a random secret key to obtain encrypted upgrade content, and the encrypted upgrade content is sent to the vehicle. The upgrade package and the random secret key are signed based on a Hash
algorithm and a PKI
system to obtain an abstract value, an
encryption secret key and an upgrade package
certificate; transmitting an encrypted upgrade package formed by combining the encrypted upgrade content, the abstract value, the
encryption key and the upgrade package
certificate to a main node corresponding to the upgrade scene, so that the main node performs
certificate chain
verification based on a preset
root certificate and the upgrade package certificate; and if the hash
algorithm verifies that the corresponding first hash value after the abstract value is unsigned is consistent with the second hash value corresponding to the original upgrading content, executing upgrading. Therefore, reliable updating of the vehicle
system in a complex upgrading environment is guaranteed.