A weighted attribute access control method and system for cloud-assisted industrial Internet of Things
By adopting weighted attribute access control method in cloud storage services, the privacy and security issues during data upload of industrial IoT devices are solved, and efficient and secure data storage and access are achieved.
Patent Information
- Application Number
- CN202411397153.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-10-08
AI Technical Summary
When industrial IoT devices upload data to the cloud, they can easily cause data to be out of control by the data owner, resulting in privacy and security issues.
The weighted attribute access control method of the cloud-assisted industrial Internet of Things is adopted, and the access permissions of data is controlled by using encryption technology and weighted attribute policies in cloud storage services, ensuring that only users who meet specific access policies can decrypt and access data.
It improves the privacy and security of data, prevents unauthorized access, reduces the risk of data leakage, and also reduces the pressure on decryption and computing on the user side.
Smart Images

Figure CN118972161B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a weighted attribute access control method and system for a cloud-assisted industrial Internet of Things. Background Art
[0002] With the rapid development of information technology, various industrial IoT devices have been widely used in industrial production. Industrial IoT devices can collect a large amount of valuable industrial data during their work. However, the local storage space of industrial IoT devices is generally limited. For this reason, industrial IoT devices generally store the collected industrial data in the cloud, which can greatly save the local storage space of industrial IoT devices. In addition, the industrial data uploaded to the cloud by industrial IoT devices can also be shared with other entities, but this also makes it easy for the above industrial data to be out of the control of the data owner, resulting in privacy and security issues for the above industrial data. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a weighted attribute access control method and system for cloud-assisted industrial Internet of Things to improve the privacy and security of data. The specific technical solution is as follows:
[0004] According to one aspect of an embodiment of the present application, a weighted attribute access control method for a cloud-assisted industrial Internet of Things is provided, which is applied to a first user terminal, and the method includes:
[0005] Sending a data access request of a first user and a partial decryption key of the first user to a cloud storage service, so that the cloud storage service partially decrypts a first key ciphertext based on the partial decryption key, wherein the first key ciphertext is: a ciphertext obtained by encrypting a first encryption key with a first access policy of first data as an encryption parameter, the first access policy is described by a weighted attribute of the user, the first data is: the data requested to be accessed by the data access request, and the first encryption key is: a key used to encrypt the first data to obtain the first data ciphertext;
[0006] In response to receiving a request feedback for the data access request, decrypting a portion of the decrypted ciphertext included in the request feedback based on the complete decryption key of the first user to obtain the first encryption key, wherein the request feedback is sent by the cloud storage service when the partial decryption result indicates that the weighted attribute of the first user matches the first access policy;
[0007] The first data ciphertext included in the request feedback is decrypted based on the first encryption key to obtain the first data.
[0008] According to another aspect of an embodiment of the present application, a weighted attribute access control method for a cloud-assisted industrial Internet of Things is provided, which is applied to a second user terminal, and the method includes:
[0009] obtaining a second encryption key;
[0010] Encrypting the second data to be uploaded by the second user based on the second encryption key to obtain a second data ciphertext;
[0011] determining a second access policy for the second data described by the weighted attributes of the user;
[0012] Encrypting the second encryption key using the second access policy as an encryption parameter to obtain a second key ciphertext;
[0013] Upload the second data ciphertext and the second key ciphertext to a cloud storage service.
[0014] According to another aspect of the embodiments of the present application, a weighted attribute access control method for a cloud-assisted industrial Internet of Things is provided, which is applied to a cloud storage service, and the method includes:
[0015] Receiving a data access request of a first user and a partial decryption key of the first user sent by a first user terminal;
[0016] Searching for a first data ciphertext and a first key ciphertext of the first data requested to be accessed by the data access request, wherein the first key ciphertext is: a ciphertext obtained by encrypting a first encryption key with a first access policy of the first data as an encryption parameter, the first access policy is described by a weighted attribute of a user, and the first encryption key is: a key used to encrypt the first data to obtain the ciphertext of the first data;
[0017] Partially decrypting the first key ciphertext based on the partial decryption key to obtain a partial decryption result;
[0018] If the partial decryption result represents that the weighted attribute of the first user matches the access policy of the first data, a request feedback for the data access request is sent to the first user terminal, wherein the request feedback includes: the partial decrypted ciphertext obtained by partial decryption and the first data ciphertext, so that the first user terminal decrypts the first data ciphertext based on the partial decryption ciphertext to obtain the first data.
[0019] According to another aspect of the embodiment of the present application, a weighted attribute access control method for a cloud-assisted industrial Internet of Things is provided, which is applied to management services, and the method includes:
[0020] Receiving a registration request from a first user sent by a first user terminal;
[0021] Selecting a master key of the first user, an attribute identification key and an attribute weight key of a weighted attribute from pre-generated offline keys;
[0022] Combining parameters based on the attribute identifier of the weighted attribute of the first user, the key parameter in the master key, the key parameter in the attribute identifier key, and the key parameter in the weight key to generate a partial decryption key for the first user;
[0023] Obtaining a complete decryption key for the first user based on the set key parameters in the master key;
[0024] The partial decryption key and the complete decryption key are sent to the first client.
[0025] According to another aspect of the embodiment of the present application, a weighted attribute access control system for a cloud-assisted industrial Internet of Things is provided, the system comprising: a first user terminal and a cloud storage service, wherein:
[0026] The first user terminal is used to send a data access request of the first user and a partial decryption key of the first user to the cloud storage service;
[0027] The cloud storage service is used to search for the first data ciphertext and the first key ciphertext of the first data requested for access by the data access request; partially decrypt the first key ciphertext based on the partial decryption key to obtain a partial decryption result; if the partial decryption result represents that the weighted attribute of the first user matches the access policy of the first data, then send a request feedback for the data access request to the first user terminal, wherein the first key ciphertext is: the ciphertext obtained by encrypting the first encryption key with the first access policy of the first data as an encryption parameter, the first access policy is described with the weighted attribute of the user, the first encryption key is: the key used to encrypt the first data to obtain the first data ciphertext, and the request feedback includes: the partial decryption ciphertext obtained by partial decryption and the first data ciphertext.
[0028] The first user terminal is also used to, in response to receiving the request feedback, decrypt the partial decrypted ciphertext included in the request feedback based on the complete decryption key of the first user to obtain the first encryption key; and decrypt the first data ciphertext included in the request feedback based on the first encryption key to obtain the first data.
[0029] According to another aspect of the embodiment of the present application, a weighted attribute access control device for a cloud-assisted industrial Internet of Things is provided, which is applied to a first user terminal, and the device includes:
[0030] an access request sending module, configured to send a data access request of a first user and a partial decryption key of the first user to a cloud storage service, so that the cloud storage service partially decrypts a first key ciphertext based on the partial decryption key, wherein the first key ciphertext is: a ciphertext obtained by encrypting a first encryption key with a first access policy of first data as an encryption parameter, the first access policy is described by a weighted attribute of a user, the first data is: the data requested to be accessed by the data access request, and the first encryption key is: a key used to encrypt the first data to obtain the first data ciphertext;
[0031] a complete ciphertext decryption module, configured to, in response to receiving a request feedback for the data access request, decrypt the partial decrypted ciphertext included in the request feedback based on the complete decryption key of the first user to obtain the first encryption key, wherein the request feedback is sent by the cloud storage service when the partial decryption result indicates that the weighted attribute of the first user matches the first access policy;
[0032] A data ciphertext decryption module is used to decrypt the first data ciphertext included in the request feedback based on the first encryption key to obtain the first data.
[0033] According to another aspect of the embodiment of the present application, a weighted attribute access control device for a cloud-assisted industrial Internet of Things is provided, which is applied to a second user terminal, and the device includes:
[0034] An encryption key obtaining module, used for obtaining a second encryption key;
[0035] a data encryption module, configured to encrypt second data to be uploaded by a second user based on the second encryption key to obtain a second data ciphertext;
[0036] An access policy determination module, configured to determine a second access policy for the second data described by the weighted attributes of the user;
[0037] an encryption key encryption module, configured to encrypt the second encryption key using the second access policy as an encryption parameter to obtain a second key ciphertext;
[0038] The ciphertext uploading module is used to upload the second data ciphertext and the second key ciphertext to the cloud storage service.
[0039] According to another aspect of the embodiment of the present application, a weighted attribute access control device for a cloud-assisted industrial Internet of Things is provided, which is applied to a cloud storage service, and the device includes:
[0040] An access request receiving module, configured to receive a data access request of a first user and a partial decryption key of the first user sent by a first user terminal;
[0041] a ciphertext search module, configured to search for a first data ciphertext and a first key ciphertext of the first data requested to be accessed by the data access request, wherein the first key ciphertext is a ciphertext obtained by encrypting a first encryption key using a first access policy of the first data as an encryption parameter, the first access policy being described by a weighted attribute of a user, and the first encryption key being a key used to encrypt the first data to obtain the ciphertext of the first data;
[0042] A partial decryption module, used to partially decrypt the first key ciphertext based on the partial decryption key to obtain a partial decryption result;
[0043] A request feedback sending module is used to send request feedback for the data access request to the first user terminal if the partial decryption result represents that the weighted attribute of the first user matches the access policy of the first data, wherein the request feedback includes: the partial decryption ciphertext obtained by partial decryption and the first data ciphertext, so that the first user terminal decrypts the first data ciphertext based on the partial decryption ciphertext to obtain the first data.
[0044] According to another aspect of the embodiment of the present application, a weighted attribute access control device for a cloud-assisted industrial Internet of Things is provided, which is applied to management services, and the device includes:
[0045] A registration request receiving module, used to receive a registration request of a first user sent by a first user terminal;
[0046] an offline key selection module, configured to select a master key, an attribute identification key and an attribute weight key of the weighted attribute of the first user from pre-generated offline keys;
[0047] a key generation module, configured to combine parameters based on the attribute identifier of the weighted attribute of the first user, the key parameters in the master key, the key parameters in the attribute identifier key, and the key parameters in the weight key to generate a partial decryption key for the first user; and obtain a complete decryption key for the first user based on the set key parameters in the master key;
[0048] The decryption key sending module is used to send the partial decryption key and the complete decryption key to the first user terminal.
[0049] According to another aspect of the embodiments of the present application, there is provided an electronic device, including:
[0050] Memory, used to store computer programs;
[0051] A processor is used to implement any of the above-mentioned weighted attribute access control methods for cloud-assisted industrial Internet of Things when executing a program stored in a memory.
[0052] According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any of the above-mentioned weighted attribute access control methods for cloud-assisted industrial Internet of Things is implemented.
[0053] According to another aspect of the embodiments of the present application, a computer program product comprising instructions is provided. When the computer program is run on a computer, the computer executes any of the weighted attribute access control methods for cloud-assisted industrial Internet of Things described above.
[0054] Beneficial effects of the embodiments of the present application:
[0055] It can be seen from the above that, by applying the weighted attribute access control method for cloud-assisted industrial Internet of Things provided in the embodiment of the present application, the first key ciphertext and the first data ciphertext are stored in the cloud storage service. The cloud storage service will partially decrypt the first key ciphertext only when the partial decryption result sent by the first user represents that the weighted attribute of the first user matches the first access policy. The cloud storage service can obtain the partial decrypted ciphertext and the first data ciphertext. It is difficult for the cloud storage service to obtain the first encryption key and the first data, and users whose weighted attributes do not match the first access policy cannot obtain the first encryption key and the first data. In this way, the privacy and security of the data can be improved.
[0056] In addition, the first user terminal sends part of the first user's decryption key to the cloud storage service, and the cloud storage server partially decrypts the first key ciphertext. In this way, the cloud storage server shares part of the ciphertext decryption calculation, which can reduce the pressure on the first user terminal to perform ciphertext decryption calculation and improve the efficiency of the first user terminal in accessing target data.
[0057] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0059] Figure 1a A schematic diagram of the structure of an access control system provided in an embodiment of the present application;
[0060] Figure 1b A signaling diagram of a data access process provided in an embodiment of the present application;
[0061] Figure 2a A schematic diagram of the structure of another access control system provided in an embodiment of the present application;
[0062] Figure 2b A signaling diagram of a data upload process provided in an embodiment of the present application;
[0063] Figure 3a A schematic diagram of the structure of another access control system provided in an embodiment of the present application;
[0064] Figure 3b A signaling diagram of a user registration process provided in an embodiment of the present application;
[0065] Figure 4 A flowchart of an access control method provided in an embodiment of the present application;
[0066] Figure 5 A flowchart of another access control method provided in an embodiment of the present application;
[0067] Figure 6 A flowchart of another access control method provided in an embodiment of the present application;
[0068] Figure 7 A flowchart of another access control method provided in an embodiment of the present application;
[0069] Figure 8 A schematic diagram of the structure of an access control device provided in an embodiment of the present application;
[0070] Fig. 9 A schematic diagram of the structure of another access control device provided in an embodiment of the present application;
[0071] Fig.10 A schematic diagram of the structure of another access control device provided in an embodiment of the present application;
[0072] Fig.11 A schematic diagram of the structure of another access control device provided in an embodiment of the present application;
[0073] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0074] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions 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 based on the present application belong to the scope of protection of the present application.
[0075] The solution provided by the embodiment of the present application can be applied to, for example, industrial Internet of Things, home Internet of Things, and data management platforms. Taking the industrial Internet of Things as an example, the temperature sensing device can continuously collect ambient temperature data during operation, and other industrial Internet of Things devices need to perform the tasks of the industrial Internet of Things device based on the ambient temperature. Then, the temperature sensing device can store the collected ambient temperature data in the cloud storage service. If other industrial Internet of Things devices need to obtain ambient temperature data, they can request the ambient temperature data from the cloud storage service. The solution provided by the embodiment of the present application can be applied to the large attribute space in the attribute-based encryption (ABE) method, and can also be applied to the small attribute space. The attribute space generally refers to the range of types and quantities of weighted attributes that can be processed in the system. The attribute-based encryption method of the large attribute space can support the types and quantities of expandable weighted attributes, and can flexibly add new weighted attributes. The types and quantities of weighted attributes that the attribute-based encryption method of the small attribute space can support are preset fixed values, and the types and quantities of weighted attributes that can be supported need to be pre-set.
[0076] For ease of description, the weighted attribute access control system of the cloud-assisted industrial Internet of Things is referred to as the access control system, the weighted attribute access control method of the cloud-assisted industrial Internet of Things is referred to as the access control method, and the weighted attribute access control device of the cloud-assisted industrial Internet of Things is referred to as the access control device.
[0077] The concepts involved in the embodiments of the present application are explained below.
[0078] 1. First User Terminal and Second User Terminal
[0079] The first user terminal is a user terminal for requesting data from the cloud storage service. The second user terminal is a user terminal for uploading data to the cloud storage service. The first user terminal and the second user terminal may be the same user terminal provided with a data access function and a data upload function, or the first user terminal and the second user terminal may be a user terminal provided with a data access function and a user terminal provided with a data upload function, respectively.
[0080] 2. Cloud Storage Services
[0081] The cloud storage service is used to provide data storage services. The cloud storage service may be provided by a device used by a user of the first user terminal and / or the second user terminal, or may be provided by a third-party service provider.
[0082] 3. Management Services
[0083] The management service is used to manage the access control system and can be used to perform tasks such as key generation. For example, a decryption key corresponding to each user is generated. Large-scale and frequent key generation requires more computing resources. Therefore, the management service usually has strong computing power. In addition, the management service can be provided by a device used by users of the first user terminal and / or the second user terminal, or it can be provided by a third-party service provider. When the management service is initialized, the management service can generate initialization parameters and send the initialization parameters to the first user terminal, the second user terminal, and the cloud storage service. For example, the management service can be set to generate two initialization parameters, such as the initialization parameters can include: a first initialization parameter and a second initialization parameter, and the first initialization parameter and the second initialization parameter are sent to the first user terminal, the second user terminal, and the cloud storage service.
[0084] 4. Weighted Attributes
[0085] The weighted attribute represents the attribute name of the user and the weight corresponding to the attribute name of the user. Each user has a weighted attribute corresponding to the user. A first user can set multiple corresponding weighted attributes or one corresponding weighted attribute. The weighted attribute includes an attribute identifier and an attribute weight. The attribute identifier of the weighted attribute can represent the attribute name of the user to which it belongs, and the attribute weight can represent the weight corresponding to the user's attribute. For example, the attribute identifier corresponding to the attribute name can be set for each attribute name. For example, the attribute identifier in the user's weighted attribute is doctor, and the attribute weight is 2. The weighted attribute represents that the user's attribute name is doctor, and the corresponding weight value is 2.
[0086] Combine the following Figure 1a and Figure 1b The access control system provided in the embodiment of the present application is described.
[0087] In one embodiment of the present application, see Figure 1a A structural diagram of an access control system is provided, the access control system comprising: a first user terminal 101 and a cloud storage service 102.
[0088] See also Figure 1b A signaling diagram of a data access process is provided.
[0089] The first user terminal 101 is used to send a data access request of the first user and a partial decryption key of the first user to the cloud storage service 102 .
[0090] The cloud storage service 102 is used to search for the first data ciphertext and the first key ciphertext of the first data requested by the data access request; partially decrypt the first key ciphertext based on the partial decryption key to obtain a partial decryption result; if the partial decryption result represents that the weighted attribute of the first user matches the access policy of the first data, a request feedback for the data access request is sent to the first user terminal 101.
[0091] The first user terminal 101 is also used to, in response to receiving the request feedback, decrypt the partial decrypted ciphertext included in the request feedback based on the complete decryption key of the first user to obtain the first encryption key; and decrypt the first data ciphertext included in the request feedback based on the first encryption key to obtain the first data.
[0092] It can be seen from the above that, by applying the access control system provided by the embodiment of the present application, what is stored in the cloud storage service 102 is the first key ciphertext and the first data ciphertext. Only when the partial decryption result sent by the first user represents that the weighted attribute of the first user matches the first access policy, the cloud storage service 102 will partially decrypt the first key ciphertext. The cloud storage service 102 can obtain the partial decrypted ciphertext and the first data ciphertext. Therefore, it is difficult for the cloud storage service 102 to obtain the first encryption key and the first data, and users whose weighted attributes do not match the first access policy cannot obtain the first encryption key and the first data. In this way, the privacy and security of the data can be improved.
[0093] In addition, under the premise of balancing the privacy and security of data, the access control system provided by the embodiment of the present application also reduces the computing pressure of the first user terminal and the second user terminal, so that the first user terminal and the second user terminal can be deployed on IoT devices with less computing resources.
[0094] The above access control system is described in detail in the following four parts.
[0095] 1. The first user terminal 101 is used to send a data access request of the first user and a partial decryption key of the first user to the cloud storage service 102.
[0096] The data access request may include the user identification of the first user and the data identification of the first data requested to be accessed by the first user. The first user terminal 101 may store data identifications corresponding to various data and the user identification of the first user using the first user terminal 101 .
[0097] In one implementation, the first user may request access to the first data through the user interaction interface of the first user terminal 101, and then the first user terminal 101 may send a data access request based on the data identifier of the first data and the user identifier of the first user requesting access to the first data.
[0098] In another implementation, the first user may also set a timed request task for the first data, so that the first user terminal 101 may request access to the first data according to the set timed request task, and periodically send a data access request to the cloud storage service 102 based on the data identifier of the first data and the user identifier of the first user. For example, in the field of industrial Internet of Things, if industrial equipment A needs to work according to the temperature data of location A, then the first user may set a timed request task for the temperature data of location A, and industrial equipment A periodically sends a data access request to the cloud storage service 102 according to the timed request task to obtain the temperature data of location A.
[0099] 2. The cloud storage service 102 is used to search for the first data ciphertext and the first key ciphertext of the first data requested to be accessed by the data access request.
[0100] (1) The first data ciphertext is: the first data ciphertext obtained after encrypting the first data. When encrypting the first data, a key may be generated as a first encryption key, and the first data may be symmetrically encrypted using a symmetric encryption algorithm with the first encryption key as an encryption parameter to obtain the first data ciphertext. The first data ciphertext is stored in the cloud storage service 102.
[0101] (2) The first encryption key is: a key used to encrypt the first data to obtain the first data ciphertext.
[0102] (3) The first key ciphertext is: the ciphertext obtained by encrypting the first encryption key with the first access policy of the first data as the encryption parameter. The first access policy can be described by the weighted attributes of the user. The first access policy is used to describe the range of weighted attributes of the users who can access the data corresponding to the first access policy. The range of weighted attributes can be described by the policy weighted attributes and policy range information in the first access policy. For example, the policy range information in the first access policy can be: including weighted attributes with weights greater than or equal to the policy weighted attributes of the first access policy, or including weighted attributes with weights less than or equal to the policy weighted attributes of the first access policy and below, or including only the policy weighted attributes of the first access policy, or including weighted attributes other than the policy weighted attributes of the first access policy, etc. Encrypting the first encryption key with the first access policy as the encryption parameter can enable the obtained first key ciphertext to be successfully decrypted by the partial decryption key of the first user whose weighted attributes are within the range of the weighted attributes of the user described by the first access policy.
[0103] For example, the generated first key ciphertext may include: the first ciphertext and the second ciphertext, the third ciphertext, and the fourth ciphertext corresponding to each weighted attribute of the first user.
[0104] The first ciphertext is generated based on the first initialization parameter and the attribute identifier of the weighted attribute of the first user. For example, the first ciphertext can be expressed as follows: , is the first initialization parameter, and s is the attribute identifier of the weighted attribute of the first user.
[0105] The second ciphertext corresponding to each weighted attribute of the first user is generated based on the second parameter used by the management service to generate the master key of the first user offline, the second initialization parameter and the first parameter corresponding to the weighted attribute. The first parameter is: the parameter obtained by calculating the identifier of the weighted attribute of the first user, and the second parameter is: the parameter obtained by calculating the attribute weight of the weighted attribute of the first user. The second ciphertext can be expressed as follows: The second ciphertext corresponding to the weighted attributes: , is the second parameter used when generating the master key of the first user, is the second initialization parameter, and Respectively The first parameter corresponding to a weighted attribute. The first parameter is the value of the identifier of the weighted attribute of the user. The first parameters corresponding to different weighted attributes may be the same or different. The first parameter may be determined in the following manner: for each identifier of the weighted attribute, a corresponding relationship between the identifier and the parameter value is established. After the identifier of the weighted attribute of the first user is determined, the parameter value corresponding to the identifier of the weighted attribute of the first user is searched according to the above corresponding relationship as the first parameter. The same first parameter may correspond to the identifiers of multiple weighted attributes or to the identifier of one weighted attribute. The second parameter is the value of the attribute weight of the weighted attribute of the user. The second parameters corresponding to different weighted attributes may be the same or different. The second parameter may be determined in the following manner: for each attribute weight of the weighted attribute, a corresponding relationship between the attribute weight and the parameter value is established. After the attribute weight of the weighted attribute of the first user is determined, the parameter value corresponding to the attribute weight of the weighted attribute of the first user is searched according to the above corresponding relationship as the second parameter. The same second parameter may correspond to the identifiers of multiple weighted attributes or to the identifier of one weighted attribute.
[0106] The third ciphertext corresponding to each weighted attribute of the first user is generated based on the second parameter used by the management service to generate the attribute identification key of the weighted attribute offline, the first parameter corresponding to the weighted attribute, and the second parameter corresponding to the weight of the weighted attribute of the first user. For example, for each weighted attribute of the first user, the first ciphertext of the first user can be expressed as follows: The third ciphertext corresponding to the weighted attributes: , and are the second parameters used when the management service generates the attribute identification key of the weighted attribute offline, is the range of each attribute weight of each weighted attribute of the first user, Generate offline The second parameter used when the attribute identifier key is a weighted attribute. For the The first parameter corresponding to the weighted attribute, is the first preset parameter conversion function, is the second preset parameter conversion function.
[0107] The fourth ciphertext corresponding to each weighted attribute of the first user is generated based on the first initialization parameter and the first parameter corresponding to the weighted attribute. The fourth ciphertext corresponding to each weighted attribute of the first user can be expressed as follows: The fourth ciphertext corresponding to the weighted attributes: , is the first initialization parameter.
[0108] After concatenating the first ciphertext and the second ciphertext, the third ciphertext, and the fourth ciphertext corresponding to each weighted attribute of the first user, the first key ciphertext can be obtained. For example, the first key ciphertext can be expressed as follows: ,in, Indicates the range of the weighted attribute of the first user.
[0109] Furthermore, when the attribute weight is introduced when encrypting the first encryption key, the ciphertext length of the first encryption key encrypted in the above manner is the same as the ciphertext length of the ciphertext encrypted by the attribute-based encryption method in the prior art.
[0110] In addition, the cloud storage service 102 may store the first data ciphertext and the first key ciphertext. The first data ciphertext and the first key ciphertext may be obtained in different ways. For example, in one way, the cloud storage service 102 encrypts the first data to obtain the first data ciphertext, and the cloud storage service 102 encrypts the first encryption key to obtain the first key ciphertext. In another way, the access control system further includes a second user end, the second user end encrypts the first data to obtain the first data ciphertext, encrypts the first encryption key to obtain the first key ciphertext, and then uploads the obtained first data ciphertext and the first key ciphertext to the cloud storage service 102.
[0111] The following describes the manner in which the cloud storage service 102 searches for the first data ciphertext and the first key ciphertext.
[0112] The cloud storage service 102 may record the correspondence between the data and the data ciphertext and the key ciphertext for each data, and then search for the data ciphertext and the key ciphertext according to the recorded correspondence. For example, when storing the first data ciphertext and the first key ciphertext of the first data, the cloud storage service 102 may record the correspondence between the first data identifier of the first data and the first data ciphertext and the first key ciphertext, and after receiving an access request for the first data, the first data ciphertext and the first key ciphertext may be searched according to the first data identifier of the first data.
[0113] 3. The cloud storage service 102 is configured to partially decrypt the first key ciphertext based on the partial decryption key to obtain a partial decryption result. When the partial decryption result indicates that the weighted attribute of the first user matches the access policy of the first data, a request feedback for the data access request is sent to the first user terminal 101. The request feedback includes: the partial decryption ciphertext obtained by the partial decryption and the first data ciphertext.
[0114] The following describes a case where it is determined that the weighted attribute of the first user matches the access policy of the first data by way of example.
[0115] For example, when the policy weighted attribute in the access policy of data A is (doctor, 2), and the policy scope information is: including weighted attributes whose weights are greater than or equal to the policy weighted attributes of the access policy, if the user's weighted attribute is (doctor, 1), weight 2 is greater than 1, that is, the first user's weighted attribute (doctor, 1) is not within the range of the weighted attributes of the user who can access the data corresponding to the access policy as described in the access policy, and the first user's weighted attribute does not match the access policy. If the first user's weighted attribute is (teacher, 3), then the attribute identifier in the first user's weighted attribute and the access policy are not the same attribute identifier. In this case, the first user's weighted attribute does not match the access policy. If the first user's weighted attribute is (doctor, 3), weight 3 is greater than 2, and the attribute identifier in the first user's weighted attribute is the same as the access policy, the first user's weighted attribute matches the access policy.
[0116] Specifically, if the cloud storage service 102 can successfully partially decrypt the first key ciphertext corresponding to the first data using the partial decryption key of the first user, then the obtained partial decryption result indicates that the weighted attribute of the first user matches the access policy of the first data, otherwise, the obtained partial decryption result indicates that the weighted attribute of the first user does not match the access policy of the first data. For example, the partial decryption result may include the partially decrypted first key ciphertext and a decryption success flag, and if the above decryption success flag is 1, it means that the partial decryption is successfully performed, and if the above decryption success flag is 0, it means that the partial decryption is not successfully performed.
[0117] The specific method of performing partial decryption on the storage service 102 is described below.
[0118] Step A1: Decryption is performed using the first ciphertext in the first key ciphertext and the first decryption parameter in the partial decryption key as decryption parameters to obtain a first decryption result.
[0119] Specifically, the partial decryption key may include: the attribute identifier of the weighted attribute of the first user, the first decryption parameter, the second decryption parameter, and the third decryption parameter, the fifth decryption parameter, the sixth decryption parameter, the seventh decryption parameter, and the eighth decryption parameter corresponding to each weighted attribute of the first user.
[0120] The following is a partial decryption key: , the first key ciphertext is: Take this as an example to illustrate, is the attribute identifier of the weighted attribute of the first user, is the first decryption parameter, is the second decryption parameter, is the third decryption parameter corresponding to the i-th weighted attribute of the first user, is the fifth decryption parameter of the i-th weighted attribute of the first user, is the sixth decryption parameter corresponding to the i-th weighted attribute of the first user, is the seventh decryption parameter corresponding to the i-th weighted attribute of the first user except the j-th attribute weight, It is the eighth decryption parameter corresponding to the j-th attribute weight of the ith weighted attribute of the first user.
[0121] Specifically, a preset decryption algorithm may be used to decrypt the first ciphertext in the first key ciphertext and the first decryption parameter in the partial decryption key. For example, the first decryption result may be expressed as follows: ,in, is the first ciphertext, It means that the preset decryption algorithm is executed with the two parameters in the brackets as decryption parameters.
[0122] Step A2: For each weighted attribute of the first user, decrypt with the second ciphertext corresponding to the weighted attribute and the second decryption parameter in the partial decryption key as the decryption parameter to obtain a second decryption result, decrypt with the third ciphertext corresponding to the weighted attribute and the third decryption parameter corresponding to the weighted attribute in the partial decryption key to obtain a third decryption result, decrypt with the fourth ciphertext corresponding to the weighted attribute and the fourth decryption parameter corresponding to the weighted attribute in the partial decryption key to obtain a fourth decryption result, obtain the second power of the fourth decryption result, and obtain a fifth decryption result.
[0123] The second quantity is the value of the first parameter corresponding to the weighted attribute.
[0124] Specifically, the second decryption result can be expressed as follows: , the third decryption result is expressed as follows: , the fifth decryption result is expressed as follows: ,in, For the The value of the first parameter corresponding to the weighted attribute, is the fourth decryption parameter corresponding to the i-th weighted attribute, For the The second ciphertext corresponding to the weighted attribute is For the The third ciphertext corresponding to the weighted attribute, For the The fourth ciphertext corresponding to the weighted attribute.
[0125] Among them, the fourth decryption parameter is: a parameter obtained by multiplying the fifth decryption parameter corresponding to the weighted attribute in the partial decryption key, the third power of the first weight selected from the weight domain, the seventh decryption parameter corresponding to the weighted attribute in the partial decryption key, and the fourth power of the first weight selected from the weight domain, the weight domain includes the attribute weight of the weighted attribute of the first user, the third quantity is the sixth decryption parameter corresponding to the weighted attribute in the partial decryption key, and the fourth quantity is the eighth decryption parameter corresponding to the weighted attribute in the partial decryption key.
[0126] Specifically, the fourth decryption parameter can be expressed as follows: ,in, is the first weight selected from the weight domain, represents the weighted attribute set of the first user, Indicates the weighted attribute set of the first user except The attribute identifier A collection of attribute weights, is the seventh decryption parameter corresponding to the j-th attribute weight of the i-th weighted attribute of the first user, is the first weight selected from the weight domain, It is the eighth decryption parameter corresponding to the j-th attribute weight of the ith weighted attribute.
[0127] Step A3: Calculate the product of the second decryption result, the third decryption result and the fifth decryption result to obtain a sixth decryption result.
[0128] Among them, for each weighted attribute of the first user, the second decryption result, the third decryption result and the fifth decryption result corresponding to the weighted attribute need to be calculated according to the above step B. Therefore, the second decryption results, the third decryption results and the fifth decryption results corresponding to multiple weighted attributes can be obtained. Therefore, to calculate the product of the second decryption result, the third decryption result and the fifth decryption result, it is necessary to multiply the second decryption result, the third decryption result and the fifth decryption result corresponding to each weighted attribute.
[0129] Then, the expression of the calculated sixth decryption result is: ;
[0130] Step A4: Based on the first decryption result and the sixth decryption result, a partial decryption result of partially decrypting the first key ciphertext is obtained.
[0131] Specifically, the first decryption result is divided by the sixth decryption result to obtain a partial decryption result of partially decrypting the first key ciphertext. The expression of the calculated partial decryption result is:
[0132] ;
[0133] If the weighted attribute of the first user matches the access policy of the first data, the storage service 102 can successfully use the partial decryption key of the first user to partially decrypt the first key ciphertext. Then, the obtained partial decrypted ciphertext can be expressed as: , wherein DEK is the first encryption key, and β is the first parameter used when the management service generates the master key of the first user offline.
[0134] In this way, when attribute weights are introduced during partial decryption, partial decryption is successfully performed to obtain partially decrypted ciphertext only when the weighted attributes of the first user match the access policy of the first data. By setting access policies with attribute weights, the flexibility of access permission settings can be improved. Verifying whether the weighted attributes of the first user match the access policy of the first data in this way can ensure verification accuracy and improve data security.
[0135] 4. The first user terminal 101 is also used to, in response to receiving the request feedback, decrypt the partial decrypted ciphertext included in the request feedback based on the complete decryption key of the first user to obtain the first encryption key; and decrypt the first data ciphertext included in the request feedback based on the first encryption key to obtain the first data.
[0136] The following is an explanation of the method of decrypting the ciphertext in the decryption part.
[0137] The first user terminal 101 may perform a power operation on the partially decrypted ciphertext according to the pre-obtained complete decryption key. For example, the pre-obtained complete decryption key may be β. Afterwards, the partial decrypted ciphertext is subjected to β-power operation to obtain the first encryption key DEK.
[0138] The following describes a method for decrypting the first data ciphertext.
[0139] Specifically, the first data may be encrypted using a symmetric encryption algorithm based on a first encryption key, and the first client 101 may decrypt the first data ciphertext using an inverse algorithm of the symmetric encryption algorithm based on the first encryption key used to encrypt the first data.
[0140] Combine the following Figure 2a and Figure 2b The access control system provided in the embodiment of the present application is described.
[0141] In one embodiment of the present application, see Figure 2a A structural diagram of another access control system is provided, the access control system comprising: a first user terminal 101, a cloud storage service 102 and a second user terminal 103.
[0142] See also Figure 2b A signaling diagram of a data upload process is provided.
[0143] The second user terminal 103 is used to obtain a second encryption key, encrypt the second data to be uploaded by the second user based on the second encryption key, and obtain a second data ciphertext; determine a second access strategy for the second data described by the user's weighted attributes; encrypt the second encryption key with the second access strategy as an encryption parameter to obtain a second key ciphertext; and upload the second data ciphertext and the second key ciphertext to the cloud storage service 102.
[0144] Specifically, the second user terminal 103 can randomly select a key as the second encryption key, and symmetrically encrypt the second data using an encryption algorithm based on the second encryption key to obtain a second data ciphertext. Then, the second user terminal 103 can process the second access policy using a weighted linear secret sharing scheme to obtain a second policy matrix corresponding to the second access policy, and encrypt the second encryption key using the second policy matrix as an encryption parameter to obtain a second key ciphertext.
[0145] The description of the second access policy, the second data ciphertext, the second encryption key and the second key ciphertext can refer to the description of the above embodiment. The only difference is the name, which will not be described in detail here.
[0146] The cloud storage service 102 is also used to store the second data ciphertext and the second key ciphertext.
[0147] As can be seen from the above, users can set data access policies. When setting access policies, users can flexibly set attribute identifiers and attribute weights in the access policies to set weighted data for users who can access the uploaded data, thereby achieving more fine-grained control over data access rights, achieving more flexible and precise permission control, and improving data security.
[0148] In another embodiment of the present application, the second user terminal 103 is also used to generate a key certificate of the encryption key.
[0149] The second user terminal 103 is specifically used to generate a key certificate of the second encryption key based on the user certificate private key of the second user pre-generated by the management service. Then, the second user terminal 103 uploads the second data ciphertext, the second key ciphertext and the key certificate of the second key to the cloud storage service 102.
[0150] The user certification private key is generated based on the first parameter, and the first parameter is a parameter obtained by calculating the identifier of the weighted attribute of the second user. When generating the user certification private key, a value corresponding to the identifier of the weighted attribute can be randomly selected as the first parameter for generating the certification private key, and the first parameter is used as the user certification private key.
[0151] For example, the first parameter randomly selected can be , then the user proves that the private key is: , and the management service also generates a verification key based on the first initialization parameter and the user's proof private key: .
[0152] In addition, the second user terminal 103 may generate a key certificate for the second data according to the system time period to which the second data is uploaded, the second data, and the user certification private key.
[0153] If the first client 101 requests to access the second data, the first client 101 may also use the key certificate of the second key to batch verify the accuracy of the second encryption key.
[0154] Similarly, the first data may also be uploaded from the second user terminal 103 to the management service 102 in the above manner.
[0155] In this way, a key certificate is generated for the encryption key, and the first user terminal 101 can determine whether the encryption key obtained by decryption is accurate through the key certificate, thereby reducing the possibility of errors in the first data obtained by decryption.
[0156] In addition, when the cloud storage service 102 fails to accurately decrypt part of the key ciphertext, the first user terminal 101 can also use the key proof to determine whether the encryption key obtained by decryption is accurate, thereby reducing the impact of malicious behavior of the cloud storage service 102 and maintaining the overall security of the access control system and the confidentiality of the data.
[0157] The method of generating the key certificate of the first data is described below with reference to examples.
[0158] A key certificate for the first data may be generated according to the system time period to which the first data belongs when it is uploaded, the first data, and a user certification private key.
[0159] Assume that the key proof of the first data is ,in, is the system time period to which the first data was uploaded, ,in, is the first hash value, is the second hash value, is the first number. The first Hash value is: a Hash value obtained by performing a Hash transformation on 0 and the current time based on a preset first Hash function. The first Hash value can be expressed as follows: ,in, Indicates that the two values in the brackets are hashed based on the preset first hash function. The second hash value is: the hash value obtained by performing a hash transformation on 1 and the current time based on the first hash function; the second hash value can be expressed by the following expression: The first quantity is: a hash value obtained by performing a hash transformation on the first data and the first encryption key based on a preset second hash function. The first quantity can be expressed as follows: ,in, It indicates that a hash transformation is performed on the two values in the brackets based on a preset second hash function.
[0160] The following is an explanation of the method of batch verification of accuracy.
[0161] Step B1: obtain first products of key certificates corresponding to multiple first encryption keys to be verified, decrypt using the first product and a first initialization parameter as decryption parameters, and obtain a first verification result.
[0162] There may be multiple first data, and the request feedback received by the first user terminal 101 also includes the first data ciphertext corresponding to each first data, the partially decrypted ciphertext of the first encryption key, and the key certificate. In other words, the first user terminal can receive multiple key certificates corresponding to multiple first data.
[0163] Assuming that the number of first encryption keys is n, then the first product of the key certificates corresponding to the n first encryption keys is: , and then, the first product and the first initialization parameter are decrypted using a preset decryption algorithm as decryption parameters, and the first verification result can be expressed as: .
[0164] Step B2: Obtain the second product of the verification keys corresponding to the multiple first encryption keys to be verified, and decrypt using the second product and the first Hash value as decryption parameters to obtain a second verification result.
[0165] The verification key is: pre-generated by the management service based on the first initialization parameter and the first parameter, and the first parameter is: a parameter obtained by calculating the identifier of the weighted attribute of the first user.
[0166] Similarly, if the number of first encryption keys is n, the second product of the verification keys corresponding to the n first encryption keys is: , is the verification key corresponding to the kth first encryption key. Then, the second product and the first hash value are used as the decryption parameter for decryption. The obtained second verification result can be expressed as: .
[0167] Step B3: Obtain the third product of the transformed keys corresponding to the multiple first encryption keys to be verified, decrypt using the third product and the second Hash value as decryption parameters to obtain a third verification result.
[0168] The transformation key is: the first power of the verification key corresponding to the first encryption key. The first power is: , the values of the first quantities corresponding to the multiple first encryption keys are also different, and the verification key of each first encryption key has a corresponding first quantity, that is, the transformation key is: , is the first number of verification keys corresponding to the kth first encryption key. Similarly, if the number of first encryption keys is n, the third product of the transformation keys corresponding to the n first encryption keys is: . Then, the third product and the second Hash value are used as decryption parameters for decryption, and the third verification result can be expressed as: .
[0169] Step B4: Calculate the product of the second verification result and the third verification result to obtain a fourth verification result.
[0170] Taking the second verification result and the third verification result obtained in step B3 above as an example, the fourth verification result obtained is: .
[0171] Step B4: Determine whether the fourth verification result is the same as the first verification result.
[0172] If the fourth verification result is the same as the first verification result, it is determined that the multiple first encryption keys to be verified have passed the batch verification. If the fourth verification result is different from the first verification result, it is determined that the multiple first encryption keys to be verified have not passed the batch verification.
[0173] Taking the fourth verification result obtained in step B3 and the first verification result obtained in step B1 as examples, it is possible to determine whether the fourth verification result is the same as the first verification result by determining whether the following expression is true: .
[0174] In this way, the first data and the first encryption key obtained by decryption can be verified in batches, without verifying the accuracy of the data one by one, thereby reducing the computing resources required for data accuracy verification. Compared with the method of verifying each first encryption key and first data one by one, batch verification for a batch of first encryption keys and corresponding first data can improve the efficiency of verification.
[0175] Furthermore, in the case where the cloud storage service maliciously provides an erroneous partial decryption result, the first user terminal can maintain the overall security of the system and the confidentiality of the data by verifying the accuracy of the first data obtained by decryption.
[0176] Combine the following Figure 3a and Figure 3b The access control system provided in the embodiment of the present application is described.
[0177] In one embodiment of the present application, see Figure 3a A structural diagram of another access control system is provided, the access control system comprising: a first user terminal 101, a cloud storage service 102 and a management service 104.
[0178] See also Figure 3b A signaling diagram of a user registration process is provided.
[0179] The first user terminal 101 is further configured to send a registration request of the first user to the management service 104 .
[0180] The registration request includes a user ID of the user sending the registration request. Further, the registration request information may also include attribute request information of the weighted attribute requested for registration. The registration request may also include identity verification information, which is verification information that enables the management service 104 to verify the registration request. For example, the identity verification information may be a verification code, etc.
[0181] The management service 104 is used to combine parameters based on the attribute identifier of the weighted attribute of the first user, the key parameters in the master key, the key parameters in the attribute identifier key and the key parameters in the weight key to generate a partial decryption key for the first user; and obtain the complete decryption key of the first user based on the set key parameters in the master key.
[0182] The partial decryption key is used for each user to which the first user terminal belongs. The management service generates a partial decryption key and a complete decryption key corresponding to the user, and sends the partial decryption key and the complete decryption key to the first user terminal, so that the first user terminal can record and store the partial decryption key and the complete decryption key corresponding to the first user. Moreover, for users with different weighted attributes, the partial decryption key and the complete decryption key of each user are also different.
[0183] The method of generating the master key, identification key, weight key, partial decryption key and complete decryption key is described below and will not be described in detail here.
[0184] The management service 104 is used to feed back the partial decryption key and the complete decryption key to the first user terminal 101 .
[0185] From the above, it can be seen that the management service pre-generates a master key, an attribute identification key of the weighted attribute of the first user, and an attribute weight key before the user sends a registration request. In this way, when the user sends a registration request, the management service can generate partial decryption keys and complete decryption keys more efficiently based on the generated master key, the attribute identification key of the weighted attribute of the first user, and the attribute weight key, thereby improving the efficiency of key generation and reducing the computing pressure of the management service when a large number of users register.
[0186] The following describes how the management service 104 generates the master key of the first user.
[0187] Step C1: Select a fifth number of first parameters from the attribute domain corresponding to the first user.
[0188] The attribute domain includes: a first parameter and a second parameter. The first parameter is a parameter obtained by calculating the identifier of the weighted attribute of the first user, and the second parameter is a parameter obtained by calculating the attribute weight of the weighted attribute of the first user. The attribute domain includes the numerical range of the parameter corresponding to the identifier of each weighted attribute. In this way, according to the identifier of the weighted attribute of the first user, the numerical range corresponding to the identifier of the weighted attribute of the first user can be determined, and the fifth number of first parameters can be selected in the numerical range. For example, the management service 104 can select three first parameters, and the three first parameters can be respectively The weight domain includes the numerical range of the parameter corresponding to the attribute weight of each weighted weight, so that the numerical range corresponding to the attribute weight of the weighted weight of the first user can be determined according to the attribute weight of the weighted weight of the first user, and the second parameter can be selected within the numerical range.
[0189] Step C2: Select a sixth number of first weights from the weight domain corresponding to the first user.
[0190] The weight field includes: the attribute weight of the weighted attribute of the first user.
[0191] Management service 104 may select a second parameter to Represents the second parameter.
[0192] The weight domain includes the numerical range of the parameter corresponding to each attribute weight. Thus, according to the attribute weight of the first user, the numerical range corresponding to the attribute weight of the first user can be determined, and the sixth number of first weights can be selected in the numerical range. For example, the management service 104 can select 1 first weight to represents the first weight.
[0193] Step C3: Based on the selected first parameter, the first weight, the first initialization parameter and the second initialization parameter, a plurality of first key parameters are generated to obtain a master key of the first user including the plurality of first key parameters.
[0194] For example, three first key parameters may be generated, such as first key parameter 1: 、First key parameter 2: 、First key parameter 3: Then, the obtained master key of the first user including multiple first key parameters can be expressed as follows: .
[0195] The following describes the manner in which the management service 104 generates the attribute identification keys of the weighted attributes of the first user.
[0196] Step D1: Select two first parameters from the attribute domain, and select two first weights from the weight domain.
[0197] For example, the management service 104 may select two first parameters, and the selected two first parameters are respectively Indicates that the management service 104 may select a first weight to represents the first weight.
[0198] Step D2: Based on the selected first parameter and the first initialization parameter, a second key parameter is generated, and based on the selected first parameter and the first weight, a third key parameter is generated, to obtain attribute identification keys of the weighted attributes of the first user including the selected first parameter, the second key parameter and the third key parameter.
[0199] For example, the generated second key parameter may be expressed as follows: , the generated third key parameter is expressed as follows: Then, the attribute identification keys of the weighted attributes of the first user including the selected first parameter, second key parameter and third key parameter can be expressed as follows: .
[0200] Then, the management service 104 can reselect a first parameter that has not been selected from the attribute domain, select a first weight that has not been selected from the weight domain, and re-execute the above steps D1 and D2 until all first parameters and first weights have been selected, thereby obtaining the attribute representation keys of each weighted attribute of the first user.
[0201] The following describes the manner in which the management service 104 generates the attribute identification keys of the weighted attributes of the first user.
[0202] Step E1: For each attribute weight in the weight domain, determine the first parameter corresponding to the weighted attribute to which the attribute weight belongs from the attribute domain, generate a fourth key parameter based on the determined first parameter and the attribute weight, and obtain an attribute weight key corresponding to the attribute weight that includes the determined first parameter and the fourth key parameter.
[0203] For example, for each attribute weight in the weight domain, the management service 104 may determine the first The first parameter corresponding to the weighted attribute to which the attribute weight belongs is: . The attribute weight can be expressed as: .
[0204] Then, the fourth key parameter can be generated according to the following expression: .
[0205] The resulting attribute weight key can be expressed as follows: .
[0206] Then, the management service 104 may reselect unselected attribute weights from the weight domain and re-execute the above step E1 until all attribute weights have been selected, thereby obtaining the attribute weight key corresponding to each attribute weight.
[0207] In this way, pre-generating the master key, the attribute identification key and the attribute weight key of the weighted attribute of the first user can ensure that corresponding keys are generated for each attribute identification and attribute weight. When the user sends a registration request, the management service can generate partial decryption keys and complete decryption keys more efficiently based on the generated master key, the attribute identification key and the attribute weight key of the weighted attribute of the first user, thereby improving the efficiency of key generation and reducing computing pressure.
[0208] The following describes the manner in which the management service 104 generates a partial decryption key for the first user.
[0209] Step F1: For each weighted attribute of the first user, a fifth key parameter is generated based on the key parameter in the master key, the key parameter in the attribute identification key and the key parameter in the weight key; a sixth key parameter is generated based on the first parameter, the second parameter and the identification value of the weighted attribute used to generate the attribute identification key of the weighted attribute; a seventh key parameter is generated based on the first parameter corresponding to the weighted attribute in the attribute domain and the second parameter corresponding to the attribute weight of the weighted attribute in the weight domain.
[0210] For each weighted attribute, a fifth key parameter, a sixth key parameter and a seventh key parameter corresponding to the weighted attribute will be generated, and for the seventh key parameter of a weighted attribute, a seventh key parameter of each attribute weight of the weighted attribute needs to be generated. The following is an example of generating the seventh key parameter of the j-th attribute weight of the i-th weighted attribute of the first user, and the fifth key parameter and sixth key parameter corresponding to the i-th weighted attribute.
[0211] The seventh key parameter of the j-th attribute weight of the i-th weighted attribute is generated according to the following expression: ,in, is the first parameter corresponding to the i-th weighted attribute in the attribute domain, is the second parameter corresponding to the j-th attribute weight of the ith weighted attribute.
[0212] The sixth key parameter of the i-th weighted attribute is generated according to the following expression: ,in, is the identification value of the i-th weighted attribute, is the second parameter of the i-th weighted attribute.
[0213] The fifth key parameter of the i-th weighted attribute is generated according to the following expression: ,in, The key parameters in the master key, Identifies the key parameters in the key for the i-th attribute, is the key parameter in the i-th weight key.
[0214] Step F2: Combine the attribute identifier of the weighted attribute of the first user, the key parameter in the master key, the key parameter in the attribute identifier key, the fifth key parameter, the key parameter in the weight key, the sixth key parameter and the seventh key parameter to obtain a partial decryption key for the first user.
[0215] Specifically, the attribute identifier of the weighted attribute of the first user, the key parameter in the master key, the key parameter in the attribute identifier key, the fifth key parameter, the key parameter in the weight key, the sixth key parameter and the seventh key parameter are combined to obtain a partial decryption key of the first user. The key parameter in the master key used in the combination may include: two first key parameters in the master key, the key parameter in the attribute identifier key used in the combination may include: the second key parameter and the third key parameter in the master key, and the key parameter in the weight key used in the combination may include: the fourth key parameter in the weight key.
[0216] For example, the partial decryption key of the first user can be expressed as follows:
[0217] ;
[0218] Wherein, S is the attribute identifier of the weighted attribute of the first user, and Key parameters in the master key, for example, , , and are the first key parameters in the master key, Identify the key parameters in the key for the attribute, for example, , is the second key parameter in the master key corresponding to the i-th weighted attribute, is the key parameter in the weight key, for example, = , is the jth attribute weight of the ith weighted attribute, The first user terminal 101 obtains the above-mentioned partial decryption key. If the first user terminal 101 sends the first user's data access request and the above-mentioned partial decryption key to the cloud storage service 102, the cloud storage service 102 will convert the above-mentioned partial decryption key into As the first decryption parameter, As the second decryption parameter, The third decryption parameter corresponding to the i-th weighted attribute of the first user, The fifth decryption parameter as the i-th weighted attribute of the first user, The sixth decryption parameter corresponding to the i-th weighted attribute of the first user, as the seventh decryption parameter corresponding to the i-th weighted attribute of the first user except the j-th attribute weight, The eighth decryption parameter corresponding to the jth attribute weight of the i-th weighted attribute of the first user is partially decrypted.
[0219] The management service may choose to set the key parameter as the complete decryption key. For example, the set key parameter may be the first parameter used to generate the master key of the first user, such as the first parameter selected when generating the master key of the first user. .
[0220] In this way, the generated partial decryption key can carry the weighted attribute information of the first user in the form of a key. When the weighted attribute of the first user falls within the scope of the access policy of the first data, the first key ciphertext that encrypts the first data can be successfully decrypted, so that the cloud storage service determines that the weighted attribute of the first user matches the first access policy, thereby ensuring the privacy of the data.
[0221] Corresponding to the above-mentioned access control system, an embodiment of the present application provides an access control method.
[0222] In one embodiment of the present application, see Figure 4 A flow chart of an access control method is provided. The method is applied to a first user terminal 101. The method includes the following steps S401-S403.
[0223] Step S401: Send a data access request of a first user and a partial decryption key of the first user to the cloud storage service 102, so that the cloud storage service 102 partially decrypts a first key ciphertext based on the partial decryption key.
[0224] The first key ciphertext is: a ciphertext obtained by encrypting the first encryption key with the first access policy of the first data as an encryption parameter, the first access policy is described by the weighted attribute of the user, the first data is: the data requested to be accessed by the data access request, and the first encryption key is: a key used to encrypt the first data to obtain the first data ciphertext;
[0225] Step S402: In response to receiving a request feedback for a data access request, decrypt a portion of the decrypted ciphertext included in the request feedback based on a complete decryption key of the first user to obtain a first encryption key.
[0226] The request feedback is sent by the cloud storage service 102 when the partial decryption result indicates that the weighted attribute of the first user matches the first access policy.
[0227] Step S403: decrypt the first data ciphertext included in the request feedback based on the first encryption key to obtain the first data.
[0228] The implementation of steps S401-S403 may refer to the above embodiment of the access control system, which will not be described in detail here.
[0229] As can be seen from the above, by applying the access control method provided in the embodiment of the present application, what is stored in the cloud storage service 102 is the first key ciphertext and the first data ciphertext. When the partial decryption result sent by the first user represents that the weighted attribute of the first user matches the first access policy, the cloud storage service 102 will partially decrypt the first key ciphertext. The cloud storage service 102 can obtain the partial decrypted ciphertext and the first data ciphertext. Therefore, it is difficult for the cloud storage service 102 to obtain the first encryption key and the first data, and users whose weighted attributes do not match the first access policy cannot obtain the first encryption key and the first data. In this way, the privacy and security of the data can be improved.
[0230] In one embodiment of the present application, before the first user terminal 101 sends the first user's data access request and the first user's partial decryption key to the cloud storage service 102, the first user terminal 101 also includes the following steps: sending the first user's registration request to the management service 104; obtaining the partial decryption key and the complete decryption key fed back by the management service 104 based on the pre-generated first user's master key, the attribute identification key of the weighted attribute, and the attribute weight key.
[0231] Specifically, the implementation method of the embodiment of the present application can refer to the embodiment of the access control system above, which will not be described in detail here.
[0232] As can be seen from the above, the management service 104 pre-generates a master key, an attribute identification key of the weighted attribute of the first user, and an attribute weight key before the user sends a registration request. In this way, when the user sends a registration request, the management service 104 can generate partial decryption keys and complete decryption keys more efficiently based on the generated master key, the attribute identification key of the weighted attribute of the first user, and the attribute weight key, thereby improving the efficiency of key generation and reducing the computing pressure of the management service 104 when a large number of users register.
[0233] In one embodiment of the present application, requesting feedback further includes: a key certification of the first encryption key;
[0234] After the first user terminal 101 decrypts the first data ciphertext included in the request feedback based on the first encryption key to obtain the first data, the following steps are also included: batch verifying the accuracy of the first encryption key based on key certification.
[0235] Specifically, the implementation method of the embodiment of the present application can refer to the embodiment of the access control system above, which will not be described in detail here.
[0236] In this way, by generating a key certificate for the encryption key, the first user terminal 101 can determine whether the encryption key obtained by decryption is accurate through the key certificate, avoid using the wrong encryption key to decrypt the data ciphertext, avoid invalid decryption calculations, reduce errors in decrypting the encryption key ciphertext, and reduce the waste of computing resources.
[0237] In one embodiment of the present application, the first user terminal 101 performs batch accuracy verification in the following manner: obtain a first product of key certificates corresponding to multiple first encryption keys to be verified, decrypt with the first product and the first initialization parameter as the decryption parameter, and obtain a first verification result; obtain a second product of verification keys corresponding to multiple first encryption keys to be verified, decrypt with the second product and the first hash value as the decryption parameter, and obtain a second verification result, wherein the verification key is: pre-generated by the management service based on the first initialization parameter and the first parameter, the first parameter is: a parameter obtained by calculating the identifier of the weighted attribute of the first user, and the first hash value is: a hash value obtained by hashing 0 and the current time based on a preset first hash function; obtain multiple first The third product of the transformation key corresponding to the encryption key is decrypted with the third product and the second hash value as the decryption parameter to obtain a third verification result, wherein the transformation key is: the first quantity power of the verification key corresponding to the first encryption key, the first quantity is a hash value obtained by hashing the first data and the first encryption key based on a preset second hash function, and the second hash value is: a hash value obtained by hashing 1 and the current time based on the first hash function; the product of the second verification result and the third verification result is calculated to obtain a fourth verification result; if the fourth verification result is the same as the first verification result, it is determined that the multiple first encryption keys to be verified have passed the batch verification; if the fourth verification result is different from the first verification result, it is determined that the multiple first encryption keys to be verified have not passed the batch verification.
[0238] Specifically, the implementation method of the embodiment of the present application can refer to the embodiment of the access control system above, which will not be described in detail here.
[0239] In this way, the first data and the first encryption key obtained by decryption can be verified in batches without verifying whether the data is accurate one by one, thereby reducing the computing resources required for verifying the accuracy of the data.
[0240] In one embodiment of the present application, see Figure 5 A flow chart of another access control method is provided. The method is applied to the second user terminal 103. The method includes the following steps S501-S505.
[0241] Step S501: Obtain a second encryption key.
[0242] Step S502: encrypt the second data to be uploaded by the second user based on the second encryption key to obtain a second data ciphertext.
[0243] Step S503: Determine a second access policy for second data described by the weighted attributes of the user.
[0244] Step S504: Encrypt the second encryption key using the second access policy as an encryption parameter to obtain a second key ciphertext.
[0245] Step S505: Upload the second data ciphertext and the second key ciphertext to the cloud storage service 102.
[0246] The implementation of steps S501-S505 may refer to the above embodiment of the access control system, which will not be described in detail here.
[0247] As can be seen from the above, users can set data access policies. When setting access policies, users can flexibly set attribute identifiers and attribute weights in the access policies to set weighted data for users who can access the uploaded data, thereby achieving more fine-grained control over data access rights, achieving more flexible and precise permission control, and improving data security.
[0248] In one embodiment of the present application, the above method also includes: generating a key certificate of a second encryption key based on a user certificate private key of a second user pre-generated by the management service 104, wherein the user certificate private key is generated based on a first parameter, and the first parameter is: a parameter obtained by calculating an identifier of a weighted attribute of the second user; the above step S505 is implemented in the following manner: uploading the second data ciphertext, the second key ciphertext and the key certificate of the second key to the cloud storage service 102.
[0249] In addition, when the cloud storage service 102 fails to accurately decrypt part of the key ciphertext, the first user terminal 101 can also use the key proof to determine whether the encryption key obtained by decryption is accurate, thereby reducing the impact of malicious behavior of the cloud storage service 102 and maintaining the overall security of the access control system and the confidentiality of the data.
[0250] In one embodiment of the present application, see Figure 6 A flowchart of another access control method is provided, the method is applied to the cloud storage service 102, and the method includes the following steps:
[0251] Step S601: receiving a data access request of a first user and a partial decryption key of the first user sent by a first user terminal 101.
[0252] Step S602: searching for a first data ciphertext and a first key ciphertext of the first data requested to be accessed by the data access request.
[0253] Among them, the first key ciphertext is: the ciphertext obtained by encrypting the first encryption key with the first access strategy of the first data as the encryption parameter, the first access strategy is described by the weighted attributes of the user, and the first encryption key is: the key used to encrypt the first data to obtain the first data ciphertext.
[0254] Step S603: Partially decrypt the first key ciphertext based on the partial decryption key to obtain a partial decryption result.
[0255] Step S604 : if the partial decryption result indicates that the weighted attribute of the first user matches the access policy of the first data, a request feedback for the data access request is sent to the first user terminal 101 .
[0256] The request feedback includes: the partially decrypted ciphertext obtained by partial decryption and the first data ciphertext, so that the first user terminal 101 decrypts the first data ciphertext based on the partially decrypted ciphertext to obtain the first data.
[0257] The implementation of steps S601-S604 may refer to the above embodiment of the access control system, which will not be described in detail here.
[0258] As can be seen from the above, by applying the access control method provided in the embodiment of the present application, what is stored in the cloud storage service 102 is the first key ciphertext and the first data ciphertext. When the partial decryption result sent by the first user represents that the weighted attribute of the first user matches the first access policy, the cloud storage service 102 will partially decrypt the first key ciphertext. The cloud storage service 102 can obtain the partial decrypted ciphertext and the first data ciphertext. Therefore, it is difficult for the cloud storage service 102 to obtain the first encryption key and the first data, and users whose weighted attributes do not match the first access policy cannot obtain the first encryption key and the first data. In this way, the privacy and security of the data can be improved.
[0259] In one embodiment of the present application, the cloud storage service 102 performs partial decryption in the following manner:
[0260] Decryption is performed using the first ciphertext in the first key ciphertext and the first decryption parameter in the partial decryption key as decryption parameters to obtain a first decryption result, wherein the first ciphertext is generated based on the first initialization parameter and the attribute identifier of the weighted attribute of the first user; for each weighted attribute of the first user, decryption is performed using the second ciphertext corresponding to the weighted attribute and the second decryption parameter in the partial decryption key as decryption parameters to obtain a second decryption result, decryption is performed using the third ciphertext corresponding to the weighted attribute and the third decryption parameter corresponding to the weighted attribute in the partial decryption key to obtain a third decryption result, decryption is performed using the fourth ciphertext corresponding to the weighted attribute and the fourth decryption parameter corresponding to the weighted attribute in the partial decryption key to obtain a fourth decryption result, and the power of the fourth decryption result is obtained to obtain a fifth decryption result, wherein the second ciphertext is generated based on the second parameter used when the management service generates the master key of the first user offline, the second initialization parameter and the first parameter corresponding to the weighted attribute, the first parameter is: a parameter obtained by calculating the identifier of the weighted attribute of the first user, and the second parameter is: a parameter obtained by calculating the attribute weight of the weighted attribute of the first user The third ciphertext is generated based on the second parameter used when the management service generates the attribute identification key of the weighted attribute offline, the first parameter corresponding to the weighted attribute and the second parameter corresponding to the weight of the weighted attribute of the first user. The fourth ciphertext is generated based on the first initialization parameter and the first parameter corresponding to the weighted attribute. The fourth decryption parameter is: a parameter obtained by multiplying the fifth decryption parameter corresponding to the weighted attribute in the partial decryption key, the third power of the first weight selected from the weight domain, the seventh decryption parameter corresponding to the weighted attribute in the partial decryption key, and the fourth power of the first weight selected from the weight domain, the weight domain includes the attribute weight of the weighted attribute of the first user, the third number is the sixth decryption parameter corresponding to the weighted attribute in the partial decryption key, the fourth number is the eighth decryption parameter corresponding to the weighted attribute in the partial decryption key, and the second number is the value of the first parameter corresponding to the weighted attribute; the product of the second decryption result, the third decryption result and the fifth decryption result is calculated to obtain the sixth decryption result; based on the first decryption result and the sixth decryption result, a partial decryption result for partially decrypting the first key ciphertext is obtained.
[0261] In this way, when attribute weights are introduced during the partial decryption process, partial decryption is successfully performed to obtain partially decrypted ciphertext only when the weighted attributes of the first user match the access policy of the first data. By setting an access policy with attribute weights, the flexibility of access permission settings can be improved.
[0262] In one embodiment of the present application, the request feedback also includes: a key certificate of the first encryption key. Specifically, the description of the embodiment of the present application can refer to the embodiment of the access control system above, which will not be described in detail here.
[0263] In this way, by generating a key certificate for the encryption key, the first user terminal 101 can determine whether the encryption key obtained by decryption is accurate through the key certificate, avoid using the wrong encryption key to decrypt the data ciphertext, avoid invalid decryption calculations, reduce errors in decrypting the encryption key ciphertext, and reduce the waste of computing resources.
[0264] In one embodiment of the present application, the above method also includes: receiving a second data ciphertext and a second key ciphertext uploaded by a second user terminal 103, wherein the second data ciphertext is: a ciphertext obtained by encrypting the second data to be uploaded by the second user based on a second encryption key, and the second key ciphertext is: a ciphertext obtained by encrypting the second encryption key with a second access strategy as an encryption parameter; and storing the second data ciphertext and the second key ciphertext.
[0265] Specifically, the implementation method of the embodiment of the present application can refer to the embodiment of the access control system above, which will not be described in detail here.
[0266] As can be seen from the above, users can set data access policies. When setting access policies, users can flexibly set attribute identifiers and attribute weights in the access policies to set weighted data for users who can access the uploaded data, thereby achieving more fine-grained control over data access rights, achieving more flexible and precise permission control, and improving data security.
[0267] In one embodiment of the present application, see Figure 7 A flowchart of another access control method is provided, which is applied to the management service 104. The method includes:
[0268] Step S701: receiving a registration request of a first user sent by the first user terminal 101.
[0269] Step S702: Select the master key of the first user, the attribute identification key and the attribute weight key of the weighted attribute from the pre-generated offline keys.
[0270] Step S703: Generate a partial decryption key for the first user based on the attribute identifier of the weighted attribute of the first user, the key parameters in the master key, the key parameters in the attribute identifier key, and the key parameters in the weight key; and obtain a complete decryption key for the first user based on the set key parameters in the master key.
[0271] Step S704 : sending the partial decryption key and the complete decryption key to the first user terminal 101 .
[0272] As can be seen from the above, the management service 104 pre-generates a master key, an attribute identification key of the weighted attribute of the first user, and an attribute weight key before the user sends a registration request. In this way, when the user sends a registration request, the management service 104 can generate partial decryption keys and complete decryption keys more efficiently based on the generated master key, the attribute identification key of the weighted attribute of the first user, and the attribute weight key, thereby improving the efficiency of key generation and reducing the computing pressure of the management service 104 when a large number of users register.
[0273] In one embodiment of the present application, the management service 104 generates the master key of the first user in the following manner:
[0274] Selecting a fifth number of first parameters from the attribute domain corresponding to the first user, wherein the attribute domain includes: a first parameter and a second parameter, the first parameter being a parameter obtained by calculating an identifier of a weighted attribute of the first user, and the second parameter being a parameter obtained by calculating an attribute weight of the weighted attribute of the first user;
[0275] Selecting a sixth number of first weights from the weight domain corresponding to the first user, wherein the weight domain includes: attribute weights of weighted attributes of the first user;
[0276] Based on the selected first parameter, the first weight, the first initialization parameter, and the second initialization parameter, a plurality of first key parameters are generated to obtain a master key of the first user including the plurality of first key parameters;
[0277] In one embodiment of the present application, the management service 104 generates each attribute identification key of the weighted attribute of the first user in the following manner:
[0278] Select two first parameters from the attribute domain and select two first weights from the weight domain;
[0279] Generate a second key parameter based on the selected first parameter and the first initialization parameter, and generate a third key parameter based on the selected first parameter and the first weight, and obtain each attribute identification key of the weighted attribute of the first user including the selected first parameter, the second key parameter, and the third key parameter;
[0280] In one embodiment of the present application, the management service 104 generates each attribute weight key of the weighted attribute of the first user in the following manner:
[0281] For each attribute weight in the weight domain, determine the first parameter corresponding to the weighted attribute to which the attribute weight belongs from the attribute domain, generate a fourth key parameter based on the determined first parameter and the attribute weight, and obtain an attribute weight key corresponding to the attribute weight that includes the determined first parameter and the fourth key parameter.
[0282] In this way, pre-generating the master key, the attribute identification key and the attribute weight key of the weighted attribute of the first user can ensure that corresponding keys are generated for each attribute identification and attribute weight. When the user sends a registration request, the management service can generate partial decryption keys and complete decryption keys more efficiently based on the generated master key, the attribute identification key and the attribute weight key of the weighted attribute of the first user, thereby improving the efficiency of key generation and reducing computing pressure.
[0283] In one embodiment of the present application, the management service 104 generates a partial decryption key for the first user in the following manner: for each weighted attribute of the first user, based on the key parameters in the master key, the key parameters in the attribute identification key and the key parameters in the weight key, a fifth key parameter is generated; based on the first parameter, the second parameter and the identification value of the weighted attribute used to generate the attribute identification key of the weighted attribute, a sixth key parameter is generated; based on the first parameter corresponding to the weighted attribute in the attribute domain and the second parameter corresponding to the attribute weight of the weighted attribute in the weight domain, a seventh key parameter is generated; the attribute identification of the weighted attribute of the first user, the key parameter in the master key, the key parameter in the attribute identification key, the fifth key parameter, the key parameter in the weight key, the sixth key parameter and the seventh key parameter are combined to obtain a partial decryption key for the first user.
[0284] In this way, the generated partial decryption key can carry the weighted attribute information of the first user in the form of a key. When the weighted attribute of the first user falls within the scope of the access policy of the first data, the first key ciphertext that encrypts the first data can be successfully decrypted, so that the cloud storage service determines that the weighted attribute of the first user matches the first access policy, thereby ensuring the privacy of the data.
[0285] Corresponding to the above-mentioned access control method, an embodiment of the present application provides an access control device.
[0286] In one embodiment of the present application, see Figure 8 A schematic diagram of the structure of an access control device is provided, which is applied to a first user terminal 101. The device includes:
[0287] The access request sending module 801 is used to send a data access request of a first user and a partial decryption key of the first user to the cloud storage service 102, so that the cloud storage service 102 partially decrypts a first key ciphertext based on the partial decryption key, wherein the first key ciphertext is: a ciphertext obtained by encrypting the first encryption key with a first access policy of the first data as an encryption parameter, the first access policy is described by a weighted attribute of the user, the first data is: the data requested to be accessed by the data access request, and the first encryption key is: a key used to encrypt the first data to obtain the first data ciphertext;
[0288] a complete ciphertext decryption module 802, configured to, in response to receiving a request feedback for a data access request, decrypt a partial decrypted ciphertext included in the request feedback based on a complete decryption key of the first user to obtain a first encryption key, wherein the request feedback is sent by the cloud storage service 102 when the partial decryption result indicates that the weighted attribute of the first user matches the first access policy;
[0289] The data ciphertext decryption module 803 is used to decrypt the first data ciphertext included in the request feedback based on the first encryption key to obtain the first data.
[0290] As can be seen from the above, by applying the access control method provided in the embodiment of the present application, what is stored in the cloud storage service 102102 is the first key ciphertext and the first data ciphertext. When the partial decryption result sent by the first user represents that the weighted attribute of the first user matches the first access policy, the cloud storage service 102 will partially decrypt the first key ciphertext. The cloud storage service 102 can obtain the partial decrypted ciphertext and the first data ciphertext. Therefore, it is difficult for the cloud storage service 102 to obtain the first encryption key and the first data, and users whose weighted attributes do not match the first access policy cannot obtain the first encryption key and the first data. In this way, the privacy and security of the data can be improved.
[0291] In one embodiment of the present application, the above-mentioned device further includes:
[0292] Before sending the data access request of the first user and the partial decryption key of the first user to the cloud storage service 102, the method further includes:
[0293] A registration request sending module, used to send a registration request of a first user to the management service 104;
[0294] A decryption key obtaining module, used to obtain a partial decryption key and a complete decryption key fed back by the management service 104 based on a pre-generated master key of the first user, an attribute identification key of a weighted attribute, and an attribute weight key;
[0295] As can be seen from the above, the management service 104 pre-generates a master key, an attribute identification key of the weighted attribute of the first user, and an attribute weight key before the user sends a registration request. In this way, when the user sends a registration request, the management service 104 can generate partial decryption keys and complete decryption keys more efficiently based on the generated master key, the attribute identification key of the weighted attribute of the first user, and the attribute weight key, thereby improving the efficiency of key generation and reducing the computing pressure of the management service 104 when a large number of users register.
[0296] In one embodiment of the present application, requesting feedback further includes: a key certification of the first encryption key;
[0297] The above device also includes:
[0298] A batch verification module is used to batch verify the accuracy of the first encryption key based on the key certification.
[0299] In this way, by generating a key certificate for the encryption key, the first user terminal 101 can determine whether the encryption key obtained by decryption is accurate through the key certificate, avoid using the wrong encryption key to decrypt the data ciphertext, avoid invalid decryption calculations, reduce errors in decrypting the encryption key ciphertext, and reduce the waste of computing resources.
[0300] In one embodiment of the present application, a batch verification module is specifically used to obtain a first product of key certificates corresponding to multiple first encryption keys to be verified, decrypt with the first product and a first initialization parameter as a decryption parameter to obtain a first verification result; obtain a second product of verification keys corresponding to multiple first encryption keys to be verified, decrypt with the second product and a first hash value as a decryption parameter to obtain a second verification result, wherein the verification key is: pre-generated by a management service based on a first initialization parameter and a first parameter, the first parameter is: a parameter obtained by calculating an identifier of a weighted attribute of a first user, and the first hash value is: a hash value obtained by performing a hash transformation on 0 and a current time based on a preset first hash function; obtain multiple first encryption keys to be verified, respectively The third product of the corresponding transformation key is decrypted with the third product and the second hash value as the decryption parameter to obtain a third verification result, wherein the transformation key is: the first quantity power of the verification key corresponding to the first encryption key, the first quantity is a hash value obtained by hashing the first data and the first encryption key based on a preset second hash function, and the second hash value is: a hash value obtained by hashing 1 and the current time based on the first hash function; the product of the second verification result and the third verification result is calculated to obtain a fourth verification result; if the fourth verification result is the same as the first verification result, it is determined that the multiple first encryption keys to be verified have passed the batch verification; if the fourth verification result is different from the first verification result, it is determined that the multiple first encryption keys to be verified have not passed the batch verification.
[0301] In this way, the first data and the first encryption key obtained by decryption can be verified in batches without verifying whether the data is accurate one by one, thereby reducing the computing resources required for verifying the accuracy of the data.
[0302] In one embodiment of the present application, see Fig. 9 A schematic diagram of the structure of another access control device is provided, which is applied to the second user terminal 103. The device includes:
[0303] The encryption key obtaining module 901 is used to obtain a second encryption key;
[0304] The data encryption module 902 is used to encrypt the second data to be uploaded by the second user based on the second encryption key to obtain a second data ciphertext;
[0305] An access policy determination module 903, configured to determine a second access policy for second data described by weighted attributes of a user;
[0306] The encryption key encryption module 904 is used to encrypt the second encryption key using the second access policy as an encryption parameter to obtain a second key ciphertext;
[0307] The ciphertext uploading module 905 is used to upload the second data ciphertext and the second key ciphertext to the cloud storage service 102 .
[0308] As can be seen from the above, users can set data access policies. When setting access policies, users can flexibly set attribute identifiers and attribute weights in the access policies to set weighted data for users who can access the uploaded data, thereby achieving more fine-grained control over data access rights, achieving more flexible and precise permission control, and improving data security.
[0309] In one embodiment of the present application, the above-mentioned device further includes:
[0310] A key certification generating module, configured to generate a key certification of a second encryption key based on a user certification private key of a second user pre-generated by the management service 104, wherein the user certification private key is generated based on a first parameter, wherein the first parameter is a parameter obtained by operating an identifier of a weighted attribute of the second user;
[0311] The ciphertext uploading module is specifically used to upload the second data ciphertext, the second key ciphertext and the key certificate of the second key to the cloud storage service 102.
[0312] In this way, by generating a key certificate for the encryption key, the first user terminal 101 can determine whether the encryption key obtained by decryption is accurate through the key certificate, avoid using the wrong encryption key to decrypt the data ciphertext, avoid invalid decryption calculations, reduce errors in decrypting the encryption key ciphertext, and reduce the waste of computing resources.
[0313] In one embodiment of the present application, see Fig.10 A schematic diagram of the structure of another access control device is provided, which is applied to the cloud storage service 102. The device includes:
[0314] The access request receiving module 1001 is used to receive a data access request of a first user and a partial decryption key of the first user sent by the first user terminal 101;
[0315] The ciphertext search module 1002 is used to search for a first data ciphertext and a first key ciphertext of the first data requested by the data access request, wherein the first key ciphertext is: a ciphertext obtained by encrypting a first encryption key with a first access policy of the first data as an encryption parameter, the first access policy is described by a weighted attribute of a user, and the first encryption key is: a key used to encrypt the first data to obtain the first data ciphertext;
[0316] A partial decryption module 1003, configured to partially decrypt the first key ciphertext based on the partial decryption key to obtain a partial decryption result;
[0317] The request feedback sending module 1004 is used to send request feedback for the data access request to the first user terminal 101 if the partial decryption result represents that the weighted attribute of the first user matches the access policy of the first data, wherein the request feedback includes: the partial decryption ciphertext obtained by the partial decryption and the first data ciphertext, so that the first user terminal 101 decrypts the first data ciphertext based on the partial decryption ciphertext to obtain the first data.
[0318] As can be seen from the above, by applying the access control scheme provided in the embodiment of the present application, what is stored in the cloud storage service 102 is the first key ciphertext and the first data ciphertext. When the partial decryption result sent by the first user represents that the weighted attribute of the first user matches the first access policy, the cloud storage service 102 will partially decrypt the first key ciphertext. The cloud storage service 102 can obtain the partial decrypted ciphertext and the first data ciphertext. Therefore, it is difficult for the cloud storage service 102 to obtain the first encryption key and the first data, and users whose weighted attributes do not match the first access policy cannot obtain the first encryption key and the first data. In this way, the privacy and security of the data can be improved.
[0319] In one embodiment of the present application, a partial decryption module is specifically used to decrypt using a first ciphertext in a first key ciphertext and a first decryption parameter in a partial decryption key as decryption parameters to obtain a first decryption result, wherein the first ciphertext is generated based on a first initialization parameter and an attribute identifier of a weighted attribute of the first user; for each weighted attribute of the first user, decrypting using a second ciphertext corresponding to the weighted attribute and a second decryption parameter in the partial decryption key as decryption parameters to obtain a second decryption result, decrypting using a third ciphertext corresponding to the weighted attribute and a third decryption parameter corresponding to the weighted attribute in the partial decryption key to obtain a third decryption result, decrypting using a fourth ciphertext corresponding to the weighted attribute and a fourth decryption parameter corresponding to the weighted attribute in the partial decryption key to obtain a fourth decryption result, obtaining the power of the fourth decryption result to obtain a fifth decryption result, wherein the second ciphertext is generated based on a second parameter used when the management service generates a master key of the first user offline, a second initialization parameter and a first parameter corresponding to the weighted attribute, the first parameter is: a parameter obtained by operating the identifier of the weighted attribute of the first user, and the second parameter is: an attribute of the weighted attribute of the first user The third ciphertext is generated based on the second parameter used when the management service generates the attribute identification key of the weighted attribute offline, the first parameter corresponding to the weighted attribute and the second parameter corresponding to the weight of the weighted attribute of the first user. The fourth ciphertext is generated based on the first initialization parameter and the first parameter corresponding to the weighted attribute. The fourth decryption parameter is: a parameter obtained by multiplying the fifth decryption parameter corresponding to the weighted attribute in the partial decryption key, the third power of the first weight selected from the weight domain, the seventh decryption parameter corresponding to the weighted attribute in the partial decryption key, and the fourth power of the first weight selected from the weight domain. The weight domain includes the attribute weight of the weighted attribute of the first user. The third number is the sixth decryption parameter corresponding to the weighted attribute in the partial decryption key, the fourth number is the eighth decryption parameter corresponding to the weighted attribute in the partial decryption key, and the second number is the value of the first parameter corresponding to the weighted attribute. The product of the second decryption result, the third decryption result and the fifth decryption result is calculated to obtain the sixth decryption result. Based on the first decryption result and the sixth decryption result, a partial decryption result of partially decrypting the first key ciphertext is obtained.
[0320] In this way, when attribute weights are introduced during the partial decryption process, partial decryption is successfully performed to obtain partially decrypted ciphertext only when the weighted attributes of the first user match the access policy of the first data. By setting an access policy with attribute weights, the flexibility of access permission settings can be improved.
[0321] In one embodiment of the present application, the request feedback also includes: a key certificate of the first encryption key.
[0322] In this way, by generating a key certificate for the encryption key, the first user terminal 101 can determine whether the encryption key obtained by decryption is accurate through the key certificate, avoid using the wrong encryption key to decrypt the data ciphertext, avoid invalid decryption calculations, reduce errors in decrypting the encryption key ciphertext, and reduce the waste of computing resources.
[0323] In one embodiment of the present application, the above-mentioned device also includes: a ciphertext receiving module, used to receive the second data ciphertext and the second key ciphertext uploaded by the second user terminal 103, wherein the second data ciphertext is: the ciphertext obtained by encrypting the second data to be uploaded by the second user based on the second encryption key, and the second key ciphertext is: the ciphertext obtained by encrypting the second encryption key with the second access strategy as the encryption parameter; a ciphertext storage module, used to store the second data ciphertext and the second key ciphertext.
[0324] As can be seen from the above, users can set data access policies. When setting access policies, users can flexibly set attribute identifiers and attribute weights in the access policies to set weighted data for users who can access the uploaded data, thereby achieving more fine-grained control over data access rights, achieving more flexible and precise permission control, and improving data security.
[0325] In one embodiment of the present application, see Fig.11 A schematic diagram of the structure of another access control device is provided, which provides an access control device applied to the management service 104, and the device includes:
[0326] The registration request receiving module 1101 is used to receive a registration request of a first user sent by the first user terminal 101;
[0327] The offline key selection module 1102 is used to select a master key, an attribute identification key of a weighted attribute of a first user, and an attribute weight key from pre-generated offline keys;
[0328] The key generation module 1103 is used to combine parameters based on the attribute identifier of the weighted attribute of the first user, the key parameters in the master key, the key parameters in the attribute identifier key, and the key parameters in the weight key to generate a partial decryption key for the first user; and obtain a complete decryption key for the first user based on the set key parameters in the master key;
[0329] The decryption key sending module 1104 is used to send a partial decryption key and a complete decryption key to the first user terminal 101.
[0330] As can be seen from the above, the management service 104 pre-generates a master key, an attribute identification key of the weighted attribute of the first user, and an attribute weight key before the user sends a registration request. In this way, when the user sends a registration request, the management service 104 can generate partial decryption keys and complete decryption keys more efficiently based on the generated master key, the attribute identification key of the weighted attribute of the first user, and the attribute weight key, thereby improving the efficiency of key generation and reducing the computing pressure of the management service 104 when a large number of users register.
[0331] In one embodiment of the present application, a master key of a first user is generated in the following manner: a fifth number of first parameters are selected from an attribute domain corresponding to the first user, wherein the attribute domain includes: a first parameter and a second parameter, the first parameter being: a parameter obtained by operating an identifier of a weighted attribute of the first user, and the second parameter being: a parameter obtained by operating an attribute weight of the weighted attribute of the first user; a sixth number of first weights are selected from a weight domain corresponding to the first user, wherein the weight domain includes: the attribute weight of the weighted attribute of the first user; based on the selected first parameters, first weights, first initialization parameters and second initialization parameters, a plurality of first key parameters are generated to obtain a master key of the first user comprising a plurality of first key parameters; and / or, a weighted attribute of the first user is generated in the following manner. Each attribute identification key: select two first parameters from the attribute domain, and select two first weights from the weight domain; generate a second key parameter based on the selected first parameter and the first initialization parameter, and generate a third key parameter based on the selected first parameter and the first weight, to obtain each attribute identification key of the weighted attribute of the first user including the selected first parameter, the second key parameter and the third key parameter; and / or, generate each attribute weight key of the weighted attribute of the first user in the following manner: for each attribute weight in the weight domain, determine from the attribute domain the first parameter corresponding to the weighted attribute to which the attribute weight belongs, generate a fourth key parameter based on the determined first parameter and the attribute weight, and obtain the attribute weight key corresponding to the attribute weight including the determined first parameter and the fourth key parameter.
[0332] In this way, pre-generating the master key, the attribute identification key and the attribute weight key of the weighted attribute of the first user can ensure that corresponding keys are generated for each attribute identification and attribute weight. When the user sends a registration request, the management service can generate partial decryption keys and complete decryption keys more efficiently based on the generated master key, the attribute identification key and the attribute weight key of the weighted attribute of the first user, thereby improving the efficiency of key generation and reducing computing pressure.
[0333] In one embodiment of the present application, a key generation module is specifically used to generate, for each weighted attribute of the first user, a fifth key parameter based on the key parameters in the master key, the key parameters in the attribute identification key, and the key parameters in the weight key; generate a sixth key parameter based on the first parameter, the second parameter, and the identification value of the weighted attribute used to generate the attribute identification key of the weighted attribute; generate a seventh key parameter based on the first parameter corresponding to the weighted attribute in the attribute domain and the second parameter corresponding to the attribute weight of the weighted attribute in the weight domain; the attribute identification of the weighted attribute of the first user, the key parameter in the master key, the key parameter in the attribute identification key, the fifth key parameter, the key parameter in the weight key, the sixth key parameter, and the seventh key parameter are combined to obtain a partial decryption key of the first user.
[0334] In this way, the generated partial decryption key can carry the weighted attribute information of the first user in the form of a key. When the weighted attribute of the first user falls within the scope of the access policy of the first data, the first key ciphertext that encrypts the first data can be successfully decrypted, so that the cloud storage service determines that the weighted attribute of the first user matches the first access policy, thereby ensuring the privacy of the data.
[0335] In the technical solution of this application, the operations involved in obtaining, storing, using, processing, transmitting, providing and disclosing user personal information are all carried out with the user's authorization.
[0336] The present application also provides an electronic device, such as Fig.12 As shown, including:
[0337] Memory 1201, used for storing computer programs;
[0338] The processor 1202 is used to implement any of the above-mentioned access control methods when executing the program stored in the memory 1201.
[0339] Furthermore, the electronic device may further include a communication bus and / or a communication interface, and the processor 1202, the communication interface, and the memory 1201 communicate with each other via the communication bus.
[0340] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0341] The communication interface is used for communication between the above electronic device and other devices.
[0342] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0343] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0344] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above access control methods are implemented.
[0345] In another embodiment provided by the present application, a computer program product including instructions is also provided. When the computer program is executed on a computer, the computer is enabled to execute any access control method in the above embodiments.
[0346] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a solid-state hard disk (SSD), etc.
[0347] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article 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, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0348] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the method, device, electronic device, storage medium, and computer program product embodiments, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0349] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims
1. A weighted attribute access control method for cloud-assisted industrial Internet of Things, characterized in that: Applied to a first user terminal, the method includes: Sending a data access request of a first user and a partial decryption key of the first user to a cloud storage service, so that the cloud storage service partially decrypts a first key ciphertext based on the partial decryption key, wherein the first key ciphertext is: a ciphertext obtained by encrypting a first encryption key with a first access policy of first data as an encryption parameter, the first access policy is described by a weighted attribute of the user, the first data is: the data requested to be accessed by the data access request, and the first encryption key is: a key used to encrypt the first data to obtain the first data ciphertext; In response to receiving a request feedback for the data access request, decrypting a portion of the decrypted ciphertext included in the request feedback based on the complete decryption key of the first user to obtain the first encryption key, wherein the request feedback is sent by the cloud storage service when the partial decryption result indicates that the weighted attribute of the first user matches the first access policy; Decrypting the first data ciphertext included in the request feedback based on the first encryption key to obtain the first data; The request feedback also includes: a key certificate of the first encryption key; After decrypting the first data ciphertext included in the request feedback based on the first encryption key to obtain the first data, the method further includes: batch verifying the accuracy of the first encryption key based on the key proof; The batch verification of the accuracy of the first encryption key based on the key certification includes: Obtaining first products of key certificates respectively corresponding to a plurality of first encryption keys to be verified, and performing decryption using the first products and a first initialization parameter as decryption parameters to obtain a first verification result; Obtain a second product of the verification keys respectively corresponding to the multiple first encryption keys to be verified, decrypt with the second product and the first Hash value as a decryption parameter, and obtain a second verification result, wherein the verification key is: pre-generated by the management service based on the first initialization parameter and the first parameter, the first parameter is: a parameter obtained by calculating the identifier of the weighted attribute of the first user, and the first Hash value is: a hash value obtained by performing a hash transformation on 0 and the current time based on a preset first Hash function; Obtain a third product of transformation keys respectively corresponding to the multiple first encryption keys to be verified, and decrypt using the third product and the second Hash value as a decryption parameter to obtain a third verification result, wherein the transformation key is: a first number power of the verification keys corresponding to the first encryption keys, the first number is a hash value obtained by performing a hash transformation on the first data and the first encryption key based on a preset second Hash function, and the second Hash value is: a hash value obtained by performing a hash transformation on 1 and the current time based on the first Hash function; Calculate the product of the second verification result and the third verification result to obtain a fourth verification result; If the fourth verification result is the same as the first verification result, it is determined that the multiple first encryption keys to be verified pass the batch verification; If the fourth verification result is different from the first verification result, it is determined that the multiple first encryption keys to be verified have not passed the batch verification.
2. The method according to claim 1, characterized in that Before sending the data access request of the first user and the partial decryption key of the first user to the cloud storage service, the method further includes: Sending a registration request for the first user to the management service; A partial decryption key and a complete decryption key fed back by the management service based on a pre-generated master key of the first user, an attribute identification key of a weighted attribute, and an attribute weight key are obtained.
3. A weighted attribute access control method for cloud-assisted industrial Internet of Things, characterized in that: Applied to cloud storage services, the method includes: Receiving a data access request of a first user and a partial decryption key of the first user sent by a first user terminal; Searching for a first data ciphertext and a first key ciphertext of the first data requested to be accessed by the data access request, wherein the first key ciphertext is: a ciphertext obtained by encrypting a first encryption key with a first access policy of the first data as an encryption parameter, the first access policy is described by a weighted attribute of a user, and the first encryption key is: a key used to encrypt the first data to obtain the ciphertext of the first data; Partially decrypting the first key ciphertext based on the partial decryption key to obtain a partial decryption result; If the partial decryption result indicates that the weighted attribute of the first user matches the access policy of the first data, a request feedback for the data access request is sent to the first user terminal, wherein the request feedback includes: the partial decryption ciphertext obtained by the partial decryption and the first data ciphertext, so that the first user terminal decrypts the first data ciphertext based on the partial decryption ciphertext to obtain the first data; The request feedback further includes: a key certificate of the first encryption key, wherein the key certificate is used to perform batch verification of the accuracy of the first encryption key; The partially decrypting the first key ciphertext based on the partial decryption key to obtain a partial decryption result includes: Decrypting using a first ciphertext in the first key ciphertext and a first decryption parameter in the partial decryption key as decryption parameters to obtain a first decryption result, wherein the first ciphertext is generated based on a first initialization parameter and an attribute identifier of a weighted attribute of the first user; For each weighted attribute of the first user, decryption is performed using the second ciphertext corresponding to the weighted attribute and the second decryption parameter in the partial decryption key as decryption parameters to obtain a second decryption result, decryption is performed using the third ciphertext corresponding to the weighted attribute and the third decryption parameter corresponding to the weighted attribute in the partial decryption key to obtain a third decryption result, decryption is performed using the fourth ciphertext corresponding to the weighted attribute and the fourth decryption parameter corresponding to the weighted attribute in the partial decryption key to obtain a fourth decryption result, and the second power of the fourth decryption result is obtained to obtain a fifth decryption result, wherein the second ciphertext is generated based on the second parameter used when the management service generates the master key of the first user offline, the second initialization parameter, and the first parameter corresponding to the weighted attribute, the first parameter is: a parameter obtained by calculating the identifier of the weighted attribute of the first user, and the second parameter is: a parameter obtained by calculating the attribute weight of the weighted attribute of the first user, The third ciphertext is generated based on the second parameter used when the management service generates the attribute identification key of the weighted attribute offline, the first parameter corresponding to the weighted attribute and the second parameter corresponding to the weight of the weighted attribute of the first user. The fourth ciphertext is generated based on the first initialization parameter and the first parameter corresponding to the weighted attribute. The fourth decryption parameter is: a parameter obtained by multiplying the fifth decryption parameter corresponding to the weighted attribute in the partial decryption key, the third power of the first weight selected from the weight domain, the seventh decryption parameter corresponding to the weighted attribute in the partial decryption key, and the fourth power of the first weight selected from the weight domain, the weight domain includes the attribute weight of the weighted attribute of the first user, the third number is the sixth decryption parameter corresponding to the weighted attribute in the partial decryption key, the fourth number is the eighth decryption parameter corresponding to the weighted attribute in the partial decryption key, and the second number is the value of the first parameter corresponding to the weighted attribute; Calculating the product of the obtained second decryption result, the third decryption result and the fifth decryption result to obtain a sixth decryption result; Based on the first decryption result and the sixth decryption result, a partial decryption result of partially decrypting the first key ciphertext is obtained.
4. The method according to claim 3, characterized in that The request feedback also includes: a key certificate of the first encryption key; and / or The method also includes: receiving a second data ciphertext and a second key ciphertext uploaded by a second user terminal, wherein the second data ciphertext is: a ciphertext obtained by encrypting the second data to be uploaded by the second user based on a second encryption key, and the second key ciphertext is: a ciphertext obtained by encrypting the second encryption key with a second access policy as an encryption parameter; and storing the second data ciphertext and the second key ciphertext.
5. A cloud-assisted industrial Internet of Things weighted attribute access control system, characterized in that: The system comprises: a first user terminal and a cloud storage service, wherein: The first user terminal is used to send a data access request of the first user and a partial decryption key of the first user to the cloud storage service; The cloud storage service is used to search for a first data ciphertext and a first key ciphertext of the first data requested to be accessed by the data access request; partially decrypt the first key ciphertext based on the partial decryption key to obtain a partial decryption result; if the partial decryption result indicates that the weighted attribute of the first user matches the access policy of the first data, then send a request feedback for the data access request to the first user terminal, wherein the first key ciphertext is: a ciphertext obtained by encrypting the first encryption key with the first access policy of the first data as an encryption parameter, the first access policy is described with the weighted attribute of the user, the first encryption key is: a key used to encrypt the first data to obtain the first data ciphertext, and the request feedback includes: a partial decryption ciphertext obtained by partial decryption and the first data ciphertext; The first user terminal is further configured to, in response to receiving the request feedback, decrypt the partial decrypted ciphertext included in the request feedback based on the complete decryption key of the first user to obtain the first encryption key; and decrypt the first data ciphertext included in the request feedback based on the first encryption key to obtain the first data; The request feedback also includes: a key certificate of the first encryption key; After decrypting the first data ciphertext included in the request feedback based on the first encryption key to obtain the first data, the method further includes: batch verifying the accuracy of the first encryption key based on the key proof; The batch verification of the accuracy of the first encryption key based on the key certification includes: Obtaining first products of key certificates respectively corresponding to a plurality of first encryption keys to be verified, and performing decryption using the first products and a first initialization parameter as decryption parameters to obtain a first verification result; Obtain a second product of the verification keys respectively corresponding to the multiple first encryption keys to be verified, decrypt with the second product and the first Hash value as a decryption parameter, and obtain a second verification result, wherein the verification key is: pre-generated by the management service based on the first initialization parameter and the first parameter, the first parameter is: a parameter obtained by calculating the identifier of the weighted attribute of the first user, and the first Hash value is: a hash value obtained by performing a hash transformation on 0 and the current time based on a preset first Hash function; Obtain a third product of transformation keys respectively corresponding to the multiple first encryption keys to be verified, and decrypt using the third product and the second Hash value as a decryption parameter to obtain a third verification result, wherein the transformation key is: a first number power of the verification keys corresponding to the first encryption keys, the first number is a hash value obtained by performing a hash transformation on the first data and the first encryption key based on a preset second Hash function, and the second Hash value is: a hash value obtained by performing a hash transformation on 1 and the current time based on the first Hash function; Calculate the product of the second verification result and the third verification result to obtain a fourth verification result; If the fourth verification result is the same as the first verification result, it is determined that the multiple first encryption keys to be verified pass the batch verification; If the fourth verification result is different from the first verification result, it is determined that the multiple first encryption keys to be verified have not passed the batch verification.
6. The system according to claim 5, characterized in that The system further includes: a second user terminal; the second user terminal is used to obtain a second encryption key; encrypting the second data to be uploaded by the second user based on the second encryption key to obtain a second data ciphertext; determining a second access policy for the second data described by the weighted attribute of the user; encrypting the second encryption key with the second access policy as an encryption parameter to obtain a second key ciphertext; uploading the second data ciphertext and the second key ciphertext to the cloud storage service; the cloud storage service is also used to store the second data ciphertext and the second key ciphertext; and / or The system also includes: a management service; the first user terminal is also used to send a registration request of the first user to the management service; the management service is used to combine parameters based on the attribute identifier of the weighted attribute of the first user, the key parameters in the master key, the key parameters in the attribute identifier key and the key parameters in the weight key to generate a partial decryption key for the first user; obtain the complete decryption key of the first user based on the set key parameters in the master key; and feed back the partial decryption key and the complete decryption key to the first user terminal.
7. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, for implementing the method described in any one of claims 1-2 or any one of claims 3-4 when executing a program stored in a memory.
8. A computer program product comprising instructions, characterized in that When the computer program is executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 2 or any one of claims 3 to 4.
Citation Information
Patent Citations
Multifunctional fine-grained access control method for cloud storage
CN109246096A
Multi-attribute mechanism attribute-based encryption method with tracking for cloud-assisted Internet of Things
CN111431897A