CN109688135A - Data transmission method, Vehicle Controller and the readable storage medium storing program for executing of Vehicle Controller - Google Patents
Data transmission method, Vehicle Controller and the readable storage medium storing program for executing of Vehicle Controller Download PDFInfo
- Publication number
- CN109688135A CN109688135A CN201811611970.XA CN201811611970A CN109688135A CN 109688135 A CN109688135 A CN 109688135A CN 201811611970 A CN201811611970 A CN 201811611970A CN 109688135 A CN109688135 A CN 109688135A
- Authority
- CN
- China
- Prior art keywords
- key
- vehicle controller
- target vehicle
- seed information
- request
- 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.)
- Pending
Links
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/06—Network architectures or network communication protocols for network security for supporting key management in a packet data network
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B60—VEHICLES IN GENERAL
- B60R—VEHICLES, VEHICLE FITTINGS, OR VEHICLE PARTS, NOT OTHERWISE PROVIDED FOR
- B60R16/00—Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for
- B60R16/02—Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements
- B60R16/023—Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements for transmission of signals between vehicle parts or subsystems
- B60R16/0231—Circuits relating to the driving or the functioning of the vehicle
-
- 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
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/0838—Key agreement, i.e. key establishment technique in which a shared key is derived by parties as a function of information contributed by, or associated with, each of these
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0891—Revocation or update of secret information, e.g. encryption key update or rekeying
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/12—Transmitting and receiving encryption devices synchronised or initially set up in a particular manner
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Mechanical Engineering (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
Data transmission method, Vehicle Controller and the readable storage medium storing program for executing of Vehicle Controller provided by the invention negotiate request by using first key is sent to target Vehicle Controller, and key negotiation request includes the first seed information prestored;In preset period of time, the key synchronization message that target Vehicle Controller returns is received;Wherein, key synchronization message is that target Vehicle Controller generates after negotiating to generate key when request verifies successfully and according to the first seed information to first key;Key is generated according to preset first seed information;It is encrypted according to the key pair of generation data to be transmitted, and encrypted data are sent to the technical solution of target Vehicle Controller, so that the target Vehicle Controller for needing each controller between Vehicle Controller and directly communicating with carries out key agreement, and then transmitted using the key for encrypting data for negotiating to generate, Information Security of the Vehicle Controller in data transmission procedure has been effectively ensured.
Description
Technical field
The present invention relates to the communication technology more particularly to a kind of data transmission method of Vehicle Controller, Vehicle Controller and
Readable storage medium storing program for executing.
Background technique
With vehicle intellectualized, technology of Internet of things development, automotive interior carries a large amount of electronic equipment, especially
Such as entire car controller, gateway controller, instrument controller.These electronic equipments can carry out efficient communication sum number by wireless communication
According to interaction, to meet the intelligent control demand for automobile.
In the prior art, using plaintext transmission, this makes between each controller the communication data between each controller
Communication data is easy abduction and utilization by hacker, has seriously affected automobile inherently safe.
Therefore, the safety for how improving vapour in-vehicle network communication data becomes technical problem urgently to be resolved.
Summary of the invention
Become technical problem urgently to be resolved for the above-mentioned safety for how improving vapour in-vehicle network communication data referred to,
This application provides a kind of data transmission method of Vehicle Controller, Vehicle Controller and readable storage medium storing program for executing.
On the one hand, the present invention provides a kind of data transmission methods of Vehicle Controller, comprising:
First key is sent to target Vehicle Controller and negotiates request, and the key negotiation request includes the first prestored
Sub-information;
In preset period of time, the key synchronization message that target Vehicle Controller returns is received;Wherein, the key is same
Step message be the target Vehicle Controller the first key is negotiated when request verifies successfully and according to it is described the first
Sub-information generates what key generated later;
Key is generated according to preset first seed information;
It is encrypted according to the key pair of generation data to be transmitted, and encrypted data is sent to the target carriage
Set controller.
It is optionally, described to negotiate after requesting to target Vehicle Controller transmission first key, further includes:
In preset period of time, the second key negotiation request that target Vehicle Controller is sent is received, described second is close
Key is negotiated in request to include the second seed information being pre-stored in the target Vehicle Controller;
Preferred seed information is selected from first seed information and the second seed information according to preset rules, and
Key is generated according to the preferred seed information;
It is encrypted according to the key pair of generation data to be transmitted, and encrypted data is sent to the target carriage
Set controller.
Optionally, described in preset period of time, receive the second key negotiation request that target Vehicle Controller is sent
Later, further includes: utilize preset checking algorithm, second key negotiation request is verified;It is logical and if only if verification
It is out-of-date, it executes and selects preferred seed information from first seed information and the second seed information according to preset rules
Step.
Optionally, described to be selected from first seed information and the second seed information according to preset rules preferably
Seed information, comprising:
According in first seed information and second seed information preset position character string numerical value size, determine described in
Preferred seed information.
Optionally, further includes:
After sending first key negotiation request to target Vehicle Controller, target is not received in preset period of time
When key synchronization message or the second key negotiation request that Vehicle Controller is sent, first is retransmitted to target Vehicle Controller
Key negotiation request.
Optionally, before the transmission first key negotiation request to target Vehicle Controller, further includes:
Judge whether to prestore key corresponding with the target Vehicle Controller;
If so, the key pair data to be transmitted according to generation are encrypted, and encrypted data are sent to institute
State target Vehicle Controller;
If it is not, then sending first key to target Vehicle Controller negotiates request.
Optionally, in the case where prestoring key, the data transmission method of the Vehicle Controller further include:
When key failure, Xiang Suoshu target Vehicle Controller sends first key and updates synchronization request;
In preset period of time, the key updating synchronization message that the target Vehicle Controller returns is received;Wherein, institute
It is to be updated synchronization request and to prestore according to the first key that state key updating synchronization message, which be the target Vehicle Controller,
More new algorithm synchronizes key update after generate;
According to the key updating synchronization message, update is synchronized to the key using the more new algorithm prestored.
Optionally, in the case where prestoring key, the data transmission method of the Vehicle Controller further include:
When key failure, Xiang Suoshu target Vehicle Controller sends key updating synchronization request;
In preset period of time, the second key updating synchronization request that the target Vehicle Controller is sent is received;
According to the second key updating synchronization request, the key is synchronized more using the more new algorithm prestored
Newly.
On the other hand, the present invention provides a kind of Vehicle Controllers, comprising:
Sending module negotiates request, the key negotiation request packet for sending first key to target Vehicle Controller
Include the first seed information prestored;
Receiving module, in preset period of time, receiving the key synchronization message that target Vehicle Controller is sent;Its
In, the key synchronization message is that the target Vehicle Controller is being negotiated to request to verify successfully Shi Binggen to the first key
Generate what key generated later according to first seed information;
Key production module is also used to generate key according to preset first seed information;
Transmission module is also used to be encrypted according to the key pair data to be transmitted of generation, and by encrypted data
It is sent to the target Vehicle Controller.
Optionally, receiving module is also used to after sending first key to target Vehicle Controller and negotiating request, is also wrapped
It includes: in preset period of time, receiving the second key negotiation request that target Vehicle Controller is sent, second key agreement
It include the second seed information being pre-stored in the target Vehicle Controller in request;
Key production module, for being selected from first seed information and the second seed information according to preset rules
Preferred seed information out, and key is generated according to the preferred seed information;
Transmission module is encrypted for the key pair data to be transmitted according to generation, and encrypted data is sent out
It send to the target Vehicle Controller.
It optionally, further include correction verification module, in preset period of time, receiving what target Vehicle Controller was sent
After second key negotiation request, using preset checking algorithm, second key negotiation request is verified;When and only
When passed the verification, key production module is executed according to preset rules from first seed information and the second seed information
In the step of selecting preferred seed information.
Optionally, key production module is specifically used for presetting according in first seed information and second seed information
The size of the character string numerical value of position, determines the preferred seed information.
Optionally, after sending first key negotiation request to target Vehicle Controller, receiving module is in preset time
When not receiving the key synchronization message or the second key negotiation request of target Vehicle Controller transmission in the period, sending module is also used
Negotiate request in retransmitting first key to target Vehicle Controller.
Optionally, before sending first key negotiation request to target Vehicle Controller in sending module, transmission module is also
For judging whether to prestore key corresponding with the target Vehicle Controller;If so, key of the transmission module according to generation
Data to be transmitted are encrypted, and encrypted data are sent to the target Vehicle Controller;If it is not, then sending mould
Block sends first key to target Vehicle Controller and negotiates request.
It optionally, further include key updating module;
Sending module, for when prestoring key and key fails, it is close that Xiang Suoshu target Vehicle Controller sends first
Key updates synchronization request;
Receiving module, it is same in preset period of time, receiving the key updating that the target Vehicle Controller returns
Walk message;Wherein, the key updating synchronization message, which is the target Vehicle Controller, is updated together according to the first key
Step request and the more new algorithm that prestores synchronize key update after generate;
Key updating module is used for according to the key updating synchronization message, using the more new algorithm prestored to described close
Key synchronizes update.
Optionally, in the case where prestoring key, when key failure, sending module, for vehicle-mounted to the target
Controller sends key updating synchronization request;
Receiving module, in preset period of time, receiving the second key of the target Vehicle Controller transmission more
New synchronization request;
Key updating module is used for according to the second key updating synchronization request, using the more new algorithm prestored to institute
It states key and synchronizes update.
In another aspect, the present invention provides a kind of Vehicle Controllers, comprising:
Processor;
Memory, for storing the executable instruction of the processor;
When the processor executes the executable instruction, aforementioned described in any item methods can be executed.
Last aspect, the present invention provides a kind of readable storage medium storing program for executing, including instruction, when described instruction is in the calculating
When running on machine, the computer can execute aforementioned described in any item methods.
Data transmission method, Vehicle Controller and the readable storage medium storing program for executing of Vehicle Controller provided by the invention, pass through to
Target Vehicle Controller sends first key and negotiates request, and the key negotiation request includes the first seed information prestored;?
In preset period of time, the key synchronization message that target Vehicle Controller returns is received;Wherein, the key synchronization message is institute
It states target Vehicle Controller the first key is being negotiated to generate when request verifies successfully and according to first seed information
It is generated after key;Key is generated according to preset first seed information;According to the key pair of generation data to be transmitted into
Row encrypts, and encrypted data are sent to the technical solution of the target Vehicle Controller, so that in vehicle-mounted control
The target Vehicle Controller for needing each controller between device and directly communicating with carries out key agreement, and then uses negotiation life
At key for encrypting data transmission, Information Security of the Vehicle Controller in data transmission procedure has been effectively ensured.
Detailed description of the invention
Through the above attached drawings, it has been shown that the specific embodiment of the disclosure will be hereinafter described in more detail.These attached drawings
It is not intended to limit the scope of this disclosure concept by any means with verbal description, but is by referring to specific embodiments
Those skilled in the art illustrate the concept of the disclosure.
Fig. 1 be the present invention is based on network architecture schematic diagram;
Fig. 2 is a kind of flow diagram of the data transmission method for Vehicle Controller that the embodiment of the present invention one provides;
Fig. 3 is a kind of flow diagram of the data transmission method of Vehicle Controller provided by Embodiment 2 of the present invention;
Fig. 4 is a kind of flow diagram of the data transmission method for Vehicle Controller that the embodiment of the present invention three provides;
Fig. 5 is a kind of structural schematic diagram for Vehicle Controller that the embodiment of the present invention four provides;
Fig. 6 is a kind of hardware structural diagram for Vehicle Controller that the embodiment of the present invention five provides.
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure
Example, and together with specification for explaining the principles of this disclosure.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described.
Become technical problem urgently to be resolved for the above-mentioned safety for how improving vapour in-vehicle network communication data referred to,
This application provides a kind of data transmission method of Vehicle Controller, Vehicle Controller and readable storage medium storing program for executing.
It should be noted that the application provides data transmission method, Vehicle Controller and the readable storage of Vehicle Controller
Medium can be in the data transmission procedure of all types of controllers in the car.These controllers include but is not limited to: full-vehicle control
Device, gateway controller, instrument controller etc..
Therein, entire car controller is the core control part of automobile, realizes the drive control of vehicle, energy-optimised control
The functions such as system, feedback braking control and network management.The effect of gateway controller is the logical of heterogeneous networks in interior electronic system
Hinge is interrogated, makes each unit being distributed in vehicle body that can realize communication.The effect of instrument controller is responsible for collecting each electronics
The state of component feeds back to driver by instrument.
Fig. 1 be the present invention is based on network architecture schematic diagram, as shown in Figure 1, the present invention is based on the network architecture at least wrap
It includes: setting and multiple Vehicle Controllers 2 in automobile 1.Vehicle Controller therein may include entire car controller, gateway control
Device, instrument controller etc..
Fig. 2 is a kind of flow diagram of the data transmission method for Vehicle Controller that the embodiment of the present invention one provides.
As shown in Fig. 2, the data transmission method of the Vehicle Controller, comprising:
Step 101 sends first key negotiation request to target Vehicle Controller, and the key negotiation request includes prestoring
The first seed information.
It should be noted that the executing subject of Vehicle Controller provided by the invention is concretely shown in FIG. 1 any one
A Vehicle Controller 2.
Specifically, in order to improve the safety of vapour in-vehicle network communication data, guarantee data not by hacker and kidnap and benefit
With, in the present embodiment, if Vehicle Controller needs to initiate the data of network communication to target Vehicle Controller, firstly, its
It needs to negotiate request to the first key that target Vehicle Controller transmission includes the first seed information.It wherein, should be with first
Seed information is stored in advance in the Vehicle Controller, which concretely is used to generate the random of key
Character string information.
Step 102, in preset period of time, receive target Vehicle Controller return key synchronization message;Wherein, institute
Stating key synchronization message is that the target Vehicle Controller is negotiated when request verifies successfully and according to institute to the first key
It states the first seed information and generates what key generated later.
After initiating first key and negotiating request, which will be received in preset period of time from mesh
Mark the key synchronization message of Vehicle Controller feedback, wherein target Vehicle Controller is receiving first key negotiation request
After will using preset checking algorithm to the first key negotiate request verify, after verifying successfully, target vehicle-mounted control
Device will generate key according to the first seed information and generate key synchronization message above-mentioned simultaneously.
Step 103 generates key according to preset first seed information;
After receiving key synchronization message, Vehicle Controller will generate key according to preset first seed information.
At this point, Vehicle Controller and target Vehicle Controller all will generate key according to the first seed information, the key generated will be protected
It holds consistent.
Step 104 is encrypted according to the key pair data to be transmitted of generation, and encrypted data is sent to institute
State target Vehicle Controller.
Specifically, after completing the generation for key, Vehicle Controller will utilize the data of key pair transmission
It is encrypted, and encrypted data is sent to target Vehicle Controller, so that it is received and is handled.Wherein, vehicle-mounted control
Device and target Vehicle Controller generate identical key using identical seed information, and therefore, target Vehicle Controller is by root
Corresponding decryption processing is carried out according to the data after key pair encryption, to read data and handle.
The data transmission method for the Vehicle Controller that the embodiment of the present invention one provides, by using to target vehicle-mounted control
Device sends first key and negotiates request, and key negotiation request includes the first seed information prestored;In preset period of time, connect
Receive the key synchronization message that target Vehicle Controller returns;Wherein, key synchronization message is target Vehicle Controller to first
Generate what key generated later when key negotiation request verifies successfully and according to the first seed information;According to preset first seed
Information generates key;It is encrypted according to the key pair of generation data to be transmitted, and encrypted data is sent to target
The technical solution of Vehicle Controller, so that the mesh for needing each controller between Vehicle Controller and directly communicating with
It marks Vehicle Controller and carries out key agreement, and then transmitted using the key for encrypting data for negotiating to generate, has been effectively ensured vehicle-mounted
Information Security of the controller in data transmission procedure.
On the basis of the above embodiment, Fig. 3 is a kind of data of Vehicle Controller provided by Embodiment 2 of the present invention
The flow diagram of transmission method.
As shown in figure 3, the data transmission method of the Vehicle Controller, comprising:
Step 201 sends first key negotiation request to target Vehicle Controller, and the key negotiation request includes prestoring
The first seed information.
It should be noted that the executing subject of Vehicle Controller provided by the invention is concretely shown in FIG. 1 any one
A Vehicle Controller 2.
Specifically, in order to improve the safety of vapour in-vehicle network communication data, guarantee data not by hacker and kidnap and benefit
With, in the present embodiment, if Vehicle Controller needs to initiate the data of network communication to target Vehicle Controller, firstly, its
It needs to negotiate request to the first key that target Vehicle Controller transmission includes the first seed information.It wherein, should be with first
Seed information is stored in advance in the Vehicle Controller, which concretely is used to generate the random of key
Character string information.
Step 202, in preset period of time, receive target Vehicle Controller send the second key negotiation request, institute
Stating includes the second seed information being pre-stored in the target Vehicle Controller in the second key negotiation request.
Step 203 selects preferred kind from first seed information and the second seed information according to preset rules
Sub-information, and key is generated according to the preferred seed information.
Specifically, in above-mentioned steps 202 and 203, after initiating first key and negotiating request, the Vehicle Controller
It can be judged whether there is in preset period of time and receive the message sent from target Vehicle Controller.Wherein, preset time
Period can specifically be patrolled the record of time by those skilled in the art's self-setting by the timing inside Vehicle Controller
The timing units such as circuit or timing chain are collected to realize.
When the message is key synchronization message, key is generated according to preset first seed information;When the message
When the second key negotiation request to carry second seed information, according to preset rules from first seed information and described
Preferred seed information is selected in second seed information, according to the preferred seed information generate key, described second therein
Sub-information is pre-stored in the target Vehicle Controller.
Specifically, when Vehicle Controller is received from the message that target Vehicle Controller is sent, which is deposited
In two kinds of situations:
One of which may be the first negotiated by target Vehicle Controller according to first key in request for the message
After sub-information generates key, the key synchronization message of generation.Specifically, when target Vehicle Controller receives first key
After negotiating request, request can be negotiated according to the first key and generate corresponding key, generated and returned to the Vehicle Controller
One key synchronization message;Correspondingly, being believed after the Vehicle Controller receives the key synchronization message according to first seed
Breath generates key.That is, in that case, Vehicle Controller and target Vehicle Controller will all be believed according to the first seed
Breath generates key, and the key generated will be consistent.
Wherein alternatively possible is that be by target Vehicle Controller be the message carries the second close of second seed information
Key negotiates request.Specifically, while Vehicle Controller wishes to obtain with target Vehicle Controller and communicates and initiate data,
The target Vehicle Controller may be at the same time it is wished that communicating with Vehicle Controller acquirement and initiating data.That is, the two
The first key for initiating to carry the first seed information simultaneously respectively is negotiated into request and carries the of second seed information
Two key negotiation requests.In this case, the competition mechanism of seed information can be used to determine the seed for generating key
Preset rules are selected preferred kind from first seed information and the second seed information by information, the i.e. Vehicle Controller
Sub-information, and key is generated according to the preferred seed information;Correspondingly, target Vehicle Controller is sending out the second key association
Consult and request after asking, will receive from the Vehicle Controller initiate first key negotiate request, also according to preset rules from
Preferred seed information is selected in first seed information and second seed information generates key.Therefore, in this case, vehicle-mounted control
Device processed and target Vehicle Controller all will generate key according to preferred seed information, and the key generated will be consistent.
Above-mentioned selects preferred seed from first seed information and the second seed information according to preset rules
The size according to the character string numerical value for presetting position in first seed information and second seed information specifically can be used in information,
Determine the mode of the preferred seed information;Other modes can also be used, present embodiment is not limited this.
Optionally, it is sent when Vehicle Controller does not receive in preset period of time from target Vehicle Controller
Message when, may be because the first key negotiate request send failure or target Vehicle Controller send message hair
Send failure.At this point, the Vehicle Controller, which can re-initiate first key, negotiates request, so that the reception of target Vehicle Controller is gone forward side by side
Row processing.Certainly, it should be noted that, can also be for repeating to send out during this repeats to initiate first key negotiation request
Rise number monitored in real time, to be excluded due to the problem of communication line in time caused by Vehicle Controller can not be with mesh
Mark the problem of Vehicle Controller obtains communication connection.
Step 204 is encrypted according to the key pair data to be transmitted of generation, and encrypted data is sent to institute
State target Vehicle Controller.
Specifically, after completing the generation for key, Vehicle Controller will utilize the data of key pair transmission
It is encrypted, and encrypted data is sent to target Vehicle Controller, so that it is received and is handled.Wherein, vehicle-mounted control
Device and target Vehicle Controller generate identical key using identical seed information, and therefore, target Vehicle Controller is by root
Corresponding decryption processing is carried out according to the data after key pair encryption, to read data and handle.
Preferably, in the above-described embodiment, Vehicle Controller is when receiving the message that target Vehicle Controller is sent, also
Preset checking algorithm will be used, the received message will be verified;It is obstructed out-of-date when verifying, the message is not carried out
Processing.Specifically, whether verifying message is complete, and checking algorithm therein specifically may include is specifically used for the verification of message
MAC algorithm etc..
Preferably, in the above-described embodiment, Vehicle Controller is sending first key negotiation to target Vehicle Controller
Before request, further include the steps that judging whether to prestore the key for carrying out coded communication with the target Vehicle Controller.
That is, when Vehicle Controller needs to send data to target Vehicle Controller, it can be it is first determined whether prestoring corresponding
Key execute transmissions first key above-mentioned and negotiate to request, and is vehicle-mounted with target and only in the case where the key is not present
The process of controller progress key agreement;In the case where having key, Vehicle Controller can be directly according to the key pair of generation
Data to be transmitted are encrypted, and encrypted data are sent to the target Vehicle Controller.
The data transmission method of Vehicle Controller provided by Embodiment 2 of the present invention, by using to target vehicle-mounted control
Device sends first key and negotiates request, and the key negotiation request includes the first seed information prestored;In preset period of time
It is interior, receive the message that target Vehicle Controller is sent;When the message is key synchronization message, according to preset first seed
Information generates key;When the message is to carry the second key negotiation request of second seed information, according to preset rules
Preferred seed information is selected from first seed information and the second seed information, it is raw according to the preferred seed information
At key, the second seed information therein is pre-stored in the target Vehicle Controller;According to the key pair of generation
Data to be transmitted are encrypted, and encrypted data are sent to the technical solution of the target Vehicle Controller, thus
So that the target Vehicle Controller for needing each controller between Vehicle Controller and directly communicating with carries out key agreement,
And then transmitted using the key for encrypting data for negotiating to generate, number of the Vehicle Controller in data transmission procedure has been effectively ensured
According to safety.
On the basis of embodiment one or two, Fig. 4 is a kind of data for Vehicle Controller that the embodiment of the present invention three provides
The flow diagram of transmission method.
As shown in figure 4, the data transmission method of the Vehicle Controller includes:
Step 301 judges whether to prestore key.
If so, thening follow the steps 302;If it is not, thening follow the steps 305.
Step 302, the validity for judging the key.
When the key is effective, step 308 is executed;When key failure, step 303 is executed.
Step 303, Xiang Suoshu target Vehicle Controller send first key and update synchronization request;
Step 304, in preset period of time, receive the message that the target Vehicle Controller returns;When the message is
When key updating synchronization message, according to the key updating synchronization message, the key is carried out using the more new algorithm prestored
Synchronized update;When the message is the second key updating synchronization request, according to the second key updating synchronization request, using pre-
The more new algorithm deposited synchronizes update to the key;Execute step 308.
Wherein, the key updating synchronization message, which is the target Vehicle Controller, is updated together according to the first key
Step request and the more new algorithm that prestores synchronize key update after generate;
Step 305 sends first key negotiation request to target Vehicle Controller, and the key negotiation request includes prestoring
The first seed information.
Step 306, in preset period of time, receive target Vehicle Controller send message.
Step 307, when the message be key synchronization message when, according to preset first seed information generate key;When
The message is to be believed according to preset rules from first seed when carrying the second key negotiation request of second seed information
Preferred seed information is selected in breath and the second seed information, key, institute therein are generated according to the preferred seed information
Second seed information is stated to be pre-stored in the target Vehicle Controller.
Step 308 is encrypted according to the key pair data to be transmitted of generation, and encrypted data is sent to institute
State target Vehicle Controller.
Similarly with embodiment one, the executing subject of Vehicle Controller provided by the invention is concretely shown in FIG. 1
Any one Vehicle Controller 2.
Unlike embodiment one and two, in order to further increase Information Security, the timeliness according to key is also needed
Key is updated.
In the present embodiment three, when Vehicle Controller needs to initiate data to target Vehicle Controller to transmit, it can sentence first
It is disconnected whether to prestore key corresponding with the target Vehicle Controller.Wherein, it should be noted that be directed to different target carriages
Set controller, Vehicle Controller need to communicate using different keys.
Then, when not being stored with corresponding key in Vehicle Controller, the mode of step 305-308 can be used, it is raw
At corresponding secret key, and data encryption and transmission are carried out, detailed process can be found in the corresponding steps of embodiment one, present embodiment
It repeats no more.
When being stored with corresponding key in Vehicle Controller, need to judge the validity of the key.Specifically
For, it can be confirmed by validity information such as generation time, term of validity to key, it is whether effective to obtain the key
Result.
In the effective situation of key, Vehicle Controller can directly using effective key pair data to be transmitted at
It manages and is sent to target Vehicle Controller.
In the case where key failure, Vehicle Controller needs to trigger corresponding key updating mechanism, i.e., using prestoring
More new algorithm is updated key.Wherein, many algorithms, such as hash algorithm can be used in more new algorithm, is to be stored in advance
In Vehicle Controller.While being updated to key, Vehicle Controller will also send close to target Vehicle Controller
Key updates synchronization message, so that target Vehicle Controller is after receiving the key updating synchronization message, according to prestoring more
New algorithm synchronizes update to key.It should be noted that with there are the more new algorithm Ying Yuyu in target Vehicle Controller
There are the more new algorithms in Vehicle Controller to be consistent, so that the updated key that each self refresh of the two obtains keeps one
It causes.
In addition, it should be noted that, as recipient of the Vehicle Controller as data, it is also possible to receive from it
His Vehicle Controller, the key updating synchronization message sent such as target Vehicle Controller;At this point, Vehicle Controller will be according to prestoring
More new algorithm the key is updated, renewal process is similar with aforementioned embodiments, herein without repeating.
Then, after completing for the update of key, similarly with previous embodiment one, Vehicle Controller is by basis
More newly-generated key pair data to be transmitted are encrypted, and encrypted data are sent to the target vehicle-mounted control
Device.
Preferably, in the above-described embodiment, Vehicle Controller is when receiving the message that target Vehicle Controller is sent, also
Preset checking algorithm will be used, the received message will be verified;It is obstructed out-of-date when verifying, the message is not carried out
Processing.Specifically, whether verifying message is complete, and checking algorithm therein specifically may include is specifically used for the verification of message
MAC algorithm etc..
The data transmission method for the Vehicle Controller that the present embodiment three provides is also logical on the basis of aforementioned embodiments
It crosses setting and each Vehicle Controller is further ensured that so that key can be timely updated for the update mechanism for the key that fails
Data safety when transmitting data.
Fig. 5 is a kind of structural schematic diagram for Vehicle Controller that the embodiment of the present invention four provides, as shown in figure 5, this is vehicle-mounted
Controller includes:
Sending module 10 negotiates request, the key negotiation request for sending first key to target Vehicle Controller
Including the first seed information prestored;
Receiving module 20, in preset period of time, receiving the key synchronization message that target Vehicle Controller is sent;
Wherein, the key synchronization message is that the target Vehicle Controller is negotiated when request verifies successfully simultaneously to the first key
Generate what key generated later according to first seed information;
Key production module 30 is also used to generate key according to preset first seed information;
Transmission module 40 is also used to be encrypted according to the key pair data to be transmitted of generation, and by encrypted number
According to being sent to the target Vehicle Controller.
Optionally, receiving module 20 is also used to after sending first key to target Vehicle Controller and negotiating request, also
It include: to receive the second key negotiation request that target Vehicle Controller is sent, the second key association in preset period of time
Consulting and requesting includes the second seed information being pre-stored in the target Vehicle Controller in asking;
Key production module 30 is used for according to preset rules from first seed information and the second seed information
Preferred seed information is selected, and key is generated according to the preferred seed information;
Transmission module 40 is encrypted for the key pair data to be transmitted according to generation, and by encrypted data
It is sent to the target Vehicle Controller.
It optionally, further include correction verification module, in preset period of time, receiving what target Vehicle Controller was sent
After second key negotiation request, using preset checking algorithm, second key negotiation request is verified;When and only
When passed the verification, key production module 30, which is executed, believes according to preset rules from first seed information and the second seed
The step of preferred seed information is selected in breath.
Optionally, key production module 30 are specifically used for according to pre- in first seed information and second seed information
If the size of the character string numerical value of position determines the preferred seed information.
Optionally, after sending first key negotiation request to target Vehicle Controller, receiving module 20 is when default
Between when the key synchronization message or the second key negotiation request of target Vehicle Controller transmission are not received in the period, sending module 10
It is also used to retransmit first key to target Vehicle Controller and negotiates request.
Optionally, before sending first key negotiation request to target Vehicle Controller in sending module 10, transmission module
40 are also used to judge whether to prestore key corresponding with the target Vehicle Controller;If so, transmission module 40 is according to generation
Key pair data to be transmitted encrypted, and encrypted data are sent to the target Vehicle Controller;If it is not, then
Sending module 10 sends first key to target Vehicle Controller and negotiates request.
It optionally, further include key updating module;
Sending module 10, for when prestoring key and key fails, Xiang Suoshu target Vehicle Controller to send first
Key updating synchronization request;
Receiving module 20, the key updating returned in preset period of time, receiving the target Vehicle Controller
Synchronization message;Wherein, the key updating synchronization message, which is the target Vehicle Controller, is updated according to the first key
Synchronization request and the more new algorithm prestored synchronize key update after generate;
Key updating module is used for according to the key updating synchronization message, using the more new algorithm prestored to described close
Key synchronizes update.
Optionally, in the case where prestoring key, when key failure, sending module 10 is used for the target carriage
Set controller sends key updating synchronization request;
Receiving module 20, the second key sent in preset period of time, receiving the target Vehicle Controller
Update synchronization request;
Key updating module is used for according to the second key updating synchronization request, using the more new algorithm prestored to institute
It states key and synchronizes update.
The technical staff in the field can be understood that, for convenience and simplicity of description, the system of foregoing description
Specific work process and corresponding beneficial effect, can refer to corresponding processes in the foregoing method embodiment, herein no longer
It repeats.
The Vehicle Controller of Vehicle Controller provided by the invention sends first by using to target Vehicle Controller
Key negotiation request, key negotiation request include the first seed information prestored;In preset period of time, it is vehicle-mounted to receive target
The key synchronization message that controller returns;Wherein, key synchronization message is that target Vehicle Controller is asked to first key negotiation
It asks when verifying successfully and generates what key generated later according to the first seed information;It is generated according to preset first seed information close
Key;It is encrypted according to the key pair of generation data to be transmitted, and encrypted data is sent to target Vehicle Controller
Technical solution so that the target vehicle-mounted control for needing each controller between Vehicle Controller and directly communicating with
Device carries out key agreement, and then is transmitted using the key for encrypting data for negotiating to generate, and Vehicle Controller has been effectively ensured in number
According to the Information Security in transmission process.
In other embodiments, Fig. 6 is that a kind of hardware configuration for Vehicle Controller that the embodiment of the present invention five provides shows
It is intended to.As shown in fig. 6, the vehicle-mounted control implement body can include:
Processor 42;
Memory 41, for storing the executable instruction of the processor 42;
When the processor 42 executes the executable instruction, method described above can be executed.
Wherein, above-mentioned memory 41 can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and light
Data storage device etc..And processor 42 can be by one or more application specific integrated circuit (ASIC), digital signal processor
Framework (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA),
Controller, microcontroller, microprocessor framework or other electronic components are realized.
The technical staff in the field can be understood that, for convenience and simplicity of description, the system of foregoing description
Specific work process and corresponding beneficial effect, can refer to corresponding processes in the foregoing method embodiment, herein no longer
It repeats.
The Vehicle Controller of Vehicle Controller provided by the invention sends first by using to target Vehicle Controller
Key negotiation request, key negotiation request include the first seed information prestored;In preset period of time, it is vehicle-mounted to receive target
The key synchronization message that controller returns;Wherein, key synchronization message is that target Vehicle Controller is asked to first key negotiation
It asks when verifying successfully and generates what key generated later according to the first seed information;It is generated according to preset first seed information close
Key;It is encrypted according to the key pair of generation data to be transmitted, and encrypted data is sent to target Vehicle Controller
Technical solution so that the target vehicle-mounted control for needing each controller between Vehicle Controller and directly communicating with
Device carries out key agreement, and then is transmitted using the key for encrypting data for negotiating to generate, and Vehicle Controller has been effectively ensured in number
According to the Information Security in transmission process.
The present invention provides a kind of readable storage medium storing program for executing, including instruction, when described instruction is run on the computer,
The computer can execute any method in above-described embodiment one or embodiment two.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the disclosure
Its embodiment.The present invention is directed to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or
Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure
Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following
Claims are pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and
And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by appended claims
System.
Claims (11)
1. a kind of data transmission method of Vehicle Controller characterized by comprising
First key is sent to target Vehicle Controller and negotiates request, and the key negotiation request includes the first seed letter prestored
Breath;
In preset period of time, the key synchronization message that target Vehicle Controller returns is received;Wherein, the key synchronization disappears
Breath is that the target Vehicle Controller is being negotiated to believe when request verifies successfully and according to first seed to the first key
Breath generates what key generated later;
Key is generated according to preset first seed information;
It is encrypted according to the key pair of generation data to be transmitted, and encrypted data is sent to the vehicle-mounted control of the target
Device processed.
2. data transmission method according to claim 1, which is characterized in that described to send first to target Vehicle Controller
After key negotiation request, further includes:
In preset period of time, the second key negotiation request that target Vehicle Controller is sent, the second key association are received
Consulting and requesting includes the second seed information being pre-stored in the target Vehicle Controller in asking;
Preferred seed information is selected from first seed information and the second seed information according to preset rules, and according to
The preferred seed information generates key;
It is encrypted according to the key pair of generation data to be transmitted, and encrypted data is sent to the vehicle-mounted control of the target
Device processed.
3. data transmission method according to claim 1, which is characterized in that it is described in preset period of time, receive mesh
After the second key negotiation request for marking Vehicle Controller transmission, further includes: preset checking algorithm is utilized, it is close to described second
Key is negotiated request and is verified;When verification passes through, execute according to preset rules from first seed information and institute
State the step of preferred seed information is selected in second seed information.
4. the data transmission method of Vehicle Controller according to claim 2, which is characterized in that it is described according to preset rules from
Preferred seed information is selected in first seed information and the second seed information, comprising:
According to the size for the character string numerical value for presetting position in first seed information and second seed information, determine described preferred
Seed information.
5. data transmission method according to claim 2, which is characterized in that further include:
After sending first key negotiation request to target Vehicle Controller, it is vehicle-mounted target is not received in preset period of time
When key synchronization message or the second key negotiation request that controller is sent, first key is retransmitted to target Vehicle Controller
Negotiate request.
6. the data transmission method of Vehicle Controller according to claim 1, which is characterized in that described to the vehicle-mounted control of target
Device processed is sent before first key negotiation request, further includes:
Judge whether to prestore key corresponding with the target Vehicle Controller;
If so, the key pair data to be transmitted according to generation are encrypted, and encrypted data are sent to the mesh
Mark Vehicle Controller;
If it is not, then sending first key to target Vehicle Controller negotiates request.
7. the data transmission method of Vehicle Controller according to claim 6, which is characterized in that in the feelings for prestoring key
Under condition, the data transmission method of the Vehicle Controller further include:
When key failure, Xiang Suoshu target Vehicle Controller sends first key and updates synchronization request;
In preset period of time, the key updating synchronization message that the target Vehicle Controller returns is received;Wherein, described close
It is the update for updating synchronization request according to the first key and prestoring that it is the target Vehicle Controller that key, which updates synchronization message,
Algorithm synchronizes key update after generate;
According to the key updating synchronization message, update is synchronized to the key using the more new algorithm prestored.
8. the data transmission method of Vehicle Controller according to claim 6, which is characterized in that in the feelings for prestoring key
Under condition, the data transmission method of the Vehicle Controller further include:
When key failure, Xiang Suoshu target Vehicle Controller sends key updating synchronization request;
In preset period of time, the second key updating synchronization request that the target Vehicle Controller is sent is received;
According to the second key updating synchronization request, update is synchronized to the key using the more new algorithm prestored.
9. a kind of Vehicle Controller characterized by comprising
Sending module negotiates request for sending first key to target Vehicle Controller, and the key negotiation request includes pre-
The first seed information deposited;
Receiving module, in preset period of time, receiving the key synchronization message that target Vehicle Controller is sent;Wherein,
The key synchronization message, which is the target Vehicle Controller, is negotiating when request verify successfully simultaneously basis to the first key
First seed information generates what key generated later;
Key production module, for generating key according to preset first seed information;
Transmission module is encrypted for the key pair data to be transmitted according to generation, and encrypted data is sent to
The target Vehicle Controller.
10. a kind of Vehicle Controller characterized by comprising
Processor;
Memory, for storing the executable instruction of the processor;
When the processor executes the executable instruction, side described in any one of the claims 1-8 can be executed
Method.
11. a kind of readable storage medium storing program for executing, which is characterized in that including instruction, when described instruction is run on the computer, institute
Method described in any one of the claims 1-8 can be executed by stating computer.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811611970.XA CN109688135A (en) | 2018-12-27 | 2018-12-27 | Data transmission method, Vehicle Controller and the readable storage medium storing program for executing of Vehicle Controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811611970.XA CN109688135A (en) | 2018-12-27 | 2018-12-27 | Data transmission method, Vehicle Controller and the readable storage medium storing program for executing of Vehicle Controller |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109688135A true CN109688135A (en) | 2019-04-26 |
Family
ID=66190477
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811611970.XA Pending CN109688135A (en) | 2018-12-27 | 2018-12-27 | Data transmission method, Vehicle Controller and the readable storage medium storing program for executing of Vehicle Controller |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109688135A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110466495A (en) * | 2019-09-02 | 2019-11-19 | 浙江鸿吉智能控制有限公司 | A kind of intelligence automatic vectorization drives execution system and control method |
CN111565182A (en) * | 2020-04-29 | 2020-08-21 | 深圳市元征科技股份有限公司 | Vehicle diagnosis method and device and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101064599A (en) * | 2006-04-26 | 2007-10-31 | 华为技术有限公司 | Method and system for optical network authentication, cipher key negotiation method and system and optical line terminal and optical network unit |
CN101183935A (en) * | 2007-12-17 | 2008-05-21 | 华为技术有限公司 | Cipher key negotiation method, device and system of RTP packet |
CN104393989A (en) * | 2014-10-30 | 2015-03-04 | 北京神州泰岳软件股份有限公司 | A secret key negotiating method and device |
US20180198763A1 (en) * | 2017-01-11 | 2018-07-12 | Mastercard International Incorporated | Systems and methods for secure communication bootstrapping of a device |
CN109040063A (en) * | 2018-08-01 | 2018-12-18 | 百度在线网络技术(北京)有限公司 | Determination method, apparatus, equipment and the storage medium of vehicle ECU key |
-
2018
- 2018-12-27 CN CN201811611970.XA patent/CN109688135A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101064599A (en) * | 2006-04-26 | 2007-10-31 | 华为技术有限公司 | Method and system for optical network authentication, cipher key negotiation method and system and optical line terminal and optical network unit |
CN101183935A (en) * | 2007-12-17 | 2008-05-21 | 华为技术有限公司 | Cipher key negotiation method, device and system of RTP packet |
CN104393989A (en) * | 2014-10-30 | 2015-03-04 | 北京神州泰岳软件股份有限公司 | A secret key negotiating method and device |
US20180198763A1 (en) * | 2017-01-11 | 2018-07-12 | Mastercard International Incorporated | Systems and methods for secure communication bootstrapping of a device |
CN109040063A (en) * | 2018-08-01 | 2018-12-18 | 百度在线网络技术(北京)有限公司 | Determination method, apparatus, equipment and the storage medium of vehicle ECU key |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110466495A (en) * | 2019-09-02 | 2019-11-19 | 浙江鸿吉智能控制有限公司 | A kind of intelligence automatic vectorization drives execution system and control method |
CN110466495B (en) * | 2019-09-02 | 2024-04-09 | 浙江鸿吉智能控制有限公司 | Intelligent automatic vector driving execution system and control method |
CN111565182A (en) * | 2020-04-29 | 2020-08-21 | 深圳市元征科技股份有限公司 | Vehicle diagnosis method and device and storage medium |
CN111565182B (en) * | 2020-04-29 | 2022-08-19 | 深圳市元征科技股份有限公司 | Vehicle diagnosis method and device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108347331B (en) | Method and device for safe communication between T _ Box device and ECU device in Internet of vehicles system | |
CN111279310B (en) | Vehicle-mounted equipment upgrading method and related equipment | |
CN107846395B (en) | Method, system, medium, and vehicle for securing communications on a vehicle bus | |
CN106899404B (en) | Vehicle-mounted CAN FD bus communication system and method based on pre-shared key | |
JP6079768B2 (en) | In-vehicle communication system | |
CN106664311B (en) | Supporting differentiated secure communications between heterogeneous electronic devices | |
CN100581102C (en) | Data safety transmission method for wireless sensor network | |
CN107968781A (en) | The security processing of vehicle shared service | |
CN106685653B (en) | Vehicle remote firmware updating method and device based on information security technology | |
JP6512023B2 (en) | Communication system, transmitting node, and receiving node | |
WO2017010172A1 (en) | Gateway device and control method therefor | |
WO2013175633A1 (en) | Communication device, communication system and communication method | |
CN106790285B (en) | A kind of Session state reuse method and device | |
CN106537864A (en) | Resource access method and apparatus | |
JP5712995B2 (en) | COMMUNICATION SYSTEM, COMMUNICATION DEVICE, AND COMMUNICATION METHOD | |
CN113905351B (en) | Internet of vehicles authentication method based on block chain and confidential calculation | |
EP3982587A1 (en) | Authentication method, device, and system | |
CN107836095B (en) | Method for generating a secret or key in a network | |
CN110086755A (en) | Realize method, application server, internet of things equipment and the medium of Internet of Things service | |
CN110288729A (en) | A kind of vehicle starting method and system based on wireless near field communication | |
CN109688135A (en) | Data transmission method, Vehicle Controller and the readable storage medium storing program for executing of Vehicle Controller | |
KR102172287B1 (en) | Vehicle communication network system and operating method of the same | |
MX2007011639A (en) | Method for implementing a state tracking mechanism in a communications session between a server and a client system. | |
JP6375962B2 (en) | In-vehicle gateway device and electronic control device | |
CN107135228B (en) | Authentication system and authentication method based on central node |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190426 |
|
RJ01 | Rejection of invention patent application after publication |