CN109257374A - Method of controlling security, device and computer equipment - Google Patents
Method of controlling security, device and computer equipment Download PDFInfo
- Publication number
- CN109257374A CN109257374A CN201811291768.3A CN201811291768A CN109257374A CN 109257374 A CN109257374 A CN 109257374A CN 201811291768 A CN201811291768 A CN 201811291768A CN 109257374 A CN109257374 A CN 109257374A
- Authority
- CN
- China
- Prior art keywords
- ecu
- information
- gateway
- identity information
- authentication information
- Prior art date
- Legal status (The legal status 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 status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 84
- 238000012795 verification Methods 0.000 claims abstract description 24
- 230000005540 biological transmission Effects 0.000 claims abstract description 18
- 238000003860 storage Methods 0.000 claims description 31
- 238000012545 processing Methods 0.000 claims description 12
- 230000008569 process Effects 0.000 claims description 11
- 238000004590 computer program Methods 0.000 claims description 6
- 238000012937 correction Methods 0.000 claims description 6
- 238000004891 communication Methods 0.000 abstract description 26
- 238000010586 diagram Methods 0.000 description 18
- 230000006870 function Effects 0.000 description 16
- 238000009826 distribution Methods 0.000 description 10
- 238000005516 engineering process Methods 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000002093 peripheral effect Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 238000003745 diagnosis Methods 0.000 description 2
- 235000013399 edible fruits Nutrition 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 241001269238 Data Species 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- 230000003213 activating effect Effects 0.000 description 1
- 230000004913 activation Effects 0.000 description 1
- -1 at this moment Substances 0.000 description 1
- 238000000151 deposition Methods 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 239000000976 ink Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 210000003733 optic disk Anatomy 0.000 description 1
- 230000001172 regenerating effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/083—Network architectures or network communication protocols for network security for authentication of entities using passwords
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L12/40006—Architecture of a communication node
- H04L12/40013—Details regarding a bus controller
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/12—Applying verification of the received information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L2012/40208—Bus networks characterized by the use of a particular bus standard
- H04L2012/40215—Controller Area Network CAN
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L2012/40267—Bus for use in transportation systems
- H04L2012/40273—Bus for use in transportation systems the transportation system being a vehicle
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computing Systems (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Small-Scale Networks (AREA)
- Selective Calling Equipment (AREA)
Abstract
The present invention proposes a kind of method of controlling security, device and computer equipment, wherein, method includes: the key for obtaining and being generated according to the ECU identity information of control unit for vehicle ECU to be certified and the Gateway identity information of vehicle gateway, and generate the check information of corresponding ECU identity information, encryption is carried out using key pair check information and generates the first authentication information, receive the second authentication information generated based on the first authentication information that ECU is sent, the check information carried and ECU identity information are decrypted using the second authentication information of key pair, by judging whether the check information that decryption obtains has corresponding relationship with ECU identity information, safety check is carried out to ECU, in each verification, gateway carries out safety check using different check informations to each ECU, simultaneously, when transmitting check information , also encrypted using different keys, so that transmission process is safer, realizes the safety verification of ECU, ensure that communication security.
Description
Technical field
The present invention relates to vehicle safety communications technical field more particularly to a kind of method of controlling security, device and computer
Equipment.
Background technique
With the progress of people's living standard, vehicle is more and more used by people, the various functions in vehicle be by
What electronic control unit ECU was realized, if interior ECU is not legal, or controlled by hacker, then the life of passenger
Life safety will be by danger, therefore the communication security between interior each ECU is particularly important.
In the related technology, when being communicated between each ECU, no authentication procedures, or consolidate using algorithm is relatively simple
Fixed software cryptography algorithm is authenticated, and since identifying algorithm is simpler, makes it easy to be cracked, and causes ECU to be easy illegal
ECU substitution, cause the communication security between ECU that can not be guaranteed.
Summary of the invention
The present invention is directed to solve at least some of the technical problems in related technologies.
For this purpose, the first purpose of this invention is to propose a kind of method of controlling security, in each verification, gateway is generated
Check information is carried out safety check using different check informations to each ECU, avoids being cracked using single check information
The case where occur, meanwhile, when transmitting check information, also encrypted using different keys it is real so that transmission process is safer
The legitimate verification for having showed ECU ensure that the safety of interior communication, solve in the related technology, without body when ECU is communicated
Part safety check, the technical issues of causing the communication security between ECU that can not be guaranteed.
Second object of the present invention is to propose another method of controlling security.
Third object of the present invention is to propose a kind of safety control.
Fourth object of the present invention is to propose another safety control.
5th purpose of the invention is to propose a kind of computer equipment.
6th purpose of the invention is to propose a kind of non-transitorycomputer readable storage medium.
In order to achieve the above object, first aspect present invention embodiment proposes a kind of method of controlling security, this method is by vehicle
Gateway executes, comprising:
It obtains according to the ECU identity information of control unit for vehicle ECU to be certified and the Gateway identity of the vehicle gateway
Information, the key of generation, and generate the check information of the corresponding ECU identity information;
It is encrypted using check information described in the key pair, generates the first authentication information;
First authentication information is sent to the ECU;Wherein, first authentication information, for ECU generation pair
The second authentication information answered;
The second authentication information that the ECU is sent is received, is decrypted using the second authentication information described in the key pair
The check information and ECU identity information carried;
By judging the check information that second authentication information carries and the ECU identity that second authentication information carries
Whether information has corresponding relationship, carries out safety check to the ECU.
In order to achieve the above object, second aspect of the present invention embodiment proposes another method of controlling security, this method is by vehicle
Control unit ECU is executed, comprising:
Receive the first authentication information that vehicle gateway is sent;
It is decrypted using the first authentication information described in the key pair prestored, to obtain check information;Wherein, described to prestore
Key, it is raw according to the Gateway identity information of the ECU identity information of the ECU and the vehicle gateway by the vehicle gateway
At, and it is sent to the ECU;
Generate the second authentication information of the key encryption prestored described in passing through;Wherein, second authentication information carries
Decrypt obtained check information and the ECU identity information;
Second authentication information is sent to the vehicle gateway;Wherein, second authentication information is used for the vehicle
Gateway, which passes through, judge the check information that second authentication information carries and the ECU identity letter that second authentication information carries
Whether breath has corresponding relationship, carries out safety check to the ECU.
In order to achieve the above object, third aspect present invention embodiment proposes a kind of safety control, which is set to
Vehicle gateway, comprising:
Processing module, for obtaining ECU identity information and the vehicle net according to control unit for vehicle ECU to be certified
The Gateway identity information of pass, the key of generation, and generate the check information of the corresponding ECU identity information;
Encrypting module generates the first authentication information for being encrypted using check information described in the key pair;
First sending module, for sending first authentication information to the ECU;Wherein, first authentication information,
Corresponding second authentication information is generated for the ECU;
First receiving module, the second authentication information sent for receiving the ECU, using second described in the key pair
The check information carried and ECU identity information is decrypted in authentication information;
Correction verification module, for the check information and second authentication information by judging the second authentication information carrying
Whether the ECU identity information of carrying has corresponding relationship, carries out safety check to the ECU.
In order to achieve the above object, fourth aspect present invention embodiment proposes another safety control, device setting
In control unit for vehicle ECU, comprising:
First receiving module, for receiving the first authentication information of vehicle gateway transmission;
Deciphering module, for being decrypted using the first authentication information described in the key pair prestored, to obtain check information;
Wherein, the key prestored, by the vehicle gateway according to the ECU identity information of the ECU and the net of the vehicle gateway
It closes identity information to generate, and is sent to the ECU;
Generation module, for generating the second authentication information of the key prestored described in process encryption;Wherein, described second recognizes
Card information carries check information and the ECU identity information that decryption obtains;
First sending module, for second authentication information to be sent to the vehicle gateway;Wherein, described second recognizes
Information is demonstrate,proved, passes through for the vehicle gateway and judges that the check information that second authentication information carries is believed with second certification
Whether the ECU identity information that breath carries has corresponding relationship, carries out safety check to the ECU.
In order to achieve the above object, fifth aspect present invention embodiment proposes a kind of computer equipment, including memory, processing
Device and storage on a memory and the computer program that can run on a processor, when the processor executes described program, reality
Now method of controlling security as described in relation to the first aspect, alternatively, realizing the method for controlling security as described in second aspect.
In order to achieve the above object, sixth aspect present invention embodiment proposes a kind of non-transitory computer-readable storage medium
Matter is stored thereon with computer program, when which is executed by processor, realizes security control side as described in relation to the first aspect
Method, alternatively, realizing the method for controlling security as described in second aspect.
Technical solution provided by the present invention may include it is following the utility model has the advantages that
It obtains according to the ECU identity information of control unit for vehicle ECU to be certified and the Gateway identity information of vehicle gateway,
The key of generation, and the check information of corresponding ECU identity information is generated, it is encrypted, is generated using key pair check information
First authentication information sends first authentication information to ECU, wherein the first authentication information generates corresponding for ECU
Two authentication informations are received the second authentication information that ECU is sent, are decrypted using the second authentication information of key pair and to be carried
Check information and ECU identity information are carried by the check information and the second authentication information that judge the carrying of the second authentication information
Whether ECU identity information has corresponding relationship, carries out safety check to ECU, and in each verification, gateway generates check information,
The case where carrying out safety check using different check information to each ECU, avoiding using single check information and be cracked goes out
It is existing, meanwhile, when transmitting check information, is also encrypted using different keys, so that transmission process is safer, realize ECU
Legitimate verification, ensure that the safety of interior communication.
Detailed description of the invention
Above-mentioned and/or additional aspect and advantage of the invention will become from the following description of the accompanying drawings of embodiments
Obviously and it is readily appreciated that, in which:
Fig. 1 is a kind of structural schematic diagram of the network topology structure of vehicle provided by the embodiment of the present invention;
Fig. 2 is a kind of flow diagram of method of controlling security provided by the embodiment of the present invention;
Fig. 3 is the flow diagram of another kind method of controlling security provided by the embodiment of the present invention;
Fig. 4 is the flow diagram of another method of controlling security provided by the embodiment of the present invention;
Fig. 5 is the flow diagram of another method of controlling security provided by the embodiment of the present invention;
Fig. 6 carries out the exchange method of security control between a kind of vehicle gateway and ECU provided by the embodiment of the present invention
Flow diagram;
Fig. 7 is a kind of structural schematic diagram of safety control provided in an embodiment of the present invention;
Fig. 8 is the structural schematic diagram of another safety control provided in an embodiment of the present invention;And
Fig. 9 shows the block diagram for being suitable for the exemplary computer device for being used to realize the application embodiment.
Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end
Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached
The embodiment of figure description is exemplary, it is intended to is used to explain the present invention, and is not considered as limiting the invention.
Below with reference to the accompanying drawings the method for controlling security, device and computer equipment of the embodiment of the present invention are described.
Before illustrating the method for controlling security of the present embodiment, the network topology structure of vehicle is simply introduced.
Fig. 1 is a kind of structural schematic diagram of the network topology structure of vehicle provided by the embodiment of the present invention, such as Fig. 1 institute
Show, which includes gateway 10, diagnosis interface 11, P-CAN bus 20, B-CAN bus 21 and realize each function
ECU1, ECU2, ECU3, ECU4, ECU5, ECU6 and ECU7.
Wherein, P-CAN bus is high-speed bus, and transmission rate 500Kbit/s, B-CAN bus 21 is low speed bus, is passed
Defeated rate is 125Kbit/s.
Interface 11 is diagnosed, is attached with each ECU1-ECU7, so that each ECU can record failure when breaking down
Information and correlative code, and given a warning by trouble light, it is instructed at the same time it can also be sent by diagnosis interface 11 to gateway,
For example, sending the instruction for activating each ECU authentication key to gateway.
ECU1, ECU2, ECU3, ECU4, ECU5, ECU6 and ECU7 are electronic control unit, and the function of realization is different,
Number does not represent priority level, wherein ECU1-ECU4 belongs to identical A network segment, and is counted using the P-CAN bus of high speed
According to sending and transmitting, ECU5-ECU7 belongs to identical another B network segment, carries out data transmission and biography using the B-CAN bus of low speed
It is defeated, and belong to the ECU in different segment A and network segment B, then the forwarding of data is carried out by gateway 10, realizes communication, for example, A
It is communicated between the ECU6 in ECU2 and B network segment in network segment, then needs to carry out data forwarding by gateway 10 to realize information
Interaction.It should be noted that topological structure shown in fig. 1 be only schematically illustrate, gateway each ECU of different segment it
Between structure when being communicated, which can also have other structure types, and the quantity of ECU is also not necessarily limited to show in figure
Quantity, be not defined in the present embodiment.
Fig. 2 is a kind of flow diagram of method of controlling security provided by the embodiment of the present invention.
As shown in Fig. 2, method includes the following steps:
Step 101, it obtains according to the ECU identity information of control unit for vehicle ECU to be certified and the gateway of vehicle gateway
Identity information, the key of generation, and generate the check information of corresponding ECU identity information.
The executing subject of the embodiment of the present invention is vehicle gateway, and vehicle gateway is various function ECU in each network segment of connection
Central node realize authentication to ECU for communicating to establishing not between the ECU of a network segment.
Wherein, the identity information of ECU refers to that vehicular manufacturer distributes to ECU, for uniquely indicating the letter of ECU identity
Breath, for example, unique user identifier (User identifier, UID), equally, the identity of Gateway identity information and ECU are believed
It is identical to cease principle, repeats no more.
Specifically, when vehicle powers on, when vehicle gateway needs to carry out authentication to ECU, vehicle gateway obtains key,
As a kind of possible implementation, which be can be after vehicle powers on, and be generated according to ECU to be certified, that is to say, that
Vehicle gateway does not store key, and when needing to carry out authentication to ECU, vehicle gateway generates key, so that key be avoided to let out
Dew.Specifically, vehicle gateway reads the ECU identity information of the ECU to be certified prestored, as a kind of possible implementation, ECU
Identity information, which can be, to be pre-stored in the band electric erazable programmable memory EEPROM of gateway, according at least to the ECU identity of reading
The Gateway identity information of information and vehicle gateway generates key, and generates the check information of corresponding ECU identity information, as one
The possible implementation of kind, gateway arbitrarily generate a random number, which can be by vehicle according to Generating Random Number
Speed, time and ECU identification identifier dynamic generation.
It should be noted that gateway generates the verification message of corresponding ECU identity information, i.e., check information is stored in gateway
Corresponding relationship between the identity information of ECU.
As alternatively possible implementation, key is also possible to vehicle gateway when distributing key to ECU in advance, will
The key storage of generation in vehicle gateway, it is subsequent need to ECU carry out authentication when, vehicle gateway reads the key, and
Without regenerating.For example, hardware security module HSM can be arranged in vehicle gateway, it is stored in the HSM of vehicle gateway,
And it is set as gateway reading mode, ensure the safety of key.
It should be noted that the key in the present embodiment can also include other information, such as vehicle identification number VIN code
Deng being not construed as limiting in the present embodiment.
Step 102, it is encrypted using key pair check information, generates the first authentication information.
Specifically, it is encrypted, is generated using the combination of the Gateway identity information and check information of key pair vehicle gateway
First authentication information ensure that the first authentication information maliciously will not be stolen and be distorted by the encryption of key, ensure that first
The safety of authentication information.
Step 103, the first authentication information is sent to ECU, wherein the first authentication information generates corresponding second for ECU
Authentication information.
Specifically, the first authentication information of generation is sent to ECU to be certified by gateway, so that ECU is according to acquisition
First authentication information generates corresponding second authentication information.
Optionally, the first authentication information is also used to ECU and is decrypted using the first authentication information of key pair prestored, obtained
To Gateway identity information, the Gateway identity information decrypted according to the first authentication information is carried out with the Gateway identity information prestored
Compare, it is determined whether matching is realized and carries out safety check to vehicle gateway, wherein the key prestored in ECU is gateway according to
ECU identity information and Gateway identity information generate, and key is sent to ECU in advance, and following gateways carry out key distribution
Embodiment will be described in detail.
It should be noted that the key that gateway obtains after the power-up in the key and step 101 that prestore in ECU to be certified,
Be it is identical, by the setting of key, realize the encryption and decryption to the authentication information of ECU verification process, ensure that certification letter
The safety of breath.
Step 104, the second authentication information that ECU is sent is received, is decrypted to obtain using the second authentication information of key pair
The check information and ECU identity information of carrying.
Step 105, by judging the check information that the second authentication information carries and the ECU identity that the second authentication information carries
Whether information has corresponding relationship, carries out safety check to ECU.
Specifically, vehicle gateway using the second authentication information of key pair be decrypted the check information that is carried and
After ECU identity information, the storage of the identity information for the ECU that gateway is decrypted according to the second authentication information in a gateway is situated between
It is searched in matter, for example, in EEPROM, if finding the identity information of corresponding ECU in vehicle gateway, according in vehicle gateway
The identity information of the ECU of storage and the corresponding relationship of check information, find the check information, and will to the second authentication information into
Obtained check information is compared with the check information of the correspondence ECU found after row decryption, if the correspondence found this
The check information that the check information of ECU and decryption obtain is identical, then the safety check of the ECU passes through, which is legal ECU;
If ECU safety check is not over illustrating, this ECU may be replaced by an illegal ECU, it is also possible to this ECU
Program maliciously write with a brush dipped in Chinese ink, at this moment, vehicle gateway can be to this ECU of bus broadcast it is illegal, carry out warning note, by right
The safety check of ECU, the data that ensure that the ECU of communication is sent all are valid datas, are also prevented from, and ECU is illegally replaced, or
It is that ECU is sent invalid data after malicious attack again brush program, vehicle operation is caused to be in danger, improves ECU communication
Safety.
In the embodiment of the present invention, the ECU identity information and vehicle gateway according to control unit for vehicle ECU to be certified are obtained
Gateway identity information, the key of generation, and generate the check information of corresponding ECU identity information verified using key pair and believed
Breath is encrypted, and the first authentication information is generated, and sends first authentication information to ECU, wherein the first authentication information is used for
ECU generates corresponding second authentication information, receives the second authentication information that ECU is sent, using the second authentication information of key pair into
Row the decryption check information and ECU identity information that are carried, by the check information and for judge carrying of the second authentication information
Whether the ECU identity information that two authentication informations carry has corresponding relationship, and in each verification, gateway generates check information, right
The case where each ECU carries out safety check using different check information, avoids using single check information and is cracked appearance,
Meanwhile when transmitting check information, is also encrypted using different keys, so that transmission process is safer, realize the conjunction of ECU
Method verifying ensure that the safety of interior communication.
Above described embodiment describes gateway after the power-up, needs to obtain ECU identity information and Gateway identity information, raw
At key, and before generating key, the identity information of ECU is obtained in gateway from ECU, it is therefore, real based on upper one
Example is applied, another method of controlling security is present embodiments provided, Fig. 3 is another kind security control provided by the embodiment of the present invention
The flow diagram of method, specifically illustrates, and how gateway with ECU carries out letter before generating key according to ECU identity information
Breath interaction, distributes the process of key.
As shown in figure 3, may include following steps before step 101:
Step 201, Gateway identity information is sent to ECU.
Wherein, Gateway identity information is stored for the ECU band electric erazable programmable for storing Gateway identity information to ECU
In device EEPROM.
In the embodiment of the present invention, after the completion of vehicle production, when vehicle is offline, vehicle gateway obtains activation authentication
The instruction of the distribution of key, for example, gateway passes through the automatic checkout system OBD interface acquisition instruction of vehicle, in turn, vehicle gateway
Poll car ECU sends Gateway identity information to interior ECU one by one, and specifically, vehicle gateway is with the unified diagnostic service of gateway
The ID number of UDS is source address, using the ID number of the unified diagnostic service UDS of ECU as purpose address, the agreement based on UDS, to ECU
The instruction of request ECU identity information is sent, while carrying the Gateway identity information of vehicle gateway itself in instruction, so that ECU
After receiving the request instruction, first judge destination address whether be itself UDS ID number, if it is, with send instruction
Gateway UDS ID number be purpose address, the identity information of the ECU is sent to vehicle gateway.
Step 202, the ECU identity information that ECU is sent is received.
Step 203, key is generated according to ECU identity information and Gateway identity information, and key is sent to ECU.
Specifically, after vehicle gateway receives the ECU identity information that ECU is sent, vehicle gateway is according to ECU identity information and net
Close identity information and generate key, and key is sent to ECU, realize the key that each ECU is acquired be it is only, keep away
Single key bring insecurity is exempted from.After key is sent to ECU by vehicle gateway, so that the key that ECU will be received
It stores into particular module, as a kind of possible implementation, which can be hardware security module HSM, wherein
The key stored in HSM can only be read by ECU, and realizing the key stored in ECU will not be stolen, and ensure that the safety of key
Property.
Step 204, ECU identity information is stored into the EEPROM of vehicle gateway.
Specifically, gateway stores ECU identity information to vehicle net after receiving the identity information of ECU of ECU transmission
In the EEPROM of pass.
It should be noted that above-mentioned steps 201-204 is performed a plurality of times, the information of vehicle gateway and all ECU can be completed
Communication, and the process of distribution key.
In the method for controlling security of the present embodiment, gateway passes through the communication between ECU, so that in gateway and ECU respectively
The identity information of ECU and the identity information of gateway are obtained and store, and by gateway according to the identity information of the ECU of acquisition and certainly
The identity information of body generates key, and is sent to ECU, realizes the preparatory distribution of key, at the same ECU by key storage in hardware
In security module, because hardware security module may be configured as unreadable, the safety of key storage is improved.Then, in vehicle net
It closes during carrying out authentication to ECU, using the key of pre-generated distribution, encrypted transmission is carried out to authentication information, is protected
The safety for having demonstrate,proved authentication information transmission, improves the reliability of ECU safety certification, improves the safety of communication.
In order to realize above-described embodiment, the embodiment of the present invention also proposed a kind of method of controlling security, and this method is held by ECU
Row.
Fig. 4 is the flow diagram of another method of controlling security provided by the embodiment of the present invention, as shown in figure 4, should
Method includes the following steps:
Step 301, the first authentication information that vehicle gateway is sent is received.
Wherein, the first authentication information be vehicle gateway after the power-up, according to the ECU identity information and net to be certified of acquisition
The identity information of itself, the key of generation are closed, and carries out encryption generation using the check information that the key pair generates, wherein
There is corresponding relationship between check information and ECU to be certified.
Step 302, it is decrypted using the first authentication information of key pair prestored, to obtain check information.
Wherein, the key prestored is believed by vehicle gateway according to the ECU identity information of ECU and the Gateway identity of vehicle gateway
Breath generates, and is sent to ECU.
Specifically, ECU reads the key prestored, and as a kind of possible implementation, key can be stored in advance in ECU
In hardware security module HSM, and be set as only ECU can reading mode, ensure that the safety of key storage.In turn, ECU is used
The first authentication information of key pair prestored is decrypted, to obtain the check information carried in the first authentication information.
Optionally, ECU is decrypted using the first authentication information of key pair prestored, can also obtain the first authentication information
The Gateway identity information of the vehicle gateway to be certified carried, the gateway that will be prestored in Gateway identity information to be certified and ECU
Identity information is compared, if matching, vehicle gateway security verification to be certified passes through, and carries out to realize to ECU
During authentication, the safety check of vehicle gateway can also be carried out, the safety using gateway as retransmission center is improved
And reliability.
Step 303, the second authentication information by the key encryption prestored is generated.
Wherein, the second authentication information carries the check information and ECU identity information that decryption obtains.
Specifically, the safety check of the check information and vehicle gateway that obtain to ECU identity information, decryption is as a result, adopt
It is encrypted with the key prestored in the hardware security module HSM of ECU, obtains the second certification letter.
Step 304, the second authentication information is sent to vehicle gateway.
Specifically, the second authentication information is sent to vehicle gateway by ECU so that vehicle gateway using generate key pair
Second authentication information is decrypted, the ECU's that the check information and the second authentication information for obtaining the carrying of the second authentication information carry
Identity information, in turn, the identity information for the ECU that vehicle gateway is decrypted according to the second authentication information depositing in a gateway
It is searched in storage media, for example, if finding the identity information of corresponding ECU in gateway, being stored according in gateway in EEPROM
ECU identity information and check information corresponding relationship, find the check information, and will solve to the second authentication information
The check information obtained after close is compared with the check information of the correspondence ECU found, if the correspondence ECU found
Check information is identical with the check information that decryption obtains, then the safety check of the ECU passes through, which is legal ECU, realizes
To the safety check of ECU.
In the method for controlling security of the embodiment of the present invention, ECU receives the first authentication information that vehicle gateway is sent, using pre-
The first authentication information of key pair deposited is decrypted, and obtains check information, and utilize the key pair check information and ECU body prestored
Part information is encrypted to obtain the second authentication information, and the second authentication information is sent to vehicle gateway, so that vehicle gateway is logical
Cross whether the check information for judging that the second authentication information carries has corresponding pass with the ECU identity information that the second authentication information carries
System carries out safety check to ECU, it is ensured that the legitimacy of ECU ensure that communication security.
It also proposed another method of controlling security based on the upper embodiment embodiment of the present invention, Fig. 5 is that the present invention is implemented
The flow diagram of another method of controlling security provided by example illustrates before ECU carries out authentication, first from vehicle
Gateway obtains the process of the key of vehicle gateway distribution.
As shown in figure 5, this method may include following step before step 301:
Step 401, the Gateway identity information that vehicle gateway is sent is received.
In the embodiment of the present invention, before the Gateway identity information that ECU receives that vehicle gateway is sent, vehicle gateway, which obtains, to swash
The instruction of the distribution of the key of authentication living, for example, gateway passes through the automatic checkout system OBD interface acquisition instruction of vehicle,
In turn, vehicle gateway poll car ECU sends Gateway identity information to interior ECU one by one, and specifically, vehicle gateway is with gateway
Unified diagnostic service UDS ID number be source address be based on using the ID number of the unified diagnostic service UDS of ECU as purpose address
The agreement of UDS sends the instruction of request ECU identity information to ECU, while the Gateway identity of vehicle gateway itself is carried in instruction
Information.
To which ECU takes in acquisition instruction after the volume instruction for the request ECU identity information for receiving the transmission of vehicle gateway
The Gateway identity information of band.
Step 402, the Gateway identity information that vehicle gateway is sent is stored to the band electric erazable programmable memory of ECU
In EEPROM.
Step 403, ECU identity information is sent to vehicle gateway.
Step 404, the key that vehicle gateway is generated according to ECU identity information, Gateway identity information is received, by key storage
To the HSM of ECU.
Wherein, the key stored in HSM, which is provided with, reads permission, is only limitted to affiliated ECU and reads, ensure that the peace of key
Quan Xing.
Specifically, the key that ECU is received is that vehicle gateway is generated according to ECU identity information and Gateway identity information,
Realize that each ECU acquires for authentication information is decrypted and decoded key be it is only, avoid list
One key bring insecurity.
In the method for controlling security of the embodiment of the present invention, before ECU carries out authentication by gateway, ECU is from gateway
In obtain Gateway identity information and key, and Gateway identity information is stored into EEPROM, by key storage into HSM,
It has ensured the safety of key, and has carried out authentication information using the key prestored during subsequent ECU carries out safety certification
Decryption and encryption, ensure that authentication information illegally will not be intercepted and captured or be changed, ensured while realizing the safety verification of ECU
The validity of certification has ensured the safety of communication.
Based on the above embodiment, the embodiment of the present invention also proposed and carry out security control between a kind of vehicle gateway and ECU
Exchange method, Fig. 6 is a kind of vehicle gateway provided by the embodiment of the present invention and carries out the interaction side of security control between ECU
The flow diagram of method, as shown in fig. 6, this method comprises the following steps:
Step 501, vehicle gateway sends Gateway identity information to ECU.
Step 502, ECU receive vehicle gateway send Gateway identity information, and by Gateway identity information store to
In EEPROM.
Step 503, ECU sends ECU identity information to vehicle gateway.
Step 504, vehicle gateway receive ECU send ECU identity information, and by the identity information of ECU store to
In EEPROM.
Step 505, vehicle gateway generates key using ECU identity information and Gateway identity information.
Step 506, key is sent to ECU by vehicle gateway.
Step 507, ECU receives the key that vehicle gateway is sent, and will be in the HSM of key storage to ECU.
Step 508, vehicle gateway obtains the key generated, and generates the check information of corresponding ECU identity information.
Step 509, vehicle gateway is encrypted using key pair check information, generates the first authentication information.
Step 510, vehicle gateway sends the first authentication information to ECU.
Step 511, ECU is decrypted to obtain the net of check information and gateway to be certified to the first authentication information received
Close identity information.
Step 512, whether ECU matches according to Gateway identity information to be certified with the Gateway identity information prestored, to vehicle
Gateway carries out safety check.
Step 513, ECU generates the second authentication information by the key encryption prestored.
Step 514, the second authentication information of ECU transmission gives vehicle two gateways.
Step 515, vehicle gateway receives the second authentication information that ECU is sent, and is carried out using the second authentication information of key pair
Decrypt the check information and ECU identity information carried.
Step 516, by judging the check information that the second authentication information carries and the ECU identity that the second authentication information carries
Whether information has corresponding relationship, carries out safety check to ECU.
Above-mentioned steps, the description being specifically referred in previous embodiment, principle is identical, no longer repeats one by one herein.
It should be noted that describing to be communicated between vehicle gateway and ECU in above-mentioned steps 501-507, and will
Key is distributed to the process of corresponding ECU, and step 508-516 is communicated between vehicle gateway and ECU, based on generation
The safety of keys for securing communications data realizes the authentication to ECU, ensure that the safety of communication, while also achieving pair
The authentication of vehicle gateway further improves the safety of the reliability and communications of verifying.
In the exchange method of the embodiment of the present invention, the distribution of key is carried out in advance by vehicle gateway, so that in ECU in advance
The key of the corresponding ECU is stored, and carries out the encryption and decoding of verification information based on the key during verifying, in reality
While having showed ECU safety verification, also ensures that verification information is not easy to be stolen, improve the accuracy of safety verification, in turn
Improve the safety communicated between ECU.
In order to realize above-described embodiment, the present invention also proposes a kind of safety control, which is set to vehicle gateway.
Fig. 7 is a kind of structural schematic diagram of safety control provided in an embodiment of the present invention.
As shown in fig. 7, the device includes: processing module 61, encrypting module 62, the first sending module 63, first reception mould
Block 64 and correction verification module 65.
Processing module 61, for obtaining ECU identity information and vehicle gateway according to control unit for vehicle ECU to be certified
Gateway identity information, the key of generation, and generate the check information of corresponding ECU identity information.
Encrypting module 62 generates the first authentication information for being encrypted using key pair check information.
First sending module 63, for sending the first authentication information to ECU, wherein the first authentication information, it is raw for ECU
At corresponding second authentication information.
First receiving module 64, for receive ECU transmission the second authentication information, using the second authentication information of key pair into
The check information and ECU identity information that row decryption is carried.
Correction verification module 65, for what is carried by the check information and the second authentication information that judge the carrying of the second authentication information
Whether ECU identity information has corresponding relationship, carries out safety check to ECU.
Further, in a kind of possible implementation of the embodiment of the present invention,
The device further include: the second sending module, the second receiving module, memory module and third sending module.
Second sending module, for sending the Gateway identity information to the ECU;The Gateway identity information, is used for
The ECU stores the Gateway identity information into the band electric erazable programmable memory EEPROM of the ECU.
Second receiving module, the ECU identity information sent for receiving the ECU.
Third sending module, for generating the key according to the ECU identity information and the Gateway identity information, and
The key is sent to the ECU.
Memory module, for storing the ECU identity information into the EEPROM of the vehicle gateway.
As a kind of possible implementation, above-mentioned processing module 61, further includes: reading unit and generation unit.
Reading unit, for when vehicle powers on, reading the ECU identity information prestored.
Generation unit, for generating key according to ECU identity information and Gateway identity information.
As a kind of possible implementation, above-mentioned encrypting module 62 is specifically used for:
It is encrypted using the combination of the Gateway identity information and the check information of vehicle gateway described in the key pair,
Generate first authentication information.
As a kind of possible implementation, the first authentication information is also used to the ECU using described in the key pair prestored
First authentication information is decrypted, and obtains the Gateway identity information, the gateway decrypted according to first authentication information
Whether identity information matches with the Gateway identity information prestored, carries out safety check to the vehicle gateway.
It should be noted that the aforementioned explanation for executing embodiment of the method to vehicle gateway is also applied for the embodiment
Device, details are not described herein again.
In the safety control of the present embodiment, gateway passes through the communication between ECU, so that in gateway and ECU respectively
The identity information of ECU and the identity information of gateway are obtained and store, and by gateway according to the identity information of the ECU of acquisition and certainly
The identity information of body generates key, and is sent to ECU, realizes the preparatory distribution of key, at the same ECU by key storage in hardware
In security module, because hardware security module may be configured as unreadable, the safety of key storage is improved.Then, in vehicle net
It closes during carrying out authentication to ECU, using the key of pre-generated distribution, encrypted transmission is carried out to authentication information, is protected
The safety for having demonstrate,proved authentication information transmission, improves the reliability of ECU safety certification, improves the safety of communication.
In order to realize above-described embodiment, the present invention also proposes a kind of safety control, which is set to ECU.
Fig. 8 is the structural schematic diagram of another safety control provided in an embodiment of the present invention.
As shown in figure 8, the device includes: the first receiving module 71, deciphering module 72, generation module 73 and the first transmission mould
Block 74.
First receiving module 71, for receiving the first authentication information of vehicle gateway transmission;
Deciphering module 72, for being decrypted using the first authentication information described in the key pair prestored, to obtain verification letter
Breath;Wherein, the key prestored, by the vehicle gateway according to the ECU identity information of the ECU and the vehicle gateway
Gateway identity information generates, and is sent to the ECU;
Generation module 73, for generating the second authentication information of the key prestored described in process encryption;Wherein, described second
Authentication information carries the check information and the ECU identity information that decryption obtains;
First sending module 74, for second authentication information to be sent to the vehicle gateway;Wherein, described second
Authentication information passes through the check information and second certification for judging that second authentication information carries for the vehicle gateway
Whether the ECU identity information that information carries has corresponding relationship, carries out safety check to the ECU.
Further, in a kind of possible implementation of the embodiment of the present invention, the device further include:
Second receiving module, the Gateway identity information sent for receiving the vehicle gateway;The vehicle gateway is sent out
The Gateway identity information sent is stored into the band electric erazable programmable memory EEPROM of the ECU.
Second sending module, for sending the ECU identity information to the vehicle gateway.
Third receiving module, for receiving the vehicle gateway according to the ECU identity information, the Gateway identity information
The key of generation;By the key storage to the HSM of the ECU.
As a kind of possible implementation, the first authentication information also carries Gateway identity information to be certified, the dress
It sets further include: correction verification module.
Correction verification module, the first authentication information described in the key pair for prestoring described in use are decrypted, obtain to be certified
Gateway identity information;Whether matched according to the Gateway identity information to be certified with the Gateway identity information prestored, to institute
It states vehicle gateway and carries out safety check.
As a kind of possible implementation, above-mentioned generation module 73 is specifically used for:
To the ECU identity information, the safety check knot for decrypting obtained check information and the vehicle gateway
Fruit is encrypted using the key that the hardware security module HSM of the ECU is prestored, and obtains second authentication information.
As a kind of possible implementation, above-mentioned deciphering module 72 is specifically used for:
First authentication information described in the key pair prestored using the HSM of the ECU is decrypted, and check information is obtained.
It should be noted that the aforementioned explanation for executing embodiment of the method to ECU is also applied for the device of the embodiment,
Details are not described herein again.
In the safety control of the embodiment of the present invention, before ECU carries out authentication by gateway, ECU is from gateway
In obtain Gateway identity information and key, and Gateway identity information is stored into EEPROM, by key storage into HSM,
It has ensured the safety of key, and has carried out authentication information using the key prestored during subsequent ECU carries out safety certification
Decryption and encryption, ensure that authentication information illegally will not be intercepted and captured or be changed, ensured while realizing the safety verification of ECU
The validity of certification has ensured the safety of communication.
Based on the above embodiment, the embodiment of the invention also provides a kind of computer equipment, including memory, processor and
The computer program that can be run on a memory and on a processor is stored, when the processor executes described program, is realized such as
Method of controlling security described in preceding method embodiment.
Fig. 9 shows the block diagram for being suitable for the exemplary computer device for being used to realize the application embodiment.What Fig. 9 was shown
Computer equipment 12 is only an example, should not function to the embodiment of the present application and use scope bring any restrictions.
As shown in figure 9, computer equipment 12 is showed in the form of universal computing device.The component of computer equipment 12 can be with
Including but not limited to: one or more processor or processing unit 16, system storage 28 connect different system components
The bus 18 of (including system storage 28 and processing unit 16).
Bus 18 indicates one of a few class bus structures or a variety of, including memory bus or Memory Controller,
Peripheral bus, graphics acceleration port, processor or the local bus using any bus structures in a variety of bus structures.It lifts
For example, these architectures include but is not limited to industry standard architecture (Industry Standard
Architecture;Hereinafter referred to as: ISA) bus, microchannel architecture (Micro Channel Architecture;Below
Referred to as: MAC) bus, enhanced isa bus, Video Electronics Standards Association (Video Electronics Standards
Association;Hereinafter referred to as: VESA) local bus and peripheral component interconnection (Peripheral Component
Interconnection;Hereinafter referred to as: PCI) bus.
Computer equipment 12 typically comprises a variety of computer system readable media.These media can be it is any can be by
The usable medium that computer equipment 12 accesses, including volatile and non-volatile media, moveable and immovable medium.
Memory 28 may include the computer system readable media of form of volatile memory, such as random access memory
Device (Random Access Memory;Hereinafter referred to as: RAM) 30 and/or cache memory 32.Computer equipment 12 can be with
It further comprise other removable/nonremovable, volatile/non-volatile computer system storage mediums.Only as an example,
Storage system 34 can be used for reading and writing immovable, non-volatile magnetic media, and (Fig. 9 do not show, commonly referred to as " hard drive
Device ").Although being not shown in Fig. 9, the disk for reading and writing to removable non-volatile magnetic disk (such as " floppy disk ") can be provided and driven
Dynamic device, and to removable anonvolatile optical disk (such as: compact disc read-only memory (Compact Disc Read Only
Memory;Hereinafter referred to as: CD-ROM), digital multi CD-ROM (Digital Video Disc Read Only
Memory;Hereinafter referred to as: DVD-ROM) or other optical mediums) read-write CD drive.In these cases, each driving
Device can be connected by one or more data media interfaces with bus 18.Memory 28 may include that at least one program produces
Product, the program product have one group of (for example, at least one) program module, and it is each that these program modules are configured to perform the application
The function of embodiment.
Program/utility 40 with one group of (at least one) program module 42 can store in such as memory 28
In, such program module 42 include but is not limited to operating system, one or more application program, other program modules and
It may include the realization of network environment in program data, each of these examples or certain combination.Program module 42 is usual
Execute the function and/or method in embodiments described herein.
Computer equipment 12 can also be with one or more external equipments 14 (such as keyboard, sensing equipment, display 24
Deng) communication, can also be enabled a user to one or more equipment interact with the computer equipment 12 communicate, and/or with make
The computer equipment 12 any equipment (such as network interface card, the modulatedemodulate that can be communicated with one or more of the other calculating equipment
Adjust device etc.) communication.This communication can be carried out by input/output (I/O) interface 22.Also, computer equipment 12 may be used also
To pass through network adapter 20 and one or more network (such as local area network (Local Area Network;Hereinafter referred to as:
LAN), wide area network (Wide Area Network;Hereinafter referred to as: WAN) and/or public network, for example, internet) communication.Such as figure
Shown, network adapter 20 is communicated by bus 18 with other modules of computer equipment 12.It should be understood that although not showing in figure
Out, other hardware and/or software module can be used in conjunction with computer equipment 12, including but not limited to: microcode, device drives
Device, redundant processing unit, external disk drive array, RAID system, tape drive and data backup storage system etc..
Processing unit 16 by the program that is stored in system storage 28 of operation, thereby executing various function application and
Data processing, such as realize the method referred in previous embodiment.
In order to realize above-described embodiment, the embodiment of the present invention proposes a kind of non-transitorycomputer readable storage medium,
It is stored thereon with computer program, when which is executed by processor, realizes the security control as described in preceding method embodiment
Method.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show
The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example
Point is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are not
It must be directed to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be in office
It can be combined in any suitable manner in one or more embodiment or examples.In addition, without conflicting with each other, the skill of this field
Art personnel can tie the feature of different embodiments or examples described in this specification and different embodiments or examples
It closes and combines.
In addition, term " first ", " second " are used for descriptive purposes only and cannot be understood as indicating or suggesting relative importance
Or implicitly indicate the quantity of indicated technical characteristic.Define " first " as a result, the feature of " second " can be expressed or
Implicitly include at least one this feature.In the description of the present invention, the meaning of " plurality " is at least two, such as two, three
It is a etc., unless otherwise specifically defined.
Any process described otherwise above or method description are construed as in flow chart or herein, and expression includes
It is one or more for realizing custom logic function or process the step of executable instruction code module, segment or portion
Point, and the range of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discussed suitable
Sequence, including according to related function by it is basic simultaneously in the way of or in the opposite order, to execute function, this should be of the invention
Embodiment person of ordinary skill in the field understood.
Expression or logic and/or step described otherwise above herein in flow charts, for example, being considered use
In the order list for the executable instruction for realizing logic function, may be embodied in any computer-readable medium, for
Instruction execution system, device or equipment (such as computer based system, including the system of processor or other can be held from instruction
The instruction fetch of row system, device or equipment and the system executed instruction) it uses, or combine these instruction execution systems, device or set
It is standby and use.For the purpose of this specification, " computer-readable medium ", which can be, any may include, stores, communicates, propagates or pass
Defeated program is for instruction execution system, device or equipment or the dress used in conjunction with these instruction execution systems, device or equipment
It sets.The more specific example (non-exhaustive list) of computer-readable medium include the following: there is the electricity of one or more wirings
Interconnecting piece (electronic device), portable computer diskette box (magnetic device), random access memory (RAM), read-only memory
(ROM), erasable edit read-only storage (EPROM or flash memory), fiber device and portable optic disk is read-only deposits
Reservoir (CDROM).In addition, computer-readable medium can even is that the paper that can print described program on it or other are suitable
Medium, because can then be edited, be interpreted or when necessary with it for example by carrying out optical scanner to paper or other media
His suitable method is handled electronically to obtain described program, is then stored in computer storage.
It should be appreciated that each section of the invention can be realized with hardware, software, firmware or their combination.Above-mentioned
In embodiment, software that multiple steps or method can be executed in memory and by suitable instruction execution system with storage
Or firmware is realized.Such as, if realized with hardware in another embodiment, following skill well known in the art can be used
Any one of art or their combination are realized: have for data-signal is realized the logic gates of logic function from
Logic circuit is dissipated, the specific integrated circuit with suitable combinational logic gate circuit, programmable gate array (PGA), scene can compile
Journey gate array (FPGA) etc..
Those skilled in the art are understood that realize all or part of step that above-described embodiment method carries
It suddenly is that relevant hardware can be instructed to complete by program, the program can store in a kind of computer-readable storage medium
In matter, which when being executed, includes the steps that one or a combination set of embodiment of the method.
It, can also be in addition, each functional unit in each embodiment of the present invention can integrate in a processing module
It is that each unit physically exists alone, can also be integrated in two or more units in a module.Above-mentioned integrated mould
Block both can take the form of hardware realization, can also be realized in the form of software function module.The integrated module is such as
Fruit is realized and when sold or used as an independent product in the form of software function module, also can store in a computer
In read/write memory medium.
Storage medium mentioned above can be read-only memory, disk or CD etc..Although having been shown and retouching above
The embodiment of the present invention is stated, it is to be understood that above-described embodiment is exemplary, and should not be understood as to limit of the invention
System, those skilled in the art can be changed above-described embodiment, modify, replace and become within the scope of the invention
Type.
Claims (15)
1. a kind of method of controlling security, which is characterized in that executed, be the described method comprises the following steps by vehicle gateway:
It obtains according to the ECU identity information of control unit for vehicle ECU to be certified and the Gateway identity information of the vehicle gateway,
The key of generation, and generate the check information of the corresponding ECU identity information;
It is encrypted using check information described in the key pair, generates the first authentication information;
First authentication information is sent to the ECU;Wherein, first authentication information generates corresponding for the ECU
Second authentication information;
The second authentication information that the ECU is sent is received, is decrypted to obtain using the second authentication information described in the key pair
The check information and ECU identity information of carrying;
By judging the check information that second authentication information carries and the ECU identity information that second authentication information carries
Whether there is corresponding relationship, safety check is carried out to the ECU.
2. method of controlling security according to claim 1, which is characterized in that the acquisition is according to vehicle control to be certified
The Gateway identity information of the ECU identity information of unit ECU and the vehicle gateway, the key of generation, comprising:
When vehicle powers on, the ECU identity information prestored is read;
According to the ECU identity information and the Gateway identity information, the key is generated.
3. method of controlling security according to claim 1, which is characterized in that described using verification letter described in the key pair
Breath is encrypted, and the first authentication information is generated, comprising:
It is encrypted, is generated using the combination of the Gateway identity information and the check information of vehicle gateway described in the key pair
First authentication information.
4. method of controlling security according to claim 2, which is characterized in that it is described read the ECU identity information that prestores it
Before, further includes:
The Gateway identity information is sent to the ECU;The Gateway identity information is used for the ECU for the Gateway identity
Information is stored into the band electric erazable programmable memory EEPROM of the ECU;
Receive the ECU identity information that the ECU is sent;
The ECU identity information is stored into the EEPROM of the vehicle gateway.
5. method of controlling security according to claim 4, which is characterized in that the ECU identity for receiving the ECU and sending
After information, further includes:
The key is generated according to the ECU identity information and the Gateway identity information, and the key is sent to described
ECU。
6. method of controlling security according to claim 3, which is characterized in that first authentication information is also used to described
ECU is decrypted using the first authentication information described in the key pair prestored, the Gateway identity information is obtained, according to described first
Whether the Gateway identity information that authentication information is decrypted matches with the Gateway identity information prestored, carries out to the vehicle gateway
Safety check.
7. a kind of method of controlling security, which is characterized in that executed, be the described method comprises the following steps by control unit for vehicle ECU:
Receive the first authentication information that vehicle gateway is sent;
It is decrypted using the first authentication information described in the key pair prestored, to obtain check information;Wherein, it is described prestore it is close
Key is generated by the vehicle gateway according to the ECU identity information of the ECU and the Gateway identity information of the vehicle gateway, and
It is sent to the ECU;
Generate the second authentication information of the key encryption prestored described in passing through;Wherein, second authentication information carries decryption
Obtained check information and the ECU identity information;
Second authentication information is sent to the vehicle gateway;Wherein, second authentication information is used for the vehicle net
Close is by the ECU identity information for judging that the check information that second authentication information carries is carried with second authentication information
It is no that there is corresponding relationship, safety check is carried out to the ECU.
8. method of controlling security according to claim 7, which is characterized in that first authentication information is also carried wait recognize
The Gateway identity information of card, it is described receive vehicle gateway send the first authentication information after, further includes:
It is decrypted using the first authentication information described in the key pair prestored, obtains Gateway identity information to be certified;
Whether matched according to the Gateway identity information to be certified with the Gateway identity information prestored, to the vehicle gateway into
Row safety check.
9. method of controlling security according to claim 7, which is characterized in that the key prestored described in process that generates adds
The second close authentication information, comprising:
To the ECU identity information, the safety check for decrypting obtained check information and the vehicle gateway as a result, adopting
It is encrypted with the key that the hardware security module HSM of the ECU is prestored, obtains second authentication information.
10. method of controlling security according to claim 7, which is characterized in that described using described in the key pair that prestores the
One authentication information is decrypted, and obtains check information, comprising:
First authentication information described in the key pair prestored using the HSM of the ECU is decrypted, and check information is obtained.
11. method of controlling security according to claim 9 or 10, which is characterized in that described to receive what vehicle gateway was sent
Before first authentication information, further includes:
Receive the Gateway identity information that the vehicle gateway is sent;
The Gateway identity information that the vehicle gateway is sent is stored to the band electric erazable programmable memory EEPROM of the ECU
In;
The ECU identity information is sent to the vehicle gateway;
Receive the key that the vehicle gateway is generated according to the ECU identity information, the Gateway identity information;
By the key storage to the HSM of the ECU.
12. a kind of safety control, which is characterized in that be set to vehicle gateway, described device includes:
Processing module, for obtaining according to the ECU identity information of control unit for vehicle ECU to be certified and the vehicle gateway
Gateway identity information, the key of generation, and generate the check information of the corresponding ECU identity information;
Encrypting module generates the first authentication information for being encrypted using check information described in the key pair;
First sending module, for sending first authentication information to the ECU;Wherein, first authentication information, is used for
The ECU generates corresponding second authentication information;
First receiving module, the second authentication information sent for receiving the ECU, using the second certification described in the key pair
The check information carried and ECU identity information is decrypted in information;
Correction verification module, for by judging that the check information that second authentication information carries is carried with second authentication information
ECU identity information whether there is corresponding relationship, to the ECU carry out safety check.
13. a kind of safety control, which is characterized in that be set to control unit for vehicle ECU, described device includes:
First receiving module, for receiving the first authentication information of vehicle gateway transmission;
Deciphering module, for being decrypted using the first authentication information described in the key pair prestored, to obtain check information;Its
In, the key prestored, by the vehicle gateway according to the ECU identity information of the ECU and the gateway of the vehicle gateway
Identity information generates, and is sent to the ECU;
Generation module, for generating the second authentication information of the key prestored described in process encryption;Wherein, the second certification letter
Breath carries the check information and the ECU identity information that decryption obtains;
First sending module, for second authentication information to be sent to the vehicle gateway;Wherein, the second certification letter
Breath is taken by the check information for judging that second authentication information carries with second authentication information for the vehicle gateway
Whether the ECU identity information of band has corresponding relationship, carries out safety check to the ECU.
14. a kind of computer equipment, which is characterized in that including memory, processor and store on a memory and can handle
The computer program run on device when the processor executes described program, realizes such as peace as claimed in any one of claims 1 to 6
Full control method, alternatively, realizing any method of controlling security as claim in claims 7-11.
15. a kind of non-transitorycomputer readable storage medium, is stored thereon with computer program, which is characterized in that the program
Such as method of controlling security as claimed in any one of claims 1 to 6 is realized when being executed by processor, alternatively, realizing such as claim 7-
Any method of controlling security in 11.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110937538.5A CN113709123B (en) | 2018-10-31 | 2018-10-31 | Security control method and device and computer equipment |
CN201811291768.3A CN109257374B (en) | 2018-10-31 | 2018-10-31 | Security control method and device and computer equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811291768.3A CN109257374B (en) | 2018-10-31 | 2018-10-31 | Security control method and device and computer equipment |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110937538.5A Division CN113709123B (en) | 2018-10-31 | 2018-10-31 | Security control method and device and computer equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109257374A true CN109257374A (en) | 2019-01-22 |
CN109257374B CN109257374B (en) | 2021-09-03 |
Family
ID=65044542
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811291768.3A Active CN109257374B (en) | 2018-10-31 | 2018-10-31 | Security control method and device and computer equipment |
CN202110937538.5A Active CN113709123B (en) | 2018-10-31 | 2018-10-31 | Security control method and device and computer equipment |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110937538.5A Active CN113709123B (en) | 2018-10-31 | 2018-10-31 | Security control method and device and computer equipment |
Country Status (1)
Country | Link |
---|---|
CN (2) | CN109257374B (en) |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110176990A (en) * | 2019-05-15 | 2019-08-27 | 百度在线网络技术(北京)有限公司 | Vehicle assembly replaces recognition methods, device, computer equipment and storage medium |
CN111147492A (en) * | 2019-12-26 | 2020-05-12 | 国汽(北京)智能网联汽车研究院有限公司 | Data secure transmission system, method and device |
CN111193761A (en) * | 2019-09-11 | 2020-05-22 | 腾讯科技(深圳)有限公司 | File transmission method and device and readable storage medium |
CN111193732A (en) * | 2019-12-26 | 2020-05-22 | 国汽(北京)智能网联汽车研究院有限公司 | In-vehicle communication method and device and electronic equipment |
CN111356114A (en) * | 2020-02-19 | 2020-06-30 | 北京百度网讯科技有限公司 | In-vehicle electronic control unit upgrading method, device, equipment and vehicle system |
CN111865922A (en) * | 2020-06-23 | 2020-10-30 | 国汽(北京)智能网联汽车研究院有限公司 | Communication method, device, equipment and storage medium |
CN112422595A (en) * | 2019-08-20 | 2021-02-26 | 华为技术有限公司 | Vehicle-mounted system safety protection method and device |
CN112650172A (en) * | 2020-12-17 | 2021-04-13 | 山东云天安全技术有限公司 | Safety authentication method and equipment for industrial control system |
CN112994898A (en) * | 2021-04-08 | 2021-06-18 | 北京邮电大学 | Vehicle intranet communication safety authentication method and device |
CN113612804A (en) * | 2021-10-08 | 2021-11-05 | 江铃汽车股份有限公司 | Vehicle configuration upgrading method and system, storage medium and intelligent gateway |
CN113709101A (en) * | 2021-07-19 | 2021-11-26 | 英博超算(南京)科技有限公司 | Automobile fingerprint safety identification system and method |
CN114124578A (en) * | 2022-01-25 | 2022-03-01 | 湖北芯擎科技有限公司 | Communication method, device, vehicle and storage medium |
CN114844627A (en) * | 2021-06-28 | 2022-08-02 | 长城汽车股份有限公司 | Vehicle key anti-theft method, system, electronic equipment and vehicle |
CN116318727A (en) * | 2023-03-16 | 2023-06-23 | 北京百度网讯科技有限公司 | ECU access method, device, equipment and storage medium |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003216220A (en) * | 2002-01-21 | 2003-07-31 | Toyota Motor Corp | Vehicle manufacturing method, program collating device and program setting device |
CN106302379A (en) * | 2015-06-26 | 2017-01-04 | 比亚迪股份有限公司 | The authentication method of vehicle mounted electrical apparatus, system and its apparatus |
CN106464566A (en) * | 2014-06-16 | 2017-02-22 | 株式会社理光 | Network system, communication control method, and storage medium |
JP2017050848A (en) * | 2015-08-31 | 2017-03-09 | パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America | Gateway device, on-vehicle network system and transfer method |
CN106533655A (en) * | 2016-10-27 | 2017-03-22 | 江苏大学 | Method for secure communication of ECUs (Electronic control unit) in a vehicle network |
CN106664230A (en) * | 2014-07-14 | 2017-05-10 | 国立大学法人名古屋大学 | Communication system, communication control device and method for preventing transmission of invalid information |
CN106790053A (en) * | 2016-12-20 | 2017-05-31 | 江苏大学 | A kind of method of ECU secure communications in CAN |
CN106899404A (en) * | 2017-02-15 | 2017-06-27 | 同济大学 | Vehicle-mounted CAN FD bus communication systems and method based on wildcard |
CN107683583A (en) * | 2015-06-29 | 2018-02-09 | 歌乐株式会社 | Vehicle-mounted information communication system and authentication method |
CN108207039A (en) * | 2016-12-19 | 2018-06-26 | 比亚迪股份有限公司 | Safe transmission method, external device and the car borne gateway of vehicle-mounted data |
CN108259465A (en) * | 2017-12-08 | 2018-07-06 | 清华大学 | A kind of authentication encryption method of intelligent automobile internal network |
CN108366069A (en) * | 2018-02-26 | 2018-08-03 | 北京赛博兴安科技有限公司 | A kind of mutual authentication method and system |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101106455B (en) * | 2007-08-20 | 2010-10-13 | 北京飞天诚信科技有限公司 | Identity authentication method and intelligent secret key device |
CN107306261B (en) * | 2016-04-22 | 2021-09-07 | 中兴通讯股份有限公司 | Encryption communication method, device and system |
-
2018
- 2018-10-31 CN CN201811291768.3A patent/CN109257374B/en active Active
- 2018-10-31 CN CN202110937538.5A patent/CN113709123B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003216220A (en) * | 2002-01-21 | 2003-07-31 | Toyota Motor Corp | Vehicle manufacturing method, program collating device and program setting device |
CN106464566A (en) * | 2014-06-16 | 2017-02-22 | 株式会社理光 | Network system, communication control method, and storage medium |
CN106664230A (en) * | 2014-07-14 | 2017-05-10 | 国立大学法人名古屋大学 | Communication system, communication control device and method for preventing transmission of invalid information |
CN106302379A (en) * | 2015-06-26 | 2017-01-04 | 比亚迪股份有限公司 | The authentication method of vehicle mounted electrical apparatus, system and its apparatus |
CN107683583A (en) * | 2015-06-29 | 2018-02-09 | 歌乐株式会社 | Vehicle-mounted information communication system and authentication method |
JP2017050848A (en) * | 2015-08-31 | 2017-03-09 | パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America | Gateway device, on-vehicle network system and transfer method |
CN106533655A (en) * | 2016-10-27 | 2017-03-22 | 江苏大学 | Method for secure communication of ECUs (Electronic control unit) in a vehicle network |
CN108207039A (en) * | 2016-12-19 | 2018-06-26 | 比亚迪股份有限公司 | Safe transmission method, external device and the car borne gateway of vehicle-mounted data |
CN106790053A (en) * | 2016-12-20 | 2017-05-31 | 江苏大学 | A kind of method of ECU secure communications in CAN |
CN106899404A (en) * | 2017-02-15 | 2017-06-27 | 同济大学 | Vehicle-mounted CAN FD bus communication systems and method based on wildcard |
CN108259465A (en) * | 2017-12-08 | 2018-07-06 | 清华大学 | A kind of authentication encryption method of intelligent automobile internal network |
CN108366069A (en) * | 2018-02-26 | 2018-08-03 | 北京赛博兴安科技有限公司 | A kind of mutual authentication method and system |
Non-Patent Citations (1)
Title |
---|
刘毅; 秦贵和; 赵睿: "车载控制器局域网络安全协议", 《西安交通大学学报》 * |
Cited By (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110176990A (en) * | 2019-05-15 | 2019-08-27 | 百度在线网络技术(北京)有限公司 | Vehicle assembly replaces recognition methods, device, computer equipment and storage medium |
CN112422595A (en) * | 2019-08-20 | 2021-02-26 | 华为技术有限公司 | Vehicle-mounted system safety protection method and device |
CN112422595B (en) * | 2019-08-20 | 2022-10-11 | 华为技术有限公司 | Vehicle-mounted system safety protection method and device |
CN111193761A (en) * | 2019-09-11 | 2020-05-22 | 腾讯科技(深圳)有限公司 | File transmission method and device and readable storage medium |
CN111147492A (en) * | 2019-12-26 | 2020-05-12 | 国汽(北京)智能网联汽车研究院有限公司 | Data secure transmission system, method and device |
CN111193732A (en) * | 2019-12-26 | 2020-05-22 | 国汽(北京)智能网联汽车研究院有限公司 | In-vehicle communication method and device and electronic equipment |
CN111356114A (en) * | 2020-02-19 | 2020-06-30 | 北京百度网讯科技有限公司 | In-vehicle electronic control unit upgrading method, device, equipment and vehicle system |
CN111865922B (en) * | 2020-06-23 | 2022-09-23 | 国汽(北京)智能网联汽车研究院有限公司 | Communication method, device, equipment and storage medium |
CN111865922A (en) * | 2020-06-23 | 2020-10-30 | 国汽(北京)智能网联汽车研究院有限公司 | Communication method, device, equipment and storage medium |
CN112650172A (en) * | 2020-12-17 | 2021-04-13 | 山东云天安全技术有限公司 | Safety authentication method and equipment for industrial control system |
CN112994898A (en) * | 2021-04-08 | 2021-06-18 | 北京邮电大学 | Vehicle intranet communication safety authentication method and device |
CN112994898B (en) * | 2021-04-08 | 2022-07-26 | 北京邮电大学 | Vehicle intranet communication safety authentication method and device |
CN114844627A (en) * | 2021-06-28 | 2022-08-02 | 长城汽车股份有限公司 | Vehicle key anti-theft method, system, electronic equipment and vehicle |
CN113709101A (en) * | 2021-07-19 | 2021-11-26 | 英博超算(南京)科技有限公司 | Automobile fingerprint safety identification system and method |
CN113612804B (en) * | 2021-10-08 | 2021-12-14 | 江铃汽车股份有限公司 | Vehicle configuration upgrading method and system, storage medium and intelligent gateway |
CN113612804A (en) * | 2021-10-08 | 2021-11-05 | 江铃汽车股份有限公司 | Vehicle configuration upgrading method and system, storage medium and intelligent gateway |
CN114124578A (en) * | 2022-01-25 | 2022-03-01 | 湖北芯擎科技有限公司 | Communication method, device, vehicle and storage medium |
CN116318727A (en) * | 2023-03-16 | 2023-06-23 | 北京百度网讯科技有限公司 | ECU access method, device, equipment and storage medium |
CN116318727B (en) * | 2023-03-16 | 2024-05-10 | 北京百度网讯科技有限公司 | ECU access method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113709123B (en) | 2023-07-28 |
CN109257374B (en) | 2021-09-03 |
CN113709123A (en) | 2021-11-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109257374A (en) | Method of controlling security, device and computer equipment | |
US10855460B2 (en) | In-vehicle computer system, vehicle, key generation device, management method, key generation method, and computer program | |
US11218323B2 (en) | Method and system for producing a secure communication channel for terminals | |
JP5310761B2 (en) | Vehicle network system | |
US9992178B2 (en) | Method, apparatus and system for dynamically controlling secure vehicle communication based on ignition | |
CN111447601B (en) | Implementation method and device of automobile Bluetooth key | |
US20020023223A1 (en) | Authorization process using a certificate | |
JP2010011400A (en) | Cipher communication system of common key system | |
CN107026840A (en) | The safety vehicle network architecture | |
CN108306727A (en) | For encrypting, decrypting and the method and apparatus of certification | |
CN107277079A (en) | A kind of across cloud customer certification system towards mixed cloud | |
CN103281299B (en) | A kind of ciphering and deciphering device and information processing method and system | |
CN112883382B (en) | Vehicle writing method, internet of vehicles box, vehicle and storage medium | |
CN111082941B (en) | Internet of things data sharing method and system based on block chain technology | |
CN113347133B (en) | Authentication method and device of vehicle-mounted equipment | |
CN110446075A (en) | Encryption method and device, decryption method and device, electronic equipment | |
CN113138775A (en) | Firmware protection method and system for vehicle-mounted diagnosis system | |
Ammar et al. | Securing the on-board diagnostics port (obd-ii) in vehicles | |
US10949552B2 (en) | Whole apparatus having an authentication arrangement, and method for authentication | |
US20080189794A1 (en) | Secure Host Interface | |
JP6299039B2 (en) | Vehicle information collection system, data security device, vehicle information collection method, and computer program | |
KR102236282B1 (en) | Method and system for authenticating communication data of vehicle | |
CN114223176A (en) | Certificate management method and device | |
WO2023000313A1 (en) | Key verification method and related apparatus | |
CN108390757A (en) | Processing method of communication data, device, electronic equipment, program and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20211012 Address after: 100176 101, floor 1, building 1, yard 7, Ruihe West 2nd Road, Beijing Economic and Technological Development Zone, Daxing District, Beijing Patentee after: Apollo Intelligent Connectivity (Beijing) Technology Co., Ltd. Address before: 100085 Baidu Building, 10 Shangdi Tenth Street, Haidian District, Beijing Patentee before: BAIDU ONLINE NETWORK TECHNOLOGY (BEIJING) Co.,Ltd. |