Cipher state resource sharing method capable of resisting keyword guess in Internet of Vehicles

By designing a dense state resource sharing method that resists keyword guessing in the Internet of Vehicles and using bilinear mapping and hash functions, the problems of data leakage and low search efficiency in the Internet of Vehicles are solved, and secure encryption and efficient search of resources are achieved. , improving the security of data transmission and search efficiency.

CN118574115APending Publication Date: 2024-08-30ZHENGZHOU UNIVERSITY OF LIGHT INDUSTRY +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410655489.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-24
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

In the Internet of Vehicles scenario, there are problems such as outsourced shared data being easily leaked, resource search and matching mechanisms being inefficient, and data facing security threats during transmission.

Method used

A method of dense state resource sharing that resists keyword guessing is designed. Through the steps of key initialization, attribute authentication, resource upload and access permission setting, resource keyword setting, query matching and permission verification, bilinear mapping and hashing are used. Hash functions ensure security and efficiency of resource encryption and search.

Benefits of technology

It achieves secure encryption and efficient search of resources in the Internet of Vehicles environment, protects the privacy of terminals and resources, improves data transmission security and search efficiency, and avoids flooding attacks and computing resource occupation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118574115A
    Figure CN118574115A
Patent Text Reader

Abstract

The invention provides a key-word-guessing-resistant secret-state resource sharing method in the Internet of Vehicles. The method comprises the following steps: initializing a key; the vehicle terminal performs verification through the authentication center according to own attributes to obtain attribute authority; setting of resource access authority and setting of resource keywords: a vehicle terminal needs to send information to a road side unit according to the access resource of the terminal of the vehicle terminal, and the road side unit forwards the information to a cloud server after verification; the cloud server carries out verification, and stores the information in an information table after verification is passed; when resources of a specific theme type are looked up, the vehicle terminal uses keywords to summarize and forward the keywords to the nearby roadside unit, the roadside unit signs legal information and forwards the legal information to the cloud server, the cloud server searches and matches the legal information, and if the cloud server finds the resources meeting search conditions, the authority of a looker needs to be further verified. According to the invention, the privacy of the terminal and the resources can be protected through verification of correctness and security; security data sharing can be guaranteed, and a security guarantee technology is provided for multi-party data sharing in the Internet of Vehicles.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of secret resource sharing, cryptography and information security, and in particular to a secret resource sharing method resistant to keyword guessing in an Internet of Vehicles. Background Art

[0002] The Internet of Vehicles is the interconnection between vehicles, and between vehicles and individuals or terminals with communication capabilities. It can provide mobile networking functions, remote intelligent control, new information services, traffic road safety, etc. for vehicles and drivers and passengers. In the Internet of Vehicles scenario, vehicles generate massive amounts of data during movement and demand generation. Through devices such as GPS, RFID and sensors, the vehicle's own environment and status information can be collected. On the one hand, the storage and computing capabilities of the vehicle terminals that generate data are limited, and on the other hand, for the purpose of resource sharing, a large amount of terminal data needs to be uploaded to the cloud. However, while the Internet of Vehicles serves humans, it also allows cars and transportation platforms to interact with the outside world with more interfaces and sensitive data, exposing them to more security risks. In the process of sharing, data is bound to step out of the safe zone, and its privacy and security face challenges; in addition, a large amount of data is gathered in the cloud, and it is difficult for terminals to upload and access data in a simple and efficient way. In the current Internet of Vehicles scenario, a large amount of private information is stored in the honest and curious cloud service end. The uploaded data often involves the private information of the terminal. In order to protect the privacy of the data, the data needs to be encrypted before uploading. However, the simple and inefficient encryption method is no longer applicable to today's complex and changeable network environment. A highly confidential storage and access mechanism must be adopted for shared resources. A large number of resources are gathered in the cloud, and the resources have their own specific keyword sets. Previous solutions only studied the precise fit between resources and search. However, end users often only care about a few keywords, and do not care whether there are other keywords. Sometimes they want to exclude resources that contain a certain keyword, which puts higher requirements on resource encryption methods and search functionality. In the process of leaving the terminal and uploading to the cloud, the data may be intercepted by attackers hidden in the network at any time. How to enhance the randomness of the data and further protect secret information is a problem that needs to be deeply considered in resource sharing in the Internet of Vehicles environment.

[0003] The invention patent with application number CN202310636636.4 discloses a secure data sharing method for the Internet of Vehicles based on blockchain, which belongs to the field of mobile communication technology. First, a cloud-edge-end three-layer network model of the Internet of Vehicles scenario is established; then, a two-layer blockchain architecture is proposed to enable the data sharing process, and a sharing strategy and an asynchronous partition sharing method are further proposed; this scheme can realize safe and efficient asynchronous model sharing in the Internet of Vehicles scenario while protecting the data privacy of the user's vehicle. This scheme maximizes sharing efficiency in vehicle mobility scenarios, efficiently utilizes edge network and user data resources, and breaks the bottleneck of artificial intelligence applications in Internet of Vehicles scenarios. However, the above invention has the problems of easy leakage of outsourced shared data, inefficient resource search and matching mechanism, and security threats to data during transmission. Summary of the invention

[0004] In view of the technical problems existing in existing Internet of Vehicles scenarios, such as the easy leakage of outsourced shared data, the inefficiency of resource search and matching mechanisms, and the security threats faced by data during transmission, the present invention proposes a confidential resource sharing method in the Internet of Vehicles that is resistant to keyword guessing, which solves the security problems encountered by vehicles, transportation platforms, and external parties when sharing resources and the precise matching problems encountered during queries in the prior art. The present invention designs a secure attribute authentication process that can secretly distribute attribute weights to vehicle terminals; designs a resource encryption scheme that is resistant to keyword guessing, which builds a secure confidential environment for resource sharing between vehicles; and designs a flexible search mechanism that can satisfy multi-keyword searches with wildcards, keyword exclusion searches, and partial keyword matches.

[0005] In order to achieve the above object, the technical solution of the present invention is implemented as follows: a method for sharing secret resources in a vehicle network that resists keyword guessing, and the steps are as follows:

[0006] Step 1: Key initialization

[0007] A) The authentication center CA, roadside unit, cloud server and vehicle terminal run the key generation function to generate their own public / private key pairs;

[0008] B) The authentication center CA calculates all attributes in the system attribute set to obtain an authentication attribute sequence set and broadcasts it in the Internet of Vehicles;

[0009] Step 2: The vehicle terminal obtains attribute permissions

[0010] C) The vehicle terminal calculates the attribute sequence based on its own attributes and sends it to the authentication center CA, which verifies the attributes of the vehicle terminal. After the verification is passed, the authentication center CA generates encrypted attribute permission parameters;

[0011] D) The encrypted attribute permission parameters are returned to the vehicle terminal, and the vehicle terminal obtains the attribute permission by decrypting its own key;

[0012] Step 3: Upload resources, which is divided into setting resource access permissions and setting resource keywords

[0013] Setting resource access permissions:

[0014] E) The vehicle terminal inputs the access policy generated according to the attributes of the resource, calculates the resource authority parameter I, and the vehicle terminal signs the resource authority parameter using the timestamp, and sends the signature and the resource authority parameter I to the roadside unit RSU;

[0015] F) After receiving the information from the vehicle terminal, the roadside unit RSU verifies the signature. If the verification is successful, it re-randomizes the information, calculates the resource authority parameter II and the signature verification parameter, and then sends the information containing the resource authority parameter II and the signature verification parameter to the cloud server CS;

[0016] G) After receiving the information, the cloud server CS verifies the signature and saves the information to the resource table if it passes;

[0017] Setting of resource keywords;

[0018] H) The vehicle terminal first constructs a keyword vector for the resource, then calculates the keyword parameters, and forwards the keyword parameters to the roadside unit RSU;

[0019] I) After receiving the information from the vehicle terminal, the roadside unit RSU first verifies the signature. If the verification passes, the information is re-randomized and forwarded to the cloud server CS;

[0020] J) After receiving the information, the cloud server CS verifies the signature. If the verification passes, the keyword parameters are saved in the resource table;

[0021] Step 4: Accessing resources

[0022] Keyword query and matching:

[0023] K) The vehicle terminal selects a random number according to the number of keywords to be queried and constructs a query vector, calculates the query vector parameters, and forwards them to the roadside unit RSU;

[0024] L) After receiving the information, the roadside unit RSU re-randomizes the query vector parameters and then sends the re-randomized information to the cloud server CS;

[0025] M) After receiving the information, the cloud server CS verifies the information to verify whether the shared resource contains the keyword queried by the vehicle terminal;

[0026] If the cloud server CS finds a resource that matches the vehicle terminal query, it needs to further verify whether the vehicle terminal's permissions meet the resource access permissions:

[0027] Permission verification:

[0028] N) The access terminal constructs an attribute authority vector according to the attributes it possesses, calculates attribute authority parameters according to the attribute authority vector and sends them to the roadside unit RSU;

[0029] O) After receiving the information, the roadside unit RSU re-randomizes the attribute authority parameters and sends them to the cloud server CS;

[0030] P) After receiving the information, the cloud server CS performs attribute authority verification. If the verification passes, the cloud server CS returns the resource link secret to the access terminal.

[0031] Preferably, the key initialization in step 1 is implemented as follows: each entity runs a key generation function K.Gen to generate its own public key and private key;

[0032] The private / public key of the vehicle terminal is (sk i ,pk i ),in is the private key of the vehicle terminal, pk i ∈G1 is the public key of the vehicle terminal, and represents the set of positive integers of order q, and g is the generator of the multiplicative cyclic group G1;

[0033] The private / public key of the certification authority CA is (SK CA ,PK CA ),in The private key of the certification authority, PK CA ∈G1 is the public key of the certification authority, and The private / public key of the roadside unit RSU is (SK RSU ,PK RSU ),in PK is the private key of the authentication center. RSU ∈G1 is the public key of the certification authority, and

[0034] The private / public key of the cloud server CS is (SK CS ,PK CS ),in is the private key of the cloud server CS, PK CS ∈G1 is the public key of the cloud server, and

[0035] The authentication center CA has a set of system attributes Att = {A1, A2, ..., A n} all attributes A1, A2, ... A n Perform the calculation: Then broadcast the message {PK CA ,(S1,S2,...,S n )};

[0036] Among them, H1() means hash mapping the content in the brackets, A n Represents the nth attribute of the system attribute set Att; S n Indicates the attribute sequence used by the vehicle terminal for comparison, which is used to compare whether the vehicle terminal has the attribute parameters.

[0037] Preferably, the implementation method of the vehicle terminal obtaining attribute authority in step 2 is:

[0038] 1) Assume that the vehicle terminal u i Has attribute set A i ={a i,1 ,a i,2 ,a i,3 ...,a i,m}, 1≤m≤n; vehicle terminal u i After receiving the broadcast information from the certification center CA, according to its own attributes and the public key PK of the certification center CA Computed property sequence: Vehicle Terminal i Set the attribute sequence {S i,1 ,S i,2 ,...,S i,m} and the broadcast attribute sequence set {S1,S2,...,S n} for comparison, if the attribute sequence S i,1 =S1, then the vehicle terminal u i If it has this attribute, it is marked as 1; otherwise it is 0; where m represents the vehicle terminal u i The total number of attributes, a i,m Represents vehicle terminal u i The mth attribute of ;

[0039] Assume S i,1 =S1,S i,2 =S3,S i,3 =S4,...,S i,m =S m+1 , then the vehicle terminal u i The binary number corresponding to the attribute is converted to decimal number d i , calculate the intermediate parameters and Vehicle Terminal i Send information {pm i ,di ,pk i ,sig i} is sent to the certification authority CA to initiate an attribute authentication request; where || is a connector, pm i For vehicle terminal u i The intermediate parameters required in the attribute authentication process, sig i For vehicle terminal u i The intermediate parameters required in the attribute authentication process, H3() is the hash function;

[0040] 2) The authentication center CA receives the vehicle terminal u i After sending the information, calculate the intermediate parameter ph according to the information CA =H3(pm i ||pk i )H1(d i ), and verify the equation Is it true? If the equation is verified, it means that the signature of the vehicle terminal is valid. Otherwise, it refuses to respond to the attribute authentication request. After the verification is passed, the decimal number d i Converted into binary, the vehicle terminal u can be determined i Verified attributes; the certification authority CA calculates the intermediate parameters Verify the equation e(pm CA ,g)=e(pm i ,pk i ) is true; if the equation is verified, it means that the vehicle terminal u i The attribute is a legal attribute, and the authentication center CA uses the vehicle terminal u i The attribute weights assigned to the authenticated attributes; where ph CA is the intermediate parameter required by the vehicle terminal in the attribute authentication process, e(,) is a computable bilinear mapping;

