CN117241267B - Quantum group key distribution method applicable to V2I scene based on blockchain - Google Patents

Quantum group key distribution method applicable to V2I scene based on blockchain Download PDF

Info

Publication number
CN117241267B
CN117241267B CN202311515376.1A CN202311515376A CN117241267B CN 117241267 B CN117241267 B CN 117241267B CN 202311515376 A CN202311515376 A CN 202311515376A CN 117241267 B CN117241267 B CN 117241267B
Authority
CN
China
Prior art keywords
vehicle
key
message
gsp
road end
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.)
Active
Application number
CN202311515376.1A
Other languages
Chinese (zh)
Other versions
CN117241267A (en
Inventor
程腾
刘强
石琴
单榴
高东奇
万森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Anhui Keda Qingtian Technology Co ltd
Hefei University of Technology
Original Assignee
Anhui Keda Qingtian Technology Co ltd
Hefei University of Technology
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Anhui Keda Qingtian Technology Co ltd, Hefei University of Technology filed Critical Anhui Keda Qingtian Technology Co ltd
Priority to CN202311515376.1A priority Critical patent/CN117241267B/en
Publication of CN117241267A publication Critical patent/CN117241267A/en
Application granted granted Critical
Publication of CN117241267B publication Critical patent/CN117241267B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

本发明涉及密钥分发技术领域,具体是一种基于区块链适用于V2I场景下量子组密钥分发方法,包括以下操作步骤:注册阶段:分别为车辆和路端赋予唯一标志,并向车辆和路端中预充注量子密钥,同时为路端颁发数字证书;初始化阶段:进行车辆与云端之间的身份互认,且为车辆获取匿名凭证,同时将该匿名凭证上传至区块链;组密钥获取阶段:车辆和路端之间通过密钥进行身份认证,并且路端向车辆下发组密钥参数,同时车辆通过组密钥参数计算得到组密钥;组密钥更新阶段:对组成员进行更新,以执行组成员更新和组密钥更换操作;本发明能够有效减少车辆之间通信传输的计算负载,进而提高车辆之间的通信安全和通信效率。

The present invention relates to the technical field of key distribution. Specifically, it is a quantum group key distribution method based on blockchain and suitable for V2I scenarios. It includes the following steps: Registration stage: assign unique identifiers to vehicles and road ends respectively, and assign unique identifiers to vehicles and road ends. Pre-fill the quantum key in the road end and issue a digital certificate to the road end at the same time; Initialization phase: Carry out mutual identity recognition between the vehicle and the cloud, obtain an anonymous certificate for the vehicle, and upload the anonymous certificate to the blockchain ;Group key acquisition phase: Identity authentication is performed between the vehicle and the road end through the key, and the road end issues group key parameters to the vehicle, and the vehicle obtains the group key through calculation of the group key parameters; Group key update phase : Update group members to perform group member update and group key replacement operations; the invention can effectively reduce the computational load of communication transmission between vehicles, thereby improving communication security and communication efficiency between vehicles.

Description

一种基于区块链适用于V2I场景下量子组密钥分发方法A blockchain-based quantum group key distribution method suitable for V2I scenarios

技术领域Technical field

本发明涉及密钥分发技术领域,具体是一种基于区块链适用于V2I场景下量子组密钥分发方法。The invention relates to the technical field of key distribution, specifically a quantum group key distribution method based on blockchain suitable for V2I scenarios.

背景技术Background technique

在车载自组网络场景下,通信对象通常是指车辆之间进行通信。为了确保车辆之间的通信不会泄露隐私信息,通常会对通信传输的信息进行加密处理。常见的加密方式有基于大数因子分解的公私钥加密方式、基于椭圆曲线的密钥算法等等。但是由于基于大数因子分解的公私钥加密方式较为复杂,计算成本较高,因此适用范围较窄。基于椭圆曲线的密钥算法相比大数因子分解在计算精度上有很大提高,但是随着量子计算的出现,导致公私钥加密的安全性出现裂缝,基于公私钥的加密方式安全性难以保证,基于椭圆曲线的密钥算法也逐渐被弃用。In the scenario of vehicle-mounted ad hoc network, communication objects usually refer to communication between vehicles. In order to ensure that communication between vehicles does not leak private information, the information transmitted by the communication is usually encrypted. Common encryption methods include public and private key encryption methods based on large number factorization, key algorithms based on elliptic curves, and so on. However, because the public and private key encryption method based on large number factorization is more complex and has higher computational cost, its scope of application is narrow. The key algorithm based on elliptic curves has greatly improved the calculation accuracy compared to large number factorization. However, with the emergence of quantum computing, the security of public and private key encryption has cracked, and the security of encryption methods based on public and private keys is difficult to guarantee. , the key algorithm based on elliptic curve has also been gradually deprecated.

为了避免上述现有技术中的问题,有学者提出用区块链代替云端,实现组密钥的分发;路端需要对每一辆车形成一份智能合约,每次组成员更新时,路端都需要对智能合约进行更新,这种密钥分发的方式虽然不需要可信服务器的参与,但是有效的解决了用户分布比较广的时候密钥的分配问题。但是当网络规模很大时,每个用户所要保存的主密钥的数量也就越多,这就导致车辆之间通信的计算负载大幅度增加,进而导致通信的效率和成本变高,因此亟待解决。In order to avoid the above-mentioned problems in the existing technology, some scholars have proposed to use blockchain to replace the cloud to realize the distribution of group keys; the road end needs to form a smart contract for each vehicle, and each time the group members are updated, the road end All smart contracts need to be updated. Although this key distribution method does not require the participation of a trusted server, it effectively solves the key distribution problem when users are widely distributed. However, when the network scale is large, the number of master keys to be saved by each user is also larger, which leads to a significant increase in the computational load of communication between vehicles, which in turn leads to higher communication efficiency and cost. Therefore, there is an urgent need for solve.

发明内容Contents of the invention

为了避免和克服现有技术中存在的技术问题,本发明提供了一种基于区块链适用于V2I场景下量子组密钥分发方法。本发明能够有效减少车辆之间通信传输的计算负载,进而提高车辆之间的通信安全和通信效率。In order to avoid and overcome the technical problems existing in the existing technology, the present invention provides a quantum group key distribution method based on blockchain suitable for V2I scenarios. The invention can effectively reduce the computational load of communication transmission between vehicles, thereby improving communication security and communication efficiency between vehicles.

为实现上述目的,本发明提供如下技术方案:In order to achieve the above objects, the present invention provides the following technical solutions:

一种基于区块链适用于V2I场景下量子组密钥分发方法,包括以下操作步骤:A blockchain-based quantum group key distribution method suitable for V2I scenarios, including the following steps:

S1、注册阶段:分别为车辆和路端赋予唯一标志,并分别向车辆和路端中预充对应的注量子密钥,同时为路端颁发数字证书;S1. Registration stage: assign unique marks to the vehicle and the road terminal respectively, precharge the corresponding injection subkeys into the vehicle and the road terminal respectively, and issue a digital certificate to the road terminal at the same time;

S2、初始化阶段:进行车辆与云端之间的身份互认,且为车辆获取匿名凭证,同时将该匿名凭证上传至区块链;S2. Initialization stage: Carry out mutual identity recognition between the vehicle and the cloud, obtain an anonymous certificate for the vehicle, and upload the anonymous certificate to the blockchain;

S3、组密钥获取阶段:车辆和路端之间通过密钥进行身份认证,并且路端向车辆下发组密钥参数,同时车辆通过组密钥参数计算得到组密钥;S3. Group key acquisition phase: The vehicle and the road end perform identity authentication through keys, and the road end issues group key parameters to the vehicle. At the same time, the vehicle calculates the group key through the group key parameters;

S4、组密钥更新阶段:对组成员进行更新,以执行组成员更新和组密钥更换操作。S4. Group key update stage: Update group members to perform group member update and group key replacement operations.

作为本发明的进一步技术方案:注册阶段的具体操作步骤如下:As a further technical solution of the present invention: the specific operation steps of the registration stage are as follows:

S11、在车辆出厂时为车辆i赋予唯一标识码VINi,同时向车辆i内的安全介质中预充注设定数量且与唯一标识码VINi彼此一一对应的量子会话密钥与量子完整性校验密钥;S11. When the vehicle leaves the factory, the unique identification code VIN i is assigned to the vehicle i, and at the same time, a set number of quantum session keys and quantum integrity corresponding to the unique identification code VIN i are pre-charged into the secure medium in the vehicle i. Sexuality verification key;

在路端出厂时为路端r赋予唯一标识码RIDr,同时向路端r内的安全介质中预充注设定数量且与唯一标识码RIDr彼此一一对应的量子会话密钥与量子完整性校验密钥;When the road end leaves the factory, a unique identification code RID r is assigned to the road end r. At the same time, a set number of quantum session keys and quantum keys that correspond one-to-one to the unique identification code RID r are prefilled into the secure medium in the road end r. Integrity check key;

S12、接着车辆i向云端上传唯一标识码VINi,并将唯一标识码VINi存储在云端的数据库中;同时路端r向云端上传唯一标识码RIDr,并将唯一标识码RIDr存储在云端的数据库中;S12. Then the vehicle i uploads the unique identification code VIN i to the cloud, and stores the unique identification code VIN i in the cloud database; at the same time, the road end r uploads the unique identification code RID r to the cloud, and stores the unique identification code RID r in In a cloud database;

S13、当车辆i或路端r的安全介质中的量子会话密钥低于预设值时,车辆i或路端r向云端的密钥分发中心发出量子会话密钥补充申请,云端的密钥分发中心向车辆i或路端r补充量子会话密钥;S13. When the quantum session key in the secure medium of vehicle i or road end r is lower than the preset value, vehicle i or road end r issues a quantum session key supplement application to the key distribution center in the cloud. The key in the cloud The distribution center replenishes the quantum session key to vehicle i or road end r;

S14、通过第三方认证中心为路端r的唯一标识码RIDr颁发包含路端r的公钥信息的数字证书DCrS14. Issue a digital certificate DC r containing the public key information of the road end r for the unique identification code RID r of the road end r through a third-party certification center.

作为本发明的再进一步技术方案:初始化阶段的具体操作步骤如下:As a further technical solution of the present invention: the specific operating steps in the initialization phase are as follows:

S21、车辆i的量子随机数发生器产生n个真随机数RNi-c,加上车辆i身份唯一标识码VINi和车辆i的当前时间戳Tsi后,使用车辆i预充注的量子会话密钥PFSKtag进行加密,得到加密后的消息EPFSK(VINi,{RNi-c}i=1 n,Tsi),其中{}i=1 n表示n个参与者的集合;同时使用车辆i预充注的量子完整性验证密钥PFIKtag计算加密后的消息EPFSK(VINi,{RNi-c}i=1 n,Tsi)的消息验证码MACPFIK;接着对消息EPFSK(VINi,{RNi-c}i=1 n,Tsi)进行拼接,以形成用于车辆i身份认证请求的消息体M1,M1={PFSKtag,PFIKtag,EPFSK(VINi,{RNi-c}i=1 n,Tsi),MACPFIK,Tsi},最后将消息体M1发送给云端;S21. The quantum random number generator of vehicle i generates n true random numbers RN ic . After adding the unique identification code VIN i of vehicle i and the current timestamp T si of vehicle i, the quantum session secret prefilled by vehicle i is used. The key PFSK tag is encrypted to obtain the encrypted message E PFSK (VIN i ,{RN ic } i=1 n ,T si ), where {} i=1 n represents a set of n participants; at the same time, vehicle i is used to pre- The filled quantum integrity verification key PFIK tag calculates the message verification code MAC PFIK of the encrypted message E PFSK (VIN i , {RN ic } i=1 n , T si ); then the message E PFSK (VIN i , {RN ic } i=1 n ,T si ) are spliced to form the message body M1 for the identity authentication request of vehicle i, M1={PFSK tag ,PFIK tag ,E PFSK (VIN i ,{RN ic } i= 1 n ,T si ),MAC PFIK ,T si }, and finally send the message body M1 to the cloud;

S22、云端的身份认证服务器收到车辆i发送的消息体M1后,首先对当前时间戳Tsi进行时效性判断,若当前时间戳Tsi与当前判断时刻的差值大于设定的时间阈值,则云端的身份认证服务器对收到的消息体M1不进行下一步处理;反之,云端的身份认证服务器根据接收到的消息体M1里面的量子会话密钥PFSKtag与量子完整性验证密钥PFIKtag,在云端的安全介质内找到对应的预充注的量子会话密钥PFSKv、量子完整性验证密钥PFIKv,以及车辆i预存在云端数据库中的唯一标识码VINi0S22. After receiving the message body M1 sent by vehicle i, the identity authentication server in the cloud first performs a timeliness judgment on the current timestamp T si . If the difference between the current timestamp T si and the current judgment time is greater than the set time threshold, Then the identity authentication server in the cloud does not perform further processing on the received message body M1; on the contrary, the identity authentication server in the cloud uses the quantum session key PFSK tag and the quantum integrity verification key PFIK tag in the received message body M1. , find the corresponding pre-filled quantum session key PFSK v , quantum integrity verification key PFIK v , and the unique identification code VIN i0 of vehicle i pre-stored in the cloud database in the secure medium of the cloud;

判断消息验证码MACPFIK的完整性,若完整,则云端使用预充注的量子会话密钥PFSKv对消息体M1进行解密,以使云端得到车辆i的唯一标识码VINi与车辆i的真随机数{RNi-c}i=1 nDetermine the integrity of the message verification code MAC PFIK . If it is complete, the cloud uses the pre-charged quantum session key PFSK v to decrypt the message body M1, so that the cloud can obtain the unique identification code VINi of vehicle i and the true randomness of vehicle i. Number {RN ic } i=1 n ;

云端的身份认证服务器对解密后得到的唯一标识码VINi与在数据库中查询到的唯一标识码VINi0进行比较,若两者相等,则云端的身份认证服务器产生n个真随机数,以形成真随机数集合{RNc-i}i=1 nThe identity authentication server in the cloud compares the unique identification code VIN i obtained after decryption with the unique identification code VIN i0 queried in the database. If the two are equal, the identity authentication server in the cloud generates n true random numbers to form True random number set {RN ci } i=1 n ;

S23、云端对真随机数RNi-c进行加一操作,并加上云端自己产生的真随机数RNc-i,和云端的当前时间戳Tsc进行拼接后使用云端预充注的车辆i的量子会话密钥PFSKtag’进行加密,以使云端得到加密后的消息EPFSK’({RNi-c+1,RNc-i}i=1 n,Tsc);同时使用云端预充注的车辆i的量子完整性验证密钥PFIKtag’计算加密后的消息EPFSK’({RNi-c+1,RNc-i}i=1 n,Tsc)的消息验证码MACPFIK’;接着对消息EPFSK’({RNi-c+1,RNc-i}i=1 n,Tsc)进行拼接,以得到消息体M2,M2={PFSKtag’,PFIKtag’, EPFSK’({RNi-c+1,RNc-i}i=1 n,Tsc),MACPFIK’,Tsc},并将消息体M2发送给车辆i;S23. The cloud adds one to the true random number RN ic , adds the true random number RN ci generated by the cloud itself, splices it with the current timestamp T sc of the cloud, and then uses the quantum session key of vehicle i precharged by the cloud. Encrypt the key PFSK tag' so that the cloud can obtain the encrypted message E PFSK' ({RN ic +1,RN ci } i=1 n ,T sc ); at the same time, the quantum integrity of the vehicle i precharged in the cloud is used Verification key PFIK tag'Calculate the message verification code MAC PFIK' of the encrypted message E PFSK' ({RN ic +1,RN ci } i=1 n ,T sc ); then verify the message E PFSK' ({RN ic +1,RN ci } i=1 n ,T sc ) to get the message body M2, M2={PFSK tag' ,PFIK tag' , E PFSK' ({RN ic +1,RN ci } i=1 n ,T sc ),MAC PFIK' ,T sc }, and send the message body M2 to vehicle i;

S24、车辆i收到云端返还的消息体M2后,对消息体M2中的当前时间戳Tsc进行判断,若当前时间戳Tsc与当前判断时刻的差值大于设定的时间阈值,则车辆i对消息体不做下一步处理,反之,车辆i根据收到的消息体M2里面PFSKtag’与PFIKtag’,在车辆i的安全介质内找到对应的预充注的量子会话密钥PFSKv’和完整性验证密钥PFIKv’S24. After receiving the message body M2 returned by the cloud, the vehicle i judges the current timestamp T sc in the message body M2. If the difference between the current timestamp T sc and the current judgment time is greater than the set time threshold, the vehicle i i does not perform further processing on the message body. On the contrary, vehicle i finds the corresponding pre-charged quantum session key PFSK v in the secure medium of vehicle i based on the PFSK tag' and PFIK tag' in the received message body M2. ' and integrity verification key PFIK v' ;

计算消息体M2中的消息验证码MACPFIK’,判断消息验证码MACPFIK’的完整性;若完整,则使用车辆i预充注的量子会话密钥PFSKv’对消息体M2进行解密,以使车辆i得到云端返回的消息集合{RNi-c+1,RNc-i}i=1 nCalculate the message verification code MAC PFIK' in the message body M2, and determine the integrity of the message verification code MAC PFIK' ; if it is complete, use the quantum session key PFSK v' precharged by vehicle i to decrypt the message body M2 to Let vehicle i get the message set {RN ic +1,RN ci } i=1 n returned by the cloud;

S25、车辆i根据真随机数RNc-i、真随机数RNi-c,以及唯一标识VINi,通过单向哈希函数H计算得到n个匿名凭证的哈希值,ANCi的哈希值计算结果为:ANCi=H(VINi,RNi-c,RNc-i);S25. Vehicle i calculates the hash value of n anonymous credentials through the one-way hash function H based on the true random number RN ci , the true random number RN ic , and the unique identifier VIN i . The hash value calculation result of ANC i is: :ANC i =H(VIN i ,RN ic,RNc-i );

S26、车辆i将匿名凭证ANCi上传至云端,以组装得到消息体M3,M3={PFSKtag,PFIKtag, EPFSK(VINi,{H(RNi-c),H(ANC)}i=1 n,Tsi),MACPFIK,Tsi},并将消息体M3发送至云端;S26. Vehicle i uploads the anonymous certificate ANC i to the cloud to assemble the message body M3, M3={PFSK tag ,PFIK tag , E PFSK (VIN i ,{H(RN ic ),H(ANC)} i=1 n ,T si ),MAC PFIK ,T si }, and send the message body M3 to the cloud;

S27、根据车辆i的匿名凭证ANCi,在云端查询到生成该匿名凭证ANCi的参数VINi、RNc-i和RNi-c;云端对查询到的RNc-i进行哈希计算,并将计算结果与车辆i的哈希值H(VINi,RNi-c,RNc-i)进行比对,若两者相同,则车辆i完成n个匿名凭证的计算;反之,则没有完成n个匿名凭证的计算,需要按照步骤S21到步骤S27重新处理;S27. According to the anonymous certificate ANC i of vehicle i, query the parameters VIN i , RN ci and RN ic that generate the anonymous certificate ANC i on the cloud; the cloud performs hash calculation on the queried RN ci and compares the calculation results with the vehicle Compare the hash value H (VIN i , RN ic , RN ci ) of i. If the two are the same, vehicle i has completed the calculation of n anonymous credentials; otherwise, the calculation of n anonymous credentials has not been completed and needs to be calculated according to Step S21 to step S27 are processed again;

S28、接着云端为车辆i的n个匿名凭证生成n个智能合约,并得到每个智能合约的唯一标识码POS,同时使用唯一标识码POS与每个匿名凭证的哈希值,以及对应的生成该匿名凭证的参数的哈希值,共同生成消息体M4,M4={PFSKtag,PFIKtag, EPFSK({H(RNc-i),H(ANC),POS }i=1 n,Tsc),MACPFIK,Tsc},并将消息体M4发送至车辆i,以告知车辆i的匿名凭证已经上传至区块链,车辆i可以与路端r进行身份认证。S28. Then the cloud generates n smart contracts for n anonymous certificates of vehicle i, and obtains the unique identification code POS of each smart contract. At the same time, the unique identification code POS and the hash value of each anonymous certificate are used, and the corresponding generation The hash value of the parameters of the anonymous credential jointly generates the message body M4, M4={PFSK tag ,PFIK tag , E PFSK ({H(RN ci ),H(ANC),POS } i=1 n ,T sc ) ,MAC PFIK ,T sc }, and send the message body M4 to the vehicle i to inform the vehicle i that the anonymous certificate has been uploaded to the blockchain, and the vehicle i can perform identity authentication with the road end r.

作为本发明的再进一步技术方案:组密钥获取阶段的具体步骤如下:As a further technical solution of the present invention: the specific steps in the group key acquisition phase are as follows:

S31、路端r在其通讯范围内广播数字证书DCrS31. The road end r broadcasts the digital certificate DC r within its communication range;

S32、驶入路端r通信范围内的车辆i,通过PC5广播接收路端r的数字证书DCr;车辆i向路端r广播消息{AddReq,POS,ANCi,H(RNc-i)};其中,H(RNc-i)为RNc-i的哈希值;S32. The vehicle i that enters the communication range of the road end r receives the digital certificate DC r of the road end r through PC5 broadcast; the vehicle i broadcasts the message {AddReq, POS, ANC i , H(RN ci )} to the road end r; Among them, H(RN ci ) is the hash value of RN ci ;

S33、路端r通过POS找到智能合约,并发生交易,以触发智能合约;智能合约向车辆i返还H(RNc-i)与量子会话密钥PFSKtag;如果车辆i通过智能合约得到的H(RNc-i)与从消息{AddReq,POS,ANCi,H(RNc-i)}中收到的H(RNc-i)相等,则车辆i身份合法;反之,则不合法;S33. The road end r finds the smart contract through POS, and a transaction occurs to trigger the smart contract; the smart contract returns H(RN ci ) and the quantum session key PFSK tag to the vehicle i; if the H(RN obtained by the vehicle i through the smart contract ci ) is equal to H(RN ci) received from the message {AddReq, POS, ANC i , H(RN ci ) }, then the identity of vehicle i is legal; otherwise, it is illegal;

当车辆i的身份合法时,路端r的随机数发生器产生一个随机数GSP-1,并使用触发智能合约得到的量子会话密钥PFSKtag作为对称密钥对随机数GSP-1进行加密;When the identity of vehicle i is legal, the random number generator at road end r generates a random number GSP-1, and uses the quantum session key PFSK tag obtained by triggering the smart contract as a symmetric key to encrypt the random number GSP-1;

S34、所有车辆身份认证完成后,路端r计算当前所有合法车辆的匿名凭证的哈希值,并将该哈希值作为GSP-2,结合路端r的当前时间戳Tsr和对比使用私钥对参数进行签名而得到Signature,以构成消息{GSP-2,{ANCi,PFSKtag,EPFSK(GSP-1)}i=1 n,Signature,Tsr},并将该消息通过组播的方式传输给当前所有车辆;S34. After the identity authentication of all vehicles is completed, the road end r calculates the hash value of the anonymous credentials of all current legal vehicles, and uses the hash value as GSP-2, combined with the current timestamp T sr of the road end r and comparison using the private The key is used to sign the parameters to obtain the Signature to form the message {GSP-2,{ANC i ,PFSK tag ,E PFSK (GSP-1)} i=1 n ,Signature,T sr }, and the message is multicast transmitted to all current vehicles;

S35、车辆i接收组播的消息,并检查消息中是否存在车辆i自己的匿名凭证;若存在,则车辆i的身份验证成功,反之,车辆i的身份验证不成功;S35. Vehicle i receives the multicast message and checks whether the anonymous credential of vehicle i exists in the message; if it exists, the identity verification of vehicle i is successful; otherwise, the identity verification of vehicle i is unsuccessful;

对身份验证成功的车辆,首先截取消息中的GSP-2,并根据路端r的数字证书获得的公钥,进而通过公钥Signature进行验证;然后根据得到的GSP-1与GSP-2,计算得到组密钥GSK,GSK=H(GSP-1,GSP-2)。For vehicles whose identity verification is successful, first intercept the GSP-2 in the message, and then verify it through the public key Signature based on the public key obtained from the digital certificate of road end r; then calculate based on the obtained GSP-1 and GSP-2 Get the group key GSK, GSK=H(GSP-1,GSP-2).

作为本发明的再进一步技术方案:组密钥更新阶段包括新成员加入阶段和组成员离开阶段;新成员加入阶段的具体操作步骤如下:As a further technical solution of the present invention: the group key update phase includes a new member joining phase and a group member leaving phase; the specific operating steps of the new member joining phase are as follows:

S4A1、路端r在其通讯范围内广播数字证书DCrS4A1, the road end r broadcasts the digital certificate DC r within its communication range;

S4A2、驶入路端r通信范围内的车辆j,通过PC5广播接收路端r的数字证书DCr;车辆j向路端r广播消息{AddReq,POS,ANCj,H(RNc-j)},其中,H(RNc-j)为RNc-j的哈希值;S4A2. Vehicle j driving into the communication range of road end r receives the digital certificate DC r of road end r through PC5 broadcast; vehicle j broadcasts the message {AddReq, POS, ANC j , H(RN cj )} to road end r, Among them, H(RN cj ) is the hash value of RN cj ;

S4A3、路端r通过POS找到智能合约,并发生交易,以触发智能合约,智能合约向车辆j返还H(RNc-j)与量子会话密钥PFSKtag;如果车辆j通过智能合约得到的H(RNc-j)与从消息{AddReq,POS,ANCj,H(RNc-j)}中收到的H(RNc-j)相等,则车辆j身份合法;反之,则不合法;S4A3, road end r finds the smart contract through POS, and a transaction occurs to trigger the smart contract. The smart contract returns H(RN cj ) and the quantum session key PFSK tag to vehicle j; if vehicle j obtains H(RN through the smart contract cj ) is equal to H(RN cj ) received from the message {AddReq, POS, ANC j , H(RN cj )}, then the identity of vehicle j is legal; otherwise, it is illegal;

当车辆j的身份合法时,使用触发智能合约得到的量子会话密钥PFSKtag作为对称密钥对已经产生的随机数GSP-1进行加密,以使随机数GSP-1保持不变;When the identity of vehicle j is legal, the quantum session key PFSK tag obtained by triggering the smart contract is used as a symmetric key to encrypt the random number GSP-1 that has been generated, so that the random number GSP-1 remains unchanged;

S4A4、所有新加入车辆的身份认证完成后,路端r重新计算当前所有合法车辆的匿名凭证的哈希值,并将该哈希值作为GSP-1,结合拼接时间戳Tsr和对比使用私钥对参数进行签名而得到Signature,以构成消息{GSP-2,{ANCj, PFSKtag, EPFSK(GSP-1)}i=1 1,Signature, Tsr},并将该消息通过组播的方式传输给当前所有车辆;S4A4. After the identity authentication of all newly added vehicles is completed, the road end r recalculates the hash value of the anonymous credentials of all current legal vehicles, and uses the hash value as GSP-1, combined with the splicing timestamp T sr and comparison using the private The key is used to sign the parameters to obtain the Signature to form the message {GSP-2,{ANC j , PFSK tag , E PFSK (GSP-1)} i=1 1 ,Signature, T sr }, and the message is multicast transmitted to all current vehicles;

S4A5、车辆j接收组播的消息,并检查消息中是否存在车辆j自己的匿名凭证;若存在,则车辆j的身份验证成功,反之,车辆j的身份验证不成功;S4A5. Vehicle j receives the multicast message and checks whether the anonymous credential of vehicle j exists in the message; if it exists, the identity verification of vehicle j is successful; otherwise, the identity verification of vehicle j is unsuccessful;

对身份验证成功的车辆,首先截取消息中的GSP-2,并根据路端r的数字证书获得的公钥,进而通过公钥Signature进行验证;然后根据得到的GSP-1与GSP-2,计算得到组密钥GSK,GSK=H(GSP-1,GSP-2);For vehicles whose identity verification is successful, first intercept the GSP-2 in the message, and then verify it through the public key Signature based on the public key obtained from the digital certificate of road end r; then calculate based on the obtained GSP-1 and GSP-2 Get the group key GSK, GSK=H(GSP-1,GSP-2);

对于路端r通讯范围内原有成员,只需要按步骤S34重新得到GSP-2,并更新对应的GSK即可。For the original members within the communication range of the road end r, it is only necessary to obtain GSP-2 again according to step S34 and update the corresponding GSK.

作为本发明的再进一步技术方案:组成员离开阶段的具体操作步骤如下:As a further technical solution of the present invention: the specific operation steps of the group member leaving stage are as follows:

S4B1、路端r在其通讯范围内广播数字证书DCrS4B1, the road end r broadcasts the digital certificate DC r within its communication range;

S4B2、驶入路端r通信范围内的车辆j,通过PC5广播接收路端r的数字证书DCr;车辆j向路端r广播消息{AddReq,POS,ANCj,H(RNc-j)},其中,H(RNc-j)为RNc-j的哈希值;S4B2. Vehicle j driving into the communication range of road end r receives the digital certificate DC r of road end r through PC5 broadcast; vehicle j broadcasts the message {AddReq, POS, ANC j , H(RN cj )} to road end r, Among them, H(RN cj ) is the hash value of RN cj ;

S4B3、路端r判断当前准备离开的车辆是否为当前组成员,如果是,路端r重新生成GSP-1,并使用步骤S33中触发智能合约得到的量子会话密钥PFSKtag作为对称密钥对已经产生的随机数GSP-1进行加密,以使随机数GSP-1保持不变;S4B3. Road end r determines whether the vehicle currently preparing to leave is a member of the current group. If so, road end r regenerates GSP-1 and uses the quantum session key PFSK tag obtained by triggering the smart contract in step S33 as a symmetric key pair. The generated random number GSP-1 is encrypted so that the random number GSP-1 remains unchanged;

S4B4、路端r重新计算当前组内所有身份合法的车辆的匿名凭证的哈希值,并将该哈希值作为GSP-1,结合拼接时间戳Tsr和对比使用私钥对参数进行签名而得到Signature,以构成消息,并将该消息通过组播的方式传输给当前所有车辆;S4B4, road end r recalculates the hash value of the anonymous credentials of all vehicles with legal identities in the current group, and uses the hash value as GSP-1, combines the splicing timestamp T sr and compares the private key to sign the parameters. Obtain the Signature to form a message and transmit the message to all current vehicles through multicast;

S4B5、组内剩余车辆接收组播的消息,并检查是否存在自己的匿名凭证,若存在,则车辆还在当前组内,反之,则不在;S4B5. The remaining vehicles in the group receive the multicast message and check whether its own anonymous credentials exist. If it exists, the vehicle is still in the current group, otherwise, it is not;

对还在当前组内的车辆,首先截取消息中的GSP-2,并根据路端r的数字证书获得的公钥,进而通过公钥进行验证;For vehicles still in the current group, first intercept the GSP-2 in the message, and then verify it through the public key based on the public key obtained from the digital certificate of road end r;

然后通过量子会话密钥PFSKtag对消息进行解密,以得到GSP-2;最后使用得到的GSP-1与GSP-2,计算得到组密钥GSK,GSK=H(GSP-1,GSP-2)。与现有技术相比,本发明的有益效果是:Then the message is decrypted through the quantum session key PFSK tag to obtain GSP-2; finally, the obtained GSP-1 and GSP-2 are used to calculate the group key GSK, GSK=H(GSP-1,GSP-2) . Compared with the prior art, the beneficial effects of the present invention are:

1、本发明在集中式密钥分配方法中,每一个用户不需要保存大量的密钥,只需每一个参与者和密钥分发中心(KDC)之间共享密钥,密钥分配由KDC负责。但是,用户使用简单,对云端要求高,因此云端压力较大。集中式密钥分发方案在网络的规模很大时,KDC通常要保存大量的密钥,各个用户和KDC之间的通信量也会很大,会存在KDC负担过重的问题。同时存在单点攻击的可能性,即攻击者集中攻击KDC,使得KDC无法提供服务,匿名攻击者的目的就达到了。因为量子密钥的特殊性,不得不有一个量子密钥分发中心,但是通过使用私有链,将压力转移到区块链实现分布式,减少计算开销。因此本发明没有使用区块链用于组密钥的分发,而是使用区块链的智能合约实现了路端对车辆的快速身份认证,同时因为使用了区块链,实现了KDC的功能下沉到路端,减少了云端的计算,存储与并发压力。1. In the centralized key distribution method of the present invention, each user does not need to save a large number of keys, but only needs to share the key between each participant and the Key Distribution Center (KDC), and the KDC is responsible for the key distribution. . However, users are easy to use and have high requirements on the cloud, so the cloud is under great pressure. In the centralized key distribution scheme, when the network scale is large, the KDC usually needs to store a large number of keys, and the communication volume between each user and the KDC will also be large, causing the KDC to be overburdened. At the same time, there is the possibility of a single point of attack, that is, the attacker concentrates on attacking the KDC, making the KDC unable to provide services, and the purpose of the anonymous attacker is achieved. Because of the particularity of quantum keys, there must be a quantum key distribution center, but by using a private chain, the pressure is transferred to the blockchain to achieve distribution and reduce computing overhead. Therefore, the present invention does not use the blockchain for the distribution of group keys, but uses the smart contract of the blockchain to realize the rapid identity authentication of the vehicle at the road end. At the same time, because of the use of the blockchain, the KDC function is realized It sinks to the road end, reducing the computing, storage and concurrency pressure on the cloud.

2、本发明在集中式组密钥分发方案中,所有通信都需要通过中心实体进行。这意味着当参与者数量增加时,通信的复杂性和开销也会随之增加。大量的通信流量需要在中心实体上进行处理和调度,导致通信的延迟和瓶颈,通常需要中心实体承担大量的计算任务,包括密钥的生成、加密和解密操作。随着参与者数量的增加,中心实体需要处理更多的密钥生成和计算操作,增加了计算的复杂性和开销。分布式组密钥分发方案中,密钥的生成和分发过程由多个节点共同参与,可以根据需要灵活地增加或减少节点,以适应系统规模的变化。密钥的生成和分发过程需要多个节点共同协作,因此攻击者很难同时攻破多个节点以获取密钥。节点之间需要进行相互通信来共享信息和密钥,这可能增加通信开销和延迟。我们结合两种方式,将KDC的功能下沉到路端实现了组密钥的高效更新。2. In the centralized group key distribution scheme of the present invention, all communications need to be conducted through the central entity. This means that as the number of participants increases, so does the complexity and overhead of communication. A large amount of communication traffic needs to be processed and scheduled on the central entity, resulting in communication delays and bottlenecks. The central entity is usually required to undertake a large number of computing tasks, including key generation, encryption and decryption operations. As the number of participants increases, the central entity needs to handle more key generation and calculation operations, increasing computational complexity and overhead. In the distributed group key distribution scheme, the key generation and distribution process is jointly participated by multiple nodes, and nodes can be flexibly added or reduced as needed to adapt to changes in the system scale. The key generation and distribution process requires the cooperation of multiple nodes, so it is difficult for an attacker to compromise multiple nodes at the same time to obtain the key. Nodes need to communicate with each other to share information and keys, which may increase communication overhead and latency. We combine the two methods to bring the KDC function to the road end to achieve efficient update of group keys.

3、本发明现有的量子安全密钥分发方案可能在效率和可扩展性方面存在一定的局限性。由于有线传输的方式束缚了传统量子加密在车载自组网络中的应用,因此,在实际应用中,需要根据不同场景,设计不同的身份认证方式与组密钥分发方案来满足实时通信和大规模网络的需求。然而,目前仍缺乏量子安全的身份认证方与组密钥分发方案,需要解决这一问题以推动量子安全通信技术在车辆上的实际应用。3. The existing quantum secure key distribution scheme of the present invention may have certain limitations in terms of efficiency and scalability. Since the wired transmission method restricts the application of traditional quantum encryption in vehicle ad hoc networks, in practical applications, it is necessary to design different identity authentication methods and group key distribution schemes according to different scenarios to meet the needs of real-time communication and large-scale network needs. However, there is still a lack of quantum-safe identity authenticator and group key distribution solutions, and this problem needs to be solved to promote the practical application of quantum-safe communication technology in vehicles.

4、本发明提出了车辆随机数与云端随机数一次性生成多个车辆匿名凭证的方式,减少了车云之间的通讯次数,云端将每一个“匿名凭证-车辆真实身份-预充注密钥信息-生成匿名凭证参数”的映射关系以智能合约的形式发布在私有链上,实现了路端对车辆身份的计算。提出组密钥的两段式组密钥生成方式,路端使用量子随机数发生器产生随机数GSP-2,并通过智能合约得到车辆的一个密钥,使用这个密钥对GSP-2加密,并通过计算所有合法成员匿名凭证得到组密钥参数GSP-1,通过两段式的组密钥生成方案实现组密钥的快速更新。车辆新加入时,对组内成员只需更新GSP-1,实现了计算开销的减少,该策略在保证一次一密的前提下实现前向安全与后向安全。4. The present invention proposes a method for generating multiple vehicle anonymous certificates at one time using vehicle random numbers and cloud random numbers, which reduces the number of communications between cars and clouds. The cloud pre-charges each "anonymous certificate - vehicle's true identity" The mapping relationship between "key information - generated anonymous credential parameters" is published on the private chain in the form of a smart contract, realizing the calculation of vehicle identity at the road end. A two-stage group key generation method is proposed. The road end uses a quantum random number generator to generate the random number GSP-2, and obtains a key for the vehicle through a smart contract. This key is used to encrypt GSP-2. The group key parameter GSP-1 is obtained by calculating the anonymous credentials of all legal members, and the group key is quickly updated through a two-stage group key generation scheme. When a new vehicle joins, only the GSP-1 needs to be updated for the members in the group, which reduces the computational overhead. This strategy achieves forward security and backward security while ensuring one-time padding.

5、本发明在V2X广播通讯的基础上,减少计算开销与信令开销。路端借助区块链智能合约实现了车路身份匿名互认,实现了隐私保护,并实现了去中心化,路端不再需要云端协助实现对车辆身份的认证。同时结合现有的证书体系,实现了车辆对路端的身份认证。实现了KDC去中心化,所有路端都可以对车辆进行身份认证。同时减少了车云匿名凭证产生的数量。由于没有单一的中心服务器,因此不存在单点故障问题。通过触发区块链智能合约获得组密钥参数GSP-1保证组密钥安全性,通过路端广播方式获得GSP-2组密钥参数实现了分发的高效率和实时性。在这个过程中保证组密钥的一次一密,同时保证了通信的前向安全与后向安全。5. On the basis of V2X broadcast communication, the present invention reduces computing overhead and signaling overhead. With the help of blockchain smart contracts, the road end realizes anonymous mutual recognition of vehicle and road identities, achieves privacy protection, and achieves decentralization. The road end no longer needs the cloud to assist in authenticating vehicle identities. At the same time, combined with the existing certificate system, the identity authentication of the vehicle to the road end is realized. KDC has been decentralized and all road terminals can authenticate vehicles. At the same time, the number of anonymous credentials generated by Cheyun is reduced. Since there is no single central server, there is no single point of failure. The group key parameter GSP-1 is obtained by triggering the blockchain smart contract to ensure the security of the group key, and the GSP-2 group key parameter is obtained through roadside broadcasting to achieve high efficiency and real-time distribution. In this process, the one-time padding of the group key is guaranteed, and the forward security and backward security of communication are ensured.

可追溯性:区块链上记录了路端对车辆的认证信息,由于是私有链,故路端没有权限,不可更改;当需要追溯时,可从云端获取认证记录,实现追溯。Traceability: The blockchain records the certification information of the vehicle at the road end. Since it is a private chain, the road end has no authority and cannot be changed. When traceability is needed, the certification record can be obtained from the cloud to achieve traceability.

可撤销性:由于是私有链,云端作为管理者可撤销路端的访问权限,路端无法访问智能合约,无法对车辆认证,路端节点失去功能。云端也可撤销智能合约,也无法对云端认证,因此不能获得V2V服务。Revocability: Because it is a private chain, the cloud, as the administrator, can revoke the access rights of the road end. The road end cannot access the smart contract, cannot authenticate the vehicle, and the road end node loses its function. The cloud can also revoke smart contracts and cannot authenticate the cloud, so it cannot obtain V2V services.

附图说明Description of the drawings

图1为本发明的操作流程结构示意图。Figure 1 is a schematic structural diagram of the operation flow of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.

PC5是指用于直接车辆之间通信的物理层接口。PC5是V2X通信中的一种特定接口标准,用于在车辆之间进行直接的短距离通信,它利用了车载设备中的无线通信模块,允许车辆之间直接交换信息,如位置、速度、行驶意图等。PC5接口的使用使得V2X通信更加灵活和高效,车辆能够直接进行通信,而不需要依赖基础设施或网络的支持。它提供了低延迟和高可靠性的通信,为车辆之间的交互和协作提供了更好的条件。通过PC5接口,车辆可以直接进行点对点或多点之间的通信。PC5 refers to the physical layer interface used for direct vehicle-to-vehicle communication. PC5 is a specific interface standard in V2X communication, used for direct short-distance communication between vehicles. It utilizes wireless communication modules in on-board equipment to allow vehicles to directly exchange information, such as location, speed, and travel. Intention etc. The use of the PC5 interface makes V2X communication more flexible and efficient, allowing vehicles to communicate directly without relying on infrastructure or network support. It provides low-latency and high-reliability communication, providing better conditions for interaction and collaboration between vehicles. Through the PC5 interface, vehicles can directly communicate point-to-point or between multiple points.

V2X广播是指向所有附近车辆广泛发送消息的通信方式。在广播通信中,发送者将消息传递给附近的所有车辆,而不需要事先确定特定的接收者。广播通信可以用于广泛的信息传递,例如交通状况警告、紧急事件通知等。由于广播消息会被所有车辆接收,因此消息内容通常需要进行加密和认证,以确保安全性和可信度。V2X broadcast is a communication method that widely sends messages to all nearby vehicles. In broadcast communication, the sender delivers a message to all nearby vehicles without identifying specific recipients in advance. Broadcast communication can be used for a wide range of information transmission, such as traffic situation warnings, emergency event notifications, etc. Since broadcast messages are received by all vehicles, the message content usually needs to be encrypted and authenticated to ensure security and trustworthiness.

组密钥是一种用于在多个参与者之间进行安全通信的密钥。与一对一通信中使用的密钥不同,组密钥通常是由参与组的所有成员共享的。组密钥用于支持群组通信或多方通信场景,其中有多个参与者需要进行安全的消息传递。该密钥用于加密和解密消息,以确保只有授权的组成员能够访问和理解消息内容。在使用组密钥的协议中,参与者可以动态地加入或离开组,并且只有授权的组成员才能访问密钥。通常,组密钥的管理由特定的密钥分发协议或密钥管理方案来处理,以确保安全性和适当的密钥更新。组密钥的共享性质使得它适用于多方协作、团队合作或群组间的保密通信。通过使用组密钥,参与者可以使用相同的密钥来加密和解密消息,从而实现高效且安全的群组通信。A group key is a key used for secure communication between multiple participants. Unlike keys used in one-to-one communication, group keys are typically shared by all members of the participating group. Group keys are used to support group communication or multi-party communication scenarios where multiple participants require secure messaging. This key is used to encrypt and decrypt messages to ensure that only authorized group members can access and understand the message content. In protocols that use group keys, participants can join or leave the group dynamically, and only authorized group members have access to the key. Typically, the management of group keys is handled by a specific key distribution protocol or key management scheme to ensure security and appropriate key updates. The shared nature of the group key makes it suitable for multi-party collaboration, teamwork, or confidential communication between groups. By using group keys, participants can use the same key to encrypt and decrypt messages, enabling efficient and secure group communication.

在提出的车路协同场景中,云端与每一个RSU都建立点对点的连接。车辆与路端,路端与云端,车辆与云端之间都是互不信任的,因此双方在真正通讯前都需要对身份进行互认。其中车辆在每次启动后都需要与云端进行身份认证,以便获得车路之间认证所需的匿名凭证。每部分的功能如下:In the proposed vehicle-road collaboration scenario, the cloud establishes point-to-point connections with each RSU. The vehicle and the road end, the road end and the cloud, and the vehicle and the cloud do not trust each other. Therefore, both parties need to recognize each other's identities before actual communication. The vehicle needs to authenticate with the cloud every time it is started in order to obtain the anonymous credentials required for vehicle-to-road authentication. The functions of each part are as follows:

云端:云端服务器由身份认证服务器、密钥分发服务器与TSP平台组成。主要负责车辆的身份认证,RSU的身份认证,车云之间会话密钥的下发,以及部分组密钥的下发。Cloud: The cloud server consists of an identity authentication server, a key distribution server and a TSP platform. Mainly responsible for vehicle identity authentication, RSU identity authentication, session key issuance between cars and clouds, and partial group key issuance.

身份认证服务器:主要负责车辆的身份认证,为车辆颁发匿名凭证,以及路端设备的身份认证,同时为路端设备提供零知识证明,帮助路端设备完成车辆身份合法的验证,实现车路之间的身份互认。Identity authentication server: Mainly responsible for the identity authentication of the vehicle, issuing anonymous certificates to the vehicle, and the identity authentication of the road-end equipment. It also provides zero-knowledge proof for the road-end equipment, helping the road-end equipment to complete the legal verification of the vehicle identity, and realizing the road-to-vehicle identification. mutual recognition of identities.

密钥分发服务器:在本发明中,点对点通信中传输的消息都是经过量子密钥加密的,车辆与路端的安全介质中都存储有预充注的量子密钥,用于消息的加解密。当安全介质中的量子会话密钥低于预设值时,就需要向云端的密钥分发中心申请量子会话密钥,完成量子密钥的补充。同时密钥申请与密钥下发过程也是使用预先充注的密钥进行加密。Key distribution server: In the present invention, the messages transmitted in point-to-point communication are all encrypted by quantum keys, and pre-filled quantum keys are stored in the security media of the vehicle and the road end for encryption and decryption of messages. When the quantum session key in the secure medium is lower than the preset value, you need to apply for the quantum session key from the key distribution center in the cloud to complete the supplement of the quantum key. At the same time, the key application and key issuance process also uses pre-charged keys for encryption.

路端:路端基础设施配有RSU,主要负责为车辆提供服务,如广播当前路端范围的交通情况等。在本发明中,路端主要负责部分组密钥的分发。同时路端的存在可以减轻云端密钥分发服务器的并行压力。Road end: The road end infrastructure is equipped with RSU, which is mainly responsible for providing services to vehicles, such as broadcasting the traffic conditions within the current road end range. In the present invention, the road end is mainly responsible for the distribution of partial group keys. At the same time, the existence of the road end can reduce the parallel pressure on the cloud key distribution server.

车辆:每一辆车在出厂阶段就被赋予了由量子随机数发生器产生的一段真随机数作为车辆的唯一标识码VIN,同时车辆内部已经预先充注了一批量子会话密钥句柄与量子会话密钥,密钥句柄与量子密钥一一对应,量子密钥句柄是量子密钥的唯一标识。配备有OBU设备与量子随机数发生器,车辆能够与路端设备RSU进行广播通讯,同时也能够与装配有OBU设备的其他车辆完成信息交互。只有通过了云端的身份认证并且获得匿名凭证的车辆,才能够完成与路之间的身份互认,享受组通信服务。Vehicle: Each vehicle is given a true random number generated by a quantum random number generator as the vehicle's unique identification code VIN when it leaves the factory. At the same time, a batch of quantum session key handles and quantum keys have been pre-filled inside the vehicle. The session key and key handle correspond to the quantum key one-to-one, and the quantum key handle is the unique identifier of the quantum key. Equipped with OBU equipment and a quantum random number generator, the vehicle can broadcast communications with the roadside equipment RSU, and can also complete information exchange with other vehicles equipped with OBU equipment. Only vehicles that have passed cloud identity authentication and obtained anonymous credentials can complete mutual identity recognition with the road and enjoy group communication services.

区块链是一种去中心化的分布式账本技术,通过将数据以块的形式链接在一起,形成一个不可篡改的记录链。每个块包含了一些交易数据,并且通过密码学方法与之前的块进行链接,确保数据的安全性和完整性。区块链的一个重要特征是去中心化,它不依赖于单个中央机构或服务器来验证和存储数据,而是通过网络中的多个节点共同达成共识。这种去中心化的特性使得区块链具有抗攻击和单点故障的能力。智能合约是区块链技术的重要应用之一。智能合约是一种以计算机代码形式编写的自动化合约,它在区块链上执行和执行合同条款。智能合约利用区块链的去中心化和不可篡改性,通过编程代码自动执行合同中约定的条件和操作。Blockchain is a decentralized distributed ledger technology that links data together in blocks to form an immutable chain of records. Each block contains some transaction data and is cryptographically linked to previous blocks to ensure data security and integrity. An important feature of blockchain is decentralization. It does not rely on a single central agency or server to verify and store data, but instead reaches consensus through multiple nodes in the network. This decentralized nature makes the blockchain resistant to attacks and single points of failure. Smart contracts are one of the important applications of blockchain technology. A smart contract is an automated contract written in the form of computer code that executes and enforces the terms of the contract on the blockchain. Smart contracts take advantage of the decentralization and immutability of blockchain to automatically execute the conditions and operations agreed in the contract through programming code.

如图1所示,一种基于区块链适用于V2I场景下量子组密钥分发方法,包括以下操作步骤:As shown in Figure 1, a blockchain-based quantum group key distribution method suitable for V2I scenarios includes the following steps:

S1、注册阶段:分别为车辆和路端赋予唯一标志,并向车辆和路端中预充注量子密钥,同时为路端颁发数字证书。S1. Registration stage: Give the vehicle and the road terminal a unique logo respectively, pre-fill the quantum key into the vehicle and the road terminal, and issue a digital certificate to the road terminal.

注册阶段的具体操作步骤如下:The specific steps in the registration phase are as follows:

S11、在车辆出厂时为车辆i赋予唯一标识码VINi,同时向车辆i内的安全介质中预充注设定数量且与唯一标识码VINi彼此一一对应的量子会话密钥与量子完整性校验密钥;S11. When the vehicle leaves the factory, the unique identification code VIN i is assigned to the vehicle i, and at the same time, a set number of quantum session keys and quantum integrity corresponding to the unique identification code VIN i are pre-charged into the secure medium in the vehicle i. Sexuality verification key;

在路端出厂时为路端r赋予唯一标识码RIDr,同时向路端r内的安全介质中预充注设定数量且与唯一标识码RIDr彼此一一对应的量子会话密钥与量子完整性校验密钥;When the road end leaves the factory, a unique identification code RID r is assigned to the road end r. At the same time, a set number of quantum session keys and quantum keys that correspond one-to-one to the unique identification code RID r are prefilled into the secure medium in the road end r. Integrity check key;

S12、接着车辆i向云端上传唯一标识码VINi,并存储在云端的数据库中;同时路端r向云端上传唯一标识码RIDr,并存储在云端的数据库中;S12. Then the vehicle i uploads the unique identification code VIN i to the cloud and stores it in the cloud database; at the same time, the road end r uploads the unique identification code RID r to the cloud and stores it in the cloud database;

S13、当车辆i或路端r的安全介质中的量子会话密钥低于预设值时,车辆i或路端r向云端的密钥分发中心发出量子会话密钥补充申请,云端的密钥分发中心向车辆i或路端r补充量子会话密钥;S13. When the quantum session key in the secure medium of vehicle i or road end r is lower than the preset value, vehicle i or road end r issues a quantum session key supplement application to the key distribution center in the cloud. The key in the cloud The distribution center replenishes the quantum session key to vehicle i or road end r;

S14、接着使用第三方认证中心为路端r的唯一标识码RIDr颁发包含路端r公钥信息的数字证书DCrS14. Then use a third-party certification center to issue a digital certificate DC r containing the public key information of the road end r for the unique identification code RID r of the road end r.

S2、初始化阶段:进行车辆与云端之间的身份互认,且为车辆获取匿名凭证,同时将该匿名凭证上传至区块链;S2. Initialization stage: Carry out mutual identity recognition between the vehicle and the cloud, obtain an anonymous certificate for the vehicle, and upload the anonymous certificate to the blockchain;

初始化阶段的具体操作步骤如下:The specific steps in the initialization phase are as follows:

S21、车辆i的量子随机数发生器产生n个真随机数RNi-c,加上车辆i身份唯一标识码VINi和车辆i的当前时间戳Tsi后,使用车辆i预充注的量子会话密钥PFSKtag进行加密,得到加密后的消息EPFSK(VINi,{RNi-c}i=1 n,Tsi),其中{}i=1 n表示n个参与者的集合;同时使用车辆i预充注的量子完整性验证密钥PFIKtag计算加密后的消息EPFSK(VINi,{RNi-c}i=1 n,Tsi)的消息验证码MACPFIK;接着对消息EPFSK(VINi,{RNi-c}i=1 n,Tsi)进行拼接,以形成用于车辆i身份认证请求的消息体M1,M1={PFSKtag,PFIKtag,EPFSK(VINi,{RNi-c}i=1 n,Tsi),MACPFIK,Tsi},最后将消息体M1发送给云端;S21. The quantum random number generator of vehicle i generates n true random numbers RN ic . After adding the unique identification code VIN i of vehicle i and the current timestamp T si of vehicle i, the quantum session secret prefilled by vehicle i is used. The key PFSK tag is encrypted to obtain the encrypted message E PFSK (VIN i ,{RN ic } i=1 n ,T si ), where {} i=1 n represents a set of n participants; at the same time, vehicle i is used to pre- The filled quantum integrity verification key PFIK tag calculates the message verification code MAC PFIK of the encrypted message E PFSK (VIN i , {RN ic } i=1 n , T si ); then the message E PFSK (VIN i , {RN ic } i=1 n ,T si ) are spliced to form the message body M1 for the identity authentication request of vehicle i, M1={PFSK tag ,PFIK tag ,E PFSK (VIN i ,{RN ic } i= 1 n ,T si ),MAC PFIK ,T si }, and finally send the message body M1 to the cloud;

S22、云端的身份认证服务器收到车辆i发送的消息体M1后,首先对当前时间戳Tsi进行时效性判断,若当前时间戳Tsi与当前判断时刻的差值大于设定的时间阈值,则云端的身份认证服务器对收到的消息体M1不进行下一步处理;反之,云端的身份认证服务器根据接收到的消息体M1里面的量子会话密钥PFSKtag与量子完整性验证密钥PFIKtag,在云端的安全介质内找到对应的预充注的量子会话密钥PFSKv、量子完整性验证密钥PFIKv,以及车辆i预存在云端数据库中的唯一标识码VINi0S22. After receiving the message body M1 sent by vehicle i, the identity authentication server in the cloud first performs a timeliness judgment on the current timestamp T si . If the difference between the current timestamp T si and the current judgment time is greater than the set time threshold, Then the identity authentication server in the cloud does not perform further processing on the received message body M1; on the contrary, the identity authentication server in the cloud uses the quantum session key PFSK tag and the quantum integrity verification key PFIK tag in the received message body M1. , find the corresponding pre-filled quantum session key PFSK v , quantum integrity verification key PFIK v , and the unique identification code VIN i0 of vehicle i pre-stored in the cloud database in the secure medium of the cloud;

判断消息验证码MACPFIK的完整性,若完整,则云端使用预充注的量子会话密钥PFSKv对消息体M1进行解密,以使云端得到车辆i的唯一标识码VINi与车辆i的真随机数{RNi-c}i=1 nDetermine the integrity of the message verification code MAC PFIK . If it is complete, the cloud uses the pre-charged quantum session key PFSK v to decrypt the message body M1, so that the cloud can obtain the unique identification code VINi of vehicle i and the true randomness of vehicle i. Number {RN ic } i=1 n ;

云端的身份认证服务器对解密后得到的唯一标识码VINi与在数据库中查询到的唯一标识码VINi0进行比较,若两者相等,则云端的身份认证服务器产生n个真随机数,以形成真随机数集合{RNc-i}i=1 nThe identity authentication server in the cloud compares the unique identification code VIN i obtained after decryption with the unique identification code VIN i0 queried in the database. If the two are equal, the identity authentication server in the cloud generates n true random numbers to form True random number set {RN ci } i=1 n ;

S23、云端对真随机数RNi-c进行加一操作,并加上云端自己产生的真随机数RNc-i,和云端的当前时间戳Tsc进行拼接后使用云端预充注的车辆i的量子会话密钥PFSKtag’进行加密,以使云端得到加密后的消息EPFSK’({RNi-c+1,RNc-i}i=1 n,Tsc);同时使用云端预充注的车辆i的量子完整性验证密钥PFIKtag’计算加密后的消息EPFSK’({RNi-c+1,RNc-i}i=1 n,Tsc)的消息验证码MACPFIK’;接着对消息EPFSK’({RNi-c+1,RNc-i}i=1 n,Tsc)进行拼接,以得到消息体M2,M2={PFSKtag’,PFIKtag’, EPFSK’({RNi-c+1,RNc-i}i=1 n,Tsc),MACPFIK’,Tsc},并将消息体M2发送给车辆i;S23. The cloud adds one to the true random number RN ic , adds the true random number RN ci generated by the cloud itself, splices it with the current timestamp T sc of the cloud, and then uses the quantum session key of vehicle i precharged by the cloud. Encrypt the key PFSK tag' so that the cloud can obtain the encrypted message E PFSK' ({RN ic +1,RN ci } i=1 n ,T sc ); at the same time, the quantum integrity of the vehicle i precharged in the cloud is used Verification key PFIK tag'Calculate the message verification code MAC PFIK' of the encrypted message E PFSK' ({RN ic +1,RN ci } i=1 n ,T sc ); then verify the message E PFSK' ({RN ic +1,RN ci } i=1 n ,T sc ) to get the message body M2, M2={PFSK tag' ,PFIK tag' , E PFSK' ({RN ic +1,RN ci } i=1 n ,T sc ),MAC PFIK' ,T sc }, and send the message body M2 to vehicle i;

S24、车辆i收到云端返还的消息体M2后,对消息体M2中的当前时间戳Tsc进行判断,若当前时间戳Tsc与当前判断时刻的差值大于设定的时间阈值,则车辆i对消息体不做下一步处理,反之,车辆i根据收到的消息体M2里面PFSKtag’与PFIKtag’,在车辆i的安全介质内找到对应的预充注的量子会话密钥PFSKv’和完整性验证密钥PFIKv’S24. After receiving the message body M2 returned by the cloud, the vehicle i judges the current timestamp T sc in the message body M2. If the difference between the current timestamp T sc and the current judgment time is greater than the set time threshold, the vehicle i i does not perform further processing on the message body. On the contrary, vehicle i finds the corresponding pre-charged quantum session key PFSK v in the secure medium of vehicle i based on the PFSK tag' and PFIK tag' in the received message body M2. ' and integrity verification key PFIK v' ;

计算消息体M2中的消息验证码MACPFIK’,判断消息验证码MACPFIK’的完整性;若完整,则使用车辆i预充注的量子会话密钥PFSKv’对消息体M2进行解密,以使车辆i得到云端返回的消息集合{RNi-c+1,RNc-i}i=1 nCalculate the message verification code MAC PFIK' in the message body M2, and determine the integrity of the message verification code MAC PFIK' ; if it is complete, use the quantum session key PFSK v' precharged by vehicle i to decrypt the message body M2 to Let vehicle i get the message set {RN ic +1,RN ci } i=1 n returned by the cloud;

S25、车辆i根据真随机数RNc-i、真随机数RNi-c,以及唯一标识VINi,通过单向哈希函数H计算得到n个匿名凭证的哈希值,ANCi的哈希值计算结果为:ANCi=H(VINi,RNi-c,RNc-i);S25. Vehicle i calculates the hash value of n anonymous credentials through the one-way hash function H based on the true random number RN ci , the true random number RN ic , and the unique identifier VIN i . The hash value calculation result of ANC i is: :ANC i =H(VIN i ,RN ic,RNc-i );

S26、车辆i将匿名凭证ANCi上传至云端,以组装得到消息体M3,M3={PFSKtag,PFIKtag, EPFSK(VINi,{H(RNi-c),H(ANC)}i=1 n,Tsi),MACPFIK,Tsi},并将消息体M3发送至云端;S26. Vehicle i uploads the anonymous certificate ANC i to the cloud to assemble the message body M3, M3={PFSK tag ,PFIK tag , E PFSK (VIN i ,{H(RN ic ),H(ANC)} i=1 n ,T si ),MAC PFIK ,T si }, and send the message body M3 to the cloud;

S27、根据车辆i的匿名凭证ANCi,在云端查询到生成该匿名凭证ANCi的参数VINi、RNc-i和RNi-c;云端对查询到的RNc-i进行哈希计算,并将计算结果与车辆i的哈希值H(VINi,RNi-c,RNc-i)进行比对,若两者相同,则车辆i完成n个匿名凭证的计算;反之,则没有完成n个匿名凭证的计算,需要按照步骤S21到步骤S27重新处理;S27. According to the anonymous certificate ANC i of vehicle i, query the parameters VIN i , RN ci and RN ic that generate the anonymous certificate ANC i on the cloud; the cloud performs hash calculation on the queried RN ci and compares the calculation results with the vehicle Compare the hash value H (VIN i , RN ic , RN ci ) of i. If the two are the same, vehicle i has completed the calculation of n anonymous credentials; otherwise, the calculation of n anonymous credentials has not been completed and needs to be calculated according to Step S21 to step S27 are processed again;

S28、接着云端为车辆i的n个匿名凭证生成n个智能合约,并得到每个智能合约的唯一标识码POS,同时使用唯一标识码POS与每个匿名凭证的哈希值,以及对应的生成该匿名凭证的参数的哈希值,共同生成消息体M4,M4={PFSKtag,PFIKtag, EPFSK({H(RNc-i),H(ANC),POS }i=1 n,Tsc),MACPFIK,Tsc},并将消息体M4发送至车辆i,以告知车辆i的匿名凭证已经上传至区块链,车辆i可以与路端r进行身份认证。S28. Then the cloud generates n smart contracts for n anonymous certificates of vehicle i, and obtains the unique identification code POS of each smart contract. At the same time, the unique identification code POS and the hash value of each anonymous certificate are used, and the corresponding generation The hash value of the parameters of the anonymous credential jointly generates the message body M4, M4={PFSK tag ,PFIK tag , E PFSK ({H(RN ci ),H(ANC),POS } i=1 n ,T sc ) ,MAC PFIK ,T sc }, and send the message body M4 to the vehicle i to inform the vehicle i that the anonymous certificate has been uploaded to the blockchain, and the vehicle i can perform identity authentication with the road end r.

S3、组密钥获取阶段:车辆和路端之间通过密钥进行身份认证,并且路端向车辆下发组密钥参数,同时车辆通过组密钥参数计算得到组密钥。S3. Group key acquisition stage: The vehicle and the road end perform identity authentication through keys, and the road end issues group key parameters to the vehicle. At the same time, the vehicle calculates the group key through the group key parameters.

组密钥获取阶段的具体步骤如下:The specific steps in the group key acquisition phase are as follows:

S31、路端r在其通讯范围内广播数字证书DCrS31. The road end r broadcasts the digital certificate DC r within its communication range;

S32、驶入路端r通信范围内的车辆i,通过PC5广播接收路端r的数字证书DCr;车辆i向路端r广播消息{AddReq,POS,ANCi,H(RNc-i)};其中,H(RNc-i)为RNc-i的哈希值;S32. The vehicle i that enters the communication range of the road end r receives the digital certificate DC r of the road end r through PC5 broadcast; the vehicle i broadcasts the message {AddReq, POS, ANC i , H(RN ci )} to the road end r; Among them, H(RN ci ) is the hash value of RN ci ;

S33、路端r通过POS找到智能合约,并发生交易,以触发智能合约;智能合约向车辆i返还H(RNc-i)与量子会话密钥PFSKtag;如果车辆i通过智能合约得到的H(RNc-i)与从消息{AddReq,POS,ANCi,H(RNc-i)}中收到的H(RNc-i)相等,则车辆i身份合法;反之,则不合法;S33. The road end r finds the smart contract through POS, and a transaction occurs to trigger the smart contract; the smart contract returns H(RN ci ) and the quantum session key PFSK tag to the vehicle i; if the H(RN obtained by the vehicle i through the smart contract ci ) is equal to H(RN ci) received from the message {AddReq, POS, ANC i , H(RN ci ) }, then the identity of vehicle i is legal; otherwise, it is illegal;

当车辆i的身份合法时,路端r的随机数发生器产生一个随机数GSP-1,并使用触发智能合约得到的量子会话密钥PFSKtag作为对称密钥对随机数GSP-1进行加密;When the identity of vehicle i is legal, the random number generator at road end r generates a random number GSP-1, and uses the quantum session key PFSK tag obtained by triggering the smart contract as a symmetric key to encrypt the random number GSP-1;

S34、所有车辆身份认证完成后,路端r计算当前所有合法车辆的匿名凭证的哈希值,并将该哈希值作为GSP-2,结合路端r的当前时间戳Tsr和对比使用私钥对参数进行签名而得到Signature,以构成消息{GSP-2,{ANCi,PFSKtag,EPFSK(GSP-1)}i=1 n,Signature,Tsr},并将该消息通过组播的方式传输给当前所有车辆;S34. After the identity authentication of all vehicles is completed, the road end r calculates the hash value of the anonymous credentials of all current legal vehicles, and uses the hash value as GSP-2, combined with the current timestamp T sr of the road end r and comparison using the private The key is used to sign the parameters to obtain the Signature to form the message {GSP-2,{ANC i ,PFSK tag ,E PFSK (GSP-1)} i=1 n ,Signature,T sr }, and the message is multicast transmitted to all current vehicles;

S35、车辆i接收组播的消息,并检查消息中是否存在车辆i自己的匿名凭证;若存在,则车辆i的身份验证成功,反之,车辆i的身份验证不成功;S35. Vehicle i receives the multicast message and checks whether the anonymous credential of vehicle i exists in the message; if it exists, the identity verification of vehicle i is successful; otherwise, the identity verification of vehicle i is unsuccessful;

对身份验证成功的车辆,首先截取消息中的GSP-2,并根据路端r的数字证书获得的公钥,进而通过公钥Signature进行验证;然后根据得到的GSP-1与GSP-2,计算得到组密钥GSK,GSK=H(GSP-1,GSP-2)。For vehicles whose identity verification is successful, first intercept the GSP-2 in the message, and then verify it through the public key Signature based on the public key obtained from the digital certificate of road end r; then calculate based on the obtained GSP-1 and GSP-2 Get the group key GSK, GSK=H(GSP-1,GSP-2).

S4、组密钥更新阶段:对组成员进行更新,以执行组成员更新和组密钥更换操作。S4. Group key update stage: Update group members to perform group member update and group key replacement operations.

组密钥更新阶段包括新成员加入阶段和组成员离开阶段;新成员加入阶段的具体操作步骤如下:The group key update phase includes the new member joining phase and the group member leaving phase; the specific operation steps of the new member joining phase are as follows:

S4A1、路端r在其通讯范围内广播数字证书DCrS4A1, the road end r broadcasts the digital certificate DC r within its communication range;

S4A2、驶入路端r通信范围内的车辆j,通过PC5广播接收路端r的数字证书DCr;车辆j向路端r广播消息{AddReq,POS,ANCj,H(RNc-j)},其中,H(RNc-j)为RNc-j的哈希值;S4A2. Vehicle j driving into the communication range of road end r receives the digital certificate DC r of road end r through PC5 broadcast; vehicle j broadcasts the message {AddReq, POS, ANC j , H(RN cj )} to road end r, Among them, H(RN cj ) is the hash value of RN cj ;

S4A3、路端r通过POS找到智能合约,并发生交易,以触发智能合约,智能合约向车辆j返还H(RNc-j)与量子会话密钥PFSKtag;如果车辆j通过智能合约得到的H(RNc-j)与从消息{AddReq,POS,ANCj,H(RNc-j)}中收到的H(RNc-j)相等,则车辆j身份合法;反之,则不合法;S4A3, road end r finds the smart contract through POS, and a transaction occurs to trigger the smart contract. The smart contract returns H(RN cj ) and the quantum session key PFSK tag to vehicle j; if vehicle j obtains H(RN through the smart contract cj ) is equal to H(RN cj ) received from the message {AddReq, POS, ANC j , H(RN cj )}, then the identity of vehicle j is legal; otherwise, it is illegal;

当车辆j的身份合法时,使用触发智能合约得到的量子会话密钥PFSKtag作为对称密钥对已经产生的随机数GSP-1进行加密,以使随机数GSP-1保持不变;When the identity of vehicle j is legal, the quantum session key PFSK tag obtained by triggering the smart contract is used as a symmetric key to encrypt the random number GSP-1 that has been generated, so that the random number GSP-1 remains unchanged;

S4A4、所有新加入车辆的身份认证完成后,路端r重新计算当前所有合法车辆的匿名凭证的哈希值,并将该哈希值作为GSP-1,结合拼接时间戳Tsr和对比使用私钥对参数进行签名而得到Signature,以构成消息{GSP-2,{ANCj, PFSKtag, EPFSK(GSP-1)}i=1 1,Signature, Tsr},并将该消息通过组播的方式传输给当前所有车辆;S4A4. After the identity authentication of all newly added vehicles is completed, the road end r recalculates the hash value of the anonymous credentials of all current legal vehicles, and uses the hash value as GSP-1, combined with the splicing timestamp T sr and comparison using the private The key is used to sign the parameters to obtain the Signature to form the message {GSP-2,{ANC j , PFSK tag , E PFSK (GSP-1)} i=1 1 ,Signature, T sr }, and the message is multicast transmitted to all current vehicles;

S4A5、车辆j接收组播的消息,并检查消息中是否存在车辆j自己的匿名凭证;若存在,则车辆j的身份验证成功,反之,车辆j的身份验证不成功;S4A5. Vehicle j receives the multicast message and checks whether the anonymous credential of vehicle j exists in the message; if it exists, the identity verification of vehicle j is successful; otherwise, the identity verification of vehicle j is unsuccessful;

对身份验证成功的车辆,首先截取消息中的GSP-2,并根据路端r的数字证书获得的公钥,进而通过公钥Signature进行验证;然后根据得到的GSP-1与GSP-2,计算得到组密钥GSK,GSK=H(GSP-1,GSP-2);For vehicles whose identity verification is successful, first intercept the GSP-2 in the message, and then verify it through the public key Signature based on the public key obtained from the digital certificate of road end r; then calculate based on the obtained GSP-1 and GSP-2 Get the group key GSK, GSK=H(GSP-1,GSP-2);

对于路端r通讯范围内原有成员,只需要按步骤S34重新得到GSP-2,并更新对应的GSK即可。For the original members within the communication range of the road end r, it is only necessary to obtain GSP-2 again according to step S34 and update the corresponding GSK.

组成员离开阶段的具体操作步骤如下:The specific steps for group members to leave are as follows:

S4B1、路端r在其通讯范围内广播数字证书DCrS4B1, the road end r broadcasts the digital certificate DC r within its communication range;

S4B2、驶入路端r通信范围内的车辆j,通过PC5广播接收路端r的数字证书DCr;车辆j向路端r广播消息{AddReq,POS,ANCj,H(RNc-j)},其中,H(RNc-j)为RNc-j的哈希值;S4B2. Vehicle j driving into the communication range of road end r receives the digital certificate DC r of road end r through PC5 broadcast; vehicle j broadcasts the message {AddReq, POS, ANC j , H(RN cj )} to road end r, Among them, H(RN cj ) is the hash value of RN cj ;

S4B3、路端r判断当前准备离开的车辆是否为当前组成员,如果是,路端r重新生成GSP-1,并使用步骤S33中触发智能合约得到的量子会话密钥PFSKtag作为对称密钥对已经产生的随机数GSP-1进行加密,以使随机数GSP-1保持不变;S4B3. Road end r determines whether the vehicle currently preparing to leave is a member of the current group. If so, road end r regenerates GSP-1 and uses the quantum session key PFSK tag obtained by triggering the smart contract in step S33 as a symmetric key pair. The generated random number GSP-1 is encrypted so that the random number GSP-1 remains unchanged;

S4B4、路端r重新计算当前组内所有身份合法的车辆的匿名凭证的哈希值,并将该哈希值作为GSP-1,结合拼接时间戳Tsr和对比使用私钥对参数进行签名而得到Signature,以构成消息,并将该消息通过组播的方式传输给当前所有车辆;S4B4, road end r recalculates the hash value of the anonymous credentials of all vehicles with legal identities in the current group, and uses the hash value as GSP-1, combines the splicing timestamp T sr and compares the private key to sign the parameters. Obtain the Signature to form a message and transmit the message to all current vehicles through multicast;

S4B5、组内剩余车辆接收组播的消息,并检查是否存在自己的匿名凭证,若存在,则车辆还在当前组内,反之,则不在;S4B5. The remaining vehicles in the group receive the multicast message and check whether its own anonymous credentials exist. If it exists, the vehicle is still in the current group, otherwise, it is not;

对还在当前组内的车辆,首先截取消息中的GSP-2,并根据路端r的数字证书获得的公钥,进而通过公钥进行验证;For vehicles still in the current group, first intercept the GSP-2 in the message, and then verify it through the public key based on the public key obtained from the digital certificate of road end r;

然后通过量子会话密钥PFSKtag对消息进行解密,以得到GSP-2;最后使用得到的GSP-1与GSP-2,计算得到组密钥GSK,GSK=H(GSP-1,GSP-2)。Then the message is decrypted through the quantum session key PFSK tag to obtain GSP-2; finally, the obtained GSP-1 and GSP-2 are used to calculate the group key GSK, GSK=H(GSP-1,GSP-2) .

以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,根据本发明的技术方案及其发明构思加以等同替换或改变,都应涵盖在本发明的保护范围之内。The above are only preferred specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person familiar with the technical field can, within the technical scope disclosed in the present invention, implement the technical solutions of the present invention. Equivalent substitutions or changes of the inventive concept thereof shall be included in the protection scope of the present invention.

Claims (4)

1.一种基于区块链适用于V2I场景下量子组密钥分发方法,其特征在于,包括以下操作步骤:1. A blockchain-based quantum group key distribution method suitable for V2I scenarios, which is characterized by including the following steps: S1、注册阶段:分别为车辆和路端赋予唯一标志,并分别向车辆和路端中预充对应的注量子密钥,同时为路端颁发数字证书;S1. Registration stage: assign unique marks to the vehicle and the road terminal respectively, precharge the corresponding injection subkeys into the vehicle and the road terminal respectively, and issue a digital certificate to the road terminal at the same time; S2、初始化阶段:进行车辆与云端之间的身份互认,且为车辆获取匿名凭证,同时将该匿名凭证上传至区块链;S2. Initialization stage: Carry out mutual identity recognition between the vehicle and the cloud, obtain an anonymous certificate for the vehicle, and upload the anonymous certificate to the blockchain; S3、组密钥获取阶段:车辆和路端之间通过密钥进行身份认证,并且路端向车辆下发组密钥参数,同时车辆通过组密钥参数计算得到组密钥;S3. Group key acquisition phase: The vehicle and the road end perform identity authentication through keys, and the road end issues group key parameters to the vehicle. At the same time, the vehicle calculates the group key through the group key parameters; S4、组密钥更新阶段:对组成员进行更新,以执行组成员更新和组密钥更换操作;S4. Group key update stage: Update group members to perform group member update and group key replacement operations; 初始化阶段的具体操作步骤如下:The specific steps in the initialization phase are as follows: S21、车辆i的量子随机数发生器产生n个真随机数RNi-c,加上车辆i身份唯一标识码VINi和车辆i的当前时间戳Tsi后,使用车辆i预充注的量子会话密钥PFSKtag进行加密,得到加密后的消息EPFSK(VINi,{RNi-c}i=1 n,Tsi),其中{}i=1 n表示n个参与者的集合;同时使用车辆i预充注的量子完整性验证密钥PFIKtag计算加密后的消息EPFSK(VINi,{RNi-c}i=1 n,Tsi)的消息验证码MACPFIK;接着对消息EPFSK(VINi,{RNi-c}i=1 n,Tsi)进行拼接,以形成用于车辆i身份认证请求的消息体M1,M1={PFSKtag,PFIKtag,EPFSK(VINi,{RNi-c}i=1 n,Tsi),MACPFIK,Tsi},最后将消息体M1发送给云端;S21. The quantum random number generator of vehicle i generates n true random numbers RN ic . After adding the unique identification code VIN i of vehicle i and the current timestamp T si of vehicle i, the quantum session secret prefilled by vehicle i is used. The key PFSK tag is encrypted to obtain the encrypted message E PFSK (VIN i ,{RN ic } i=1 n ,T si ), where {} i=1 n represents a set of n participants; at the same time, vehicle i is used to pre- The filled quantum integrity verification key PFIK tag calculates the message verification code MAC PFIK of the encrypted message E PFSK (VIN i , {RN ic } i=1 n , T si ); then the message E PFSK (VIN i , {RN ic } i=1 n ,T si ) are spliced to form the message body M1 for the identity authentication request of vehicle i, M1={PFSK tag ,PFIK tag ,E PFSK (VIN i ,{RN ic } i= 1 n ,T si ),MAC PFIK ,T si }, and finally send the message body M1 to the cloud; S22、云端的身份认证服务器收到车辆i发送的消息体M1后,首先对当前时间戳Tsi进行时效性判断,若当前时间戳Tsi与当前判断时刻的差值大于设定的时间阈值,则云端的身份认证服务器对收到的消息体M1不进行下一步处理;反之,云端的身份认证服务器根据接收到的消息体M1里面的量子会话密钥PFSKtag与量子完整性验证密钥PFIKtag,在云端的安全介质内找到对应的预充注的量子会话密钥PFSKv、量子完整性验证密钥PFIKv,以及车辆i预存在云端数据库中的唯一标识码VINi0S22. After receiving the message body M1 sent by vehicle i, the identity authentication server in the cloud first performs a timeliness judgment on the current timestamp T si . If the difference between the current timestamp T si and the current judgment time is greater than the set time threshold, Then the identity authentication server in the cloud does not perform further processing on the received message body M1; on the contrary, the identity authentication server in the cloud uses the quantum session key PFSK tag and the quantum integrity verification key PFIK tag in the received message body M1. , find the corresponding pre-filled quantum session key PFSK v , quantum integrity verification key PFIK v , and the unique identification code VIN i0 of vehicle i pre-stored in the cloud database in the secure medium of the cloud; 判断消息验证码MACPFIK的完整性,若完整,则云端使用预充注的量子会话密钥PFSKv对消息体M1进行解密,以使云端得到车辆i的唯一标识码VINi与车辆i的真随机数{RNi-c}i=1 nDetermine the integrity of the message verification code MAC PFIK . If it is complete, the cloud uses the pre-charged quantum session key PFSK v to decrypt the message body M1, so that the cloud can obtain the unique identification code VINi of vehicle i and the true randomness of vehicle i. Number {RN ic } i=1 n ; 云端的身份认证服务器对解密后得到的唯一标识码VINi与在数据库中查询到的唯一标识码VINi0进行比较,若两者相等,则云端的身份认证服务器产生n个真随机数,以形成真随机数集合{RNc-i}i=1 nThe identity authentication server in the cloud compares the unique identification code VIN i obtained after decryption with the unique identification code VIN i0 queried in the database. If the two are equal, the identity authentication server in the cloud generates n true random numbers to form True random number set {RN ci } i=1 n ; S23、云端对真随机数RNi-c进行加一操作,并加上云端自己产生的真随机数RNc-i,和云端的当前时间戳Tsc进行拼接后使用云端预充注的车辆i的量子会话密钥PFSKtag’进行加密,以使云端得到加密后的消息EPFSK’({RNi-c+1,RNc-i}i=1 n,Tsc);同时使用云端预充注的车辆i的量子完整性验证密钥PFIKtag’计算加密后的消息EPFSK’({RNi-c+1,RNc-i}i=1 n,Tsc)的消息验证码MACPFIK’;接着对消息EPFSK’({RNi-c+1,RNc-i}i=1 n,Tsc)进行拼接,以得到消息体M2,M2={PFSKtag’,PFIKtag’, EPFSK’({RNi-c+1,RNc-i}i=1 n,Tsc),MACPFIK’,Tsc},并将消息体M2发送给车辆i;S23. The cloud adds one to the true random number RN ic , adds the true random number RN ci generated by the cloud itself, splices it with the current timestamp T sc of the cloud, and then uses the quantum session key of vehicle i precharged by the cloud. Encrypt the key PFSK tag' so that the cloud can obtain the encrypted message E PFSK' ({RN ic +1,RN ci } i=1 n ,T sc ); at the same time, the quantum integrity of the vehicle i precharged in the cloud is used Verification key PFIK tag'Calculate the message verification code MAC PFIK' of the encrypted message E PFSK' ({RN ic +1,RN ci } i=1 n ,T sc ); then verify the message E PFSK' ({RN ic +1,RN ci } i=1 n ,T sc ) to get the message body M2, M2={PFSK tag' ,PFIK tag' , E PFSK' ({RN ic +1,RN ci } i=1 n ,T sc ),MAC PFIK' ,T sc }, and send the message body M2 to vehicle i; S24、车辆i收到云端返还的消息体M2后,对消息体M2中的当前时间戳Tsc进行判断,若当前时间戳Tsc与当前判断时刻的差值大于设定的时间阈值,则车辆i对消息体不做下一步处理,反之,车辆i根据收到的消息体M2里面PFSKtag’与PFIKtag’,在车辆i的安全介质内找到对应的预充注的量子会话密钥PFSKv’和完整性验证密钥PFIKv’S24. After receiving the message body M2 returned by the cloud, the vehicle i judges the current timestamp T sc in the message body M2. If the difference between the current timestamp T sc and the current judgment time is greater than the set time threshold, the vehicle i i does not perform further processing on the message body. On the contrary, vehicle i finds the corresponding pre-charged quantum session key PFSK v in the secure medium of vehicle i based on the PFSK tag' and PFIK tag' in the received message body M2. ' and integrity verification key PFIK v' ; 计算消息体M2中的消息验证码MACPFIK’,判断消息验证码MACPFIK’的完整性;若完整,则使用车辆i预充注的量子会话密钥PFSKv’对消息体M2进行解密,以使车辆i得到云端返回的消息集合{RNi-c+1,RNc-i}i=1 nCalculate the message verification code MAC PFIK' in the message body M2, and determine the integrity of the message verification code MAC PFIK' ; if it is complete, use the quantum session key PFSK v' precharged by vehicle i to decrypt the message body M2 to Let vehicle i get the message set {RN ic +1,RN ci } i=1 n returned by the cloud; S25、车辆i根据真随机数RNc-i、真随机数RNi-c,以及唯一标识VINi,通过单向哈希函数H计算得到n个匿名凭证的哈希值,ANCi的哈希值计算结果为:ANCi=H(VINi,RNi-c,RNc-i);S25. Vehicle i calculates the hash value of n anonymous credentials through the one-way hash function H based on the true random number RN ci , the true random number RN ic , and the unique identifier VIN i . The hash value calculation result of ANC i is: :ANC i =H(VIN i ,RN ic ,RN ci ); S26、车辆i将匿名凭证ANCi上传至云端,以组装得到消息体M3,M3={PFSKtag,PFIKtag,EPFSK(VINi,{H(RNi-c),H(ANC)}i=1 n,Tsi),MACPFIK,Tsi},并将消息体M3发送至云端;S26. Vehicle i uploads the anonymous certificate ANC i to the cloud to assemble the message body M3, M3={PFSK tag ,PFIK tag ,E PFSK (VIN i ,{H(RN ic ),H(ANC)} i=1 n ,T si ),MAC PFIK ,T si }, and send the message body M3 to the cloud; S27、根据车辆i的匿名凭证ANCi,在云端查询到生成该匿名凭证ANCi的参数VINi、RNc-i和RNi-c;云端对查询到的RNc-i进行哈希计算,并将计算结果与车辆i的哈希值H(VINi,RNi-c,RNc-i)进行比对,若两者相同,则车辆i完成n个匿名凭证的计算;反之,则没有完成n个匿名凭证的计算,需要按照步骤S21到步骤S27重新处理;S27. According to the anonymous certificate ANC i of vehicle i, query the parameters VIN i , RN ci and RN ic that generate the anonymous certificate ANC i on the cloud; the cloud performs hash calculation on the queried RN ci and compares the calculation results with the vehicle Compare the hash value H (VIN i , RN ic , RN ci ) of i. If the two are the same, vehicle i has completed the calculation of n anonymous credentials; otherwise, the calculation of n anonymous credentials has not been completed and needs to be calculated according to Step S21 to step S27 are processed again; S28、接着云端为车辆i的n个匿名凭证生成n个智能合约,并得到每个智能合约的唯一标识码POS,同时使用唯一标识码POS与每个匿名凭证的哈希值,以及对应的生成该匿名凭证的参数的哈希值,共同生成消息体M4,M4={PFSKtag,PFIKtag, EPFSK({H(RNc-i),H(ANC),POS}i=1 n,Tsc),MACPFIK,Tsc},并将消息体M4发送至车辆i,以告知车辆i的匿名凭证已经上传至区块链,车辆i可以与路端r进行身份认证;S28. Then the cloud generates n smart contracts for n anonymous certificates of vehicle i, and obtains the unique identification code POS of each smart contract. At the same time, the unique identification code POS and the hash value of each anonymous certificate are used, and the corresponding generation The hash value of the parameters of the anonymous credential jointly generates the message body M4, M4={PFSK tag ,PFIK tag , E PFSK ({H(RN ci ),H(ANC),POS} i=1 n ,T sc ) ,MAC PFIK ,T sc }, and sends the message body M4 to the vehicle i to inform the vehicle i that the anonymous certificate has been uploaded to the blockchain, and the vehicle i can perform identity authentication with the road end r; 组密钥获取阶段的具体步骤如下:The specific steps in the group key acquisition phase are as follows: S31、路端r在其通讯范围内广播数字证书DCrS31. The road end r broadcasts the digital certificate DC r within its communication range; S32、驶入路端r通信范围内的车辆i,通过PC5广播接收路端r的数字证书DCr;车辆i向路端r广播消息{AddReq,POS,ANCi,H(RNc-i)};其中,H(RNc-i)为RNc-i的哈希值;S32. The vehicle i that enters the communication range of the road end r receives the digital certificate DC r of the road end r through PC5 broadcast; the vehicle i broadcasts the message {AddReq, POS, ANC i , H(RN ci )} to the road end r; Among them, H(RN ci ) is the hash value of RN ci ; S33、路端r通过POS找到智能合约,并发生交易,以触发智能合约;智能合约向车辆i返还H(RNc-i)与量子会话密钥PFSKtag;如果车辆i通过智能合约得到的H(RNc-i)与从消息{AddReq,POS,ANCi,H(RNc-i)}中收到的H(RNc-i)相等,则车辆i身份合法;反之,则不合法;S33. The road end r finds the smart contract through POS, and a transaction occurs to trigger the smart contract; the smart contract returns H(RN ci ) and the quantum session key PFSK tag to the vehicle i; if the H(RN obtained by the vehicle i through the smart contract ci ) is equal to H(RN ci) received from the message {AddReq, POS, ANC i , H(RN ci ) }, then the identity of vehicle i is legal; otherwise, it is illegal; 当车辆i的身份合法时,路端r的随机数发生器产生一个随机数GSP-1,并使用触发智能合约得到的量子会话密钥PFSKtag作为对称密钥对随机数GSP-1进行加密;When the identity of vehicle i is legal, the random number generator at road end r generates a random number GSP-1, and uses the quantum session key PFSK tag obtained by triggering the smart contract as a symmetric key to encrypt the random number GSP-1; S34、所有车辆身份认证完成后,路端r计算当前所有合法车辆的匿名凭证的哈希值,并将该哈希值作为GSP-2,结合路端r的当前时间戳Tsr和对比使用私钥对参数进行签名而得到Signature,以构成消息{GSP-2,{ANCi,PFSKtag,EPFSK(GSP-1)}i=1 n,Signature,Tsr},并将该消息通过组播的方式传输给当前所有车辆;S34. After the identity authentication of all vehicles is completed, the road end r calculates the hash value of the anonymous credentials of all current legal vehicles, and uses the hash value as GSP-2, combined with the current timestamp T sr of the road end r and comparison using the private The key is used to sign the parameters to obtain the Signature to form the message {GSP-2,{ANC i ,PFSK tag ,E PFSK (GSP-1)} i=1 n ,Signature,T sr }, and the message is multicast transmitted to all current vehicles; S35、车辆i接收组播的消息,并检查消息中是否存在车辆i自己的匿名凭证;若存在,则车辆i的身份验证成功,反之,车辆i的身份验证不成功;S35. Vehicle i receives the multicast message and checks whether the anonymous credential of vehicle i exists in the message; if it exists, the identity verification of vehicle i is successful; otherwise, the identity verification of vehicle i is unsuccessful; 对身份验证成功的车辆,首先截取消息中的GSP-2,并根据路端r的数字For vehicles whose identity verification is successful, the GSP-2 in the message is first intercepted, and the GSP-2 is intercepted based on the number of the road end r. 证书获得的公钥,进而通过公钥Signature进行验证;然后根据得到的GSP-1与GSP-2,计算得到组密钥GSK,GSK=H(GSP-1,GSP-2)。The public key obtained from the certificate is then verified through the public key Signature; then the group key GSK is calculated based on the obtained GSP-1 and GSP-2, GSK=H (GSP-1, GSP-2). 2.根据权利要求1所述的一种基于区块链适用于V2I场景下量子组密钥分发方法,其特征在于,注册阶段的具体操作步骤如下:2. A blockchain-based quantum group key distribution method suitable for V2I scenarios according to claim 1, characterized in that the specific operating steps of the registration phase are as follows: S11、在车辆出厂时为车辆i赋予唯一标识码VINi,同时向车辆i内的安全介质中预充注设定数量且与唯一标识码VINi彼此一一对应的量子会话密钥与量子完整性校验密钥;S11. When the vehicle leaves the factory, the unique identification code VIN i is assigned to the vehicle i, and at the same time, a set number of quantum session keys and quantum integrity corresponding to the unique identification code VIN i are pre-charged into the secure medium in the vehicle i. Sexuality verification key; 在路端出厂时为路端r赋予唯一标识码RIDr,同时向路端r内的安全介质中预充注设定数量且与唯一标识码RIDr彼此一一对应的量子会话密钥与量子完整性校验密钥;When the road end leaves the factory, a unique identification code RID r is assigned to the road end r. At the same time, a set number of quantum session keys and quantum keys that correspond one-to-one to the unique identification code RID r are prefilled into the secure medium in the road end r. Integrity check key; S12、接着车辆i向云端上传唯一标识码VINi,并将唯一标识码VINi存储在云端的数据库中;同时路端r向云端上传唯一标识码RIDr,并将唯一标识码RIDr存储在云端的数据库中;S12. Then the vehicle i uploads the unique identification code VIN i to the cloud, and stores the unique identification code VIN i in the cloud database; at the same time, the road end r uploads the unique identification code RID r to the cloud, and stores the unique identification code RID r in In a cloud database; S13、当车辆i或路端r的安全介质中的量子会话密钥低于预设值时,车辆i或路端r向云端的密钥分发中心发出量子会话密钥补充申请,云端的密钥分发中心向车辆i或路端r补充量子会话密钥;S13. When the quantum session key in the secure medium of vehicle i or road end r is lower than the preset value, vehicle i or road end r issues a quantum session key supplement application to the key distribution center in the cloud. The key in the cloud The distribution center replenishes the quantum session key to vehicle i or road end r; S14、通过第三方认证中心为路端r的唯一标识码RIDr颁发包含路端r的公钥信息的数字证书DCrS14. Issue a digital certificate DC r containing the public key information of the road end r for the unique identification code RID r of the road end r through a third-party certification center. 3.根据权利要求2所述的一种基于区块链适用于V2I场景下量子组密钥分发方法,其特征在于,组密钥更新阶段包括新成员加入阶段和组成员离开阶段;新成员加入阶段的具体操作步骤如下:3. A blockchain-based quantum group key distribution method suitable for V2I scenarios according to claim 2, characterized in that the group key update stage includes a new member joining stage and a group member leaving stage; new members join The specific operation steps of the stage are as follows: S4A1、路端r在其通讯范围内广播数字证书DCrS4A1, the road end r broadcasts the digital certificate DC r within its communication range; S4A2、驶入路端r通信范围内的车辆j,通过PC5广播接收路端r的数字证书DCr;车辆j向路端r广播消息{AddReq,POS,ANCj,H(RNc-j)},其中,H(RNc-j)为RNc-j的哈希值;S4A2. Vehicle j driving into the communication range of road end r receives the digital certificate DC r of road end r through PC5 broadcast; vehicle j broadcasts the message {AddReq, POS, ANC j , H(RN cj )} to road end r, Among them, H(RN cj ) is the hash value of RN cj ; S4A3、路端r通过POS找到智能合约,并发生交易,以触发智能合约,智能合约向车辆j返还H(RNc-j)与量子会话密钥PFSKtag;如果车辆j通过智能合约得到的H(RNc-j)与从消息{AddReq,POS,ANCj,H(RNc-j)}中收到的H(RNc-j)相等,则车辆j身份合法;反之,则不合法;S4A3, road end r finds the smart contract through POS, and a transaction occurs to trigger the smart contract. The smart contract returns H(RN cj ) and the quantum session key PFSK tag to vehicle j; if vehicle j obtains H(RN through the smart contract cj ) is equal to H(RN cj ) received from the message {AddReq, POS, ANC j , H(RN cj )}, then the identity of vehicle j is legal; otherwise, it is illegal; 当车辆j的身份合法时,使用触发智能合约得到的量子会话密钥PFSKtag作为对称密钥对已经产生的随机数GSP-1进行加密,以使随机数GSP-1保持不变;When the identity of vehicle j is legal, the quantum session key PFSK tag obtained by triggering the smart contract is used as a symmetric key to encrypt the random number GSP-1 that has been generated, so that the random number GSP-1 remains unchanged; S4A4、所有新加入车辆的身份认证完成后,路端r重新计算当前所有合法车辆的匿名凭证的哈希值,并将该哈希值作为GSP-1,结合拼接时间戳Tsr和对比使用私钥对参数进行签名而得到Signature,以构成消息{GSP-2,{ANCj, PFSKtag, EPFSK(GSP-1)}i=1 1, Signature,Tsr},并将该消息通过组播的方式传输给当前所有车辆;S4A4. After the identity authentication of all newly added vehicles is completed, the road end r recalculates the hash value of the anonymous credentials of all current legal vehicles, and uses the hash value as GSP-1, combined with the splicing timestamp T sr and comparison using the private The key is used to sign the parameters to obtain the Signature to form the message {GSP-2,{ANC j , PFSK tag , E PFSK (GSP-1)} i=1 1 , Signature,T sr }, and the message is multicast transmitted to all current vehicles; S4A5、车辆j接收组播的消息,并检查消息中是否存在车辆j自己的匿名凭证;若存在,则车辆j的身份验证成功,反之,车辆j的身份验证不成功;S4A5. Vehicle j receives the multicast message and checks whether the anonymous credential of vehicle j exists in the message; if it exists, the identity verification of vehicle j is successful; otherwise, the identity verification of vehicle j is unsuccessful; 对身份验证成功的车辆,首先截取消息中的GSP-2,并根据路端r的数字For vehicles whose identity verification is successful, the GSP-2 in the message is first intercepted, and the GSP-2 is intercepted based on the number of the road end r. 证书获得的公钥,进而通过公钥Signature进行验证;然后根据得到的GSP-1与GSP-2,计算得到组密钥GSK,GSK=H(GSP-1,GSP-2);The public key obtained from the certificate is then verified through the public key Signature; then the group key GSK is calculated based on the obtained GSP-1 and GSP-2, GSK=H(GSP-1,GSP-2); 对于路端r通讯范围内原有成员,只需要按步骤S34重新得到GSP-2,并更新对应的GSK即可。For the original members within the communication range of the road end r, it is only necessary to obtain GSP-2 again according to step S34 and update the corresponding GSK. 4.根据权利要求3所述的一种基于区块链适用于V2I场景下量子组密钥分发方法,其特征在于,组成员离开阶段的具体操作步骤如下:4. A blockchain-based quantum group key distribution method suitable for V2I scenarios according to claim 3, characterized in that the specific operating steps of the group member leaving stage are as follows: S4B1、路端r在其通讯范围内广播数字证书DCrS4B1, the road end r broadcasts the digital certificate DC r within its communication range; S4B2、驶入路端r通信范围内的车辆j,通过PC5广播接收路端r的数字证书DCr;车辆j向路端r广播消息{AddReq,POS,ANCj,H(RNc-j)},其中,H(RNc-j)为RNc-j的哈希值;S4B2. Vehicle j driving into the communication range of road end r receives the digital certificate DC r of road end r through PC5 broadcast; vehicle j broadcasts the message {AddReq, POS, ANC j , H(RN cj )} to road end r, Among them, H(RN cj ) is the hash value of RN cj ; S4B3、路端r判断当前准备离开的车辆是否为当前组成员,如果是,路端r重新生成GSP-1,并使用步骤S33中触发智能合约得到的量子会话密钥PFSKtag作为对称密钥对已经产生的随机数GSP-1进行加密,以使随机数GSP-1保持不变;S4B3. Road end r determines whether the vehicle currently preparing to leave is a member of the current group. If so, road end r regenerates GSP-1 and uses the quantum session key PFSK tag obtained by triggering the smart contract in step S33 as a symmetric key pair. The generated random number GSP-1 is encrypted so that the random number GSP-1 remains unchanged; S4B4、路端r重新计算当前组内所有身份合法的车辆的匿名凭证的哈希值,并将该哈希值作为GSP-1,结合拼接时间戳Tsr和对比使用私钥对参数进行签名而得到Signature,以构成消息,并将该消息通过组播的方式传输给当前所有车辆;S4B4, road end r recalculates the hash value of the anonymous credentials of all vehicles with legal identities in the current group, and uses the hash value as GSP-1, combines the splicing timestamp T sr and compares the private key to sign the parameters. Obtain the Signature to form a message and transmit the message to all current vehicles through multicast; S4B5、组内剩余车辆接收组播的消息,并检查是否存在自己的匿名凭证,若存在,则车辆还在当前组内,反之,则不在;S4B5. The remaining vehicles in the group receive the multicast message and check whether its own anonymous credentials exist. If it exists, the vehicle is still in the current group, otherwise, it is not; 对还在当前组内的车辆,首先截取消息中的GSP-2,并根据路端r的数字For vehicles still in the current group, first intercept the GSP-2 in the message, and use the number of r at the road end to 证书获得的公钥,进而通过公钥进行验证;The public key obtained by the certificate is then verified through the public key; 然后通过量子会话密钥PFSKtag对消息进行解密,以得到GSP-2;最后使用得到的GSP-1与GSP-2,计算得到组密钥GSK,GSK=H(GSP-1,GSP-2)。Then the message is decrypted through the quantum session key PFSK tag to obtain GSP-2; finally, the obtained GSP-1 and GSP-2 are used to calculate the group key GSK, GSK=H(GSP-1,GSP-2) .
CN202311515376.1A 2023-11-15 2023-11-15 Quantum group key distribution method applicable to V2I scene based on blockchain Active CN117241267B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311515376.1A CN117241267B (en) 2023-11-15 2023-11-15 Quantum group key distribution method applicable to V2I scene based on blockchain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311515376.1A CN117241267B (en) 2023-11-15 2023-11-15 Quantum group key distribution method applicable to V2I scene based on blockchain

Publications (2)

Publication Number Publication Date
CN117241267A CN117241267A (en) 2023-12-15
CN117241267B true CN117241267B (en) 2024-01-12

Family

ID=89093403

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311515376.1A Active CN117241267B (en) 2023-11-15 2023-11-15 Quantum group key distribution method applicable to V2I scene based on blockchain

Country Status (1)

Country Link
CN (1) CN117241267B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118488406A (en) * 2024-05-08 2024-08-13 奇瑞汽车股份有限公司 Vehicle OTA encryption upgrade method, device, electronic device and storage medium
CN119182512B (en) * 2024-11-26 2025-01-21 正则量子(北京)技术有限公司 Key management method and device based on blockchain network and quantum security technology

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2020102068A4 (en) * 2020-09-01 2020-10-15 Seyed-Sajad Ahmadpour LSM- Quantum Computing: LARGE DATABASES STORE INTO A VERY SMALL MEMORY USING QUANTUM COMPUTING AND AI-BASED PROGRAMMING
WO2021083557A1 (en) * 2019-10-31 2021-05-06 Eberle Design, Inc. Method for secure vehicular communications and methods for pedestrian and vehicle location validation
CN113596778A (en) * 2021-07-28 2021-11-02 国家电网有限公司 An anonymous authentication method for IoV nodes based on blockchain
WO2022153039A1 (en) * 2021-01-13 2022-07-21 Arqit Limited System and method for group key formation
CN115001722A (en) * 2021-02-20 2022-09-02 南京如般量子科技有限公司 Anti-quantum computing internet-of-vehicle communication method and system based on CA and Guomu algorithm
CN115019901A (en) * 2022-06-14 2022-09-06 浪潮集团有限公司 Drug screening and synthesizing processing method based on block chain and quantum computation
KR20220138648A (en) * 2021-04-06 2022-10-13 주식회사 이와이엘 Device authentication method using the quantum key through QRNG and certificate generated through the quantum key
WO2022213564A1 (en) * 2021-04-07 2022-10-13 东南大学 Quantum key distribution and negotiation method for internet-of-things wireless terminal
CN116471128A (en) * 2023-06-20 2023-07-21 合肥工业大学 Secure audio communication method and system for vehicle and external equipment
CN116933886A (en) * 2023-09-12 2023-10-24 苏州浪潮智能科技有限公司 A quantum computing execution method, system, electronic device and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9509506B2 (en) * 2011-09-30 2016-11-29 Los Alamos National Security, Llc Quantum key management
EP3639497A1 (en) * 2017-06-12 2020-04-22 British Telecommunications Public Limited Company Expendable network access
US11863546B2 (en) * 2018-11-09 2024-01-02 Eberle Design, Inc. Method for secure communications and structure therefor
KR102592873B1 (en) * 2020-07-03 2023-10-25 한국전자통신연구원 Quantum Key Distribution Node Apparatus and Method for Quantum Key Distribution thereof

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021083557A1 (en) * 2019-10-31 2021-05-06 Eberle Design, Inc. Method for secure vehicular communications and methods for pedestrian and vehicle location validation
AU2020102068A4 (en) * 2020-09-01 2020-10-15 Seyed-Sajad Ahmadpour LSM- Quantum Computing: LARGE DATABASES STORE INTO A VERY SMALL MEMORY USING QUANTUM COMPUTING AND AI-BASED PROGRAMMING
WO2022153039A1 (en) * 2021-01-13 2022-07-21 Arqit Limited System and method for group key formation
CN115001722A (en) * 2021-02-20 2022-09-02 南京如般量子科技有限公司 Anti-quantum computing internet-of-vehicle communication method and system based on CA and Guomu algorithm
KR20220138648A (en) * 2021-04-06 2022-10-13 주식회사 이와이엘 Device authentication method using the quantum key through QRNG and certificate generated through the quantum key
WO2022213564A1 (en) * 2021-04-07 2022-10-13 东南大学 Quantum key distribution and negotiation method for internet-of-things wireless terminal
CN113596778A (en) * 2021-07-28 2021-11-02 国家电网有限公司 An anonymous authentication method for IoV nodes based on blockchain
CN115019901A (en) * 2022-06-14 2022-09-06 浪潮集团有限公司 Drug screening and synthesizing processing method based on block chain and quantum computation
CN116471128A (en) * 2023-06-20 2023-07-21 合肥工业大学 Secure audio communication method and system for vehicle and external equipment
CN116933886A (en) * 2023-09-12 2023-10-24 苏州浪潮智能科技有限公司 A quantum computing execution method, system, electronic device and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一款基于量子通信技术的新型无人驾驶车载安全通信模块;彭鹏;;江苏通信(01);全文 *
基于身份验证和纠缠交换的量子密钥分发;钟纪锋;;邵阳学院学报(自然科学版)(06);全文 *

Also Published As

Publication number Publication date
CN117241267A (en) 2023-12-15

Similar Documents

Publication Publication Date Title
CN109687976B (en) Motorcade building and managing method and system based on block chain and PKI authentication mechanism
CN112039872B (en) Cross-domain anonymous authentication method and system based on block chain
CN108667616B (en) Identity-based cross-cloud security authentication system and method
CN105763558B (en) Distributed polymerization authentication method with secret protection in vehicular ad hoc net
CN109698754B (en) Fleet safety management system and method based on ring signature and vehicle management platform
CN111147460B (en) A blockchain-based collaborative fine-grained access control method
CN117241267B (en) Quantum group key distribution method applicable to V2I scene based on blockchain
Zhang et al. DBCPA: Dual blockchain-assisted conditional privacy-preserving authentication framework and protocol for vehicular ad hoc networks
CN113852632B (en) SM9 algorithm-based vehicle identity authentication method, system, device and storage medium
CN117254910B (en) Efficient group key distribution method based on quantum random number under vehicle-mounted ad hoc network
CN110958607B (en) A certificate management method for the Internet of Vehicles to prevent privacy leakage
CN110099367A (en) Car networking secure data sharing method based on edge calculations
CN115102695B (en) Internet of Vehicles Certificate Authentication Method Based on Blockchain
Feng et al. PBAG: A privacy-preserving blockchain-based authentication protocol with global-updated commitment in IoVs
CN113316095B (en) 5G C-V2X-oriented lightweight vehicle safety formation protocol method
CN115473631A (en) A Blockchain Certificateless Aggregate Signcryption Key Agreement Method Based on Chinese Remainder Theorem
CN116321139A (en) An Anonymous Secure Communication Method Against Key Leakage in Internet of Vehicles
CN115515127A (en) Vehicle networking communication privacy protection method based on block chain
CN118972847A (en) V2G cross-domain identity authentication method and system based on quantum key
CN114615006A (en) Edge layer data security protection method and system for power distribution Internet of things and storage medium
CN117793670A (en) A secure communication method for Internet of Vehicles based on blockchain architecture
CN118018191A (en) Traceable internet-of-vehicles anonymous mutual trust authentication and key agreement method
CN117202195A (en) Lightweight Internet of vehicles national security communication method based on identity encryption
CN111245613A (en) An identity-based three-level key negotiation method for in-vehicle and in-vehicle networks
CN116760614A (en) A zero-knowledge proof identity authentication solution for Internet of Vehicles based on blockchain and PUF technology

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