A dynamic access control method and device based on time-space range attribute constraints
By introducing space-time range attribute constraints in the access control method and using forward or backward derivation functions for attribute matching, the problem of traditional access control methods ignoring spatiotemporal variable factors is solved, and the multi-attribute and fine-grained effect of dynamic data access control is achieved.
Patent Information
- Application Number
- CN202411958545.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-12-30
AI Technical Summary
Traditional access control methods ignore variable factors such as time intervals and spatial location ranges, resulting in the inability to effectively realize dynamic access control of data.
A dynamic access control method based on space-time range attribute constraints is adopted. Through the transformation and processing of spatial attributes, the forward derivation function or backward derivation function is used to match the range and position attribute levels, and the session key and ciphertext header are generated to realize the dynamic access permission control of the user.
It realizes multi-attribute, fine-grained dynamic data access control, and can dynamically adjust access permissions based on the user's time and space attributes, improving the flexibility and effectiveness of data security.
Smart Images

Figure CN119383019B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data security technology, and in particular to a dynamic access control method and device based on time-space range attribute constraints. Background Art
[0002] With the rapid development of cutting-edge fields such as spatiotemporal data science and the rapid rise of emerging industries such as the metaverse, the demand for data security and privacy protection is growing. Protecting user privacy and data security is an important prerequisite for the healthy development of industries such as the metaverse. Therefore, ensuring the security of large-scale data processing and sharing, especially the security of spatiotemporal big data, is a key issue that needs to be solved urgently. Traditional access control methods usually rely on logical rules to prevent unauthorized information access, while ignoring variable factors such as time intervals and spatial location ranges. Access control based on spatiotemporal range constraints adopts a dynamic control method to determine whether a user has access rights to a specific data resource based on the range of the user's authorized time and space attributes. This method not only considers the user's static attributes and matching access rights, but also verifies the time and space attribute ranges authorized by the user. Only within a specific time and space dynamic range can a user obtain access rights to a data resource, thereby achieving a more flexible data security control strategy.
[0003] In the related technology, the traditional access control method ignores the technical problems of variable factors such as time interval and spatial location range, and has not yet obtained an effective solution. Summary of the invention
[0004] The main purpose of the present application is to provide a dynamic access control method and device based on time-space range attribute constraints, so as to at least solve the problem that the traditional access control method in the related art ignores variable factors such as time interval and spatial location range.
[0005] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a dynamic access control method based on spatiotemporal range attribute constraints is provided. The method includes: transforming spatial attributes and processing spatial data, including: inserting new nodes and deleting data; the data owner uses security parameters and attribute levels as input to generate public keys and master keys; uses forward derivation functions or backward derivation functions to match range and location attribute levels, and the data owner uses the master key to generate private keys for users with access privileges; the data owner formulates access policies according to actual needs, uses public keys and access policies as inputs, and generates session keys and ciphertext headers; the user uses his own private key and access policy as input to generate a delegation key for the proxy server; the proxy server uses the delegation key and ciphertext header as input to output a new ciphertext header for the user, and the user uses the secret sharing of the main secret to reconstruct the attribute key, calculate the session key, and decrypt the data based on the session key.
[0006] Optionally, inserting a new node includes: traversing the KD tree according to the process of creating the KD tree, and comparing the new node with the separation value, including: if the new node is less than or equal to the separation value, comparing downward along the left subtree until a leaf node for placing the new node is found; if the new node is greater than the separation value, comparing along the right subtree until a leaf node for placing the new node is found; after finding the leaf node for placing the new node, checking whether the number of data points in the leaf node is within Including: If the number of data points in the leaf node after inserting the new node is within Insert the new node into the leaf node; if the number of data points after inserting the new node is greater than , for this area points for splitting, take the axis with larger variance and divide it based on its median value, after the splitting is completed, the level of the tree of the leaf node is increased by one; after the leaf node is inserted and split, check whether the depth of all leaf nodes meets the maximum difference standard and the horizontal difference standard, if balancing is required, identify and confirm the merged subtree, including: from top to bottom, adopt a breadth-first search strategy, starting from the root node, if merging and splitting are performed at the root node, whether the level of the tree meets the maximum difference standard and the horizontal difference standard at the same time, including: if it meets, move to its child node, check the left subtree first and then the right subtree, until a node is reached; if the standard is not met, its parent node will be used as the node for performing subtree merging and splitting; from bottom to top, start from the leaf node at the bottom of the tree, search upward for the first node that can be merged and split, and obtain an index tree whose depth of all leaf nodes meets the maximum difference standard and the horizontal difference standard; deleting data includes: traversing the KD tree, finding the leaf node where the discarded data is located, when the leaf node contains discarded data, perform a deletion operation, and then check the number of data points of the leaf node according to the range boundary, if the number of data points of the leaf node is less than , leaf nodes and sibling nodes are merged into their parent nodes, including: if the number of parent node data points is If the number of data points of the parent node is greater than , then re-split into new left and right subtrees, where is the minimum number of data points that can be accommodated in a leaf node, The maximum number of data points that can be accommodated in a leaf node.
[0007] Optionally, each leaf node is associated with two hierarchical codes through positive and negative depth-first coding, wherein the two hierarchical codes are positive depth-first coding and negative depth-first coding; an integer pair consisting of the positive depth-first coding and the negative depth-first coding of the node is assigned to each node, wherein the nodes include leaf nodes and non-leaf nodes; if it is pattern-independent data, including: when there are no restrictions on the type and insertion position of the data points newly inserted into the subtree, the coding space is reserved for all possible insertion positions on average; when there are any restrictions on the type and insertion position of the data points newly inserted into the subtree, the reserved coding space for each branch is allocated according to the number of data points inserted at each position.
[0008] Optionally, given a bilinear mapping system ,set up A randomly selected large prime number that is kept secret. is the public system modulus, parameter ,parameter For confidentiality, It is a composite cyclic group, and there is a bilinear map , randomly select generators and ,in, and yes two subgroups of , Then select four random numbers , and use a hash function , mapped to the root node, randomly selecting two indices set up and , get the public key and the master key .
[0009] Optionally, after the location server obtains the user's location, the user performs path matching according to the spatial index tree constructed in the initialization phase, starting from the root node, matching the area until the location that does not contain the area, thereby obtaining the node position of the user's location in the index tree and obtaining the corresponding positive and negative depth-first encoding.
[0010] Optionally, compare the user attributes with the rule attributes, the user's time attributes and There is an intersection and the user's position hierarchical encoding Both greater than When , compute the attribute key, , , , and then calculate the user's private key ,in, is the attribute hash, is the first key parameter, is the second key parameter, is the third key parameter and is generated by the random generator Power It is calculated that is the fourth key parameter, forward mapped by position It is calculated that is the fifth key parameter, forward mapped by position It is calculated that For time attributes The forward mapping of For time attributes The backward mapping of is the forward mapping of the positive depth-first encoding, is the forward map of negative depth-first encoding, The attribute hash identifier.
[0011] Optionally, given an access policy tree, calculate the ciphertext header using the formula: ,in, To access the strategy tree, middle Calculated from the random number generated during the initialization phase, is the encryption component group, , , , They are different encryption components. , is the rule attribute, For access policy, is the main secret to access the strategy tree.
[0012] Optionally, when checking the rule attribute to be a generalized attribute of the user attribute through the delegation encryption algorithm, if so, the delegation key is calculated.
[0013] Optionally, check whether the user attributes match the rule attributes. If they match, calculate the secret sharing value of the primary secret. After receiving the new ciphertext header, the user uses the random number to calculate the attribute key and the session key.
[0014] According to another aspect of the present application, a dynamic access control device based on spatiotemporal range attribute constraints is provided. The device includes: a conversion unit for converting spatial attributes and processing spatial data, including: inserting new nodes and deleting data; a first generation unit for the data owner to generate a public key and a master key using security parameters and attribute levels as input; a second generation unit for matching the range and location attribute levels using a forward derivation function or a backward derivation function, and the data owner uses the master key to generate a private key for a user with access privileges; a third generation unit for the data owner to formulate an access policy according to actual needs, using the public key and access policy as input, and generating a session key and a ciphertext header; a fourth generation unit for the user to use his own private key and access policy as input to generate a delegation key for the proxy server; a decryption unit for the proxy server to use the delegation key and the ciphertext header as input, and output a new ciphertext header for the user, and the user uses the secret sharing of the main secret to reconstruct the attribute key, calculate the session key, and decrypt the data based on the session key.
[0015] Through this application, the following steps are adopted: transforming spatial attributes and processing spatial data, including: inserting new nodes and deleting data; the data owner uses security parameters and attribute levels as input to generate public keys and master keys; using forward deduction functions or backward deduction functions to match range and position attribute levels, the data owner uses the master key to generate private keys for users with access privileges; the data owner formulates access policies based on actual needs, uses public keys and access policies as input, and generates session keys and ciphertext headers; the user uses his own private key and access policy as input to generate a delegation key for the proxy server; the proxy server uses the delegation key and ciphertext header as input to output a new ciphertext header for the user, the user uses the secret sharing of the main secret to reconstruct the attribute key, calculate the session key, and decrypt the data based on the session key, which solves the problem that traditional access control methods in related technologies ignore variable factors such as time intervals and spatial location ranges, thereby achieving the effect of realizing multi-attribute, fine-grained dynamic data access control. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 It is a flow chart of a dynamic access control method based on time-space range attribute constraints provided according to an embodiment of the present application;
[0018] Figure 2 It is a timing diagram of a dynamic access control method based on time-space range attribute constraints;
[0019] Figure 3 It is a schematic diagram of the original area division;
[0020] Figure 4 It is a two-bit partition diagram;
[0021] Figure 5 It is a recoding schematic diagram;
[0022] Figure 6 It is a schematic diagram of the forward / backward derivation function;
[0023] Figure 7 It is a structural block diagram of a dynamic access control device based on time-space range attribute constraints provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0024] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] As introduced in the background technology, traditional access control methods in the prior art usually rely on logical rules to prevent unauthorized access to information. In order to solve the problem that traditional access control methods ignore variable factors such as time intervals and spatial location ranges, the embodiments of the present application provide a dynamic access control method and device based on time and space range attribute constraints.
[0028] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0029] In this embodiment, a dynamic access control method based on time and space range attribute constraints running on a mobile terminal, a computer terminal or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0030] Figure 1 FIG. 1 is a flow chart of a dynamic access control method based on time-space range attribute constraints according to an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:
[0031] Step S101, transforming spatial attributes and processing spatial data, including: inserting new nodes and deleting data;
[0032] Specifically, the spatial partitioning and fast range search characteristics of KD trees are often used to construct spatial data indexes. However, because the traditional KD tree index structure is relatively fixed, when a spatial index is constructed based on a traditional KD tree, that is, after a KD index tree is constructed based on a specified regional data set, if a new node is added or modified in the data set, the KD tree needs to be rebuilt. To this end, we propose a dynamic indexing scheme that implements spatial region hierarchicalization based on the KD tree structure and supports the insertion and deletion of location nodes. This scheme introduces three new parameters: : The minimum number of data points that can be accommodated in a leaf node; : The maximum number of data points that can be accommodated in a leaf node; : The imbalance level threshold that requires regenerating the KD tree.
[0033] Step S102, the data owner generates a public key and a master key using the security parameters and attribute hierarchy as input;
[0034] Step S103, using a forward derivation function or a backward derivation function to match the range and location attribute hierarchy, the data owner uses the master key to generate a private key for the user with access privileges;
[0035] Specifically, for location attributes, the data owner can encode the spatial index tree constructed in the initialization phase according to the positive and negative depth-first coding algorithm; after completing the spatial index coding, the user's location is matched with the nodes in the positive and negative depth-first coding tree to obtain the code corresponding to the location. The user's location can be a fixed point, an activity trajectory, or an activity range.
[0036] Step S104, the data owner formulates an access policy according to actual needs, takes the public key and the access policy as input, and generates a session key and a ciphertext header;
[0037] Specifically, the data owner formulates an access strategy according to actual needs, that is, sets corresponding time and space range constraints. The time range can be divided according to specific time periods, and the space range can be accurately defined according to the space coding tree created in step S103.
[0038] Step 105, the user uses his / her private key and access policy as input to generate a delegation key for the proxy server;
[0039] Specifically, the data owner takes the public key and access policy as input to generate a session key and a ciphertext header. The session key is a symmetric key used to encrypt and decrypt data. The ciphertext header is a parameter calculated by the data owner's public key and the access policy for specific data. It is used to calculate a new ciphertext header for the user with the delegation key and then calculate the user's attribute key.
[0040] Step 106, the proxy server uses the delegation key and the ciphertext header as input, outputs a new ciphertext header for the user, and the user reconstructs the attribute key using the secret sharing of the primary secret, calculates the session key, and decrypts the data based on the session key;
[0041] Specifically, the proxy server takes the delegation key and the ciphertext header as input and checks whether each attribute matches; the delegation key is a parameter calculated from the user's private key and the user's attributes, and is used to calculate the new ciphertext header with the ciphertext header. The proxy server uses the secret sharing of the access tree in the bilinear mapping system to To be specific, this scheme converts the user's attribute set into a tree structure of an access tree and encrypts the user's attributes as leaf nodes; secret sharing is a cryptographic tool that divides a secret into multiple parts, and only a certain number or specific parties can recover the secret. In this scheme, it is used to allow users who meet certain attribute requirements to recover the attribute key; the secret is a parameter used to allow the user to calculate the attribute key in the next decryption stage; after receiving the new ciphertext header, the data user uses the secret to calculate the attribute key, and the attribute key is a parameter used to calculate the session key.
[0042] The present invention involves six entities: cloud service provider, data owner, user, proxy server, time server and location server; the access control device includes five modules: spatial attribute preprocessing, initialization, attribute matching, encryption and decryption. The present invention is based on the access control technology based on attribute encryption, uses positive and negative depth-first coding and forward / backward derivation functions to achieve dynamic range matching of time and space attributes, adopts dynamic indexing technology based on KD tree structure, realizes multi-attribute and fine-grained data access control based on time and space dynamic range constraints, and realizes the effective integration of hierarchical key management, hierarchical space coding and data access control technology based on time and space dynamic range.
[0043] Through this embodiment, positive and negative depth-first coding and forward / backward deduction functions are used to achieve spatiotemporal attribute matching, which can more quickly and accurately match the spatial location information of users and data owners; an improved dynamic indexing scheme based on the KD tree structure and an update scheme based on positive and negative depth-first coding are proposed. When new nodes are inserted, there is no need to frequently reconstruct the index structure, and the insertion and deletion of location nodes can be dynamically handled.
[0044] In an optional embodiment, inserting a new node includes: traversing the KD tree according to the process of creating the KD tree, and comparing the new node with the separation value, including: if the new node is less than or equal to the separation value, comparing downward along the left subtree until a leaf node is found to place the new node; if the new node is greater than the separation value, comparing along the right subtree until a leaf node is found to place the new node; after finding the leaf node to place the new node, checking whether the number of data points in the leaf node is within Including: If the number of data points in the leaf node after inserting the new node is within Insert the new node into the leaf node; if the number of data points after inserting the new node is greater than , for this area Points are split, and the axis with larger variance is taken and divided based on its median value. After the split is completed, the level of the tree of the leaf node increases by one;
[0045] In an optional embodiment, after the leaf node is inserted and split, check whether the depth of all leaf nodes meets the maximum difference standard and the horizontal difference standard. If balancing is required, identify and confirm the merged subtree, including: proceeding from top to bottom, using a breadth-first search strategy, starting from the root node, if merging and splitting are performed at the root node, whether the level of the tree meets the maximum difference standard and the horizontal difference standard at the same time, including: if satisfied, move to its child node, first check the left subtree and then check the right subtree, until a node is reached; if the standard is not met, its parent node will be used as the node for performing subtree merging and splitting; proceeding from bottom to top, starting from the leaf node at the bottom of the tree, upwardly search for the first node that can be merged and split, and obtain an index tree whose depth of all leaf nodes meets the maximum difference standard and the horizontal difference standard;
[0046] Specifically, a maximum difference criterion is defined to detect the depth of leaf nodes and the expected depth. Does the difference between exceed the depth threshold? . A level difference standard is also defined to detect the level difference between the highest layer and the lowest layer. Whether it exceeds a level threshold After the leaf nodes are inserted and split, the tree balance is checked, that is, the depth of all leaf nodes is checked to see if they meet the maximum difference standard and the horizontal difference standard. If balance is required, the following process is used to identify which subtree to merge.
[0047] In an optional embodiment, deleting data includes: traversing the KD tree, finding the leaf node where the obsolete data is located, performing a deletion operation when the leaf node contains obsolete data, and then checking the number of data points of the leaf node according to the range boundary, and if the number of data points of the leaf node is less than , leaf nodes and sibling nodes are merged into their parent nodes, including: if the number of parent node data points is If the number of data points of the parent node is greater than , then re-split into new left and right subtrees, where is the minimum number of data points that can be accommodated in a leaf node, The maximum number of data points that can be accommodated in a leaf node.
[0048] In an optional embodiment, each leaf node is associated with two hierarchical codes through positive and negative depth-first coding, wherein the two hierarchical codes are positive depth-first coding and negative depth-first coding; an integer pair consisting of the positive depth-first coding and the negative depth-first coding of the node is assigned to each node, wherein the nodes include leaf nodes and non-leaf nodes; if it is pattern-independent data, including: when there are no restrictions on the type and insertion position of the data points newly inserted into the subtree, the coding space is reserved for all possible insertion positions on average; when there are any restrictions on the type and insertion position of the data points newly inserted into the subtree, the coding space reserved for each branch is allocated according to the number of data points inserted at each position.
[0049] Specifically, after the spatial index is built, the positive and negative depth first (hereinafter referred to as PNDF) encoding algorithm is used to encode the spatial index tree. Through PNDF encoding, each leaf node is associated with two hierarchical codes, and the positive depth first encoding Coding and negative depth-first encoding The specific construction method of PNDF is as follows:
[0050] To encode each node, we first need to define two stacks: and . Representation elements Push to stack, Indicates that the element is popped from the stack. Indicates getting the element at the top of the stack. It can be used to determine whether the stack is empty. The algorithm first places the root node Press-in and In both stacks. In , since the right subtree of each node will be pushed into the stack first, the forward code of the right subtree is greater than the forward code of the left subtree. In the example, the left subtree of each node is pushed into the stack first, and the negative code of its left subtree is greater than the negative code of its right subtree.
[0051] To improve the proposed positive and negative depth coding trees, the scheme will assign each node an integer pair consisting of the positive depth-first code and the negative depth-first code of the node.
[0052] For the merged coding tree, this scheme uses the nodes in the tree The order is the pre-order traversal order of the node in the tree, and the size is the number of nodes in the subtree with the node as the root. The size in the pair is set larger than the actual size to reserve encoding space.
[0053] If the data is pattern-independent (meaning that the data distribution is irregular, and there is no situation where one area is dense and another area is sparse), there are no restrictions on the type and location of the newly inserted subtree. In this case, the "average reservation" strategy is adopted: the coding space is evenly reserved for all possible insertion locations. If there are restrictions on the location where the data point is inserted, the reserved coding space for each branch is allocated according to the number of data points inserted at each location.
[0054] In the above content, the present invention preliminarily processes the location attribute, converts the complex spatial matching calculation into a simple comparison problem on the integer range, and realizes efficient location attribute matching. The traditional ABE system describes the ciphertext by attributes and embeds the policy into the user's key. CP-ABE uses attributes to characterize the user's qualifications, and the ciphertext access policy is formulated by the data encryption party to determine who can decrypt the ciphertext. In CP-ABE, the user's private key is related to a series of attributes, and only when the user's attributes meet the access structure of the ciphertext can the ciphertext be decrypted. Next, the present invention gives a specific implementation of the CP-ABE scheme based on spatiotemporal range constraints. The present invention divides the time element according to the interval, converts the spatial attribute according to the above scheme, adopts the attribute comparison encryption method, and uses the forward / backward derivation function to convert the spatiotemporal range constraint problem into a cryptographic problem for derivation, so as to realize fine-grained, efficient and secure access control.
[0055] In an alternative embodiment, given a bilinear mapping system ,set up A randomly selected large prime number that is kept secret. is the public system modulus, parameter ,parameter For confidentiality, It is a composite cyclic group, and there is a bilinear map , randomly select generators and ,in, and yes two subgroups of , Then select four random numbers , and use a hash function , mapped to the root node , randomly select two indices set up and , get the public key and the master key .
[0056] Specifically, the present invention initially processes the attributes. In the initialization phase, the data owner uses security parameters and attribute hierarchy As input, generate the system public key and the master key .
[0057] Additionally, the cryptographic construction for integer comparison is based on forward / backward derivation functions. This construction is based on the RSA-type composite order Special multiplication group of Above, among which , are two large prime numbers. First, Select two different randomly generated numbers from the group , ,in Then, in Choose two different random numbers from and ,in , The order is Medium is big enough.
[0058] Based on the RSA cryptographic system, two functions are defined:
[0059] From the set of integers Map to and , defined as:
[0060] ;
[0061] ;
[0062] in, express Rather than . Note that if If unknown, then the value = and = Integer only Calculate. Next, according to Definition of forward derivation function FDF: , backward derivation function BDF: , it is easy to prove and . But under the RSA assumption, when Cannot be based on Confidential and efficient computation of and When, from get It is very difficult.
[0063] In an optional embodiment, after the location server obtains the user's location, the user performs path matching based on the spatial index tree constructed in the initialization phase, starting from the root node, matching areas until the location that does not contain the area, thereby obtaining the node position of the user's location in the index tree and obtaining the corresponding positive and negative depth-first encoding.
[0064] Specifically, in the attribute matching stage, the present invention uses forward / backward derivation functions to achieve the matching of time range and location attribute levels. For time attributes, time has a single dimension and can be matched in real time according to time periods. In , the first two items represent the time range. For the location attribute, the data owner can encode the spatial index tree constructed in the initialization phase according to the positive and negative depth-first coding algorithm. After completing the spatial index coding, the user's location is matched to the node in the positive and negative depth-first coding tree. The user's location can be a fixed point, an activity trajectory, or an activity range.
[0065] In an optional embodiment, the user attributes are compared with the rule attributes, and the user's time attribute and There is an intersection and the user's position hierarchical encoding Both greater than When , compute the attribute key, , , , and then calculate the user's private key ,in, is the attribute hash, is the first key parameter, is the second key parameter, is the third key parameter and is generated by the random generator Power It is calculated that is the fourth key parameter, forward mapped by position It is calculated that is the fifth key parameter, forward mapped by position It is calculated that For time attributes The forward mapping of For time attributes The backward mapping of is the forward mapping of the positive depth-first encoding, is the forward map of negative depth-first encoding, The attribute hash identifier.
[0066] In an optional embodiment, given an access policy tree, the ciphertext header is calculated using the following formula: ,in, To access the strategy tree, middle Calculated from the random number generated during the initialization phase, is the encryption component group, , , , They are different encryption components. , is the rule attribute, For access policy, is the main secret to access the strategy tree.
[0067] Specifically, Each component of ; ,in, is an abbreviation for parameter calculation, , the session key is set to ,in Is the access tree The main secret of is the value of a property in the tree Secret sharing of the data owner is the tree Each node in save Secret Sharing .
[0068] In an optional embodiment, when checking the rule attribute to be a generalized attribute of the user attribute through the delegation encryption algorithm, if so, the delegation key is calculated.
[0069] Specifically, in the stage of entrusted encryption, the user uses his own private key and an access policy As input, if there is , a delegation key is generated for the proxy server The specific operation is as follows: Given a specified access right (necessary privileges) and private key , this algorithm checks Is it If so, calculate:
[0070] =
[0071] = = ,
[0072] ,
[0073] ,
[0074] ,
[0075] .
[0076] Among them, the time forward derivation function Time backward derivation function ,Position forward derivation function ,Position forward derivation function .
[0077] Next, choose a random number And calculate:
[0078] ,
[0079] ,
[0080] ,
[0081] ,
[0082] .
[0083] in for Add random number The derived version after calculation, , , , Similarly, used to form the delegation key, attribute hash identifier Finally, the delegation key is set to .
[0084] In an optional embodiment, it is checked whether the user attributes match the rule attributes. If they match, the secret sharing value of the primary secret is calculated; after receiving the new ciphertext header, the user uses a random number to calculate the attribute key and the session key.
[0085] Specifically, the proxy server uses the delegation key and the ciphertext header As input, check whether each attribute and Match (belong to is the attribute of the data user, which belongs to The attributes are those required by the data owner. Access to this data requires There is an intersection and the user's position hierarchical encoding are greater than the required access to the data ( ). If it is true, the main secret The secret shared value The pair can be calculated by the following first decryption algorithm:
[0086] .
[0087] in, represents a bilinear pairing, Represents the decryption step. Among them, .because ,and , , , ,therefore, Then, using the Lagrange interpolation algorithm, the value Can be Finally, the new ciphertext header is returned. .
[0088] Finally, the data user receives the new ciphertext header Then, use the random number Calculate the attribute key by the second decryption algorithm Next, calculate the session key .
[0089] in accordance with Figure 2 The present invention is described, and the present invention relates to six entities, such as Figure 2 As shown, they are: cloud service provider, data owner, user, proxy server, time server and location server.
[0090] (1) Cloud service providers: Cloud service providers mainly provide data storage services and data access services to users.
[0091] (2) Data owner: Before uploading data to the cloud server, the data owner can pre-define the access policy.
[0092] (3) User: In this system, each user is assigned a unique global identifier and keys are issued based on their attributes.
[0093] (4) Proxy server: Receives the delegation key generated by the user's private key and access policy, combines it with the ciphertext header, and uses secret sharing to reconstruct the secret.
[0094] (5) Time server: To implement time-based access control, a reliable time server is required to manage the system clock.
[0095] (6) Location Server: The location server is located in a specific area and is used to confirm the user's location with the help of sensors.
[0096] First, during the system initialization phase, the data owner enters security parameters and properties , which is used to generate the public key and the master key Next, the data owner is assigned a specific access privilege. User-generated private key . This provides the user with access to system data.
[0097] The data owner then uses the public key and access policies To execute the encryption algorithm and generate the session key and the ciphertext header . This process ensures that the data is secure during transmission.
[0098] In cases where delegated access is required, the user can enter a private key and the new access policy .if yes A subset of ), then the proxy server can generate a proxy private key for the user This step allows users to authorize the proxy server to access data on their behalf.
[0099] Next, the proxy server uses the delegation key and the ciphertext header To execute the first decryption algorithm. Satisfy access policy , the proxy server will output the ciphertext header , thereby allowing the user to further access the data.
[0100] Ultimately, data users can use their private keys And the new ciphertext header , execute the second decryption algorithm 2 to obtain the session key, so that the data can be decrypted. This whole process ensures the security and access control of the data, allowing the data owner to effectively manage the access rights of the data and delegate access when necessary. This system architecture provides a strong data security and privacy protection mechanism. The specific implementation is as follows:
[0101] The location attributes are processed to transform the complex spatial matching calculation into a simple integer range comparison problem. Secondly, the time element is divided into intervals, and the spatial attributes are transformed according to the above scheme. The attribute comparison encryption method is adopted, and the forward / backward derivation function is used to transform the space-time range constraint problem into a cryptographic problem for derivation.
[0102] Step 1: Initialization phase: the data owner uses security parameters and attribute hierarchy As input, generate the system public key and the master key .
[0103] Step 2, attribute matching phase, using attribute-based access privileges Indicates the user's access rights. The data owner uses CP-ABE to implement access policies. Encryption is performed.
[0104] A data user can access resources if and only if the following conditions are met: (1) The user attributes satisfy the access policy, expressed as ; (2) Current access time satisfy ; (3) The location attribute in the user privilege is the same as the attribute hierarchy in the access policy, or more specific, expressed as and .
[0105] Step 2-1, use the forward / backward derivation function to achieve the matching of time range and location attribute hierarchy. For the location attribute, the data owner can encode the spatial index tree constructed in the initialization phase according to the positive and negative depth-first encoding algorithm.
[0106] Step 2-2, after completing the spatial index encoding, match the user's location to the node in the positive and negative depth-first coding tree. The user's location can be a fixed point, activity trajectory, or activity range. The data owner uses the master key to have access privileges. User-generated private key .
[0107] Step 3, encryption phase, the data owner formulates access strategy according to actual needs, that is, sets corresponding time and space range constraints. The time range can be defined according to time intervals, and the space range can be represented according to the space range constraints using the spatial coding tree constructed by the data owner.
[0108] Step 3-1: The data owner sends the public key and access policies As input, generate a session key and the ciphertext header .
[0109] Step 3-2, the stage of entrusted encryption, the user uses his own private key and an access policy As input, generate a delegation key for the proxy server .
[0110] Step 4, decryption phase, the proxy server uses the delegated key and the ciphertext header As input, using superior Secret Sharing Rebuild.
[0111] Step 4-1, after receiving the final data user , using secret Go to calculate .
[0112] Step 4-2, calculate the session key .
[0113] like Figure 3-Figure 6 As shown, the attribute matching part of the scheme of the present invention starts from step 1. After the system divides the original area, it converts the area information into a KD tree and re-encodes it. After the location server obtains the user location, the system matches the user location to the node in the KD tree through spatial attribute preprocessing, and obtains the forward / backward depth-first encoding, which acts on the forward / backward derivation function in the subsequent steps and is finally used to calculate the session key.
[0114] The embodiment of the present application also provides a dynamic access control device based on spatiotemporal range attribute constraints. It should be noted that the dynamic access control device based on spatiotemporal range attribute constraints of the embodiment of the present application can be used to execute the dynamic access control method based on spatiotemporal range attribute constraints provided by the embodiment of the present application. The device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0115] The following introduces a dynamic access control device based on time-space range attribute constraints provided in an embodiment of the present application.
[0116] Figure 7 is a structural block diagram of a dynamic access control device based on time-space range attribute constraints according to an embodiment of the present application. Figure 7As shown, the device includes: a conversion unit 701, which is used to convert spatial attributes and process spatial data, including: inserting new nodes and deleting data; a first generation unit 702, which is used by the data owner to generate a public key and a master key with security parameters and attribute levels as input; a second generation unit 703, which is used to match the range and position attribute levels using a forward deduction function or a backward deduction function, and the data owner uses the master key to generate a private key for a user with access privileges; a third generation unit 704, which is used by the data owner to formulate an access policy according to actual needs, and use the public key and the access policy as input to generate a session key and a ciphertext header; a fourth generation unit 705, which is used by the user to use his own private key and the access policy as input to generate a delegation key for the proxy server; a decryption unit 706, which is used by the proxy server to use the delegation key and the ciphertext header as input to output a new ciphertext header for the user, and the user uses the secret sharing of the main secret to reconstruct the attribute key, calculate the session key, and decrypt the data based on the session key.
[0117] The transformation unit 701 includes: an insertion subunit for inserting a new node, including: a comparison module, for traversing the KD tree according to the process of creating the KD tree, and comparing the new node with the separation value, including: if the new node is less than or equal to the separation value, comparing downward along the left subtree until a leaf node for placing the new node is found; if the new node is greater than the separation value, comparing along the right subtree until a leaf node for placing the new node is found; a checking subunit, for checking whether the number of data points in the leaf node is within the range after finding the leaf node for placing the new node; Including: If the number of data points in the leaf node after inserting the new node is within, insert the new node into the leaf node; if the number of data points after inserting the new node is greater than , for this area points for segmentation, taking the axis with the larger variance and dividing it based on its median value, after the segmentation is completed, the level of the tree of the leaf node is increased by one; a balancing subunit is used to check whether the depths of all the leaf nodes meet the maximum difference standard and the horizontal difference standard after the leaf node is inserted and segmented, and if balancing is required, identify and confirm the merged subtree, including: The first search module is used to perform a top-down search using a breadth-first search strategy, starting from the root node. If merging and splitting are performed at the root node, whether the tree level satisfies both the maximum difference standard and the horizontal difference standard, including: if satisfied, move to its child node, first check the left subtree and then the right subtree, until a node is reached; if the standard is not met, its parent node will be used as the node for performing subtree merging and splitting; the second search module is used to perform a bottom-up search, starting from the leaf node at the bottom of the tree, and searching upward for the first node that can be merged and split, to obtain an index tree whose depth of all leaf nodes meets the maximum difference standard and the horizontal difference standard; the deletion subunit is used to delete data, including: traversing the KD tree to find the leaf node where the discarded data is located, and when the leaf node contains the discarded data, perform a deletion operation, and then check the number of data points of the leaf node according to the range boundary. If the number of data points of the leaf node is less than , the leaf node and sibling nodes are merged into their parent node, including: if the number of data points of the parent node is If the number of data points of the parent node is greater than , then re-split into new left and right subtrees, where is the minimum number of data points that can be accommodated in a leaf node, The maximum number of data points that can be accommodated in a leaf node. The conversion unit includes: an association subunit, used to associate each leaf node with two hierarchical codes through positive and negative depth-first codes, wherein the two hierarchical codes are positive depth-first codes and negative depth-first codes; a first allocation subunit, used to allocate an integer pair consisting of the positive depth-first code and the negative depth-first code of each node to each node, wherein the node includes the leaf node and the non-leaf node; a second allocation subunit, used for if it is pattern-independent data, including: when there is no restriction on the type and insertion position of the data point newly inserted into the subtree, the coding space is evenly reserved to all possible insertion positions; when there is any restriction on the type and insertion position of the data point newly inserted into the subtree, the reserved coding space of each branch is allocated according to the number of data points inserted at each position.
[0118] The first generation unit 702 includes: a first generation subunit for a given bilinear mapping system ,set up A randomly selected large prime number that is kept secret. is the public system modulus, parameter ,parameter For confidentiality, It is a composite cyclic group, and there is a bilinear map , randomly select generators and ,in, and yes two subgroups of , Then select four random numbers , and use a hash function , mapped to the root node, randomly selecting two indices set up and , get the public key and the master key .
[0119] The second generation unit 703 includes: a matching subunit, which is used for after the location server obtains the user's location, the user performs path matching according to the spatial index tree constructed in the initialization phase, starting from the root node, matching the area until the position that does not contain the area, thereby obtaining the node position of the user's location in the index tree and obtaining the corresponding positive and negative depth-first encoding.
[0120] The second generating unit 703 includes: a first calculating subunit, which is used to compare the user attribute with the rule attribute, the user's time attribute and There is an intersection and the user's position hierarchical encoding Both greater than When , compute the attribute key, , , , and then calculate the user's private key ,in, is the attribute hash, is the first key parameter, is the second key parameter, is the third key parameter and is generated by the random generator Power It is calculated that is the fourth key parameter, forward mapped by position It is calculated that is the fifth key parameter, forward mapped by position It is calculated that For time attributes The forward mapping of For time attributes The backward mapping of is the forward mapping of the positive depth-first encoding, is the forward map of negative depth-first encoding, The attribute hash identifier.
[0121] The third generating unit 704 includes: a second calculating subunit, which is used to calculate the ciphertext header given an access policy tree, and the calculation formula is: ,in, To access the strategy tree, middle Calculated from the random number generated during the initialization phase, is the encryption component group, , , , They are different encryption components. , is the rule attribute, For the access policy, is the main secret to access the strategy tree.
[0122] The fourth generating unit 705 includes: a third calculating subunit, which is used to check whether the rule attribute is a generalized attribute of the user attribute through the delegation encryption algorithm, and if so, calculate and obtain the delegation key.
[0123] The decryption unit 706 includes: a fourth calculation subunit, used to check whether the user attributes are consistent with the rule attributes, and if they are consistent, calculate the secret sharing value of the main secret; a fifth calculation subunit, used to use random numbers to calculate the attribute key and the session key after the user receives the new ciphertext header.
[0124] The dynamic access control device based on spatiotemporal range attribute constraints includes a processor and a memory, and the above-mentioned conversion unit 701 and the like are stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to implement corresponding functions. The above-mentioned modules are all located in the same processor; or, the above-mentioned modules are located in different processors in any combination.
[0125] The processor contains a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the technical problem that the traditional access control method ignores variable factors such as time interval and spatial location range can be solved by adjusting kernel parameters.
[0126] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0127] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0128] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0129] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0130] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0131] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0132] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0133] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0134] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0135] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0136] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A dynamic access control method based on spatiotemporal range attribute constraints, characterized in that: include: Transform spatial attributes and process spatial data, including: inserting new nodes and deleting data; The data owner uses the security parameters as input to enable the cloud service provider to generate a public key and a master key for the data owner; The data owner takes the security parameters as input and enables the cloud service provider to generate the public key and master key for the data owner, including: Given a bilinear mapping system S N =(N, G, G T ,e), let p, q, p′, q′, s1, s2 be confidential randomly selected large prime numbers, N = pq is the public system modulus, parameter s = s1s2, parameter n′ = p′q′ is confidential, G, G T is a cyclic group of composite order n = sn′, and has a bilinear map e: G×G→G T , randomly select generator ω∈G, g∈G s and φ, φ1,φ2∈G n′ , where G s and G n′ are two subgroups of G, and e(g, ω)≠1, then select four random numbers And use a hash function H: {0, 1}*→G, map to the root node, randomly select two indices Set h = ω β , η=g 1 / β and ζ = e(g, ω) α , get the public key and master key MSK = (g α , β, p, q, n′): The user uses the forward derivation function or the backward derivation function to match the time range and location attribute hierarchy, and the data owner uses the master key to generate a private key for the user with access privileges; The data owner uses the master key to generate a private key for a user with access privileges, including: comparing the user attributes with the rule attributes, the user's time attribute [t a , t b ] and [t i , t j ] have intersection and user position hierarchical coding [P k , N K ] are greater than [P l , N l ], select two random numbers τ u , r∈Z, compute the attribute key, Then calculate the user's private key Among them, D t is the attribute hash, is the first key parameter, is the second key parameter, D″ t is the third key parameter, and is the rth power ω of the random generator r It is calculated that is the fourth key parameter, forward mapped by position It is calculated that is the fifth key parameter, forward mapped by position It is calculated that is the time attribute t a The forward mapping of is the time attribute t b The backward mapping of is the forward mapping of the positive depth-first encoding, is the forward map of negative depth-first encoding, is the attribute hash identifier, L is the access privilege; The data owner formulates an access policy according to actual needs, takes the public key and the access policy as input, and enables the cloud service provider to generate a session key and a ciphertext header for the data owner; The user uses his / her own private key and the access policy as input to enable the proxy server to generate a delegation key; The proxy server takes the delegation key and the ciphertext header as input, the cloud service provider generates a new ciphertext header for the user, the user reconstructs the attribute key using the secret sharing of the primary secret, calculates the session key, and decrypts the data based on the session key.
2. The method according to claim 1, characterized in that Transform spatial attributes and process spatial data, including: Inserting a new node includes: traversing the KD tree according to the process of creating the KD tree, and comparing the new node with the separation value, including: if the new node is less than or equal to the separation value, comparing downward along the left subtree until a leaf node for placing the new node is found; if the new node is greater than the separation value, comparing along the right subtree until a leaf node for placing the new node is found; After finding the leaf node where the new node is placed, check whether the number of data points in the leaf node is within [n, N], including: if the number of data points in the leaf node is within [n, N] after the new node is inserted, insert the new node into the leaf node; if the number of data points is greater than N after the new node is inserted, split the N+1 points in this area, take the axis with the larger variance and divide it based on its median value, and after the split is completed, the level of the tree of the leaf node is increased by one; After the leaf nodes are inserted and split, check whether the depths of all leaf nodes meet the maximum difference standard and the horizontal difference standard. If balancing is required, identify and confirm the merged subtrees, including: From top to bottom, a breadth-first search strategy is adopted, starting from the root node. If merging and splitting are performed at the root node, whether the tree level meets both the maximum difference standard and the horizontal difference standard, including: if it meets, move to its child nodes, check the left subtree first and then the right subtree, until a node is reached; if it does not meet the standard, its parent node will be used as the node for performing subtree merging and splitting; From the bottom to the top, start from the leaf node at the bottom of the tree, and search upward for the first node that can be merged and split, and obtain an index tree whose depths of all leaf nodes meet the maximum difference standard and the horizontal difference standard; Deleting data includes: traversing the KD tree to find the leaf node where the discarded data is located, and when the leaf node contains the discarded data, performing a deletion operation, and then checking the number of data points of the leaf node according to the range boundary. If the number of data points of the leaf node is less than n, the leaf node and its brother nodes are merged into its parent node, including: if the number of data points of the parent node is in the range of [n, N], deleting all leaf nodes of the parent node, and the parent node becomes a new leaf node; if the number of data points of the parent node is greater than N, re-split into new left and right subtrees, where n is the minimum number of data points that can be accommodated in a leaf node, and N is the maximum number of data points that can be accommodated in a leaf node.
3. The method according to claim 2, characterized in that After transforming the spatial attributes and processing the spatial data, it includes: By positive and negative depth-first coding, each leaf node is associated with two hierarchical codes, wherein the two hierarchical codes are positive depth-first coding and negative depth-first coding; Assigning to each node an integer pair consisting of a positive depth-first code and a negative depth-first code of the node, wherein the node includes the leaf node and the non-leaf node; If it is pattern-independent data, it includes: when there are no restrictions on the type and insertion position of data points newly inserted into the subtree, the coding space is reserved evenly for all possible insertion positions; when there are any restrictions on the type and insertion position of data points newly inserted into the subtree, the coding space reserved for each branch is allocated according to the number of data points inserted at each position.
4. The method according to claim 1, characterized in that: Users use forward derivation functions or backward derivation functions to match time ranges and location attribute levels, including: After the location server obtains the user's location, the user performs path matching according to the spatial index tree constructed in the initialization phase, starting from the root node and matching the area until the location that does not contain the area is found. In this way, the node position of the user's location in the index tree is obtained, and the corresponding positive and negative depth-first encoding is obtained.
5. The method according to claim 1, characterized in that The data owner formulates an access policy according to actual needs, takes the public key and access policy as input, and enables the cloud service provider to generate a session key and a ciphertext header for the data owner, including: Given an access policy tree, the ciphertext header is calculated using the following formula: Where T is the access strategy tree, C = h σ h is calculated from the random number generated in the initialization phase, C l is the encryption component group, C 1,l , C 2,l , C 3,l , C 4,l They are different encryption components, A l ∈AP,A l is the rule attribute, AP is the access policy, and σ is the main secret of the access policy tree.
6. The method according to claim 1, characterized in that The user uses his private key and an access policy as input, and the proxy server generates a delegation key, including: When checking the rule attribute for the generalized attribute of the user attribute through the delegation encryption algorithm, if so, the delegation key is calculated.
7. The method according to claim 1, characterized in that The proxy server takes the delegation key and the ciphertext header as input, the cloud service provider generates a new ciphertext header for the user, the user reconstructs the attribute key using the secret sharing of the primary secret, calculates the session key, and decrypts the data according to the session key, including: Check whether the user attributes match the rule attributes. If they match, calculate the secret sharing value of the primary secret. After receiving the new ciphertext header, the user uses a random number to calculate the attribute key and the session key.
8. A dynamic access control device based on spatiotemporal range attribute constraints, characterized in that: include: The conversion unit is used to convert spatial attributes and process spatial data, including: Insert new nodes and delete data; A first generating unit, configured for the data owner to use the security parameter as input so that the cloud service provider generates a public key and a master key for the data owner; The first generation unit includes: a first generation subunit for a given bilinear mapping system S N =(N, G, G T ,e), let p, q, p′, q′, s1, s2 be confidential randomly selected large prime numbers, N = pq is the public system modulus, parameter s = s1s2, parameter n′ = p′q′ is confidential, G, G T is a cyclic group of composite order n = sn′, and has a bilinear map e: G×G→G T , randomly select generator ω∈G, g∈G s and Among them, G s and G n′ are two subgroups of G, and e(g, ω)≠1, then select four random numbers And use a hash function H: {0, 1}*→G, map to the root node, randomly select two indices Set h = ω β , η=g 1 / β and ζ = e(g, ω) α , get the public key and master key MSK = (g α , β, p, q, n′): A second generation unit is used for the user to match the range and position attribute hierarchy using a forward derivation function or a backward derivation function, and the data owner uses the master key to generate a private key for the user with access privileges; The second generating unit includes: a first calculating subunit, which is used to compare the user attribute with the rule attribute, the user's time attribute [t a , t b ] and [t i , t j ] have intersection and user position hierarchical coding [P k , N K ] are greater than [P l , N l ], select two random numbers τ u , r∈Z, compute the attribute key, Then calculate the user's private key Among them, D t is the attribute hash, is the first key parameter, is the second key parameter, D″ t is the third key parameter, and is the rth power ω of the random generator r It is calculated that is the fourth key parameter, forward mapped by position It is calculated that is the fifth key parameter, forward mapped by position It is calculated that is the time attribute t a The forward mapping of is the time attribute t b The backward mapping of is the forward mapping of the positive depth-first encoding, is the forward map of negative depth-first encoding, is the attribute hash identifier, L is the access privilege; A third generating unit is used for the data owner to formulate an access policy according to actual needs, and takes the public key and the access policy as input to enable the cloud service provider to generate a session key and a ciphertext header for the data owner; A fourth generating unit, configured for the user to use his / her own private key and the access policy as inputs to enable the proxy server to generate a delegation key; A decryption unit is used for the proxy server to take the delegation key and the ciphertext header as input, the cloud service provider outputs a new ciphertext header for the user, the user reconstructs the attribute key using the secret sharing of the main secret, calculates the session key, and decrypts the data based on the session key.
Citation Information
Patent Citations
Data encryption and decryption method and device
CN108667605A
Fine-grained cloud data access control method fusing time and position attributes
CN114239062A