[0041] Assume that the attribute weights corresponding to the attributes in the system attribute set Att are Attw = {w1,w2,...,w n}, attribute weight The certification authority CA calculates the intermediate parameters TK CA =H2(W i,1 ||W i,2 ||W i,3 ||...||W i,m ), The certification authority CA sends the message {W i,1 ,W i,2 ,W i,3 ,...,W i,m ,TK CA ,sig CA}Sent to vehicle terminal u i ; Among them, w n represents the nth attribute weight, W i,1 , TK CA 、sig CA are the intermediate parameters required by the vehicle terminal in the attribute authentication process, H2() is the hash function, t k represents the set of positive integers of order q A randomly selected number in

[0042] 3) Vehicle terminal u i Received message {W i,1 ,W i,2 ,W i,3 ,...,W i,m ,TK CA ,sig CA}, calculate the intermediate parameter TK i '=H2(W i,1 ||W i,2 ||W i,3 ||...||W i,m ), check the intermediate parameter TK i 'Whether it is related to the intermediate parameter TK CA Equal, and verify equality Is it true? If the equation is true, the vehicle terminal u i Calculate attribute weights Get the attribute weight set W i ={w1,w3,w4,...,w m+1}.

[0043] Preferably, the vehicle terminal u i Upload shared resources i , the implementation method of setting the resource access permission is:

[0044] (1) Vehicle terminal u i Set the attribute att i ={A1,A3,…,A t}'s vehicle terminal has access to the resource ζ i , let vehicle terminal u i There is no second property in the sequence containing the system property set; resource ζ i The access strategy vector is represented as V i,ξ =(10 0 0 0 1 1 1 0...); vehicle terminal u i Compute resource permission parameters and And based on the current timestamp Calculate signature verification parameters The information {Di,ζ ,E i,ζ ,pk i ,sig i,ζ} is sent to the roadside unit RSU; where t represents the number of attributes owned by the vehicle terminal, n represents the number of attributes, D i,ζ 、E i,ζ Represents vehicle terminal u i Uploaded resources i Resource permission parameters, sig i,ζ Parameters for signature verification;

[0045] (2) The roadside unit RSU receives the vehicle terminal u i Information i,ζ ,E i,ζ ,pk i ,sig i,ζ}, according to the current timestamp Calculate intermediate parameters Verify the equation Is it true? If the equation is true, the roadside unit RSU will respond to the information {D i,ζ ,E i,ζ ,pk i ,sig i,ζ}Re-randomization: Calculate parameter D i,ζ * =D i,ζ α and E i,ζ * =E i,ζ α ; and generate a timestamp Calculate the signature The roadside unit RSU sends the information {D i,ζ * ,E i,ζ * ,pk i ,sig RSU,i,ζ}Forwarded to the cloud server CS; where the random number D i,ζ * and E i,ζ * They are all new parameters generated by randomizing resource parameters. H2() is a hash function.

[0046] (3) The cloud server CS receives the information {D i,ζ * ,E i,ζ * ,pk i ,sig RSU,i,ζ}, according to the timestamp Calculate intermediate parameters Verify the equation Is it true? If the verification is successful, the information is saved to the resource table.

[0047] Preferably, the resource keyword setting is implemented as follows:

[0048] Assume that vehicle terminal u i Upload shared resources i , the keyword of the resource is X i,ζ ={Kw2,Kw3,Kw5,…}={kw i,1 ,kw i,2 ,…,kw i,b}, Kw2, Kw3, Kw5, ... are the keywords in the keyword dictionary corresponding to the uploaded resource keywords, kw i,1 ,kw i,2 ,…,kw i,b The resource's own keywords, where 1≤b≤l, b is the number of keywords in the uploaded document, and l represents the number of keywords in the keyword dictionary; resourceζ i The upload process is as follows:

[0049] 11) Vehicle terminal u i For resources i Construct keyword vector v i,ζ = {v i,ζ,1 ,v i,ζ,2 ,…,v i,ζ,l}, where v i,ζ,p Represents vector v i,ζ The pth element in v i,ζ,p is the pth keyword in the keyword dictionary; vehicle terminal u i Calculating keyword arguments And the information {C i,ζ ,pk i}Forwarded to the road side unit RSU;

[0050] 12) After the roadside unit RSU receives the information, if it is a request to upload resources, it re-randomizes the keyword parameters: calculate the keyword parameters The random number The roadside unit RSU sends the information {C i,ζ * ,pk i}Send to cloud server CS;

[0051] 13) The cloud server CS receives the information {C i,ζ * ,pk i} and save it to the resource table.

[0052] Preferably, the query and matching of the keywords:

[0053] The vehicle terminal constructs a keyword query vector, which includes: an "and" query with a wildcard, a "not" query with a wildcard, and an "and" and "not" query with a wildcard;

[0054] The roadside unit RSU receives the vehicle terminal u j After the information is obtained, the query vector parameters are re-randomized: the parameters are calculated and Where β = α -1 , The re-randomized information {Q j,1 * ,Q j,2 * ,R j} is forwarded to the cloud server CS; where Q j,1 * , Q j,2 * Represents the new parameters generated by re-randomizing the query vector parameters;

[0055] Cloud server CS receives the message {Q j,1 * ,Q j,2 * ,R j}, by verifying equation e1(C i,ζ * ,Q j,1 * ,pk i )·e1(C i,ζ * ,Q j,2 * ,pk i )=e1(g,g,R j ) is established to verify whether the shared resource contains the vehicle terminal u j Query keyword X j ={kw j,1 ,kw j,2 ,…,kw j,h};

[0056] The implementation method of the permission verification is:

[0057] 21) Access terminal u j According to the attribute set att j ={A1,A3,A5,…}={a j,1 ,a j,2 ,…,a j,h}, for the attribute set att j Construct the attribute permission vector P j , vector Pj The length of is the sum of the number of bits of n attribute codes, n(n+3) / 2 bits; the first two bits are elements related to attribute A1, and are called P j,1 ; Bits 3-5 are related to attribute A2 and are called P j,2 ; And so on; the last n+1 bits and attribute A n Related, called P j,n ; respectively called P j,1 The first digit is P j,1,1 , the second position is P j,1,2 ; called P j,2 The first digit is P j,2,1 , the second position is P j,2,2 , the third position is P j,2,3 ; and so on; called P j,n The first digit is P j,n,1 , the second position is P j,n,2 , ..., the n(n+3) / 2th position is P j,n,n+1 ; 1≤h≤n, n represents the number of attributes; access terminal u j Calculated attribute permission parameters and The information {F j ,ppk j}Sent to the roadside unit;

[0058] 22) Roadside unit RSU receives the information {F j ,ppk j}, re-randomize: calculate attribute permission parameters and And the information {F j * ,ppk j *}Send to cloud server CS;

[0059] 23) Cloud server CS receives the message {F j * ,ppk j *}, verify the equation e(D i,ζ * ,F j * )=e(E i,ζ * ,ppk j * ) is established. If the verification is successful, it means that the access terminal u j The permissions satisfy the resource i The cloud server CS returns the resource link secret to the access terminal u j ; where D i,ζ* and E i,ζ * These are all new parameters generated by the roadside unit RSU by re-randomizing resource parameters.

[0060] Preferably, the access resource z i The access strategy is through a one-dimensional vector V of length (n+3)n / 2 i,ξ To describe, the one-dimensional vector V i,ξ The first two digits of are elements related to attribute A1, and are called V i,ξ,1 ; The 3rd to 5th elements related to attribute A2 are called V i,ξ,2 ; And so on; the last n+1 bits and attribute A n Related, called V i,ξ,n ; The rule for constructing access policy is: if the access policy contains attribute A m , then use attribute A m Huffman code A m code Indicates; if the policy does not contain attribute A m , then attribute A m All the coded bits of are 0;

[0061] The equation The verification method is:

[0062] The information received by the roadside unit RSU is {D i,ζ ,E i,ζ ,pk i ,sig i,ζ}, within the legal time interval The roadside unit RSU calculates the intermediate parameters based on the timestamp when the information is received Roadside Unit RSU Construction Equation Verify according to the properties of bilinear mapping:

[0063]

[0064] The equation The verification method is: within a legal time interval

[0065]

[0066] The rule for constructing resource keyword vectors is: in the keyword dictionary Kw = {Kw1, Kw2, ..., Kw l}, if Kw p ∈X i,ζ , then the element v i,ζ,p =H1(Kw p );like Then the element vi,ζ,p =-H1(Kw p ), where 1≤p≤l.

[0067] Preferably, the implementation method of the wildcard 'and' query is:

[0068] Assume that vehicle terminal u j The query needs to include the keyword set X j ={Kw2,Kw3,Kw5,…}={kw j,1 ,kw j,2 ,…,kw j,h} resources, vehicle terminal u j Select h random numbers Let the query vector be v j , and the query vector v j There are two one-dimensional vectors v of length l j,1 and v j,2 Composition; for vector v j,1 , if the element Kw p ∈X j , then v j,1,p =λc p ;like Then v j,1,p =0; for vector v j,2 , if the element Kw p ∈X j , then the element v j,2,p =μc p ;like Then v j,2,p =0; where λ+μ=1, 1≤p≤l, 1≤h≤l, h is the keyword set X j The number of elements contained in ;

[0069] Vehicle Terminal j According to the vector v j,1 and v j,2 Calculating query vector parameters and The information {Q j,1 ,Q j,2 ,R j}Forwarded to the roadside unit RSU; where kw j,h Represents vehicle terminal u j The hth keyword in the query keyword, Kw p ∈X j represents the pth keyword in the keyword dictionary, λ,μ represent the parameters of whether the terminal search condition is met, Q j,1 , Q j,2 and R jIndicates the verification parameters after forwarding;

[0070] The method of the wildcard 'not' query is:

[0071] Assume that vehicle terminal u s The query does not contain keywords Resources, keyword collection Where 1≤h≤l; vehicle terminal u s In the set of integers Select h random numbers from h is the set X s The number of elements contained in; let the query vector be v s , and the query vector v s There are two one-dimensional vectors v of length l s,1 and v s,2 Composition: For vector v s,1 , if the keyword Kw p =kw s,r ∈X s , then v s,1,p =λ'c r ;like Then v s,1,p =0; for vector v s,2 , if the keyword Kw p =kw s,r ∈X s , then v s,2,p =μ'c r ;like Then v s,2,p =0; where, λ'+μ'=-1, 1≤p≤l, 1≤r≤h;

[0072] Vehicle Terminal s Calculating query vector parameters and The information {Q s,1 ,Q s,2 ,R s}Forwarded to the road side unit RSU;

[0073] The implementation method of the wildcard 'and' and 'not' query is:

[0074] Assume that vehicle terminal u z Need to search for keywords {kw z,2 ,kw z,3 ,…} and does not contain {kw z,1 ,…} resources, keyword collection Where 1≤h≤l; vehicle terminal u z In the set of integers Select h random numbers from h is the keyword set X z The number of elements contained in {kw z,2 ,kw z,3 ,…} query elements, build a rule with wildcard reference 'and' query; for For such query elements, the construction rules refer to the 'not' query with wildcards;

[0075] Vehicle Terminal z Calculating query vector parameters and The information {Q z,1 ,Q z,2 ,R z}Forwarded to the road side unit RSU.

[0076] Preferably, the rule for constructing the attribute permission vector is: if the access terminal u j If a user has the permission for a certain attribute, the encoding position of the attribute is randomly filled. The filling rule is: the mth attribute has m+1 bits of encoding, and the sum of the first m bits is equal to the hash value of the attribute weight; where H2(w m ) j Represents terminal u j Calculate the attribute weight w of the mth attribute m The hash value, H2(w m ) j,b For terminal u j The vector P j The hash value of the bth bit of the mth attribute in .

[0077] Compared with the prior art, the beneficial effects of the present invention are as follows: the authentication center CA, the vehicle terminal U, the roadside unit RSU and the cloud server CS run the key generation function to generate their own public key and private key, and then the vehicle terminal in the Internet of Vehicles system obtains the attribute authority. Before participating in resource sharing, the vehicle terminal first performs identity authentication of hidden attributes, and ensures that its privacy information is not leaked while authenticating its identity. After successful authentication, the attribute weight is assigned to the legitimate vehicle terminal. The relevant information of shared resources can be summarized into two parts: resource access rights and resource keywords. The vehicle terminal needs to send information to the roadside unit RSU based on the resource that its terminal has the right to access. The roadside unit RSU verifies the information after receiving it, and forwards the information to the cloud server CS if the verification is successful. The cloud server verifies the information after receiving it, and saves the information to the information table if the verification is successful. The resource access stage can be summarized into two parts: query matching and authority verification. When searching for resources of a specific subject type, the vehicle terminal needs to use keywords to summarize and forward them to the nearest roadside unit. The roadside unit signs the legal information and forwards it to the cloud server, which ultimately searches and matches. If the cloud server finds resources that meet the search criteria, it needs to further verify the authority of the viewer.

