A secure query and access control method and system for digital twin data
By adopting the CP-ABE-based digital twin data security query and access control method, the problems of data security and privacy in multi-user environments are solved. It realizes access control for users and data leakage tracking, and ensures the security and privacy of digital twin data in multi-user environments.
Patent Information
- Application Number
- CN202310928126.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-26
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2043-07-26
AI Technical Summary
In existing technologies, the security and privacy of digital twin data are difficult to guarantee effectively. In particular, in multi-user environments, traditional encryption schemes suffer from problems such as high decryption computational overhead, easy leakage of access policies, and difficulty in tracking data leaks due to anonymity mechanisms.
The CP-ABE-based digital twin data security query and access control method is adopted. By initializing system parameters, private and public keys are generated to construct a data access control structure. A key center is used for identity recognition and authorization key calculation. Access users generate trapdoors for verification, and cloud servers perform secure query and access control.
It enables effective control of user access permissions in a multi-user environment, ensuring that only authorized users can query data, reducing computational overhead, ensuring data security during collection, transmission, storage and use, and tracing the source of data leaks.
Smart Images

Figure CN116846664B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data security technology, and in particular to a secure query and access control method and system for digital twin data. Background Technology
[0002] In the era of big data on the internet, the transmission and storage services of digital twin data are becoming increasingly widespread. However, the complexity of data management environments and the lack of robust data encryption and security mechanisms have led to frequent theft, leakage, and loss of digital twin data. Digital twin data is massive in scale, complex in type, and contains a large amount of private information; its leakage or loss can cause substantial economic losses, thus necessitating high security requirements for its storage. Traditional data encryption methods for digital twin data offer low security and cannot meet practical application needs, exposing it to numerous security threats and challenges. This is particularly true in sensitive scenarios, such as user personal data generated by devices in smart homes, patient health data in smart healthcare, or personal travel data during pandemics, where the conflict between data privacy and sharing becomes a significant challenge.
[0003] Access control technology has become a crucial means of protecting privacy and data security, effectively addressing the confidentiality, security, and controllability of digital twin data. Countless enterprises are advocating for privacy and security, and in this environment, employees are increasingly storing their digital twin data, which is becoming increasingly sensitive, on cloud platforms using encryption methods. Obviously, encrypted data is difficult to search or query. The emergence of searchable encryption technology effectively solves this problem, allowing authorized personnel to perform precise searches and queries on digital twin data within an encrypted environment. Therefore, in this context, achieving fine-grained and multi-keyword searches, and designing efficient and flexible access control schemes, has become a significant challenge.
[0004] Existing encryption technologies incur enormous computational overhead for decryption. Outsourcing complex decryption work to edge nodes improves the decryption efficiency for digital twin data owners, but its application environment is limited, only suitable for a single attribute authorization center. Traditional encryption schemes involve a single attribute authorization agency responsible for key distribution and user authentication, providing good access policies for a small number of users. However, as the number of users increases, the workload of a single authorization agency increases dramatically, easily leading to system inefficiency or even system crashes. In traditional access control schemes, users package ciphertext and access policies together and outsource them to the cloud platform. Because the attached access policy is in plain text form, both users and cloud servers can infer relevant information based on the access policy, posing a serious threat to privacy data. Furthermore, to address the issue of enabling keyword search functionality for ciphertext stored in the cloud, a verifiable multi-keyword search encryption scheme based on anonymous keys is proposed. This scheme hides the access policy, ensuring data confidentiality. While outsourcing decryption technology reduces the computational burden on users, the anonymity mechanism of the scheme makes it impossible to trace problems after data leakage.
[0005] Therefore, enabling multi-user query and retrieval functions for digital twin data uploaded by a single user, and studying the issues of encrypted access control and data leakage tracking of digital twin data are key to the research on digital twin security. Summary of the Invention
[0006] This invention provides a secure query and access control method and system for digital twin data, which solves the problem of range query and retrieval function for digital twin data uploaded by a single user in the prior art, and studies the problems of encrypted access control and data leakage tracking of digital twin data.
[0007] To achieve the aforementioned objectives, the present invention provides the following technical solution: a secure query and access control method for digital twin data, characterized by the following steps:
[0008] S1. Initialize system parameters;
[0009] S2. Based on system parameters, the data owner and access user select a private key and generate a public key based on the private key; the private key is kept secret while the public key is made public; the key center uses the key to generate a keyword encryption key for the data owner and sends the keyword encryption key to the data owner through the transmission channel;
[0010] S3. Authorize access to the data to be encrypted by specifying the authorized user's public key for the data to be encrypted. The data owner will send the specified authorized user's public key to the key center.
[0011] S4. Obtain the storage address index A of the ciphertext to be encrypted. The data owner has access to A. iCalculate with keywords to obtain keyword ciphertext data, upload the keyword ciphertext data to the cloud server, and build a data access control structure based on CP-ABE;
[0012] S5. The key center performs identity verification based on the data access control structure and the public key of the accessing user, and calculates the corresponding authorization key for the authorized user whose identity is consistent with the authorized user.
[0013] S6. Users can generate trapdoors to verify whether they have permission to query the data they need.
[0014] S7, the cloud server verifies the access traps of users by uploading encrypted keyword data, and completes the secure query and access control of digital twin data.
[0015] Preferably, in step S1, initializing system parameters includes:
[0016] The system selects a safety parameter λ and a large prime number p(2). λ ≤p≤2 λ+1 Let G1 be a multiplicative cyclic group of order p. Let g ∈ G be a generator, and let e be a bilinear mapping: G1 × G1 → G2, where the order of the cyclic group G1 is p(2π / 2). λ ≤p≤2 λ+1 Define a collision-resistant hash function H: {0, 1} * ;
[0017] This system parameter set is disclosed: params = (p, G1, e, G2, g, H).
[0018] Preferably, in step S2, the data owner and the accessing user select a private key based on system parameters, and generate a public key based on the private key; the private key is kept secret while the public key is made public; the key center uses the key to generate a keyword encryption key for the data owner, and sends the keyword encryption key to the data owner through a transmission channel, including:
[0019] The data owner is responsible for the data F in each file. i Select random number As the data owner's private key sk i And generate the data owner's public key. Keep the private key secret and expose the public key for PK. i ;
[0020] Among them, F i Refers to the i-th file; 'a' represents an arbitrary random number, defined as a i Mathematical definition: If p is a prime number, then under addition and multiplication modulo p, Z p It is a domain. It is Z pThe non-zero elements form a multiplication group; sk i , pk i These represent the private key and public key of the i-th file, respectively;
[0021] Each user selects a random number. As access user's private key sk id Generate access user public key Where id represents the identity identifier of the accessing user, the private key is kept secret, and the public key pk is public. id ;
[0022] The key center selects three random numbers x, y, z. Calculate x1 = g x y1=g y z1 = g z Based on these two sequences: The key center publishes global parameters (x1, y1, z1, {x 1,i}, {y 1,i}), and uses the key center's key to generate the data owner's keyword encryption key: k w,1 =x1, Send to the data owner (k) via the transmission channel w,1 ,k w,2 ).
[0023] Where x, y, z, ξ represent the private key of the key center; x1, y1, z1, {x 1,i}, {y 1,i} represents the public key of the key center; x1 = g x y1=g y z1 = g z This represents the formula for calculating the public key of the key center using the private key of the key center; k w,1 k w,2 Indicates the key encryption key; k w,1 =x1, This is the formula for calculating the keyword encryption key, where It is the public key of the key center raised to the power of x, where x is the random number indicated at the beginning of the segment.
[0024] Preferably, in step S3, access authorization is granted to the data to be encrypted by specifying the authorized user's public key for the data to be encrypted. The data owner sends the specified authorized user's public key to the key center, including:
[0025] For user file data F i Where i = 1, 2, ..., n; the total number of file data is n, and F is specified. i Authorized user public key: A′ i ={pk id(1),pk id(2) ,…,pk id(k)}; k indicates that k users are authorized to access F. i The data owner will {A′ i} is sent to the key center for processing; where, {A′ i The} represents the data access control structure sent by the data owner.
[0026] Preferably, in step S4, the storage address index A of the ciphertext to be encrypted is obtained, and the data owner accesses A. i Calculate the keyword data using the keyword, upload the encrypted keyword data to the cloud server, and construct a data access control structure based on CP-ABE, including:
[0027] Data owners obtain file data from the cloud. i The storage address index of the ciphertext is A = {A1, A2, ..., A...} n}, for A i and keyword w i ={w i,1 ,…,w i,m Perform the calculations as follows using formulas (1) and (2):
[0028]
[0029]
[0030] Obtain the set of ciphertext keywords Upload the encrypted keyword collection to the cloud server for storage.
[0031] Among them, w i , indicates a keyword; w i,θ This represents the θ-th keyword in the i-th file; m represents the number of keywords; C represents the ciphertext data, which is abbreviated as C.
[0032] This indicates the key-based ciphertext structure.
[0033] Preferably, in step S5, the key center performs identity verification based on the data access control structure and the public key of the accessing user, and calculates the corresponding authorization key for users whose identities match the authorized user, including:
[0034] Run the identity recognition algorithm: Select a random number Calculate separately: Waiting for the user's response; if the user can respond according to V... id(t) Calculated It is returned to the key center, which then verifies it. This indicates that the authorized user's identity is correct;
[0035] For users who are authorized, identify all data sets they can access.
[0036] calculate
[0037] Authorization key for each authorized user
[0038] Among them, V id(t) and V′ id(t) Both are intermediate variables used to verify user identity; V id(t) It is calculated based on the public key of the id(t)th data visitor and a random number from the non-zero element, and is used to wait for the user's response; V′ id(t) This indicates the user's response. This indicates the calculation of the generator g raised to the power of ζ; It's a calculation formula to calculate V. id(t) -b i The power of, where Let S represent the access set of the id(t)th authorized user; j∈S id(t) This indicates the file number requested by the authorized user. Preferably, in step S6, the accessing user verifies their permission to query the required data by generating a trapdoor, including:
[0039] Users generate trapdoors according to the following formula (3):
[0040]
[0041] Get T r = (Tr1, Tr2) is sent to the cloud server for verification.
[0042] Among them, T r = (Tr1, Tr2) represents the query trapdoor of the data owner; Tr1 and Tr2 represent the generating functions of the trapdoor; θ ranges from 1 to m′, where m′ represents the number of keywords to be searched.
[0043] Preferably, step S6 further includes setting m′ to 1 when the authorized user wants to perform a single keyword search.
[0044] Preferably, in step S7, the cloud server verifies the access user's trapdoor using the uploaded keyword encrypted data, completing the secure query and access control of the digital twin data, including:
[0045] The cloud server verifies the access user's trapdoor by uploading encrypted keyword data. When the authorized user id(t) is sent to the cloud server trapdoor T... rWhen querying data, first check m′. If m′ > m, the user's query request is rejected; otherwise, the cloud server continues to check. and Check if they are equal. If the equation is true, return the file stored at address A_i; if the equation is false, do not return anything.
[0046] If m′=1, then
[0047] A secure query and access control system for digital twin data, the system being used in the aforementioned secure query and access control method for digital twin data, the system comprising:
[0048] The initialization module is used to initialize system parameters;
[0049] The key generation module is used to select a private key based on the system parameters, the data owner, and the access user; generate a public key based on the private key; retain the private key and publish the public key; and the key center uses the key to generate a keyword encryption key for the data owner and sends the keyword encryption key to the data owner through a transmission channel.
[0050] The access control structure generation module is used to authorize access to the data to be encrypted, specify the authorized user public key of the data to be encrypted, and the data owner sends the specified authorized user public key to the key center.
[0051] The data encryption module is used to obtain the storage address index A of the ciphertext to be encrypted, and the data owner has access to A. i The keyword is calculated to obtain the keyword ciphertext data, and the keyword ciphertext data is uploaded to the cloud server to build a data access control structure based on CP-ABE;
[0052] The authorization key generation module is used by the key center to identify users based on the data access control structure and the public key of the accessing user, and to calculate the corresponding authorization key for users who are authorized.
[0053] The trapdoor generation module is used by users to generate trapdoors to verify whether they have permission to query the data they need.
[0054] The query verification module is used by the cloud server to verify the access traps of users by uploading encrypted keyword data, thereby completing the secure query and access control of digital twin data.
[0055] On one hand, an electronic device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, which is loaded and executed by the processor to implement the aforementioned secure query and access control method for digital twin data.
[0056] On the one hand, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by a processor to implement the above-described secure query and access control method for digital twin data.
[0057] The above technical solution has at least the following advantages compared with the existing technology:
[0058] The above-mentioned solution proposes a multi-keyword query scheme based on aggregated keys for secure data querying in digital twin environments. This scheme can protect the security of multiple keywords in the data and control the access permissions of users, so that only authorized users can query the data stored in the cloud. It is well-suited for secure data querying in digital twin environments.
[0059] To address the challenge of multi-user encrypted decryption access control in digital twin environments, a CP-ABE-based digital twin data security query and access control scheme is proposed. This scheme effectively solves both security and computational overhead issues, ensuring that even if one terminal device is controlled externally, the security of other terminal devices and authorized users remains unaffected. Furthermore, the authorization keys of authorized users cannot be cracked by malicious attackers, thus effectively protecting data security at every stage of acquisition, transmission, storage, and use. This scheme exhibits minimal computational overhead and demonstrates excellent operational efficiency. Attached Figure Description
[0060] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0061] Figure 1 This is a schematic diagram of the secure query and access control method for digital twin data provided in an embodiment of the present invention;
[0062] Figure 2 This is a model diagram of the keyword range query system provided in the embodiments of the present invention;
[0063] Figure 3 This is a traceable data access control diagram based on CP-ABE provided in an embodiment of the present invention;
[0064] Figure 4 This is a block diagram of a secure query and access control system for digital twin data provided in an embodiment of the present invention;
[0065] Figure 5This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0066] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0067] This invention addresses the inherent conflict between privacy and data sharing in existing smart healthcare systems, particularly regarding patient health data or personal travel trajectory data during pandemics. It conducts security research on digital twin data, proposes an improved access control scheme for secure querying and access, and provides a secure query and access control method and system for digital twin data.
[0068] like Figure 1 As shown, this embodiment of the invention provides a secure query and access control method for digital twin data, which can be implemented by an electronic device. Figure 1 The flowchart shown illustrates a secure query and access control method for digital twin data. The processing flow of this method may include the following steps:
[0069] S101. Initialize system parameters;
[0070] In one feasible implementation, step S101, initializing system parameters, includes:
[0071] The system selects a safety parameter λ and a large prime number p(2). λ ≤p≤2 λ+1 Let G1 be a multiplicative cyclic group of order p. Let g ∈ G be a generator, and let e be a bilinear mapping: G1 × G1 → G2, where the order of the cyclic group G1 is p(2π / 2). λ ≤p≤2 λ+1 Define a collision-resistant hash function H: {0, 1} * ;
[0072] This system parameter set is disclosed: params = (p, G1, e, G2, g, H).
[0073] In one feasible implementation, to enable multi-user data range query retrieval for a single user's uploaded data, a one-to-many user range query scheme based on key aggregation is proposed. In this scheme, users use keys to generate ciphertext for multiple keywords across multiple files. When an authorized user searches for a file, they use key aggregation to generate an aggregation trapdoor, thereby enabling multi-keyword search and improving retrieval efficiency. Furthermore, when an accessing user requests an authorization key from a key center, the key center authenticates the accessing user. Security analysis shows that this scheme, while meeting the required secure query functionality, offers higher cloud server keyword retrieval efficiency and lower overhead in generating encrypted keyword tags.
[0074] One feasible implementation method proposes a solution for secure querying of digital twin data, such as in scenarios involving multi-keyword, multi-user queries in the field of smart healthcare. Figure 2 The multi-keyword query scheme based on aggregated keys, as shown, protects the security of multiple keywords in the data while controlling access permissions for users, ensuring that only authorized users can query data stored in the cloud. This system mainly includes four entities: the data owner, authorized users, the cloud server, and the key center. The following are the operations required from each party:
[0075] Data owner: In digital twins, this refers to the data acquisition device. For security and privacy, the data owner encrypts keywords and uploads them to a cloud server for storage.
[0076] Authorized users: As authorized and honest users, they can obtain query keys and query keywords to generate trapdoors and query the cloud server.
[0077] Cloud servers: They have powerful computing capabilities and can store and verify encrypted data, but they may leak data from the cloud.
[0078] Key Center: It has low computing power but is absolutely reliable, generating keys for each user.
[0079] The data owner encrypts multiple keywords corresponding to the data and uploads them to the cloud server, which then returns the storage address. The accessing user obtains a query key from the key center, generates a aggregation trapdoor, and sends it to the cloud server for verification. The verification result is returned to the authorized user along with the data file and its address; otherwise, the query fails.
[0080] S102. Based on system parameters, the data owner and access user select a private key and generate a public key based on the private key; the private key is kept secret while the public key is made public; the key center uses the key to generate a keyword encryption key for the data owner and sends the keyword encryption key to the data owner through the transmission channel;
[0081] In one feasible implementation, in step S102, the data owner and the access user select a private key based on system parameters, and generate a public key based on the private key; the private key is kept public; the key center uses the key to generate a keyword encryption key for the data owner, and sends the keyword encryption key to the data owner through a transmission channel, including:
[0082] The data owner is responsible for the data F in each file. i Select random number As the data owner's private key sk i And generate the data owner's public key. Keep the private key secret and expose the public key for PK. i ;
[0083] Each user selects a random number. As access user's private key sk id Generate access user public key Where id represents the identity identifier of the accessing user, the private key is kept secret, and the public key pk is public. id ;
[0084] Among them, F i Refers to the i-th file; 'a' represents an arbitrary random number, defined as a i Mathematical definition: If p is a prime number, then under addition and multiplication modulo p, Z p It is a domain. It is Z p The non-zero elements form a multiplication group; sk i , pk i These represent the private key and public key of the i-th file, respectively;
[0085] The key center selects three random numbers x, y, z. Calculate x1 = g x y1=g y z1 = g z Based on these two sequences: The key center publishes global parameters (x1, y1, z1, {x 1,i}, {y 1,i}), and use its own key to generate the data owner's keyword encryption key: k w,1 =x1, Send to the data owner (k) via the transmission channel w,1 ,k w,2 ).
[0086] Where x, y, z, ξ represent the private key of the key center; x1, y1, z1, {x 1,i}, {y 1,i} represents the public key of the key center; x1 = gx y1=g y z1 = g z This represents the formula for calculating the public key of the key center using the private key of the key center; k w,1 k w,2 Indicates the key encryption key; k w,1 =x1, This is the formula for calculating the keyword encryption key, where It is the public key of the key center raised to the power of x, where x is the random number indicated at the beginning of the segment.
[0087] One feasible implementation method studies data encryption / decryption access control and data leakage tracking. Specifically, a traceable data access control scheme based on CP-ABE is proposed. This is a secure user access control scheme that supports multi-authorization CP-ABE for multiple users. The CP-ABE scheme generally consists of four phases: initialization, key generation, encryption, and decryption. Partial encryption computation is outsourced to fog nodes to reduce the computational overhead of IoT terminals. Integrity reports are generated when accessing encrypted data, and leakage tracking is initiated for illegitimate search requests, ensuring that only authorized users can obtain and decrypt the data.
[0088] In one feasible implementation, this invention proposes, in order to solve the problem of multi-user ciphertext decryption permission control in a digital twin environment, the following... Figure 3 The CP-ABE-based digital twin data security query and access control scheme effectively solves the security and computational overhead problems. The instance objects in this invention include a cloud server, a data owner, and authorized users. The data owner encrypts the data using an access structure and key and uploads it to the cloud server, outsourcing some encryption operations to fog nodes for computation. Each access by an authorized user is recorded by the cloud server to generate integrity verification, achieving the goal of traceable leaked data. The authorized user generates a decryption key using their own attributes and authorization key to decrypt the ciphertext. Considering that fog nodes can share the computational overhead, the system model of this invention consists of five entities: a key authorization center, a data owner, a cloud server, authorized users, and fog nodes. The specific roles of each party are as follows:
[0089] Key Authorization Center: The Key Authorization Center is a fully trusted third party responsible for generating public parameters and keys, and transmitting them to data owners and authorized users through reliable channels.
[0090] Data owner: Defines an access structure that uses fog nodes to encrypt data, sends it to the key center to generate a key, and then uploads the locally collected data to the cloud server after encrypting it with the key.
[0091] Cloud servers: possess powerful computing and storage capabilities, as well as high concurrency, high throughput, and high-speed bandwidth. They can provide storage and computing services for data owners and authorized users, especially helping authorized users to partially decrypt files.
[0092] Authorized users: They use attributes to request access to data from the cloud server, submit a trapdoor to the cloud server using their own attribute key, obtain the encrypted data after verification by the cloud server, and finally execute the decryption algorithm to decrypt the encrypted data. Here, authorized users refer to a group of users with the same attributes.
[0093] Fog nodes: These are semi-trusted servers that are widely distributed closest to IoT terminals. During the encryption process, data owners outsource some of the larger computations to fog nodes to share the computational burden.
[0094] S103. Authorize access to the data to be encrypted by specifying the authorized user's public key for the data to be encrypted. The data owner will send the specified authorized user's public key to the key center.
[0095] In one feasible implementation, system initialization is performed. Specifically, to ensure the entire solution can run smoothly on the system, system initialization is required at the beginning of the solution, generating the following parameters: First, a large prime number p is selected, and a finite field Z is generated based on it. p Choose two multiplicative cyclic groups G1 and G2, and then select generators g and h from them respectively; choose a bilinear mapping e: (G1, G2) → G T Choose two hash functions H1: G T →{0,1} * H: {0, 1} * →{0,1} * Finally, the system publicly selects the following parameters: P = {p, G1, G2, e, H1, H}
[0096] Key generation. Specifically, the key distribution center first selects three random numbers as the private key sk = {α, K1, K2}, and calculates the public key PK = {h...} i ,u i ,v i}as follows: Where i = 1, ..., n. The access structure for the data owner is P′ = b1...b n Each of the generating polynomials is: f Where f i It is x i The polynomial coefficients, the key PK and {f i} Sent to the data owner; Key distribution center for the attribute structure of authorized users For all k∈[1,n], calculate Constructor function: Select a random number r u ∈Z p ,calculate: and the authorization key Send to the authorized user; the key distribution center constructs a polynomial based on the data access structure and the authorized user attributes: Among the data F i It is x i The coefficient of F i It is also sent to authorized users.
[0097] In one feasible implementation, the keyword information and access control for each data user must be determined before data encryption so that after encryption, only authorized users can access that part of the data.
[0098] In one feasible implementation, the plaintext M is processed as follows: first, a random number r∈Z is selected. p The calculation is as follows:
[0099] R = g r
[0100]
[0101]
[0102]
[0103] Finally, the ciphertext data C = {R} is... m ,K 1m ,K 2m C m}Sent to the cloud server, where This is modulo-2 addition in binary. Where K... 1m K 2m The calculation process involves polynomial calculations, which are too computationally intensive. The data owner can choose to outsource this part to the fog node in the following way: (1) First, the data owner randomly selects n blinding parameters {f′ n+1 ,…,f′ 2n}, and for any f i ′, neither of them belongs to the set {f i};(2) Next, {f′ n+1 ,…,f′ 2n} and {f i} Shuffle the order and u i v i (3) Send them together to the fog node for calculation; finally, the result only needs to be obtained by multiplying and exponentiation r to get K. 1m and K2m .
[0104] In one feasible implementation, step S103 involves authorizing access to the data to be encrypted by specifying the authorized user's public key for the data to be encrypted, and the data owner sending the specified authorized user's public key to the key center, including:
[0105] For user file data F i Where i = 1, 2, ..., n; the total number of file data is n, and F is specified. i Authorized user public key: A′ i ={pk id(1) ,pk id(2) ,…,pk id(k)}; k indicates that k users are authorized to access F. i The data owner will {A′ i} is sent to the key center for processing. Where, {A′ i The} represents the data access control structure sent by the data owner.
[0106] S104. Obtain the storage address index A of the ciphertext to be encrypted. The data owner has access to A. i The keyword is calculated to obtain the encrypted keyword data, which is then uploaded to the cloud server.
[0107] In one feasible implementation, step S104 involves obtaining the storage address index A of the ciphertext to be encrypted, and the data owner accessing A... i The keyword is used to perform calculations to obtain encrypted keyword data, which is then uploaded to the cloud server, including:
[0108] Data owners obtain file data from the cloud. i The storage address index of the ciphertext is A = {A1, A2, ..., A...} n}, for A i and keyword w i ={w i,1 ,…,w i,m Perform the calculations as follows using formulas (1) and (2):
[0109]
[0110]
[0111] Obtain the set of ciphertext keywords Upload the encrypted keyword set to a cloud server for storage and build a data access control structure based on CP-ABE;
[0112] Among them, w i , indicates a keyword; wi,θ Let represent the θ-th keyword of the i-th file; m represents the number of keywords; C represents the ciphertext data. This indicates the key-based ciphertext structure.
[0113] S105. The key center performs identity verification based on the data access control structure and the public key of the accessing user, and calculates the corresponding authorization key for the authorized user whose identity is consistent with the authorized user.
[0114] In one feasible implementation, when the key center uses the data access control structure {A′} sent by the data owner... i}, for each authorized user's public key PK id(t) ∈{A′ i}, where t = 1, 2, ..., k, assume F i There are k authorized users in total.
[0115] In one feasible implementation, step S105 involves the key center performing identity verification based on the data access control structure and the public key of the accessing user, and calculating the corresponding authorization key for users whose identities match the authorized user, including:
[0116] Run the identity recognition algorithm: Select a random number Calculate separately: Waiting for the user's response; if the user can respond according to V... id(t) Calculated It is returned to the key center, which then verifies it. This indicates that the authorized user's identity is correct;
[0117] For users who are authorized, identify all data sets they can access. Calculate the authorization key for each authorized user
[0118] Among them, V id(t) and V′ id(t) Both are intermediate variables used to verify user identity; V id(t) It is calculated based on the public key of the id(t)th data visitor and a random number from the non-zero element, and is used to wait for the user's response; V′ id(t) This indicates the user's response. This indicates the calculation of the generator g raised to the power of ζ; It's a calculation formula to calculate V. id(t) -b i The power of, where Let S represent the access set of the id(t)th authorized user; j∈S id(t) This indicates the file number that the authorized user is requesting access to.
[0119] In one feasible implementation, in step S6, the accessing user verifies their permission to query the required data by generating a trapdoor, including:
[0120] In order to distinguish different data visitors, each user needs to generate a trapdoor to verify whether they have permission to query the required data. The user generates the trapdoor according to the following formula (3):
[0121]
[0122] Get T r = (Tr1, Tr2) is sent to the cloud server for verification.
[0123] Among them, T r = (Tr1, Tr2) represents the query trapdoor of the data owner; Tr1 and Tr2 represent the generating functions of the trapdoor; θ ranges from 1 to m′, where m′ represents the number of keywords to be searched.
[0124] S106. Users can generate trapdoors to verify whether they have permission to query the data they need.
[0125] In one feasible implementation, step S106 further includes setting m′ to 1 when the authorized user wants to perform a single keyword search.
[0126] S107. The cloud server verifies the access trap of the accessing user by uploading the keyword encrypted data, and completes the secure query and access control of digital twin data.
[0127] In one feasible implementation, in step S107, the cloud server verifies the access user's trapdoor using the uploaded keyword encrypted data, completing the secure query and access control of the digital twin data, including:
[0128] The cloud server verifies the access user's trapdoor by uploading encrypted keyword data. When the authorized user id(t) is sent to the cloud server trapdoor T... r When querying data, first check m′. If m′ > m, the user's query request is rejected; otherwise, the cloud server continues to check. and Check if they are equal. If the equation is true, return the file stored at address A_i; if the equation is false, do not return anything.
[0129] If m′=1, then
[0130] In one feasible implementation, the authorized user generates a trapdoor Tr using the keyword w and a key, and sends it to the cloud server. The cloud server performs a verification process and finally returns the query result: if the data does not exist, it returns ⊥; otherwise, it returns the encrypted data: C = {R}. m ,K 1m ,K 2m C m}, and record the user's unique identifier ID, generating an access record {ID,C}. m,ID H2(ID||C w ) storage, where C m,ID This is the unique identifier for the file, and || represents a join operation. Once data is leaked, investigators can trace the entity user through the access records.
[0131] In one feasible implementation, the cloud server will calculate the following steps: The authorized user executes the decryption algorithm and calculates:
[0132]
[0133]
[0134]
[0135] In this embodiment of the invention, a multi-keyword query scheme based on aggregated keys is proposed for secure data querying in a digital twin environment. This scheme can protect the security of multiple keywords in the data and control the access permissions of users, so that only authorized users can query the data stored in the cloud. It is well applicable to secure data querying in a digital twin environment.
[0136] To address the challenge of multi-user encrypted decryption access control in digital twin environments, a CP-ABE-based digital twin data security query and access control scheme is proposed. This scheme effectively solves both security and computational overhead issues, ensuring that even if one terminal device is controlled externally, the security of other terminal devices and authorized users remains unaffected. Furthermore, the authorization keys of authorized users cannot be cracked by malicious attackers, thus effectively protecting data security at every stage of acquisition, transmission, storage, and use. This scheme exhibits minimal computational overhead and demonstrates excellent operational efficiency.
[0137] Figure 4 This is a schematic diagram of a secure query and access control system for digital twin data according to the present invention. The system 200 is used for the secure query and access control of the aforementioned digital twin data. The system 200 includes:
[0138] Initialization module 210 is used to initialize system parameters;
[0139] The key generation module 220 is used to select a private key based on the system parameters, the data owner, and the access user; generate a public key based on the private key; retain the private key and publish the public key; and the key center uses the key to generate a keyword encryption key for the data owner and sends the keyword encryption key to the data owner through a transmission channel.
[0140] The access control structure generation module 230 is used to authorize access to the data to be encrypted, specify the authorized user public key of the data to be encrypted, and the data owner sends the specified authorized user public key to the key center.
[0141] Data encryption module 240 is used to obtain the storage address index A of the ciphertext to be encrypted, wherein the data owner has access to A. i The keyword is calculated to obtain the keyword ciphertext data, and the keyword ciphertext data is uploaded to the cloud server to build a data access control structure based on CP-ABE;
[0142] The authorization key generation module 250 is used by the key center to identify the user based on the data access control structure and the public key of the accessing user, and to calculate the corresponding authorization key for the user whose identity is consistent with the authorization key.
[0143] The trapdoor generation module 260 is used by users to verify whether they have permission to query the data they need by generating a trapdoor.
[0144] The query verification module 270 is used by the cloud server to verify the access traps of the accessing user through the uploaded keyword encrypted data, so as to complete the secure query and access control of digital twin data.
[0145] Preferably, the initialization module 210 is used for the system to select a safety parameter λ and a large prime number p(2). λ ≤p≤2 λ+1 Let G1 be a multiplicative cyclic group of order p. Let g ∈ G be a generator, and let e be a bilinear mapping: G1 × G1 → G2, where the order of the cyclic group G1 is p(2π / 2). λ ≤p≤2 λ+1 Define a collision-resistant hash function H: {0, 1} * ;
[0146] This system parameter set is disclosed: params = (p, G1, e, G2, g, H).
[0147] Preferably, the key generation module 220 is used by the data owner to generate a key for each file data F. i Select random number As the data owner's private key sk i And generate the data owner's public key. Keep the private key secret and expose the public key for PK. i ;
[0148] Each user selects a random number. As access user's private key sk id Generate access user public key Where id represents the identity identifier of the accessing user, the private key is kept secret, and the public key pk is public. id ;
[0149] Among them, F i Refers to the i-th file; 'a' represents an arbitrary random number, defined as a i Mathematical definition: If p is a prime number, then under addition and multiplication modulo p, Z p It is a domain. It is Z p The non-zero elements form a multiplication group; sk i , pk i These represent the private key and public key of the i-th file, respectively;
[0150] The key center selects three random numbers x, y, z. Calculate x1 = g x y1=g y z1 = g z Based on these two sequences: The key center publishes global parameters (x1, y1, z1, {x 1,i}, {y 1,i}), and use its own key to generate the data owner's keyword encryption key: k w,1 =x1, Send to the data owner (k) via the transmission channel w,1 ,k w,2 ).
[0151] Where x, y, z, ξ represent the private key of the key center; x1, y1, z1, {x 1,i}, {y 1,i} represents the public key of the key center; x1 = g x y1=g y z1 = g z This represents the formula for calculating the public key of the key center using the private key of the key center; k w,1 k w,2 Indicates the key encryption key; k w,1 =x1, This is the formula for calculating the keyword encryption key, where It is the public key of the key center raised to the power of x, where x is the random number indicated at the beginning of the segment.
[0152] Preferably, the access control structure generation module 230 is used for user file data F i Where i = 1, 2, ..., n; the total number of file data is n, and F is specified. i Authorized user public key: A′ i ={pk id(1) ,pk id(2) ,…,pk id(k)}; k indicates that k users are authorized to access F. i The data owner will {A′ i} is sent to the key center for processing, where {A′ i The} represents the data access control structure sent by the data owner.
[0153] Preferably, the data encryption module 240 is used by the data owner to obtain file data F from the cloud. i The storage address index of the ciphertext is A = {A1, A2, ..., A...} n}, for A i and keyword w i ={w i,1 ,…,w i,m Perform the calculations as follows using formulas (1) and (2):
[0154]
[0155]
[0156] Obtain the set of ciphertext keywords Upload the encrypted keyword set to a cloud server for storage and build a data access control structure based on CP-ABE;
[0157] Among them, w i, Indicates a keyword; w i,θ Let represent the θ-th keyword of the i-th file; m represents the number of keywords; C represents the ciphertext data. This indicates the key-based ciphertext structure.
[0158] Preferably, the authorization key generation module 250 is used to run the identity recognition algorithm: selecting a random number. Calculate separately: Waiting for the user's response; if the user can respond according to V... id(t) Calculated It is returned to the key center, which then verifies it. This indicates that the authorized user's identity is correct;
[0159] For users who are authorized, identify all data sets they can access. Calculate the authorization key for each authorized user
[0160] Among them, V id(t) and V i ′ d(t) Both are intermediate variables used to verify user identity; V id(t) It is calculated based on the public key of the id(t)th data visitor and a random number from the non-zero elements, and is used to wait for the user's response; V i ′ d(t) This indicates the user's response. This indicates the calculation of the generator g raised to the power of ζ; It's a calculation formula to calculate V. id(t) -b i The power of, where Let S represent the access set of the id(t)th authorized user; j∈S id(t) This indicates the file number that the authorized user is requesting access to.
[0161] Preferably, the trapdoor generation module 260 is used to allow the user to generate a trapdoor according to the following formula (3):
[0162]
[0163] Get T r = (Tr1, Tr2) are sent to the cloud server for verification;
[0164] Among them, T r = (Tr1, Tr2) represents the query trapdoor of the data owner; Tr1 and Tr2 represent the generating functions of the trapdoor; θ ranges from 1 to m′, where m′ represents the number of keywords to be searched.
[0165] Preferably, the trapdoor generation module 260 is used to set m′ to 1 when an authorized user wants to perform a single keyword search.
[0166] Preferably, the query verification module 270 is used by the cloud server to verify the trapdoor of the accessing user through the uploaded keyword encrypted data. When the authorized user id(t) is sent to the cloud server trapdoor T r When querying data, first check m′. If m′ > m, the user's query request is rejected; otherwise, the cloud server continues to check. and Check if they are equal. If the equation is true, return the memory address A. i The file; if the equation is not true, it will not be returned;
[0167]
[0168] If m′=1, then
[0169] In this embodiment of the invention, a multi-keyword query scheme based on aggregated keys is proposed for secure data querying in a digital twin environment. This scheme can protect the security of multiple keywords in the data and control the access permissions of users, so that only authorized users can query the data stored in the cloud. It is well applicable to secure data querying in a digital twin environment.
[0170] To address the challenge of multi-user encrypted decryption access control in digital twin environments, a CP-ABE-based digital twin data security query and access control scheme is proposed. This scheme effectively solves both security and computational overhead issues, ensuring that even if one terminal device is controlled externally, the security of other terminal devices and authorized users remains unaffected. Furthermore, the authorization keys of authorized users cannot be cracked by malicious attackers, thus effectively protecting data security at every stage of acquisition, transmission, storage, and use. This scheme exhibits minimal computational overhead and demonstrates excellent operational efficiency.
[0171] Figure 5 This is a schematic diagram of the structure of an electronic device 300 provided in an embodiment of the present invention. The electronic device 300 can vary considerably due to differences in configuration or performance. It may include one or more central processing units (CPUs) 301 and one or more memories 302. The memories 302 store at least one instruction, which is loaded and executed by the processors 301 to implement the steps of the following secure query and access control method for digital twin data:
[0172] S1. Initialize system parameters;
[0173] S2. Based on system parameters, the data owner and access user select a private key and generate a public key based on the private key; the private key is kept secret while the public key is made public; the key center uses the key to generate a keyword encryption key for the data owner and sends the keyword encryption key to the data owner through the transmission channel;
[0174] S3. Authorize access to the data to be encrypted by specifying the authorized user's public key for the data to be encrypted. The data owner will send the specified authorized user's public key to the key center.
[0175] S4. Obtain the storage address index A of the ciphertext to be encrypted. The data owner has access to A. iCalculate with keywords to obtain keyword ciphertext data, upload the keyword ciphertext data to the cloud server, and build a data access control structure based on CP-ABE;
[0176] S5. The key center performs identity verification based on the data access control structure and the public key of the accessing user, and calculates the corresponding authorization key for the authorized user whose identity is consistent with the authorized user.
[0177] S6. Users can generate trapdoors to verify whether they have permission to query the data they need.
[0178] S7, the cloud server verifies the access traps of users by uploading encrypted keyword data, and completes the secure query and access control of digital twin data.
[0179] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including instructions that can be executed by a processor in a terminal to complete the aforementioned secure query access control method for digital twin data. For example, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, or optical data storage device.
[0180] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
Claims
1. A method for secure query and access control of digital twin data, characterized in that, The method steps include: S1. Initialize system parameters; S2. Based on the system parameters, the data owner and the access user select a private key and generate a public key based on the private key; the private key is kept secret while the public key is made public; the key center uses the key to generate a keyword encryption key for the data owner and sends the keyword encryption key to the data owner through a transmission channel; S3. Authorize access to the data to be encrypted by specifying the authorized user's public key for the data to be encrypted. The data owner will send the specified authorized user's public key to the key center. S4. Obtain the storage address index A of the ciphertext to be encrypted. The data owner has access to A. i The keyword is calculated to obtain the keyword ciphertext data, which is then uploaded to the cloud server to construct a data access control structure based on CP-ABE; Ai represents the storage address index corresponding to the i-th ciphertext data to be encrypted. S5. The key center performs identity verification based on the CP-ABE-based data access control structure and the public key of the accessing user, and calculates the corresponding authorization key for the authorized user. S6. Users can generate trapdoors to verify whether they have permission to query the data they need. Users generate trapdoors according to the following formula (3): = , = (3) get =( Send it to the cloud server for verification; in, =( This indicates a query trap for the data owner; The generating function of the trapdoor; θ ranges from 1 to... ,in This indicates the number of keywords to be searched; This indicates that the user selected a random number. Indicates authorized user; This represents the authorization key for each authorized user; This represents the θ-th key corresponding to the i-th data. The hash value obtained by performing a hash operation; When an authorized user wants to perform a single-keyword search, then Set to 1; S7, the cloud server verifies the access traps of users by uploading keyword encrypted data, and completes the secure query and access control of digital twin data; The cloud server verifies the access user's trapdoor by uploading encrypted keyword data. When the authorized user id(t) is sent to the cloud server trapdoor... When querying data, first... Make a judgment, if > m The cloud server will refuse access to the user's query request; otherwise, it will continue to make a judgment. With e Check if they are equal. If the equation is true, return the memory address A. i The file; if the equation is not true, it will not be returned; in, This indicates a pre-defined public verification element or a verification parameter generated based on a data index. This represents the first ciphertext component corresponding to the keyword w of the i-th data; like ,but =1.
2. The method according to claim 1, characterized in that, In step S1, the initialization of system parameters includes: The system selects a safety parameter λ and a large prime number p. ≤p≤ ), and define a multiplicative cyclic group of order p. Choose a generator g∈G, where G denotes a multiplicative cyclic group of order p; define a bilinear mapping e: , and cyclic group The order is p ( ≤p≤ Define a collision-resistant hash function H: {0, 1}*; This system parameter set is disclosed: params = (p, G1, e, G2, g, H).
3. The method according to claim 2, characterized in that, In step S2, the data owner and the accessing user select a private key based on the system parameters, and generate a public key based on the private key. Keep the private key public; The key center uses the key to generate a keyword encryption key for the data owner, and sends the keyword encryption key to the data owner via a transmission channel, including: The data owner is responsible for the data F in each file. i Select random number ∈ As the data owner's private key And generate the data owner's public key. = = Keep the private key private and expose the public key. ; in, Refers to the first One file; 'a' represents randomly selecting a number, defined as... Mathematical definition: If p is a prime number, then under addition and multiplication modulo p, ... It is a domain. yes The non-zero elements form a multiplication group; These represent the private key and public key of the i-th file, respectively; Each user selects a random number. ∈ As access user's private key Generate access user public key = = Where id represents the identity of the accessing user, the private key is kept secret, and the public key is made public. ; The key center selects three random numbers x, y, z, ξ∈ ,calculate = , = , = And based on these two sequences: { = ,( i =1,2,…,n)},{ = ,( i =1,2,…,2n)};The key center publishes global parameters ( , , , { }, { } ), and use the key center's key to generate the data owner's key encryption key: = , = Send to the data owner via the transmission channel ( , ); Where x, y, z, ξ represent the private key of the key center; , , , { }, { } represents the public key of the key center; = , = , = This represents the formula for calculating the public key of the key center using the private key of the key center; Indicates the keyword encryption key; = , = This is the formula for calculating the keyword encryption key, where It is the public key of the key center. The power of x is the random number indicated at the beginning of the paragraph.
4. The method according to claim 3, characterized in that, In step S3, access authorization is granted to the data to be encrypted by specifying the authorized user's public key for the data to be encrypted. The data owner sends the specified authorized user's public key to the key center, including: For user file data F i Where i = 1, 2, ..., n; the total number of file data is n, and F is specified. i Authorized user public key: ={pk id(1) , pk id(2) ,…, pk id(k) }; k indicates that k users are authorized to access F. i The data owner will { } is sent to the key center for processing, where, { The} represents the data access control structure sent by the data owner.
5. The method according to claim 4, characterized in that, In step S4, the storage address index A of the ciphertext to be encrypted is obtained, and the data owner has access to A. i Calculate the keyword and obtain the keyword ciphertext data, upload the keyword ciphertext data to the cloud server, and construct a data access control structure based on CP-ABE, including: Data owners obtain file data from the cloud. i The storage address index of the ciphertext is A = {A1, A2, ..., A...} n }, for A i and keywords ={ ,…, Perform the calculations as follows using formulas (1) and (2): = , = (1) = ,…, = (2) Get the key ciphertext set {…,{ },…}, upload the encrypted keyword set to the cloud server for storage, and construct a data access control structure based on CP-ABE; in, Represents the i-th file. 1 key; m represents the number of keys; C represents the ciphertext data, {…,{ },…} represents a key-ciphertext structure.
6. The method according to claim 5, characterized in that, In step S5, the key center performs identity verification based on the data access control structure and the public key of the accessing user, and calculates the corresponding authorization key for users who match the authorized user's identity, including: Run the identity recognition algorithm: Select a random number ζ∈ Calculate separately: = Waiting for the user's response. If the user can respond according to... Calculated = It is returned to the key center, which then verifies it. = This indicates that the authorized user's identity is correct; For users who are authorized, identify all data sets they can access. Calculate the authorization key for each authorized user in {1,2,…,n}. = ; in, These are all intermediate variables used to verify user identity. It is calculated based on the public key of the id(t)th data visitor and a random number in the non-zero element, and is used to wait for the user's response. This indicates the user's response. This indicates the calculation of the generator g raised to the power of ζ; It is a calculation formula. of- The power, where - ; {1,2,…,n} represents the access set of the id(t)th authorized user; j∈ This indicates the file number that the authorized user is requesting access to.
7. A secure query and access control system for digital twin data, characterized in that, The system is used for the secure query and access control method for digital twin data as described in any one of claims 1 to 6, the system comprising: The initialization module is used to initialize system parameters; The key generation module is used to select a private key based on the system parameters, the data owner, and the access user; generate a public key based on the private key; retain the private key and publish the public key; and the key center uses the key to generate a keyword encryption key for the data owner and sends the keyword encryption key to the data owner through a transmission channel. The access control structure generation module is used to authorize access to the data to be encrypted, specify the authorized user public key of the data to be encrypted, and the data owner sends the specified authorized user public key to the key center. The data encryption module is used to obtain the storage address index A of the ciphertext to be encrypted, and the data owner has access to A. i The keyword is calculated to obtain the keyword ciphertext data, and the keyword ciphertext data is uploaded to the cloud server to build a data access control structure based on CP-ABE; The authorization key generation module is used by the key center to identify users based on the data access control structure and the public key of the accessing user, and to calculate the corresponding authorization key for users who are authorized. The trapdoor generation module is used by users to generate trapdoors to verify whether they have permission to query the data they need. The query verification module is used by the cloud server to verify the access traps of users by uploading encrypted keyword data, thereby completing the secure query and access control of digital twin data.
Citation Information
Patent Citations
Efficient searchable access control method based on hidden strategy CP-ABE
CN110224986A
