Summary of the invention
In view of the foregoing, the purpose of the present invention is to provide a kind of, and the group cipher based on vehicle-mounted short haul connection net is assisted
Quotient's method, this method are the characteristics using V2X network, realize the group cipher negotiations process between vehicle-mounted node, ensure that vehicle
Carry the secure communication between node.
To achieve the above object, the invention adopts the following technical scheme:
A kind of group cipher machinery of consultation based on vehicle-mounted short haul connection net, comprising the following steps:
S1: it initiates node and sends the request message for negotiating group key to surroundings nodes;
S2: surroundings nodes receive the request message, and Xiang Faqi node sends the response message adhereed to;
S3: after initiation node receives the response message, group communication queue is established, which includes surrounding section
The unique identification of point and corresponding marker bit;
S4: initiate node to surroundings nodes broadcast negotiation operation information, the negotiation message include group communication queue,
Initiate the information such as the unique identification of node;
S5: after surroundings nodes receive the negotiation message, the group communication queuing message in message is stored in local;
S6: according to the sequence of the unique identification of surroundings nodes in group communication queue, when first vehicle-mounted node receives this
After negotiation message, secret exponent x is generated using random function1, and generate and negotiate code message [ID1, Z1, Y1], whereinThen by the negotiation code message of generation to surrounding node broadcasts;
S7: after the negotiation code message for receiving first vehicle-mounted node, node around first vehicle-mounted node updates group
Group communication queue, the marker bit of first vehicle-mounted node is updated to send, meanwhile, it initiates node and saves first vehicle-mounted section
The negotiation code message that point is sent;
S8: i-th vehicle-mounted node receives the negotiation code message [ID of (i-1)-th vehicle-mounted nodei-1, Zi-1, Yi-1] after,
Secret exponent x is generated using random functioni, and generate and negotiate code message [IDi, Zi, Yi], wherein
And by the negotiation code message [ID of generationi, Zi, Yi] to surrounding node broadcasts;
S9: after the negotiation code message for receiving i-th of vehicle-mounted node, the surroundings nodes of i-th of vehicle-mounted node update group
Communication queue, meanwhile, it initiates node and saves the negotiation code message that i-th of vehicle-mounted node is sent;
S10: after initiating the negotiation code message that node receives the vehicle-mounted node transmission of the last one in group communication queue, hair
It plays node and generates secret exponent x at randomN, and generate YN、ZN, wherein
Then, it initiates node and sends final negotiation code message [IDF, Y to surroundings nodesN], wherein IDF is by week
Enclose the index queue of the unique identification composition of node;
S11: surroundings nodes receive final negotiation code message [IDF, the YN] after, the group cipher after being negotiated
Further,
Surroundings nodes send interval time by one, update the group communication queue locally saved.
When reaching the transmission interval time, i-th of vehicle-mounted node is according to (i-1)-th vehicle-mounted node in group communication queue
Marker bit judge (i-1)-th vehicle-mounted node for not sent state, i-th vehicle-mounted node utilizes the association of the i-th -2 vehicle-mounted nodes
Quotient's code message generates and negotiates code message, and the negotiation code message of generation is broadcasted.
When reaching the transmission interval time, (i-1)-th vehicle-mounted node is judged according to the marker bit in group communication queue
For not sent state, surroundings nodes delete the information of (i-1)-th vehicle-mounted node from the group communication queue locally saved.
When having new vehicle-mounted node that group is added, following steps are executed:
S21: node is initiated to the request message that vehicle-mounted node transmission negotiation group key is newly added;
S22: vehicle-mounted node is newly added to node is initiated and sends the response message adhereed to;
S23:, will after initiating the negotiation code message that node receives the vehicle-mounted node transmission of the last one in group communication queue
The negotiation code message, which is sent to, is newly added vehicle-mounted node, and vehicle-mounted node is newly added using random function and generates secret exponent xN,
And it generates and negotiates code message [IDN, ZN, YN], wherein
Then by the negotiation code message [ID of generationN, ZN, YN] to surrounding node broadcasts;
S24: it initiates node and receives negotiation code message [IDN, ZN, YN] after, secret exponent x is generated using random functionN+1,
And generate YN+1、ZN+1, wherein
Then, initiate node be added to surroundings nodes and newly vehicle-mounted node send final negotiation code message [IDF`,
YN+1], wherein IDF` is the index queue that the unique identification of vehicle-mounted node by surroundings nodes and is newly added and forms;
S25: it surroundings nodes and vehicle-mounted node is newly added receives final negotiation code message [IDF`, YN+1] after, it is assisted
Group cipher after quotient
When thering is vehicle-mounted node to exit group, following steps are executed:
S31: node is initiated from the negotiation code message of each surroundings nodes locally saved, vehicle-mounted node is exited in deletion
Negotiate code message, then generates secret exponent x using random functionN, and generate YN、ZN, wherein
Later, it initiates node and sends final negotiation code message to all surroundings nodes in addition to exiting vehicle-mounted node
[IDF``, YN], wherein IDF`` is the index queue being made of the unique identification of surroundings nodes all in addition to exiting vehicle-mounted node
IDF``;
S32: the surroundings nodes in addition to exiting vehicle-mounted node receive final negotiation code message [IDF``, YN] after, it obtains
Group cipher after final negotiationWherein, exiting vehicle-mounted node is m-th of vehicle-mounted node.
The present invention has the advantages that
Group cipher machinery of consultation based on vehicle-mounted short haul connection net of the invention, utilizes the characteristic of V2X network, such as vehicle
It carries node periodic broadcasting heartbeat message, all vehicles to be on an equal footing, realizes in V2X network vehicle-mounted section in communication range
Group cipher negotiations process between point, ensure that the secure communication between vehicle-mounted node, improves the safety of V2X network.
Specific embodiment
Below in conjunction with drawings and examples, the present invention is described in further detail.
In V2X network, each node includes periodically geographical location, state, unique identification, traveling side to surroundings nodes broadcast
To the heartbeat message of equal oneself states information, each node receives the heartbeat message of surroundings nodes transmission simultaneously, according to the heart received
Hop-information knows the case where surroundings nodes, communicates with surroundings nodes realization.Believed by means of the heartbeat of periodic broadcasting between each node
Breath is, it can be achieved that the vehicle-mounted node composition group in communication range, initiation group cipher are negotiated, monitoring group's negotiation message is sent
Situation and group's maintenance etc., and then group cipher negotiations process is completed, guarantee that the safety in group between vehicle-mounted node is logical
Letter.
Fig. 1 is flow chart of the method for the present invention.As shown, the group disclosed by the invention based on vehicle-mounted short haul connection net
Group ciphersuite negotiation method, comprising the following steps:
1, it initiates node and sends the request message for negotiating group key to surroundings nodes, which includes initiating node
Unique identification (ID), the serial number of request message (for record initiate node send request message sequence number to identify difference
Initiation request, be zeroed again calculating when the serial number is greater than certain value) and the request flag position (mark for mark request message
Will position) etc. information;
2, surroundings nodes receive the request message, if adhereing to group, send response message, the sound to node is initiated
Answering message includes the information such as the serial number of request message, response flag bit;
3, initiate node receive surroundings nodes reply adhere to the response message of group after, establish group communication team
Column, the group communication queue include whether the unique identification of each surroundings nodes and corresponding marker bit (are used for flag node
Send negotiation message);
4, it when reaching the access request threshold time of default, initiates node and disappears to the operation of surroundings nodes broadcast negotiation
Breath, the negotiation message include group communication queue, the unique identification for initiating node, the serial number of request message, negotiate mark
The information such as position (for indicating the flag bit of negotiation message);
5, after each node in group receives negotiation message, the group communication queuing message in the message is stored in
It is local;
6, according to the sequence of the unique identification of surroundings nodes in group communication queue, as first vehicle-mounted node (ID1) receive
To after the negotiation message, secret exponent x is generated using random function1, generate negotiate code message [ID on this basis1,
Z1, Y1], and by the negotiation code message to surrounding node broadcasts;Wherein,G is one
A primitive element on a mould p;
7, after the negotiation code message for receiving first vehicle-mounted node, node around first vehicle-mounted node updates this
The group communication queue that ground saves specifically will be corresponding with first vehicle-mounted node unique identification in group communication queue
Marker bit is revised as having sent, and shows that first vehicle-mounted node has been successfully transmitted negotiation code message in group;It is same with this
When, node, which is initiated, by the negotiation code message that first vehicle-mounted node is sent is stored in local;
8, i-th of vehicle-mounted node is in the negotiation code message [ID for receiving (i-1)-th vehicle-mounted nodei-1, Zi-1, Yi-1] after,
Secret exponent x is generated using random functioni, generate negotiate code message [ID on this basisi, Zi, Yi], wherein
And by the negotiation code message [ID of generationi, Zi, Yi] to surrounding node broadcasts;
9, after the negotiation code message for receiving i-th of vehicle-mounted node, the surroundings nodes of i-th of vehicle-mounted node update local protect
The group communication queue deposited, that is, modify marker bit corresponding with i-th of vehicle-mounted node unique identification in group communication queue
To have sent, show that i-th of vehicle-mounted node has been successfully transmitted negotiation code message in group;Meanwhile node is initiated by i-th
The negotiation code message that a vehicle-mounted node is sent is stored in local;
10, it initiates node and receives what the vehicle-mounted node of the last one in group communication queue (N-1 vehicle-mounted nodes) was sent
After negotiating code message, initiates node and generate secret exponent x at randomN, and utilize secret exponent xNGenerate YN、ZN, wherein
Then, node is initiated to initiate node and send to negotiate the surroundings nodes of code message (N-1 in group is a to institute is oriented
Vehicle-mounted node) final negotiation code message is sent, which includes the Y generatedN, and by N-1
The index queue IDF of the unique identification composition of vehicle-mounted node, that is, initiate node to surrounding N-1 vehicle-mounted node broadcasts most
Whole negotiation code message [IDF, YN];
11, N-1 vehicle-mounted nodes receive final negotiation code message [IDF, the Y for initiating node broadcastsN] after, it can obtain
Obtain the group cipher after finally negotiating
In view of vehicle is in continually changing state in V2X network, in fact it could happen that because of network delay or link failure
Etc. reasons, some vehicle-mounted node send the negotiation code message for negotiating code message or transmission not successfully and the feelings such as packet loss occur
Condition;To solve this problem, setting one sends interval time, the group communication queue locally saved by vehicle-mounted node, and judgement is
It is no to there is vehicle-mounted node there is a problem;Specifically, when reaching the transmission interval time of setting, i-th of vehicle-mounted node is read
(i-1)-th vehicle-mounted node unique identification and its corresponding marker bit in its group communication queue saved, discovery receive not yet
The negotiation code message of (i-1)-th vehicle-mounted node directly utilizes i-th -2 received at this point, i-th of vehicle-mounted node is no longer waiting for
The negotiation code message of a vehicle-mounted node generates the negotiation code message of itself, then broadcasts the negotiation code message of generation
It goes out;Meanwhile each vehicle-mounted node by group communication queue and sends interval time, updates the group communication team locally saved
Column, the relevant information of (i-1)-th vehicle-mounted node is deleted from group communication queue.
When the vehicle in group changes, e.g., there is that group is added in new vehicle-mounted node or vehicle-mounted node is driven out to group
Communication range when, in accordance with the following methods handle:
For there is the case where group is added in new vehicle-mounted node request:
21, initiate node by heartbeat message perceive around have new vehicle-mounted node after, to the vehicle-mounted node of new addition
Send the request message for negotiating group key;
22, vehicle-mounted node is newly added and adheres to group, Xiang Faqi node sends the response message adhereed to;
23, node is initiated to receive in group communication queue after the negotiation code message of N-1 vehicle-mounted nodes transmissions, by this
Negotiate code message and be sent to vehicle-mounted node is newly added (at this point, vehicle-mounted node, which is newly added, is denoted as node N, to initiate node and be denoted as section
Point N+1), vehicle-mounted node is newly added using random function and generates secret exponent xN, generate negotiate code message on this basis
[IDN, ZN, YN], wherein
And by the negotiation code message [ID of generationN, ZN, YN] to surrounding node broadcasts;
24, it initiates to generate using random function secret after node receives the negotiation code message that vehicle-mounted node is sent newly is added
Close index xN+1, and utilize secret exponent xN+1Generate YN+1、ZN+1, wherein
Then, node is initiated to initiate node and send to negotiate the surroundings nodes of code message (N-1 in group is a to institute is oriented
Vehicle-mounted node and vehicle-mounted node N is newly added) send final negotiation code message, which includes generating
YN+1, and the index queue IDF` being made of the unique identification of N number of vehicle-mounted node, that is, initiate node to surrounding N number of
Vehicle-mounted node broadcasts final negotiation code message [IDF`, YN+1];
25, N number of vehicle-mounted node receives final negotiation code message [IDF`, the Y for initiating node broadcastsN+1] after, it can obtain
Obtain the group cipher after finally negotiatingVehicle-mounted node is newly added using the group cipher and group
In vehicle-mounted node securely communicate.
For there is the case where vehicle-mounted node exits group, (vehicle-mounted node is driven out to group communication range, initiation node forbids certain
A little nodes participate in group communication etc.), it is assumed that m-th of vehicle-mounted node exits group, then handles in accordance with the following methods:
31, node is initiated from the negotiation code message of each vehicle-mounted node locally saved, deletes m-th of vehicle-mounted node
Negotiate code message, then generates secret exponent x using random functionN, and utilize secret exponent xNGenerate YN、ZN, wherein
Then, node is initiated to saving around institute's oriented initiations node transmission negotiation code message in addition to vehicle-mounted node m
Point (N-2 vehicle-mounted nodes in group) sends final negotiation code message, which includes generating
YN, and the index queue IDF`` being made of the unique identification of N-2 vehicle-mounted nodes, that is, initiate node to surrounding N-
2 vehicle-mounted node broadcasts final negotiation code message [IDF``, YN];
32, N-2 vehicle-mounted nodes receive final negotiation code message [IDF``, the Y for initiating node broadcastsN] after
Group cipher after obtaining final negotiateVehicle-mounted node m can not continue other in same group and save
Point carries out secret communication.
Group cipher machinery of consultation based on vehicle-mounted short haul connection net of the invention is the characteristic using V2X network, such as
In network each vehicle be on an equal footing, each vehicle-mounted node periodic broadcasting heartbeat message etc., by the vehicle within certain communication range
It carries node and forms group, the vehicle-mounted node in group, which is sequentially sent, negotiates code message, ultimately generates group cipher, realizes group
The secret communication of vehicle-mounted node in group, improves the safety of V2X network.
The above is presently preferred embodiments of the present invention and its technical principle used, for those skilled in the art
For, without departing from the spirit and scope of the present invention, any equivalent change based on the basis of technical solution of the present invention
Change, simple replacement etc. is obvious changes, all fall within the protection scope of the present invention.