[0078] The present invention uses an attribute authentication method to be used by the vehicle terminal, and the authentication center issues attribute weights for the legal attributes of the terminal. During the authentication process, it can be ensured that the attributes and attribute weights of the vehicle terminal are not cracked. The present invention proposes an encryption algorithm that resists keyword guessing, and the keywords and access policies of the resources are all confidential. During the upload and access process of the resources, only the publishing terminal and the access terminal with permission to access know, and no other entity can know (including the cloud server and the roadside unit RSU). Attackers or other terminals without permission to access cannot infer any information of the resources through the messages transmitted in the channel. The flexible search and matching algorithm in the present invention can meet the diverse search conditions of the terminal, and can also achieve fine-grained access control; a 'and' threshold access structure with wildcards and a 'and' and 'not' threshold search structure with wildcards are designed (the 'not' threshold search structure can be extended to the access structure). In the encrypted state of the resources, the access terminal can search for multiple keywords and exclude keywords; and the search and verification process is performed by the cloud server, which will not affect the efficiency of the solution by the vehicle terminal with limited computing power. The present invention meets the security requirement by adding a step of re-randomizing the information of the vehicle terminal by the roadside unit. The re-randomized information is more difficult to identify and avoids the cloud server computing resources being occupied and unable to respond to the requests of the legitimate terminal due to flooding attacks. The present invention has passed the correctness and security proofs and can protect the privacy of terminals and resources. The present invention can ensure the sharing of secure data and provide security technology for multi-party data sharing in the Internet of Vehicles. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0080] Figure 1 It is a flow chart of the present invention.

[0081] Figure 2 This is a system model diagram of the present invention. DETAILED DESCRIPTION

[0082] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0083] Aiming at the problems existing in existing Internet of Vehicles scenarios, such as easy leakage of outsourced shared data, inefficient resource search and matching mechanism, and security threats faced by data during transmission, the present invention proposes a confidential resource sharing method in Internet of Vehicles that is resistant to keyword guessing, such as Figure 1As shown. First, the authentication center CA, the vehicle terminal U, the roadside unit RSU and the cloud server CS run the key generation function to generate their own public key and private key. Before participating in resource sharing, the vehicle terminal first performs identity authentication of hidden attributes, and ensures that its privacy information is not leaked while authenticating its identity. After successful authentication, the attribute weight is assigned to the legitimate vehicle terminal. That is, the authentication center sends the attribute authority to the vehicle terminal after authenticating the attributes of the vehicle terminal. After the vehicle terminal obtains the attribute authority, it sets the resource access authority and resource keyword. After obtaining the attribute authority, a series of settings can be performed to ensure that only the terminals with permission to access can make settings, and attackers or other terminals without permission cannot make settings. The relevant information of shared resources can be summarized into two parts: resource access authority and resource keywords. If a terminal wants to access the resource, keyword query matching and permission verification are performed. In the present invention, the authentication center issues attribute weights for the legitimate attributes of the vehicle terminal, and the attributes and attribute weights of the vehicle terminal can be guaranteed not to be cracked during the authentication process. The vehicle terminal needs to send information to the roadside unit RSU according to the resources that its terminal has the right to access. The roadside unit RSU receives the information and verifies it. If the verification is successful, the information is forwarded to the CS cloud server. After receiving the information, the cloud server verifies it and saves it to the information table if the verification is successful. The resource access stage can be summarized into two parts: query matching and permission verification. When accessing resources of a specific subject type, the terminal needs to use keywords to summarize and forward them to the nearest roadside unit. The roadside unit signs the legal information and forwards it to the cloud server, which finally searches and matches it. If the cloud server finds resources that meet the search criteria, it needs to further verify the permissions of the viewer.

[0084] 1. Theoretical basic knowledge and related definitions involved in this invention

[0085] 1.1 Bilinear Map

[0086] Assume that G1 and G2 are two groups with the same large prime order q, where G1 is a multiplicative cyclic group and G2 is another multiplicative cyclic group, and both must satisfy q ≥ 2. l +1, l is a safety parameter. H1:{0,1} * →G1, and are four collision-resistant hash functions. {0,1} * Represents a string of 0 or 1 of any length; represents the field of positive integers of order q; e:G1×G1→G2 is a computable bilinear mapping function from the multiplicative group G1 to the multiplicative group G2, which satisfies the following properties:

[0087] 1) Bilinear: For any element and generator μ,ν∈G1, equation e(aμ,bν)=e(μ,ν) ab Heng established;

[0088] 2) Non-degeneracy: For any generator g∈G1, e(g,g)≠1;

[0089] 3) Computability: For any given generator μ,ν∈G1, there exists an efficient algorithm to compute e(μ,ν) in polynomial time.

[0090] 1.2 The difficulty of bilinear mapping

[0091] In the multiplicative group G1, the following assumptions exist:

[0092] (1) Discrete Logarithm Problem (DLP): For any generator g∈G1 on the multiplicative group G1 and any integer Given the generator g and the integer a, it is easy to solve Q = ag. However, given Q = ag and g, it is impossible to solve the integer a from Q in polynomial time. represents the field of positive integers of order q.

[0093] (2) Computational Diffie-Hellman Problem (CDHP): Given g∈G1 and an element (g a ,g b ),in Calculate g without knowing a and b ab is difficult.

[0094] (3) Bilinear Computational Diffie-Hellman Problem (BCDHP): Given elements g, g a ,g b ,g c ∈G1, in the unknown In the case of, calculate e(g,g) abc is difficult.

[0095] (4) Inverse Diffie–Hellman problem (Inv-CDHP): Given g, g a ,g ab ∈G1, where It is difficult to calculate g (ab / a) .

[0096] 1.3 Trilinear Mapping

[0097] Let G1 be a multiplicative cyclic group, a generator of G1 is g, G T is a multiplicative cyclic group different from G1. G1 and G T have the same large prime order q. We call e1:G1×G1×G1→GT is a trilinear map with the following properties:

[0098] Property 1. Trilinearity, for generators g1,g2,g3∈G1 and integers There is e1(g1,g2 a ,g3)=e1(g1,g2,g3) a .

[0099] Property 2. Non-degeneracy, there exist generators g1,g2,g3∈G1 such that e1(g1,g2,g3)≠1.

[0100] Property 3. Computability. For generators g1, g2, g3∈G1, there exists an efficient algorithm to compute e1(g1, g2, g3).

[0101] 1.4 The difficulty of trilinear mapping

[0102] In the multiplicative group G1, the following assumptions exist:

[0103] (1) Computational Trilinear Diffie-Hellman Problem (CTDHP): Given g1, g2, g3, g4∈G1 and elements In the unknown In the case of is difficult.

[0104] (2) Inverse Computational Trilinear Diffie–Hellman Problem (Inv-CTDHP): Given Known in It is difficult to calculate

[0105] 1.5 AND Threshold Structure with Wildcards

[0106] First, define a system attribute set Att = {A1, A2, ..., A n Next, we build a Huffman tree for the system attribute set Att, so that each attribute corresponds to a unique Huffman code. The code for attribute A1 is (10), the code for attribute A2 is (110), and so on. n The encoding of is (11…10). The Huffman code of the nth attribute has n+1 bits. i code Represents attribute A i (1≤i≤n) Huffman coding.

[0107] Assume that the access policy of resource ξ is Among them A i '∈{A icode ,0}. Here A i code Indicates that the access policy requires this attribute; '0' means that the access policy does not require this attribute, i.e., a wildcard. Each legal vehicle terminal in the system has an attribute set att = {a1, a2, ..., a m}(1≤m≤n), where if attribute a j =A i , then attribute a j The code is A i code , 1≤i≤n,1≤j≤m. The attribute set of the vehicle terminal is a subset of the system attribute set.

[0108] 1.6 Threshold query structure with wildcards 'and' and 'not'

[0109] When searching for resources at a vehicle terminal, it is hoped that the query contains certain keywords (such as {kw}) but does not contain certain keywords (such as {kw}). In order to achieve refined searching of the terminal, the present invention proposes a threshold query structure with wildcards of 'and' and 'not', so that the above requirements can be met at the same time. The threshold query structure is implemented by two pairs of random numbers (λ,μ) and (λ',μ'), where λ+μ=1, λ'+μ'=-1, When the keyword is {kw} (that is, 'and' threshold query), (λ,μ) is used; when the keyword is {kw} (that is, 'not' threshold query), (λ',μ') is used. The query structure is defined as follows:

[0110] First, define a system keyword set Kw = {Kw1, Kw2, ..., Kw l}, each keyword Kw y (1≤y≤l) corresponds to a unique value Kw y =H1(Kw y ). Assume that the keyword structure of resource ξ is Among them Kw y '∈{H1(Kw y ),-H1(Kw y )}. Here H1(Kw y ) means that the resource has this keyword, -H1(Kw y ) means that the resource does not have this keyword. If there is a keyword in the system keyword set in the keyword structure of the resource here, let Kw y ' is H1(Kw y ), if not, -H1(Kw y ). The keyword vector kkw of each vehicle terminal query is kkw = {kw1, kw2, ..., kwl}, where kw j ∈{(λc j ,μc j ),(λ'c j ,μ'c j ),(0,0)}, Here (λc j ,μc j ) indicates that the terminal needs to query resources containing the keyword; (λ'c j ,μ'c j ) means that the terminal needs to exclude resources containing the keyword; (0,0) means that it does not matter whether the keyword exists or not, that is, it is a wildcard.

[0111] 1.7 Inner Product Space

[0112] Assumptions is the domain of integers The inner product space on Any vector on it, defines an inner product mapping <|> has the following properties: for any vector Both have:

[0113] Property 1. Positive definiteness: If and only if hour,

[0114] Property 2. Symmetry:

[0115] Property 3. Linearity: for integers have and

[0116] K.Gen is the key generation function K.Gen(1 λ )→(Pk,Sk), λ is a security parameter. Running this function can obtain a public / private key pair (Pk,Sk), where Pk=Skg.

[0117] Example 1

[0118] The Internet of Vehicles is currently widely used in daily travel, generating massive amounts of data. Due to the limitations of vehicle storage and computing capabilities and the purpose of resource sharing, a large amount of terminal data needs to be uploaded to the cloud. However, the cloud server is honest and curious, and the uploaded data often involves the privacy information of the terminal. The data needs to be encrypted before uploading. Simple and inefficient encryption methods are no longer applicable to the current complex and changeable network environment. Previous solutions only focus on the precise match between resources and searches. However, terminal users often only care about a few keywords and do not care whether there are other keywords. Sometimes they want to exclude resources that contain a certain keyword, which puts higher requirements on resource encryption methods and search functionality. In the process of leaving the terminal and uploading to the cloud server, the data may be intercepted by attackers hidden in the network at any time. How to enhance the randomness of the data and further protect confidential information is an issue that needs to be deeply considered in resource sharing in the Internet of Vehicles environment. In view of this application background, the present invention proposes a confidential resource sharing method in the Internet of Vehicles that is resistant to keyword guessing, such as Figure 1 As shown in the figure, the steps are as follows: ① Key initialization: the authentication center CA, vehicle terminal U, roadside unit RSU and cloud server CS run the key generation function to generate their own public key and private key; ② Vehicle terminals in the Internet of Vehicles system obtain attribute permissions: Before participating in resource sharing, the vehicle terminal first performs identity authentication of hidden attributes, and at the same time ensures that its privacy information is not leaked. After successful authentication, attribute weights are assigned to legitimate terminals; ③ Resource upload: the relevant information of shared resources can be summarized into two parts: resource access permissions and resource keyword settings. The process of uploading shared resources is shown in the figure. Figure 2 As shown. The vehicle terminal needs to send information to the roadside unit RSU based on the resources that its terminal has access to. The roadside unit RSU verifies the information after receiving it, and forwards it to the cloud server CS if the verification is successful. The cloud server verifies the information after receiving it, and saves the information to the information table if the verification is successful; ④ Resource access. The resource access stage can be summarized into two parts: query matching and authority verification. When accessing resources of a specific subject type, the vehicle terminal needs to use keywords to summarize and forward them to the nearest roadside unit. The roadside unit signs the legal information and forwards it to the cloud server CS. Finally, the cloud server CS searches and matches. This process is called keyword query and matching. If the cloud server CS finds resources that meet the search criteria, it needs to further verify the authority of the viewer. This is the authority verification process. The system model of the resource sharing solution is as follows: Figure 2 The specific steps of the present invention are as follows:

[0119] Step 1: Key initialization.

[0120] The specific process of key initialization is as follows: Each entity runs the key generation function to generate its own private key and public key. The certification center CA calculates all attributes in the system attribute set and then broadcasts them within the Internet of Vehicles system. Specifically:

[0121] 1) Each entity runs the key generation function to generate its own public key and private key. The private / public key of the vehicle terminal is (sk i ,pk i ), where the private key Public key pk i ∈G1,

[0122] 2) The private / public key of the certification authority CA is (SK CA ,PK CA ), where the private key Public Key PK CA ∈G1,

[0123] 3) The private / public key of the roadside unit RSU is (SK RSU ,PK RSU ), where the private key Public Key PK RSU ∈G1,

[0124] 4) The private / public key of the cloud server CS is (SK CS ,PK CS ), where the private key Public Key PK CS ∈G1,

[0125] 5) The certification authority CA calculates all attributes in the system attribute set: Then broadcast the message {PK CA ,(S1,S2,...,S n )}.

[0126] Among them, G1 and G2 are two multiplicative cyclic groups, they have the same large prime order q, g∈G1 is a generator of the multiplicative cyclic group G1, e:G1×G1→G2 is a computable bilinear mapping, and e represents a computable bilinear mapping function. Suppose the keyword dictionary contains l keywords, namely Kw={Kw1,Kw2,…,Kw l The system attribute set contains n attributes, namely Att = {A1, A2, ..., A n}. The set Kw and the system attribute set Att have a strict order. Define two collision-resistant hash functions, namely: The system parameters are in, represents a set of positive integers of order q. n Indicates the attribute sequence used by the vehicle terminal for comparison, which is used to compare whether the vehicle terminal has the attribute parameters.

[0127] Step 2: The vehicle terminal obtains attribute permissions.

[0128] Before participating in resources, the vehicle terminal needs to authenticate its attributes to the authentication center and obtain the corresponding attribute permissions. The attribute authentication process is also the authentication center's verification of the terminal's identity. The authentication center issues attribute weights for the vehicle terminal's legitimate attributes. After the verification is passed, the authentication center generates encrypted attribute permission parameters and returns them to the vehicle terminal. The vehicle terminal decrypts the parameters with its own key to obtain the attribute permissions. During the authentication process, the attributes and attribute weights of the vehicle terminal can be guaranteed not to be revealed. In the subsequent resource sharing process, attribute permissions are used instead of attributes. The specific steps for attribute authentication of the vehicle terminal are as follows:

[0129] 1) Assume that the vehicle terminal u i Possessing property A i ={a i,1 ,a i,2 ,a i,3 ...,a i,m}(1≤m≤n). Vehicle terminal u i After receiving the broadcast information from the certification center CA, according to its own attributes and the public key PK of the certification center CA Computed property sequence: Vehicle Terminal i Set the attribute sequence {S i,1 ,S i,2 ,...,S i,m} and the broadcast attribute sequence set {S1,S2,...,S n} for comparison, if the attribute sequence S i,1 =S1, then the vehicle terminal u i If this attribute is present, the value is 1; otherwise, the value is 0.

[0130] Assume S i,1 =S1,S i,2 =S3,S i,3 =S4,...,S i,m =S m+1 , then the vehicle terminal u i The binary corresponding to the attribute is 1011…110…0. Vehicle terminal u i Convert the binary number to decimal d i ,calculate and Where || is a connector. Vehicle terminal u i Send information {pmi ,d i ,pk i ,sig i} is sent to the authentication center CA to initiate an attribute authentication request. Where i represents the i-th terminal and m represents the m-th attribute of the vehicle terminal.

[0131] 2) The authentication center CA receives the vehicle terminal u i After sending the information, first calculate the ph according to the information CA =H3(pm i ||pk i )H1(d i ), and verify the equation If the verification is successful, it means that the vehicle terminal u i If the signature is valid, the attribute authentication request will be rejected. i Converted into binary, the vehicle terminal u can be determined i Verify the properties. Calculated by the Certificate Authority CA Verify the equation e(pm CA ,g)=e(pm i ,pk i ) is true. If the equation is verified, it means that the vehicle terminal u i The attribute is a legal attribute, and the authentication center CA will i The attributes that pass authentication are assigned attribute weights.

[0132] Assume that the attribute weights corresponding to the attributes in the system attribute set Att are Attw = {w1,w2,...,w n},in Certification Authority CA Calculation TK CA =H2(W i,1 ||W i,2 ||W i,3 ||...||W i,m ), The message {W i,1 ,W i,2 ,W i,3 ,...,W i,m ,TK CA ,sig CA}Sent to vehicle terminal u i Among them, the random number t kIt represents a number randomly selected from a positive integer set of order q, which is used to calculate the attribute weight. Because the vehicle terminal compares its own attributes with the broadcast attribute sequence set, the second attribute is equal to the third attribute of the broadcast. After that, the authentication center calculates according to the attributes sent by the vehicle terminal. The broadcast attribute sequence t2 does not correspond to the attributes of the vehicle terminal. And the authentication center will assign attribute weights to the vehicle terminal according to the attributes that have been authenticated.

[0133] Among them, the equation The verification method is:

[0134]

[0135] Equation e(pm CA ,g)=e(pm i ,pk i ) is verified by:

[0136]

[0137] Because the vehicle terminal u i The properties of {a i,1 ,a i,2 ,a i,3 ...,a i,m} corresponds to the property {A1, A3, A4, ..., A m+1}, so H1(A1||A3||A4||...||A m+1 )=H1(a i,1 ||a i,2 ||a i,3 ||...||a i,m ),therefore:

[0138]

[0139] 3) Vehicle terminal u i Received message {W i,1 ,W i,2 ,W i,3 ,...,W i,m ,TK CA ,sig CA}, calculate the intermediate variable TK i '=H2(W i,1 ||W i,2 ||W i,3 ||...||W i,m ),examine And verify the equation Is it true? If the equation is true, the vehicle terminal u i Calculate attribute weights Get the attribute weight set W i ={w1,w3,w4,...,w m+1}.

[0140] Among them, the equation The verification method is: the authentication center CA sends to the vehicle terminal u i The information is {W i,1 ,W i,2 ,W i,3 ,...,W i,m ,TK CA ,sig CA}, where the intermediate parameter TK CA =H2(W i,1 ||W i,2 ||W i,3 ||...||W i,m ), Vehicle Terminal i Calculate TK i '=H2(W i,1 ||W i,2 ||W i,3 ||...||W i,m ), verified by the properties of bilinear mapping:

[0141]

[0142] Among them, TK i '=TK CA , so the above formula holds. This formula can be used by the vehicle terminal u i Used to verify the signature of the certification authority CA on the attribute weight parameter.

[0143] Step 3: Upload resources

[0144] The relevant information of each shared resource can be summarized into two parts: resource access rights and resource keywords. In actual application scenarios, resource attributes and keyword information are sent together. Assume that the vehicle terminal u i Upload shared resources i , the resource access permission setting process is as follows:

[0145] 1) Vehicle terminal u i Set the attribute att i ={A1,A3,…,A t}'s vehicle terminal has access to the resource ζ i , assuming that the terminal does not contain the second attribute of the system attribute set sequence. Access resource ζ i The access strategy is through a one-dimensional vector V of length (n+3)n / 2 i,ξTo describe, t represents the number of attributes of the vehicle terminal, and n represents the number of attributes. Among them, the one-dimensional vector V i,ξ The first two digits of are elements related to attribute A1, and are called V i,ξ,1 ; The 3rd to 5th elements related to attribute A2 are called V i,ξ,2 ; And so on; the last n+1 bits and attribute A n Related, called V i,ξ,n The rule for constructing an access policy is: if the policy contains attribute A m (1≤m≤n), then use the Huffman code A of this attribute m code Indicates; if the policy does not contain attribute A m , then all the encoding bits of the attribute are 0. Therefore, resource ζ i The access strategy vector can be expressed as V i,ξ =(1 0 0 0 01 1 1 0...). Vehicle terminal u i Compute resource permission parameters and And based on the current timestamp Calculate signature verification parameters The information {D i,ζ ,E i,ζ ,pk i ,sig i,ζ} is sent to the roadside unit RSU. The sum of the number of bits of n attribute codes is n(n+3) / 2 bits. i,ζ 、E i,ζ Represents vehicle terminal u i Uploaded resources i Resource permission parameters. i,ζ Parameters for signature verification. Only terminals with specific attributes can access it.

[0146] 2) The roadside unit RSU receives the vehicle terminal u i Information i,ζ ,E i,ζ ,pk i ,sig i,ζ}, according to the current timestamp Calculate intermediate parameters Verify the equation If the equation holds, the roadside unit RSU will respond to the information {D i,ζ ,E i,ζ ,pk i ,sig i,ζ}Re-randomization: Calculate parameter D i,ζ * =D i,ζ α and Ei,ζ * =E i,ζ α , where the random number And generate a timestamp Calculate the signature The roadside unit RSU sends the information {D i,ζ * ,E i,ζ * ,pk i ,sig RSU,i,ζ} is forwarded to the cloud server CS. i,ζ * and E i,ζ * They are all new parameters generated by randomizing resource parameters, and H2() is a hash function.

[0147] Among them, the equation The verification method is: the information received by the roadside unit RSU is {D i,ζ ,E i,ζ ,pk i ,sig i,ζ}, where the resource permission parameter and Signature Verification Parameters Within the legal time interval Because there is a delay between sending and receiving information, if this delay does not exceed a certain value, they are considered equal. In the absence of unexpected circumstances, t0 and t1 are equal. First, the roadside unit RSU calculates the intermediate parameters based on the timestamp when the information is received. Then the roadside unit RSU can construct the equation Verify according to the properties of bilinear mapping:

[0148]

[0149] Therefore, the roadside unit RSU can verify the resource request uploaded by the vehicle terminal.

[0150] 3) Cloud server CS receives the information {D i,ζ * ,E i,ζ * ,pk i ,sig RSU,i,ζ}, according to the timestamp Calculate intermediate parameters Verify the equation Is it true? If the verification is successful, the information is saved to the resource table.

[0151] Equation The verification method is: within a legal time interval

[0152]

[0153] The implementation method of setting resource keywords is as follows: Assume that the vehicle terminal u i Upload shared resources i , the keyword of the resource is X i,ζ ={Kw2,Kw3,Kw5,…}={kw i,1 ,kw i,2 ,…,kw i,b}, Kw2, Kw3, Kw5, ... are the keywords in the keyword dictionary corresponding to the uploaded resource keywords, kw i,1 ,kw i,2 ,…,kw i,b The resource's own keywords, where 1≤b≤l, b represents the number of keywords in the uploaded document, and l represents the number of keywords in the keyword dictionary. The resource upload process is as follows:

[0154] 1) Vehicle terminal u i First, for resources i Construct keyword vector v i,ζ = {v i,ζ,1 ,v i,ζ,2 ,…,v i,ζ,l}, where v i,ζ,p Represents vector v i,ζ The pth element in is also the pth keyword in the keyword dictionary. The rule for constructing a resource keyword vector is: in the keyword dictionary Kw = {Kw1, Kw2, …, Kw l}, if Kw p ∈X i,ζ (1≤p≤l), then the element v i,ζ,p =H1(Kw p );like Then the element v i,ζ,p =-H1(Kw p ). Vehicle terminal u i Calculating keyword arguments And the information {C i,ζ ,pk i}Forwarded to RSU.

[0155] 2) Since this information is sent together with the information about resource access rights, the verification process is not described in detail. After the roadside unit RSU receives the information, if it is a request to upload resources, it randomizes the keyword parameters and calculates the keyword parameters The random number The roadside unit RSU will trap the information {Ci,ζ * ,pk i} is sent to the cloud server CS. i,ζ * Re-randomize resource parameters (keyword parameters) to generate new parameters.

[0156] 3) Since this information is sent together with the information about resource access rights, the information verification process is not described in detail. i,ζ * ,pk i} and save it to the resource table.

[0157] Since the above two types of information are sent together, the process of verifying the information is not repeated here. The two steps of resource keywords and resource access permission settings are sent together, so they only need to be verified once.

[0158] Step 4: Resource Access

[0159] The resource access stage can be summarized into two parts: query matching and permission verification. When accessing resources of a specific subject type, the vehicle terminal needs to use keywords to summarize and forward them to the nearest roadside unit. The roadside unit signs the legal information and forwards it to the cloud server CS. Finally, the cloud server CS searches and matches. This process is called keyword query and matching. If the cloud server CS finds resources that meet the search criteria, it needs to further verify the permissions of the viewer. This is the permission verification process. Similar to the way of uploading resources, the access terminal can upload the query keywords and the permission information of the vehicle terminal at the same time, but for ease of reading, these two parts are described separately. The specific process is as follows:

[0160] Keyword query and matching: The present invention designs a threshold query structure of "and" and "not" with wildcards, which can meet the refined search conditions of the vehicle terminal. The steps are as follows: The vehicle terminal constructs a keyword query vector, which is divided into the following three types:

[0161] Type 1: 'AND' query with wildcards

[0162] 1) Assume that the vehicle terminal u j The query needs to include the keyword set X j ={Kw2,Kw3,Kw5,…}={kw j,1 ,kw j,2 ,…,kw j,h}, where 1≤h≤l, h is the keyword set X j The number of elements contained in . Vehicle terminal u j Select h random numbers Let the query vector be vj , and the query vector v j There are two one-dimensional vectors v of length l j,1 and v j,2 For vector v j,1 , if the element Kw p ∈X j , then v j,1,p =λc p ;like Then v j,1,p = 0. For vector v j,2 , if the element Kw p ∈X j , then the element v j,2,p =μc p ;like Then v j,2,p =0. Where λ+μ=1, 1≤p≤l.

[0163] 2) Then the vehicle terminal u j According to the vector v j,1 and v j,2 Calculating query vector parameters and The information {Q j,1 ,Q j,2 ,R j}Forwarded to the roadside unit. kw j,h Represents vehicle terminal u j The hth keyword in the query keyword, Kw p ∈X j Indicates the pth keyword originally contained in the keyword dictionary. λ,μ indicate whether the terminal search condition is satisfied. Q j,1 , Q j,2 and R j Indicates the authentication parameters after forwarding.

[0164] Type 2: 'not' query with wildcard

[0165] 1) Assume that the vehicle terminal u s The query does not contain keywords Resources, that is, keyword collections Where 1≤h≤l. Vehicle terminal u s In the set of integers Select h random numbers from h is the set X s The number of elements contained in . Let the query vector be v s , and the query vector v s There are two one-dimensional vectors v of length l s,1 and v s,2 For vector vs,1 , if the keyword Kw p =kw s,r ∈X s ,(1≤r≤h), then v s,1,p =λ'c k ;like Then v s,1,p = 0. For vector v s,2 , if the keyword Kw p =kw s,r ∈X s ,(1≤r≤h), then v s,2,p =μ'c r ;like Then v s,2,p =0. Where λ'+μ'=-1, 1≤p≤l (use λ' and μ' to distinguish λ and μ in 'and' queries).

[0166] 2) Then the vehicle terminal u s Calculating query vector parameters and The information {Q s,1 ,Q s,2 ,R s}Forwarded to the roadside unit.

[0167] Type 3: 'and' and 'not' queries with wildcards

[0168] 1) Assume that the vehicle terminal u z Need to search for keywords {kw z,2 ,kw z,3 ,…} and does not contain {kw z,1 ,…} resources, that is, keyword collection Where 1≤r≤l. Vehicle terminal u z In the set of integers Select h random numbers from h is the keyword set X z The number of elements contained in. For {kw z,2 ,kw z,3 ,…} query elements, build a rule with wildcard reference 'and' query. For such query elements, the construction rules refer to the 'not' query with wildcards.

[0169] 2) Then the vehicle terminal u z Calculating query vector parameters and The information {Q z,1 ,Q z,2 ,R z}Forwarded to the roadside unit.

[0170] The following steps are based on the vehicle terminal u j Take the keyword query request as an example.

[0171] The roadside unit receives the vehicle terminal u j After receiving the information, the query vector parameters are re-randomized. and Where β = α -1 , yes The inverse element of the re-randomized information {Q j,1 * ,Q j,2 * ,R j} is forwarded to the cloud server. j,1 * , Q j,2 * Represents the new parameters generated by re-randomizing the query vector parameters.

[0172] After receiving the information, the cloud server verifies equation e1(C i,ζ * ,Q j,1 * ,pk i )·e1(C i,ζ * ,Q j,2 * ,pk i )=e1(g,g,R j ) is true to verify whether the shared resource contains the vehicle terminal u j Query keyword X j ={kw j,1 ,kw j,2 ,…,kw j,h}.

[0173] Equation e1(C i,ζ * ,Q j,1 * ,pk i )·e1(C i,ζ * ,Q j,2 * ,pk i )=e1(g,g,R j ) is verified as follows: in the shared resource table, resource ζ i The corresponding keyword parameter is C i,ζ * ,in View terminal u jThe keyword parameters to be queried are forwarded by the roadside unit to the cloud server, and the query keyword parameters received by the cloud server are {Q j,1 * ,Q j,2 * ,R j},in and Using the properties of trilinear mapping, the cloud server calculates:

[0174]

[0175] Set up resources i The keywords are {kw2,kw4,…kw k}, then the vector v i,ζ Represented as v i,ζ =(-H1(kw1) H1(kw2)-H1(kw3) H1(kw4) … H1(kw k ) -H1(kw k+1 ) ... -H1(kw l ));

[0176] (1) If it is a wildcard "and" query, assuming that the access terminal u j The search keywords are {kw2,kw4,kw6}, and the random number selected is because With e1(g,g,R j ) are equal, so:

[0177]

[0178] (2) If it is a 'not' query with a wildcard, assuming that the access terminal u s The search keywords are The random number chosen is because With e1(g,g,R s ) are equal, so:

[0179]

[0180] (3) If it is a wildcard "and", "not" query, assuming that terminal u z The search keywords are The random number chosen is because And=e1(g,g,R z ) are equal, so:

[0181]

[0182] Permission verification: If the cloud server finds a resource that matches the vehicle terminal query, it needs to further verify whether the terminal's permissions meet the resource access permissions. The specific verification steps are as follows:

[0183] 1) Access terminal u j According to the attribute set att j ={A1,A3,A5,…}={a j,1 ,a j,2 ,…,a j,h}, for the attribute set att j Construct the attribute permission vector P j . Vector P j The length of is the sum of the number of attribute code bits of n, that is, n(n+3) / 2 bits. Among them, the first two bits are elements related to attribute A1, and the first two bits are called P j,1 ; The 3rd to 5th bits are related to attribute A2 and are called P j,2 ; And so on; the last n+1 bits and attribute A n Related, called P j,n . They are called P j,1 The first digit is P j,1,1 , the second position is P j,1,2 ; called P j,2 The first digit is P j,2,1 , the second position is P j,2,2 , the third position is P j,2,3 ; and so on; called P j,n The first digit is P j,n,1 , the second position is P j,n,2 , ..., the n(n+3) / 2th position is P j,n,n+1 . 1≤h≤n, where n represents the number of attributes.

[0184] The rule for constructing the attribute permission vector is: if the access terminal u j If you have the permission for a certain attribute, you can fill in the encoding position of the attribute randomly. The filling rule is: for example, if the mth attribute has m+1 bits of encoding, the sum of the first m bits is equal to the hash value of the attribute weight. m ) j Represents terminal u j Calculate the attribute weight w of the mth attribute m The hash value, H2(w m ) j,b For terminal u j The vector P j The hash value of the bth bit of the mth attribute in . Access terminal u j Calculated attribute permission parameters and The information {F j ,ppk j}Sent to the roadside unit.

[0185] 2) After the roadside unit receives it, it re-randomizes it and calculates the attribute authority parameters after re-randomization and And the information {F j * ,ppk j *}Sent to the cloud server.

[0186] 3) The cloud server receives the information j * ,ppk j *}, verify the equation e(D i,ζ * ,F j * )=e(E i,ζ * ,ppk j * ) is established. If the verification is successful, it means that the access terminal u j The permissions satisfy the resource i The cloud server returns the resource link secret to the access terminal u j . Where D i,ζ * and E i,ζ * are all new parameters generated by the roadside unit by randomizing the resource parameters. i,ζ * ,F j * )=e(E i,ζ * ,ppk j * ) is verified as follows: Assuming that resource ζ i Owner vehicle terminal u i Set the terminal with attributes (a1, a3, a4) to be accessible. Then the resource ζ i The access policy is V i,ξ =(1 0 0 0 0 1 1 1 0 1 1 1 10...). Resource ζ i The permission verification parameter is {D i,ζ * ,E i,ζ *},in

[0187] Access terminal u j Construct the attribute permission vector P according to the attribute weights j, and calculate the attribute permission parameter F j and ppk j The cloud server receives the information of the re-randomization of the roadside unit RSU {F j * ,ppk j *},in According to the properties of bilinear mapping, the cloud server verifies:

[0188]

[0189] (1) When the access permission is equal to the resource access policy. Let the access terminal u j With attribute permissions (a1, a3, a4), then P j =(H2(w1) 0 0 0 0 x1 x2 x3 0 x4 x5 x6 x7 0...), where x1+x2+x3=H2(w3), x4+x5+x6+x7=H2(w4),

[0190] So

[0191] <V i,ζ |P j >

[0192] =(1 0 0 0 0 1 1 1 0 1 1 1 1 0...)

[0193] (H2(w1) 0 0 0 0 x1 x2 x3 0 x4 x5 x6 x7 0...) T

[0194] =H2(w1)+(x1+x2+x3)+(x4+x5+x6+x7)

[0195] =H2(w1)+H2(w3)+H2(w4)

[0196] but:

[0197]

[0198] (2) When the access permission is greater than the resource access policy. Suppose the access terminal u j With attribute permissions (a1, a2, a3, a4), then P j =(H2(w1) 0 x1 x2 0 x3 x4 x5 0 x6 x7 x8 x9 0...), where x1+x2=H2(w2), x3+x4+x5=H2(w3), x6+x7+x8+x9=H2(w4),

[0199] So

[0200] <V i,ζ |P j >

[0201] =(1 0 0 0 0 1 1 1 0 1 1 1 1 0...)

[0202] P(H2(w1) 0 x1 x2 0 x3 x4 x5 0 x6 x7 x8 x9 0...) T

[0203] =H2(w1)+(0+0)+(x3+x4+x5)+(x6+x7+x8+x9)

[0204] =H2(w1)+H2(w3)+H2(w4)

[0205] but:

[0206]

[0207] (3) When the access permission is less than the resource access policy. Let the access terminal u j With attribute permissions (a1, a3), then P j =(H2(w1) 0 0 0 0 x1 x2 x3 0 0 0 0 0 0 ...), where x1+x2+x3=H2(w3),

[0208] So

[0209] <V i,ζ |P j >

[0210] =(1 0 0 0 0 1 1 1 0 1 1 1 1 0...)

[0211] (H2(w1) 0 0 0 0 x1 x2 x3 0 0 0 0 0 0...) T

[0212] =H2(w1)+(x1+x2+x3)

[0213] =H2(w1)+H2(w3)

[0214] but:

[0215]

[0216] Therefore, the cloud server can verify the access rights of the visitor through this formula. If the formula is established, it means that the access terminal u j The permissions satisfy the resource i access policy.

[0217] Example 2

[0218] A dense resource sharing scheme that resists keyword guessing in the Internet of Vehicles, such as Figure 1 In order to illustrate the content and implementation method of the present invention, a specific embodiment is given. In this embodiment, for the convenience of example description, it is assumed that the keyword dictionary contains 5 keywords Kw = {Kw1, Kw2, Kw3, Kw4, Kw5}, and the keyword of the shared resource ζ1 uploaded by the vehicle terminal u1 is X i,ζ ={Kw1,Kw2,Kw3}={kw i,1 ,kw i,2 ,…,kw i,b}, where 1≤b≤5. The system attribute set contains 4 attributes Att={A1,A2,A3,A4}, and the corresponding attribute weights are Attw={w1,w2,w3,w4}. Vehicle terminal u1 has attribute A i ={a i,1 ,a i,2 ,a i,3}. The purpose of introducing details in this embodiment is not to limit the scope of the claims, but to help understand the specific implementation method of the present invention. Those skilled in the art should understand that various modifications, changes or substitutions to the steps of the best embodiment are possible without departing from the spirit and scope of the present invention and the claims attached thereto. Therefore, the present invention should not be limited to the contents disclosed in the best embodiment and the accompanying drawings. The steps of the present invention are:

[0219] Step 1: Key initialization.

[0220] Each entity runs the key generation function to generate its own public key and private key. The public / private key of vehicle terminal u1 is (sk1, pk1). pk1∈G1, The private / public key of the certification authority CA is (SK CA ,PK CA ),in PK CA ∈G1, The private / public key of the roadside unit RSU is (SK RSU ,PK RSU ),in PK RSU ∈G1, The private / public key of the cloud server CS is (SK CS ,PKCS ),in PK CS ∈G1, The certification authority CA calculates all attributes in the system attribute set: Then broadcast {PK CA ,(S1,S2,S3,S4)}.

[0221] Step 2: Attribute authentication. Before participating in resource sharing, the vehicle terminal authenticates the attributes to the authentication center and obtains the corresponding attribute permissions. The attribute authentication process is also the authentication center's verification of the terminal's identity. In the subsequent resource sharing process, attribute permissions are used instead of attributes. Taking vehicle terminal u1 as an example, the specific steps of its attribute authentication are as follows:

[0222] 1) After receiving the broadcast information from the authentication center CA, the vehicle terminal u1 uses its own attributes and the authentication center public key PK CA calculate: Terminal u1 will {S i,1 ,S i,2 ,S i,3} is compared with the broadcast {S1,S2,S3,S4}. If S i,1 =S1, it means that terminal u1 has this attribute, marked as 1; otherwise it is 0.

[0223] Assume S i,1 =S1,S i,2 =S2,S i,3 =S3, then terminal u i The binary number corresponding to the attribute is 111. Terminal u1 converts the binary number into a decimal number d1 and calculates and The || is a connector. Terminal u1 sends the information {pm1, d1, pk1, sig1} to the certification authority CA to initiate an attribute authentication request.

[0224] 2) After receiving the information sent by U, CA first calculates ph based on the information CA =H3(pm1||pk1)H1(d1), and verify the formula If the verification is successful, it means that the terminal's signature is valid, otherwise it refuses to respond to the request. After the verification is successful, d1 is converted into binary to determine the attributes of the terminal u1 verification. The authentication center calculates Verify the equation e(pm CA ,g)=e(pm1,pk1). If the equation is verified, it means that the attributes of terminal u1 are legal attributes, and the authentication center will assign attribute weights to terminal u1 based on the attributes that have been authenticated.

[0225] Assume that the attribute weights corresponding to the attributes in the attribute set Att are Attw = {w1, w2, w3, w4}, where CA calculation TK CA =H2(W i,1 ||W i,2 ||W i,3 ), {W i,1 ,W i,2 ,W i,3 ,TK CA ,sig CA} is sent to terminal u1.

[0226] Among them, the equation The verification method is:

[0227]

[0228] If the verification is successful, it means that the signature of the terminal is valid and you can proceed to the next step of verification. Otherwise, the request will be rejected.

[0229] Among them, the equation e(pm CA ,g)=e(pm1,pk1) is verified as follows:

[0230]

[0231] Because the terminal properties {a 1,1 ,a 1,2 ,a 1,3} corresponds to the attribute {A1, A2, A3} in the system attribute set, so H1(A1||A2||A3)=H1(a i,1 ||a i,2 ||a i,3 ),therefore:

[0232]

[0233] If the equation holds, it means that the terminal's attributes are legal attributes and are a subset of the system attribute set.

[0234] 3) After receiving the information, the vehicle terminal u1 calculates TK1'=H2(W i,1 ||W i,2 ||W i,3 ),examine And verify the equation Is it true? If true, terminal u1 calculates Get the attribute weight set W i ={w1,w2,w3}. In which, the equation The verification method is:

[0235]

[0236] If the above formula is true, it can be used by the terminal to verify the signature of the authentication center on the attribute weight parameter.

[0237] Step 3: Resource upload. Shared resources can be divided into two parts, namely resource access and resource keyword upload. This step will introduce how these two parts are carried out in the actual implementation process. The keyword of the shared resource ζ1 uploaded by terminal u1 is X i,ζ ={Kw1,Kw2,Kw3}.

[0238] Resource access permission settings: 1) Terminal u1 is set to have attribute att i ={A1, A2, A3} The terminal has the right to access resource ζ1. This access policy is represented by a one-dimensional vector V with a length of 14. 1,ξ to describe (the sum of the number of bits of the four attribute codes is 4(4+3) / 2 bits). The first two bits are elements related to attribute A1, and are called V 1,ξ,1 ; Bits 3-5 are related to attribute A2 and are called V 1,ξ,2 ; And so on; The rule for constructing access policies is: If the policy contains attribute A m (1≤m≤4), then use the Huffman code A of this attribute m code Indicates; if the policy does not contain attribute A m , then all the encoding bits of this attribute are 0. Therefore, the access policy vector of resource ζ1 can be expressed as V 1,ξ =(11111111100000). Terminal u1 calculates And based on the current timestamp calculate The information {D 1,ζ ,E 1,ζ ,pk1,sig 1,ζ}Sent to RSU.

[0239] 2) RSU receives the terminal's information {D 1,ζ ,E 1,ζ ,pk1,sig 1,ζ}, according to the current timestamp calculate verify If the formula is established, the roadside unit re-randomizes the information and calculates the parameter D 1,ζ * =D 1,ζ α and E 1,ζ * =E 1,ζ α,in And generate a timestamp Calculate the signature in RSU will send information {D 1,ζ * ,E 1,ζ * ,pk1,sig RSU,1,ζ}Forward to the cloud server.

[0240] 3) CS receives the message {D 1,ζ * ,E 1,ζ * ,pk1,sig RSU,1,ζ}, according to the timestamp calculate verify If the verification is successful, the information is saved to the resource table. The verification method is:

[0241]

[0242] Through the above equation, the roadside unit can verify the information sent by terminal u1. If the equation is verified, the roadside unit will process the request, otherwise it will refuse to respond. The verification method is:

[0243]

[0244] The cloud server can verify the authenticity of the RSU signature through the above equation. If the equation is verified, the cloud server processes the RSU request, otherwise it refuses to respond.

[0245] Resource keyword setting: The keyword of shared resource ζ1 uploaded by terminal u1 is X 1,ζ ={Kw1,Kw2,Kw3}. The resource upload process is as follows:

[0246] 1) Terminal u1 first constructs a keyword vector v for the resource 1,ζ = {v 1,ζ,1 ,v 1,ζ,2 ,v 1,ζ,3}, the rule for constructing resource keyword vectors is: in the keyword dictionary Kw = {Kw1, Kw2, Kw3, Kw4, Kw5}, if Kw p ∈X i,ζ (1≤p≤5), then v i,ζ,p =H1(Kw p );like Then v i,ζ,p =-H1(Kw p ). Terminal u1 calculates And the information {C 1,ζ ,pk1} is forwarded to RSU.

[0247] 2) Since this information is sent together with the information about resource access permission settings, the information verification process is not described in detail. After the RSU receives the message, if it is a request to upload resources, it re-randomizes the information containing the keywords and calculates in The RSU sends the re-randomized information to the CS.

[0248] 3) Since this information is sent together with the information about resource access rights, the information verification process is not described in detail. 1,ζ * ,pk1} and save it to the resource table.

[0249] In actual application scenarios, resource permissions and keyword information are sent together, so the verification process will be performed when the resource access permissions are set.

[0250] Step 4: Resource access,The resource access stage can be summarized into two parts: query matching and permission verification.

[0251] Keyword query and matching: The present invention designs a threshold query structure of "and" and "not" with wildcards to meet the terminal's refined search conditions. The steps are as follows:

[0252] 1) Terminal u2 needs to query and include keywords X2 = {Kw1, Kw2, Kw3} = {kw 2,1 ,kw 2,2 ,…,kw 2,h}

[0253] resources, where 1≤h≤5. Terminal u2 selects 3 random numbers, Where 3 is the number of elements in the set X2. Let the query vector be v2, and v2 consists of two one-dimensional vectors v 2,1 and v 2,2 For vector v 2,1 , if Kw p ∈X2, then v 2,1,p =λc p ;like Then v 2,1,p = 0. For vector v 2,2 , if Kw p ∈X2, then v 2,2,p =μc p ;like Then v 2,2,p =0. Where λ+μ=1, 1≤p≤l.

[0254] 2) Then terminal u2 calculates and The information {Q 2,1 ,Q 2,2 ,R2} is forwarded to the road side unit RSU.

[0255] 3) After receiving the information from terminal u2, the RSU roadside unit calculates and Where β = α -1 , The re-randomized information {Q 2,1 * ,Q 2,2 * ,R2} is forwarded to the cloud server.

[0256] 4) After receiving the information, the cloud server uses formula e1(C 1,ζ * ,Q 2,1 * ,pk1)·e1(C 1,ζ * ,Q 2,2 * ,pk1)=e1(g,g,R2) can verify whether the shared resource contains the keyword X2={kw 2,1 ,kw 2,2 ,kw 2,3}.

[0257] Wherein the equation e1(C 1,ζ * ,Q 2,1 * ,pk1)·e1(C 1,ζ * ,Q 2,2 * ,pk1)=e1(g,g,R2) is verified as follows:

[0258]

[0259] 5) Terminal u3 needs to query without keywords resources, i.e. Where 1≤h≤5. Terminal u3 is Choose 2 random numbers from h is the number of elements contained in the set X3. Let the query vector be v3, and v3 consists of two one-dimensional vectors v 3,1 and v 3,2 For vector v 3,1 , if the keyword Kw p=kw 3,k ∈X3,(1≤k≤5), then v 3,1,p =λ'c k ;like Then v 3,1,p = 0. For vector v 3,2 , if Kw p =kw 3,k ∈X3,(1≤k≤5), then v 3,2,p =μ'c k ;like Then v 3,2,p =0. Where λ'+μ'=-1, 1≤p≤5 (using λ' and μ' to distinguish λ and μ in the 'and' query). Then terminal u3 calculates and The information {Q 3,1 ,Q 3,2 ,R3} is forwarded to the roadside unit.

[0260] 6) After receiving the information from terminal u3, the RSU roadside unit calculates and Where β = α -1 , The re-randomized information {Q 3,1 * ,Q 3,2 * ,R3} is forwarded to the cloud server.

[0261] 7) After receiving the information, the cloud server uses formula e1(C 1,ζ * ,Q 3,1 * ,pk1)·e1(C 1,ζ * ,Q 3,2 * ,pk1)=e1(g,g,R3) can verify whether the shared resource meets the search condition of terminal u3. 1,ζ * ,Q 3,1 * ,pk1)·e1(C 1,ζ * ,Q 3,2 * ,pk1)=e1(g,g,R3) is verified as follows:

[0262]

[0263] Through this formula, the cloud server can match the corresponding resource to the "non" query condition with a wildcard. If the formula is true, it means that this resource meets the search condition of terminal u3. If the formula is not true, it means that this resource does not meet the search condition of terminal u3.

[0264] 8) Terminal u4 needs to search for keywords {kw 3,1 ,kw 3,2 ,kw 3,3} and does not contain {kw 3,4 ,kw 3,5} resources, that is Where 1≤h≤5. Terminal u4 is Select 5 random numbers from Then terminal u4 calculates and The information {Q 4,1 ,Q 4,2 ,R4} is forwarded to the roadside unit.

[0265] 9) After receiving the information from terminal u4, the roadside unit calculates and Where β = α -1 , The re-randomized information {Q 4,1 * ,Q 4,2 * ,R4} is forwarded to the cloud server.

[0266] 10) After receiving the information, the cloud server uses formula e1(C 1,ζ * ,Q 4,1 * ,pk1)·e1(C 1,ζ * ,Q 4,2 * ,pk1)=e1(g,g,R4) matches the corresponding resource to the wildcard 'and' and 'not' query conditions. If the formula is established, it means that this resource meets the search condition of terminal u4. If the formula is not established, it means that this resource does not meet the search condition of terminal u4.

[0267] Wherein the equation e1(C 1,ζ * ,Q 4,1 * ,pk1)·e1(C 1,ζ * ,Q 4,2 * ,pk1)=e1(g,g,R4) is verified as follows:

[0268]

[0269] Permission verification: When the cloud server finds a resource that matches the query of terminal u1, it needs to further verify whether the permission of terminal u1 satisfies the access permission of the resource. The specific verification steps are as follows:

[0270] 1) The access terminal u1 has the attribute att1 = {A1, A2, A3} = {a 1,1 ,a 1,2 ,a 1,3}, construct the attribute permission vector P1 for att1. The length of vector P1 is the sum of the number of bits of the four attribute codes, that is, 14 bits. The rule for constructing the attribute permission vector is: if u1 has the permission for a certain attribute, then randomly fill in the encoding position of the attribute. Access terminal u1 calculates Send the information {F1,ppk1} to the roadside unit.

[0271] 2) After receiving the information, the roadside unit re-randomizes the information and calculates and And the information {F1 * ,ppk1 *}Sent to the cloud server.

[0272] 3) The cloud server receives the information {F1 * ,ppk1 *}, verify e(D 1,ζ * ,F1 * )=e(E 1,ζ * ,ppk1 * ). If the verification is successful, it means that the permissions of terminal u1 meet the access policy of resource ζ1, and the cloud server returns the resource link secret to terminal u1.

[0273] The equation e(D 1,ζ * ,F1 * )=e(E 1,ζ * ,ppk1 * ) is: access rights are equal to resource access policies. Terminal u1 has attribute rights (a1, a2, a3), then P1 = (H2(w1)111111111000000000000), where x1+x2+x3 = H2(w1+w2+w3),

[0274]

[0275] The steps of the present invention are as follows: the system runs an initialization function to generate system parameters. After that, the system entities (including vehicle terminals, roadside units, cloud servers and authentication centers) run a key generation function to generate their own public and private keys. The vehicle terminal sends its own attributes to the authentication center. After verification, the authentication center generates encrypted attribute permission parameters and returns them to the vehicle terminal. The vehicle terminal decrypts the attribute permissions using its own key. Resource upload can be divided into two parts, namely, the resource access permission and the resource keyword, which are sent together in actual scenarios. The resource access permission setting is that the terminal sets the access policy, sends the resource parameters to the roadside unit, and the roadside unit first verifies after receiving the information. The verification is passed by re-randomizing the information and calculating the resource parameters and sending them to the cloud server. The cloud server receives the message for verification, and the verification is passed and the information is saved to the resource table. Resource keyword setting is that the terminal first constructs a keyword vector for the resource, calculates the resource parameters and sends them to the roadside unit. The roadside unit will verify after receiving it. After verification, the information containing the keyword will be re-randomized and sent to the cloud server. The resource access process can also be divided into two parts: query matching and permission verification. When querying resources of a specific subject type, the terminal uses keywords to summarize and forward them to the nearest roadside unit. The roadside unit signs the legal information and forwards it to the cloud, which finally searches and matches. If the cloud finds resources that meet the search criteria, it needs to further verify the permissions of the queryer. This is the permission verification process. The present invention combines the query structure of the "AND" and "NOT" gates with wildcards to meet the terminal's diverse search conditions and achieve fine-grained access control.

[0276] The present invention is based on the theory of bilinear mapping and trilinear mapping, and is proposed with the Diffie-Hellman inverse calculation problem as the security assumption. It uses the link of re-randomizing the information of the vehicle terminal by the roadside unit, which not only ensures information security, but also avoids the cloud from being attacked by flooding and causing the corresponding service to be rejected. The present invention proposes an encryption algorithm that is resistant to keyword guessing. The keywords and access policies of the resources are all confidential. During the resource upload process, only the publishing terminal and the terminal with permission to access can know them, avoiding the threat of betrayal caused by the cloud mastering a large amount of resource information. In addition, the present invention supports the access terminal to search for multiple keywords and exclude keywords when the resources are encrypted, and the search and verification process is performed by the cloud, which will not affect the efficiency of the solution by the terminal with limited computing power, and has important field research significance and commercial application value.

[0277] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for sharing secret resources in the Internet of Vehicles to resist keyword guessing. It is characterized in that The steps are as follows: Step 1: Key initialization A) The authentication center CA, roadside unit, cloud server and vehicle terminal run the key generation function to generate their own public / private key pairs; B) The authentication center CA calculates all attributes in the system attribute set to obtain an authentication attribute sequence set and broadcasts it in the Internet of Vehicles; Step 2: The vehicle terminal obtains attribute permissions C) The vehicle terminal calculates the attribute sequence based on its own attributes and sends it to the authentication center CA, which verifies the attributes of the vehicle terminal. After the verification is passed, the authentication center CA generates encrypted attribute permission parameters; D) The encrypted attribute permission parameters are returned to the vehicle terminal, and the vehicle terminal obtains the attribute permission by decrypting its own key; Step 3: Upload resources, which is divided into setting resource access permissions and setting resource keywords Setting resource access permissions: E) The vehicle terminal inputs the access policy generated according to the attributes of the resource, calculates the resource authority parameter I, and the vehicle terminal signs the resource authority parameter using the timestamp, and sends the signature and the resource authority parameter I to the roadside unit RSU; F) After receiving the information from the vehicle terminal, the roadside unit RSU verifies the signature. If the verification is successful, it re-randomizes the information, calculates the resource authority parameter II and the signature verification parameter, and then sends the information containing the resource authority parameter II and the signature verification parameter to the cloud server CS; G) After receiving the information, the cloud server CS verifies the signature and saves the information to the resource table if it passes; Setting of resource keywords; H) The vehicle terminal first constructs a keyword vector for the resource, then calculates the keyword parameters, and forwards the keyword parameters to the roadside unit RSU; I) After receiving the information from the vehicle terminal, the roadside unit RSU first verifies the signature. If the verification passes, the information is re-randomized and forwarded to the cloud server CS; J) After receiving the information, the cloud server CS verifies the signature. If the verification passes, the keyword parameters are saved in the resource table; Step 4: Accessing resources Keyword query and matching: K) The vehicle terminal selects a random number according to the number of keywords to be queried and constructs a query vector, calculates the query vector parameters, and forwards them to the roadside unit RSU; L) After receiving the information, the roadside unit RSU re-randomizes the query vector parameters and then sends the re-randomized information to the cloud server CS; M) After receiving the information, the cloud server CS verifies the information to verify whether the shared resource contains the keyword queried by the vehicle terminal; If the cloud server CS finds a resource that matches the vehicle terminal query, it needs to further verify whether the vehicle terminal's permissions meet the resource access permissions: Permission verification: N) The access terminal constructs an attribute authority vector according to the attributes it possesses, calculates attribute authority parameters according to the attribute authority vector and sends them to the roadside unit RSU; O) After receiving the information, the roadside unit RSU re-randomizes the attribute authority parameters and sends them to the cloud server CS; P) After receiving the information, the cloud server CS performs attribute authority verification. If the verification passes, the cloud server CS returns the resource link secret to the access terminal.

2. The method for sharing secret resources against keyword guessing in the Internet of Vehicles according to claim 1, It is characterized in that The implementation method of the key initialization in step 1 is: each entity runs the key generation function K.Gen to generate its own public key and private key; The private / public key of the vehicle terminal is (sk i ,pk i ),in is the private key of the vehicle terminal, pk i ∈G 1 is the public key of the vehicle terminal, and represents the set of positive integers of order q, and g is the multiplicative cyclic group G 1 The generator of The private / public key of the certification authority CA is (SK CA ,PK CA ),in The private key of the certification authority, PK CA ∈G 1 is the public key of the certification authority, and The private / public key of the roadside unit RSU is (SK RSU ,PK RSU ),in PK is the private key of the certification center. RSU ∈G 1 the public key of the certification authority, and The private / public key of the cloud server CS is (SK CS ,PK CS ),in The private key of the cloud server CS, PK CS ∈G 1 is the public key of the cloud server, and The authentication center CA sets the system attributes Att = {A 1 ,A 2 ,...,A n All properties A in} 1 ,A 2 ,…A n Perform the calculation: Then broadcast the message {PK CA ,(S 1 ,S 2 ,...,S n )}; Among them, H 1 () indicates hash mapping of the contents in brackets. n Represents the nth attribute of the system attribute set Att; S n Indicates the attribute sequence used by the vehicle terminal for comparison, which is used to compare whether the vehicle terminal has the attribute parameters.

3. The method for sharing secret resources against keyword guessing in the Internet of Vehicles according to claim 2, It is characterized in that The implementation method of the vehicle terminal obtaining attribute authority in step 2 is: 1) Assume that the vehicle terminal u i Has attribute set A i ={a i,1 ,a i,2 ,a i,3 ...,a i,m }, 1≤m≤n; vehicle terminal u i After receiving the broadcast information from the certification center CA, according to its own attributes and the public key PK of the certification center CA Computed property sequence: Vehicle Terminal i Set the attribute sequence {S i,1 ,S i,2 ,...,S i,m } and the broadcast attribute sequence set {S 1 ,S 2 ,...,S n } for comparison, if the attribute sequence S i,1 =S 1 , then the vehicle terminal u i Possessing this attribute, marked as 1; Otherwise it is 0; where m represents the vehicle terminal u i The total number of attributes, a i,m Represents vehicle terminal u i The mth attribute of ; Assume S i,1 =S 1 ,S i,2 =S 3 ,S i,3 =S 4 ,...,S i,m =S m+1 , then the vehicle terminal u i The binary number corresponding to the attribute is converted to decimal number d i , calculate the intermediate parameters and Vehicle Terminal i Send information {pm i ,d i ,pk i ,sig i } is sent to the certification authority CA to initiate an attribute authentication request; where || is a connector, pm i For vehicle terminal u i The intermediate parameters required in the attribute authentication process, sig i For vehicle terminal u i The intermediate parameters required in the attribute authentication process, H 3 () is a hash function; 2) The authentication center CA receives the vehicle terminal u i After sending the information, calculate the intermediate parameter ph according to the information CA =H 3 (pm i ||pk i )H 1 (d i ), and verify the equation Is it true? If the equation is verified, it means that the signature of the vehicle terminal is valid. Otherwise, it refuses to respond to the attribute authentication request. After the verification is passed, the decimal number d i Converted into binary, the vehicle terminal u can be determined i Verified attributes; the certification authority CA calculates the intermediate parameters Verify the equation e(pm CA ,g)=e(pm i ,pk i ) is true; if the equation is verified, it means that the vehicle terminal u i The attribute is a legal attribute, and the authentication center CA uses the vehicle terminal u i The attribute weights assigned to the authenticated attributes; where ph CA is the intermediate parameter required by the vehicle terminal in the attribute authentication process, e(,) is a computable bilinear mapping; Assume that the attribute weight corresponding to the attribute in the system attribute set Att is Attw = {w 1 ,w 2 ,...,w n }, attribute weight The certification authority CA calculates the intermediate parameters TK CA =H 2 (W i,1 ||W i,2 ||W i,3 ||...||W i,m ), The certification authority CA sends the message {W i,1 ,W i,2 ,W i,3 ,...,W i,m ,TK CA ,sig CA }Sent to vehicle terminal u i ; Among them, w n represents the nth attribute weight, W i,1 , TK CA 、sig CA These are the intermediate parameters required by the vehicle terminal during the attribute authentication process. 2 () is the hash function, t k represents the set of positive integers of order q A randomly selected number in 3) Vehicle terminal u i Received message {W i,1 ,W i,2 ,W i,3 ,...,W i,m ,TK CA ,sig CA }, calculate the intermediate parameter TK i '=H 2 (W i,1 ||W i,2 ||W i,3 ||...||W i,m ), check the intermediate parameter TK i 'Whether it is related to the intermediate parameter TK CA Equal, and verify equality Is it true? If the equation is true, the vehicle terminal u i Calculate attribute weights Get the attribute weight set W i ={w 1 ,w 3 ,w 4 ,...,w m+1 }.

4. The method for sharing secret resources in the Internet of Vehicles against keyword guessing according to claim 3, It is characterized in that The equation The verification method is: The equation e(pm CA ,g)=e(pm i ,pk i ) is verified by: According to the properties of bilinear mapping: Because the vehicle terminal u i The properties of {a i,1 ,a i,2 ,a i,3 ...,a i,m } corresponds to the property {A 1 ,A 3 ,A 4 ,...,A m+1 }, so H 1 (A 1 ||A 3 ||A 4 ||...||A m+1 )=H 1 (a i,1 ||a i,2 ||a i,3 ||...||a i,m ),therefore: The equation The verification method is:

5. The method for sharing secret resources in the Internet of Vehicles against keyword guessing according to claim 3 or 4, It is characterized in that Assume that vehicle terminal u i Upload shared resources i , the implementation method of setting the resource access permission is: (1) Vehicle terminal u i Set the attribute att i ={A 1 ,A 3 ,…,A t }'s vehicle terminal has access to the resource ζ i , let vehicle terminal u i There is no second property in the sequence containing the system property set; resource ζ i The access strategy vector is represented as V i,ξ =(1 0 00 0 1 1 1 0 ...); vehicle terminal u i Compute resource permission parameters and And based on the current timestamp Calculate signature verification parameters The information {D i,ζ ,E i,ζ ,pk i ,sig i,ζ } is sent to the roadside unit RSU; where t represents the number of attributes owned by the vehicle terminal, n represents the number of attributes, D i,ζ 、E i,ζ Represents vehicle terminal u i Uploaded resources i Resource permission parameters, sig i,ζ Parameters for signature verification; (2) The roadside unit RSU receives the vehicle terminal u i Information i,ζ ,E i,ζ ,pk i ,sig i,ζ }, according to the current timestamp Calculate intermediate parameters Verify the equation Is it true? If the equation is true, the roadside unit RSU will respond to the information {D i,ζ ,E i,ζ ,pk i ,sig i,ζ }Re-randomization: Calculate parameter D i,ζ * =D i,ζ α and E i,ζ * =E i,ζ α ; and generate a timestamp Calculate the signature The roadside unit RSU sends the information {D i,ζ * ,E i,ζ * ,pk i ,sig RSU,i,ζ }Forwarded to the cloud server CS; where the random number D i,ζ * and E i,ζ * are all new parameters generated by randomizing resource parameters, H 2 () is a hash function; (3) The cloud server CS receives the information {D i,ζ * ,E i,ζ * ,pk i ,sig RSU,i,ζ }, according to the timestamp Calculate intermediate parameters Verify the equation Is it true? If the verification is successful, the information is saved to the resource table.

6. The method for sharing secret resources in the Internet of Vehicles against keyword guessing according to claim 5, It is characterized in that The implementation method of setting the resource keywords is: Assume that vehicle terminal u i Upload shared resources i , the keyword of the resource is X i,ζ = {Kw 2 ,Kw 3 ,Kw 5 ,…}={kw i,1 ,kw i,2 ,…,kw i,b }, Kw 2 ,Kw 3 ,Kw 5 ,… is the keyword in the keyword dictionary corresponding to the uploaded resource keyword, kw i,1 ,kw i,2 ,…,kw i,b The resource's own keywords, where 1≤b≤l, b is the number of keywords in the uploaded document, and l represents the number of keywords in the keyword dictionary; resourceζ i The upload process is as follows: 11) Vehicle terminal u i For resources i Construct keyword vector v i,ζ = {v i,ζ,1 ,v i,ζ,2 ,…,v i,ζ,l }, where v i,ζ,p Represents vector v i,ζ The pth element in v i,ζ,p is the pth keyword in the keyword dictionary; vehicle terminal u i Calculating keyword arguments And the information {C i,ζ ,pk i }Forwarded to the road side unit RSU; 12) After the roadside unit RSU receives the information, if it is a request to upload resources, it re-randomizes the keyword parameters: calculate the keyword parameters The random number The roadside unit RSU sends the information {C i,ζ * ,pk i }Send to cloud server CS; 13) The cloud server CS receives the information {C i,ζ * ,pk i } and save it to the resource table.

7. The method for sharing secret resources in a vehicle network that resists keyword guessing according to claim 6, It is characterized in that Query and match of the keywords: The vehicle terminal constructs a keyword query vector, which includes: an "and" query with a wildcard, a "not" query with a wildcard, and an "and" and "not" query with a wildcard; The roadside unit RSU receives the vehicle terminal u j After the information is obtained, the query vector parameters are re-randomized: the parameters are calculated and Where β = α -1 , The re-randomized information {Q j,1 * ,Q j,2 * ,R j } is forwarded to the cloud server CS; where Q j,1 * , Q j,2 * Represents the new parameters generated by re-randomizing the query vector parameters; Cloud server CS receives the message {Q j,1 * ,Q j,2 * ,R j }, by verifying equation e 1 (C i,ζ * ,Q j,1 * ,pk i )·e 1 (C i,ζ * ,Q j,2 * ,pk i )=e 1 (g,g,R j ) is established to verify whether the shared resource contains the vehicle terminal u j Query keyword X j ={kw j,1 ,kw j,2 ,…,kw j,h }; The implementation method of the permission verification is: 21) Access terminal u j According to the attribute set att j ={A 1 ,A 3 ,A 5 ,…}={a j,1 ,a j,2 ,…,a j,h }, for the attribute set att j Construct the attribute permission vector P j , vector P j The length of is the sum of n attribute encoding bits n(n+3) / 2 bits; the first two bits are related to attribute A. 1 The first two digits of the related elements are called P j,1 ; 3rd to 5th position and attribute A 2 Related, called P j,2 ; And so on; the last n+1 bits and attribute A n Related, called P j,n ; respectively called P j,1 The first digit is P j,1,1 , the second position is P j,1,2 ; called P j,2 The first digit is P j,2,1 , the second position is P j,2,2 , the third position is P j,2,3 ; and so on; called P j,n The first digit is P j,n,1 , the second position is P j,n,2 , ..., the n(n+3) / 2th position is P j,n,n+1 ; 1≤h≤n, n represents the number of attributes; access terminal u j Calculated attribute permission parameters and The information {F j ,ppk j }Sent to the roadside unit; 22) Roadside unit RSU receives the information {F j ,ppk j }, re-randomize: calculate attribute permission parameters and And the information {F j * ,ppk j * }Send to cloud server CS; 23) Cloud server CS receives the information {F j * ,ppk j * }, verify the equation e(D i,ζ * ,F j * )=e(E i,ζ * ,ppk j * ) is established. If the verification is successful, it means that the access terminal u j The permissions satisfy the resource i The cloud server CS returns the resource link secret to the access terminal u j ; where D i,ζ * and E i,ζ * These are all new parameters generated by the roadside unit RSU by re-randomizing resource parameters.

8. The method for sharing secret resources against keyword guessing in the Internet of Vehicles according to claim 6, It is characterized in that The access resource i The access strategy is through a one-dimensional vector V of length (n+3)n / 2 i,ξ To describe, the one-dimensional vector V i,ξ The first two digits are related to attribute A 1 The first two digits of the related elements are called V i,ξ,1 ; 3rd to 5th position and attribute A 2 The element concerned is called V i,ξ,2 ; And so on; the last n+1 bits and attribute A n Related, called V i,ξ,n ; The rule for constructing access policy is: if the access policy contains attribute A m , then use attribute A m Huffman code A m code Indicates; if the policy does not contain attribute A m , then attribute A m All the coded bits of are 0; The equation The verification method is: The information received by the roadside unit RSU is {D i,ζ ,E i,ζ ,pk i ,sig i,ζ }, within the legal time interval The roadside unit RSU calculates the intermediate parameters based on the timestamp when the information is received Roadside Unit RSU Construction Equation Verify according to the properties of bilinear mapping: The equation The verification method is: within a legal time interval The rule for constructing resource keyword vectors is: in the keyword dictionary Kw = {Kw 1 ,Kw 2 ,…,Kw l }, if Kw p ∈X i,ζ , then the element v i,ζ,p =H 1 (Kw p );like Then the element v i,ζ,p =-H 1 (Kw p ), where 1≤p≤l.

9. The method for sharing secret resources in a vehicle network that resists keyword guessing according to claim 7, It is characterized in that The implementation method of the wildcard 'and' query is: Assume that vehicle terminal u j The query needs to include the keyword set X j = {Kw 2 ,Kw 3 ,Kw 5 ,…}={kw j,1 ,kw j,2 ,…,kw j,h } resources, vehicle terminal u j Select h random numbers Let the query vector be v j , and the query vector v j There are two one-dimensional vectors v of length l j,1 and v j,2 Composition; for vector v j,1 , if the element Kw p ∈X j , then v j,1,p =λc p ;like Then v j,1,p =0; for vector v j,2 , if the element Kw p ∈X j , then the element v j,2,p =μc p ;like Then v j,2,p =0; where λ+μ=1, 1≤p≤l, 1≤h≤l, h is the keyword set X j The number of elements contained in ; Vehicle Terminal j According to the vector v j,1 and v j,2 Calculating query vector parameters and The information {Q j,1 ,Q j,2 ,R j }Forwarded to the roadside unit RSU; where kw j,h Represents vehicle terminal u j The hth keyword in the query keyword, Kw p ∈X j represents the pth keyword in the keyword dictionary, λ,μ represent the parameters of whether the terminal search condition is met, Q j,1 , Q j,2 and R j Indicates the verification parameters after forwarding; The method of the wildcard 'not' query is: Assume that vehicle terminal u s The query does not contain keywords Resources, keyword collection Where 1≤h≤l; vehicle terminal u s In the set of integers Select h random numbers from h is the set X s The number of elements contained in; let the query vector be v s , and the query vector v s There are two one-dimensional vectors v of length l s,1 and v s,2 Composition: For vector v s,1 , if the keyword Kw p =kw s,r ∈X s , then v s,1,p =λ'c r ;like Then v s,1,p =0; for vector v s,2 , if the keyword Kw p =kw s,r ∈X s , then v s,2,p =μ'c r ;like Then v s,2,p =0; where, λ'+μ'=-1, 1≤p≤l, 1≤r≤h; Vehicle Terminal s Calculating query vector parameters and The information {Q s,1 ,Q s,2 ,R s }Forwarded to the road side unit RSU; The implementation method of the wildcard 'and' and 'not' query is: Assume that vehicle terminal u z Need to search for keywords {kw z,2 ,kw z,3 ,…} and does not contain {kw z,1 ,…} resources, keyword collection Where 1≤h≤l; vehicle terminal u z In the set of integers Select h random numbers from h is the keyword set X z The number of elements contained in {kw z,2 ,kw z,3 ,…} query elements, build a rule with wildcard reference 'and' query; for For such query elements, the construction rules refer to the 'not' query with wildcards; Vehicle Terminal z Calculating query vector parameters and The information {Q z,1 ,Q z,2 ,R z }Forwarded to the road side unit RSU; The equation 1 (C i,ζ * ,Q j,1 * ,pk i )·e 1 (C i,ζ * ,Q j,2 * ,pk i )=e 1 (g,g,R j ) is verified by: In the shared resource table, resource i The corresponding keyword parameter is C i,ζ * , check terminal u j The keyword parameter to be queried is forwarded by the roadside unit RSU to the cloud server CS, and the query keyword parameter received by the cloud server CS is {Q j,1 * ,Q j,2 * ,R j },in and Using the properties of trilinear mapping, Cloud Server CS calculates: Set up resources i The keyword is {kw 2 ,kw 4 ,…kw k }, then the keyword vector v i,ζ Represented as v i,ζ =(-H 1 (kw 1 ) H 1 (kw 2 ) -H 1 (kw 3 ) H 1 (kw 4 )…H 1 (kw k ) -H 1 (kw k+1 )…-H 1 (kw l )); If it is a wildcard 'and' query, set the access terminal u j The search keyword is {kw 2 ,kw 4 ,kw 6 }, the random number selected is because With e 1 (g,g,R j ) are equal, so: If it is a 'not' query with a wildcard, set the access terminal u s The search keywords are The random number chosen is because With e 1 (g,g,R s ) are equal, so: If it is a wildcard 'and' or 'not' query, assuming that terminal u z The search keywords are The random number chosen is because and =e 1 (g,g,R z ) are equal, so:

10. The method for sharing secret resources in a vehicle network that resists keyword guessing according to claim 7, It is characterized in that The rule for constructing the attribute permission vector is: if the access terminal u j If a user has the permission for a certain attribute, the encoding position of the attribute is randomly filled. The filling rule is: the mth attribute has m+1 bits of encoding, and the sum of the first m bits is equal to the hash value of the attribute weight; where H 2 (w m ) j Represents terminal u j Calculate the attribute weight w of the mth attribute m The hash value, H 2 (w m ) j,b For terminal u j The vector P j The hash value of the bth bit of the mth attribute in ; The equation e(D i,ζ * ,F j * )=e(E i,ζ * ,ppk j * ) is verified by: Set up resources i The owner's vehicle terminal u i Set the owning property (a 1 ,a 3 ,a 4 ) can be accessed by the vehicle terminal, then the resource ζ i The vector of access strategies is V i,ξ =(1 0 0 0 0 1 1 1 0 1 1 1 1 0 ...), resource ζ i The permission verification parameter is {D i,ζ * ,E i,ζ * },in Access terminal u j Construct the attribute permission vector P according to the attribute weights j , and calculate the attribute permission parameter F j and ppk j ; The cloud server receives the information of the RSU re-randomization {F j * ,ppk j * },in According to the properties of bilinear mapping, Cloud Server CS verifies: When the access permission is equal to the resource access policy, let the access terminal u j Has attribute permissions (a 1 ,a 3 ,a 4 ), then P j =(H 2 (w 1 )0 0 0 0 x 1 x 2 x 3 0x 4 x 5 x 6 x 7 0...), where x 1 +x 2 +x 3 =H 2 (w 3 ), x 4 +x 5 +x 6 +x 7 =H 2 (w 4 ), So <V i,ζ |P j > =(1 0 0 0 0 1 1 1 0 1 1 1 1 0...)· (H 2 (w 1 ) 0 0 0 0 x 1 x 2 x 3 0 x 4 x 5 x 6 x 7 0...) T =H 2 (w 1 )+(x 1 +x 2 +x 3 )+(x 4 +x 5 +x 6 +x 7 ) =H 2 (w 1 )+H 2 (w 3 )+H 2 (w 4 ) but: When the access permission is greater than the resource access policy, set the access terminal u j Has attribute permissions (a 1 ,a 2 ,a 3 ,a 4 ), then P j =(H 2 (w 1 ) 0 x 1 x 2 0x 3 x 4 x 5 0x 6 x 7 x 8 x 9 0...), where x 1 +x 2 =H 2 (w 2 ), x 3 +x 4 +x 5 =H 2 (w 3 ), x 6 +x 7 +x 8 +x 9 =H 2 (w 4 ), So <V i,ζ |P j > =(1 0 0 0 0 1 1 1 0 1 1 1 1 0 ...)· P(H 2 (w 1 )0 x 1 x 2 0 x 3 x 4 x 5 0 x 6 x 7 x 8 x 9 0 ...) T =H 2 (w 1 )+(0+0)+(x 3 +x 4 +x 5 )+(x 6 +x 7 +x 8 +x 9 ) =H 2 (w 1 )+H 2 (w 3 )+H 2 (w 4 ) but: When the access permission is less than the resource access policy, let the access terminal u j Has attribute permissions (a 1 ,a 3 ), then P j =(H 2 (w 1 )0 00 0 x 1 x 2 x 3 0 0 0 0 0 0 ...), where x 1 +x 2 +x 3 =H 2 (w 3 ), So <V i,ζ |P j > =(1 0 0 0 0 1 1 1 0 1 1 1 1 0 ...)· (H 2 (w 1 ) 0 0 0 0 x 1 x 2 x 3 0 0 0 0 0 0 ...) T =H 2 (w 1 )+(x 1 +x 2 +x 3 ) =H 2 (w 1 )+H 2 (w 3 ) but:

Citation Information

Patent Citations

  • Internet of vehicles security data sharing method based on block chain

    CN116633523A