Interaction attribute-based encryption and decryption method and system

By interacting the decryption task to the service provider, the interactive attribute-based decryption method solves the problem of large calculation overhead of the decryption process in the prior art, improves decryption efficiency and enhances system security.

CN119760754AActive Publication Date: 2025-04-04BEIJING GUODU INTERNET TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510260083.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-06
Publication Date
2025-04-04
Estimated Expiration
2045-03-06

AI Technical Summary

Technical Problem

The existing attribute-based decryption methods require a large number of pairing operations during the decryption process, resulting in significant calculation overhead on lightweight devices.

Method used

An interactive attribute-based decryption method is proposed, which reduces the computing burden of data users during the decryption process by interacting with the service provider CSP. The specific steps include the attribute authorization agency generating the system's public parameters and master key, the data owner encrypts the data and publishes it to the blockchain network, authorizing users to obtain the ciphertext and access structure from the blockchain, performing the interactive attribute-based decryption algorithm to generate intermediate keys, and sending interactive decryption tasks to the target service provider, and finally receiving the decryption result.

Benefits of technology

By interacting decryption tasks to service providers, the computing burden on lightweight devices is reduced and the decryption efficiency is significantly improved. At the same time, blockchain technology is used to ensure the integrity and immutability of key components and access structures, improving the security of the system. The use of intermediate keys increases the security of the interactive decryption process and prevents unauthorized access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119760754A_ABST
    Figure CN119760754A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of encryption and decryption, and provides an interactive attribute-based encryption and decryption method and system, and the method comprises the steps: an attribute authorization authority AA executes an initialization algorithm, and generates a system public parameter, a master key and an access structure of attribute-based encryption; for each attribute, the attribute authorization mechanism generates a key component irrelevant to the attribute and a key component relevant to the attribute according to the master key and the access structure; the data owner encrypts the data by using the system public parameter and the access structure to generate a ciphertext; the data owner publishes the ciphertext and the access structure to a block chain network; the authorized user obtains the ciphertext and the access structure from the block chain network, executes an interactive attribute-based decryption algorithm, generates an intermediate key, and sends an interactive decryption task containing the intermediate key to the service provider; and the authorized user receives the decryption result fed back by the service provider, so that the calculation burden of the lightweight equipment in the decryption process is remarkably reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of encryption and decryption, and in particular, to an interactive attribute-based encryption and decryption method and system. Background Art

[0002] In existing attribute-based encryption (ABE) schemes, the decryption process requires a large number of pairing operations, which incurs significant computational overhead on lightweight devices. Summary of the invention

[0003] The embodiments of the present application provide an interactive attribute-based encryption and decryption method and system, which can solve the technical problem that the existing attribute-based encryption and decryption methods require a large number of pairing operations during the decryption process, which will cause significant computing overhead on lightweight devices.

[0004] In a first aspect, an embodiment of the present application provides an interactive attribute-based encryption and decryption method, including: The attribute authority AA executes the initialization algorithm to generate the system public parameter PP, the master key MSK and the attribute-based encrypted access structure AS; For each attribute The attribute authority AA generates a key component that is independent of the attribute according to the master key MSK and the access structure AS. and the key component associated with the attribute ;in, Represents different components; The data owner DO uses the system public parameter PP and the access structure AS to encrypt the data D to generate a ciphertext CT; wherein the ciphertext CT includes the ciphertext components generated by the data owner DO and key components ; The data owner DO publishes the ciphertext CT and the access structure AS to the blockchain network; The authorized user USER obtains the ciphertext CT and the access structure AS from the blockchain network; The authorized user USER executes the interactive attribute-based decryption algorithm to generate an intermediate key and sends the intermediate key to the target service provider CSP Interactive decryption task; The authorized user USER receives the decryption result fed back by the target service provider CSP.

[0005] In a possible implementation manner of the first aspect, the authorized user USER executes the interactive attribute-based decryption algorithm, which also includes: The authorized user USER verifies whether the attribute of the authorized user USER satisfies the data access policy defined by the access structure AS; If the data access policy defined by the access structure AS is met, the step of authorizing the user USER to execute the interactive attribute-based decryption algorithm is executed.

[0006] In a possible implementation of the first aspect, an intermediate key is generated The calculation formula is: ; in, represents the ciphertext component generated by the data owner DO; Represents the product symbol, used to represent the Each element in Perform multiplication operations; Represents an index set, which represents a collection of attributes; Representation and attributes a key component of the associated first component; A key component representing an attribute-independent first component for encryption; Representation and attributes a key component of an associated second component; a key component representing an attribute-independent second component for encryption; Representation and attributes a key component of an associated third component; represents a bilinear mapping function; a key component representing a first component associated with the attribute for encryption; Representation and attributes a key component of the associated first component; a key component representing a first component that is independent of the attribute; a key component representing a second component associated with the attribute for encryption; Representation and attributes a key component of an associated second component; a key component representing a second component that is independent of the attribute; a key component representing a third component associated with the attribute for encryption; Representation and attributes a key component of an associated third component; A key component representing a third component that is independent of the attribute.

[0007] In a possible implementation manner of the first aspect, the sending of the intermediate key to the target service provider CSP includes: The interactive decryption task previously included: The target service provider CSP is determined using the following formula: ; in, Indicates the candidate service provider CSPs; represents the set of all candidate service providers; Indicates The current load of each CSP; Indicates Network latency of each CSP; Indicates The computing power or capacity of each CSP; Represents a set of attributes; Representation attributes Importance weight in the access structure AS; Representation attributes Type; represents the distance factor; Indicates the task priority; Indicates The geographic location factor of each CSP; Represents the average value of the geographic location factor of all CSPs.

[0008] In a possible implementation manner of the first aspect, the authorized user USER receives a decryption result fed back by the target service provider CSP, including: The authorized user USER receives the decryption result from the target service provider CSP through the communication channel; Using blockchain technology to verify whether the hash value of the decryption result matches the expected value; If they match, the decryption result is stored; if they do not match, the smart contract will trigger an error handling mechanism.

[0009] In a second aspect, an embodiment of the present application provides an interactive attribute-based encryption and decryption system, including: an attribute authority AA, a data owner DO, an authorized user USER, and a target service provider CSP; The attribute authorization agency AA is used to execute the initialization algorithm to generate the system public parameter PP, the master key MSK and the attribute-based encrypted access structure AS; for each attribute The attribute authority AA generates a key component that is independent of the attribute according to the master key MSK and the access structure AS. and the key component associated with the attribute ;in, Represents different components; The data owner DO is used to encrypt the data D using the system public parameter PP and the access structure AS to generate a ciphertext CT; wherein the ciphertext CT includes a ciphertext component generated by the data owner DO and key components ; The data owner DO publishes the ciphertext CT and the access structure AS to the blockchain network; The authorized user USER obtains the ciphertext CT and the access structure AS from the blockchain network; the authorized user USER executes the interactive attribute-based decryption algorithm to generate an intermediate key and sends a packet containing the intermediate key to the target service provider CSP. interactive decryption task; the authorized user USER receives the decryption result fed back by the target service provider CSP.

[0010] In a third aspect, an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the interactive attribute-based encryption and decryption method described in any one of the first aspects when executing the computer program.

[0011] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the interactive attribute-based encryption and decryption method described in any one of the first aspects above is implemented.

[0012] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a computer device, the computer device executes the interactive attribute-based encryption and decryption method described in any one of the first aspects above.

[0013] In the embodiment of the present application, the attribute authorization agency AA executes the initialization algorithm to generate the system public parameter PP, the master key MSK and the attribute-based encrypted access structure AS; for each attribute The attribute authority AA generates a key component that is independent of the attribute according to the master key MSK and the access structure AS. and the key component associated with the attribute ;in, Represents different components; the data owner DO uses the system public parameter PP and the access structure AS to encrypt the data D to generate a ciphertext CT; wherein the ciphertext CT includes the ciphertext components generated by the data owner DO and key components ; The data owner DO publishes the ciphertext CT and the access structure AS to the blockchain network; the authorized user USER obtains the ciphertext CT and the access structure AS from the blockchain network; the authorized user USER executes the interactive attribute-based decryption algorithm to generate an intermediate key and sends the intermediate key to the target service provider CSP The authorized user USER receives the decryption result fed back by the target service provider CSP. By exchanging the interactive decryption task to the target service provider CSP, the authorized user USER does not need to perform a lot of calculations on the lightweight device, thereby significantly improving the decryption efficiency. In addition, the blockchain technology is used to ensure the integrity and immutability of the key components and access structure, thereby improving the security of the system. Intermediate key The use of increases the security of the interactive decryption process and prevents unauthorized access.

[0014] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, 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. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0016] Figure 1 is a schematic flow chart of an interactive attribute-based encryption and decryption method provided in an embodiment of the present application; Figure 2 It is a structural diagram of the interactive attribute-based encryption and decryption system provided in an embodiment of the present application; Figure 3 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0017] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0018] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0019] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0020] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0021] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0022] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0023] In the existing attribute-based encryption (ABE) scheme, the decryption process requires a large number of pairing operations, which will cause significant computational overhead on lightweight devices. To solve this problem, this application proposes an interactive attribute-based encryption and decryption method, which reduces the computational burden of data users in the decryption process by exchanging the computational tasks in the decryption process to the service provider CSP. Figure 1A schematic flow chart of an interactive attribute-based encryption and decryption method provided by an embodiment of the present application is shown. Interactive attribute-based encryption and decryption is a cryptographic method that combines attribute-based encryption and interactive decryption technology. It allows the decryption task to be delegated to a third party for processing after data is encrypted, while finely controlling data access rights through attribute-based encryption.

[0024] S101, the attribute authority AA executes an initialization algorithm to generate a system public parameter PP, a master key MSK and an attribute-based encrypted access structure AS.

[0025] The attribute authority AA executes the initialization algorithm Setup to generate the system public parameters PP, the master key MSK and the attribute-based encrypted access structure AS.

[0026] The system public parameters PP are a set of parameters that can be accessed by all participants in the system (including data owner DO, authorized user USER and service provider). The service provider can be a cloud service provider (Cloud Service Provider, CSP).

[0027] Among them, the parameters usually include: Mathematical parameters: such as elliptic curve parameters, hash functions, pairing operations, etc. These parameters define the mathematical basis of the encryption algorithm.

[0028] System identifier: an identifier used to distinguish different systems or different instances.

[0029] Encryption algorithm identifier: specifies the type of encryption algorithm used.

[0030] The master key MSK is the core key in the system, which is generated and kept secret by the attribute authority AA. It is used to generate other key components, including key components unrelated to attributes and key components related to attributes.

[0031] The generation of the master key MSK usually involves a random number generator to ensure that it is sufficiently random and unpredictable. After generation, the master key MSK is usually stored in a secure environment, such as a hardware security module.

[0032] Access structures, AS, define which attributes or attribute combinations can decrypt specific encrypted data. This is the core mechanism for controlling data access rights in attribute-based encryption (ABE). Access structures, AS, can be simple (such as a single attribute) or complex (such as a logical combination of attributes, such as AND, OR, etc.).

[0033] The generation of access structure AS requires the attribute authority AA to define it according to the system requirements and security policies. It can be constructed based on attributes such as user role, department, security level, etc.

[0034] The execution of the initialization algorithm generally includes the following steps: Select mathematical parameters: Select appropriate mathematical parameters based on the requirements of the encryption algorithm.

[0035] Generate the master key MSK: Generate the master key using a secure random number generator.

[0036] Define access structure AS: Define the access structure according to system requirements.

[0037] Generate system public parameters PP: Generate system public parameters PP by combining mathematical parameters, system identifiers, etc.

[0038] Distribution parameters: The system public parameters PP are made public to all system participants, while the master key MSK is stored confidentially.

[0039] Throughout the entire process, the attribute authority AA needs to ensure the security of all operations to prevent unauthorized access and leakage.

[0040] S102, for each attribute The attribute authority AA generates a key component that is independent of the attribute according to the master key MSK and the access structure AS. and the key component associated with the attribute ;in, Represents different components.

[0041] Among them, the key components that are not related to the attributes ,These key components are not related to specific attributes and can be used in the encryption process of multiple attributes. They are common parts of the system and are crucial to achieving the flexibility and efficiency of the encryption algorithm.

[0042] The key component associated with the attribute , these key components are for specific attributes Generated, and directly related to the attributes. They ensure that only users with the corresponding attributes can decrypt the data. This design allows fine-grained control over data access rights and is the core advantage of attribute-based encryption.

[0043] Among them, the key components that are independent of the attributes are generated , these components typically include: One or more randomly generated key elements, such as , ,….

[0044] These key elements can be random elements from the group and are used in certain steps of the encryption process.

[0045] Generates key components associated with attributes .

[0046] For each attribute , use a hash function or other mapping function to convert attributes Mapped to a group element, such as The master key MSK and the attribute group element are used to generate the key component associated with the attribute. For example, for each attribute , generate key components ,in, Represents different components.

[0047] S103, the data owner DO uses the system public parameter PP and the access structure AS to encrypt the data D to generate a ciphertext CT; wherein the ciphertext CT includes the ciphertext components generated by the data owner DO and key components .

[0048] Among them, the ciphertext component generated by the data owner DO , which is the part directly encrypted from data D during the encryption process, and usually contains the main body of the encrypted data.

[0049] Among them, the specific generation of the ciphertext CT is mostly existing technology, which will not be described in detail here.

[0050] S104, the data owner DO publishes the ciphertext CT and the access structure AS to the blockchain network.

[0051] Among them, smart contracts are used to manage the publishing, access and verification process of ciphertext CT and access structure AS. Smart contracts automatically execute predefined rules to ensure that only users who meet the access structure AS can decrypt the data. The ciphertext CT and access structure AS are converted into a format suitable for blockchain storage. The data is published on the blockchain using the application programming interface (API) or software development kit (SDK) of the blockchain platform. After the data is published, the integrity and correctness of the data can be verified through the blockchain network. The transparency of the blockchain and the automatic execution capability of smart contracts are used to achieve fine-grained control of data access.

[0052] S105, the authorized user USER obtains the ciphertext CT and the access structure AS from the blockchain network.

[0053] Among them, the authorized user USER retrieves the ciphertext CT and access structure AS published by the data owner DO from the blockchain network.

[0054] S106: The authorized user USER executes the interactive attribute-based decryption algorithm to generate an intermediate key and sends the intermediate key to the target service provider CSP Interactive decryption task.

[0055] The authorized user USER first needs to verify whether he has the attribute combination that meets the access structure AS. This is a prerequisite for decrypting data. If the attributes of the authorized user USER meet the access structure AS, an intermediate key will be generated using the interactive attribute-based decryption algorithm. This intermediate key It is a key step in the decryption process, which will be used to initiate a decryption request to the service provider CSP. The authorized user USER will contain the intermediate key The interactive decryption task is sent to the selected CSP. This task may include the ciphertext CT, the intermediate key, and other information that may be required, such as the access structure AS.

[0056] Among them, the authorized user USER first needs to select a suitable CSP to perform the decryption task. Multiple factors may be considered when selecting a CSP, as described below.

[0057] The interaction here can be understood as outsourcing, where the interactive decryption task is transmitted and outsourced to the CSP to perform the decryption task.

[0058] S107, the authorized user USER receives the decryption result fed back by the target service provider CSP.

[0059] After receiving the interactive decryption task, the target service provider CSP will use its computing resources to perform the decryption operation. The authorized user USER receives the decryption result from the CSP.

[0060] Optionally, the authorized user USER receives a decryption result from the target service provider CSP through a communication channel; uses blockchain technology to verify whether the hash value of the decryption result matches the expected value; if it matches, the decryption result is stored; if it does not match, the smart contract will trigger an error handling mechanism.

[0061] Among them, the authorized user USER receives the decryption result from the CSP through a secure communication channel. This can be achieved through a TLS / SSL encrypted HTTPS connection or a VPN tunnel to ensure security during data transmission. Blockchain technology is used to verify whether the hash value of the decryption result matches the expected value. Specifically, the expected hash value can be stored on the blockchain, and when the decryption result is received, its hash value is calculated and compared with the expected value on the blockchain. If the hash values ​​match, it means that the decryption result has not been tampered with and can be used safely. If the hash value of the decryption result is verified, the smart contract will be automatically triggered to distribute the decryption result to the relevant users or systems, and store the decryption result in the local secure storage system. If it does not match, the smart contract will trigger the error handling mechanism.

[0062] In the embodiment of the present application, the attribute authority AA executes the initialization algorithm to generate the system public parameter PP, the master key MSK and the attribute-based encrypted access structure AS; for each attribute The attribute authority AA generates a key component that is independent of the attribute according to the master key MSK and the access structure AS. and the key component associated with the attribute ;in, Represents different components; the data owner DO uses the system public parameter PP and the access structure AS to encrypt the data D to generate a ciphertext CT; wherein the ciphertext CT includes the ciphertext components generated by the data owner DO and key components ; The data owner DO publishes the ciphertext CT and the access structure AS to the blockchain network; the authorized user USER obtains the ciphertext CT and the access structure AS from the blockchain network; the authorized user USER executes the interactive attribute-based decryption algorithm to generate an intermediate key and sends the intermediate key to the target service provider CSP The authorized user USER receives the decryption result fed back by the target service provider CSP. By exchanging the interactive decryption task to the target service provider CSP, the authorized user USER does not need to perform a lot of calculations on the lightweight device, thereby significantly improving the decryption efficiency. In addition, the blockchain technology is used to ensure the integrity and immutability of the key components and access structure, thereby improving the security of the system. Intermediate key The use of increases the security of the interactive decryption process and prevents unauthorized access.

[0063] In an optional embodiment, the authorized user USER executes the interactive attribute-based decryption algorithm, which also includes: The authorized user USER verifies whether the attributes of the authorized user USER satisfy the data access policy defined by the access structure AS; if so, the step of the authorized user USER executing the interactive attribute-based decryption algorithm is executed.

[0064] In an embodiment of the present application, the authorized user USER first needs to verify whether he or she possesses a combination of attributes that satisfies the definition of the access structure AS. The access structure AS defines which attribute combinations can decrypt specific data. For example, AS may be defined as "the user must possess both attribute A and attribute B". If the user's attributes satisfy the data access policy defined by the access structure AS, the user can continue to execute the steps of the interactive attribute-based decryption algorithm. Among them, by verifying whether the user's attributes satisfy the access structure, it is ensured that only authorized users can access specific data, which helps prevent unauthorized access and data leakage. The access structure AS can define complex attribute combinations to achieve fine-grained control over data access. By ensuring that only qualified users can decrypt data, it helps to protect the privacy of the data and prevent sensitive information from being leaked to irrelevant personnel.

[0065] In an optional embodiment, an intermediate key is generated The calculation formula is: ; in, represents the ciphertext component generated by the data owner DO; Represents the product symbol, used to represent the Each element in Perform multiplication operations; Represents an index set, which represents a collection of attributes; Representation and attributes a key component of the associated first component; A key component representing an attribute-independent first component for encryption; Representation and attributes a key component of an associated second component; a key component representing an attribute-independent second component for encryption; Representation and attributes a key component of an associated third component; represents a bilinear mapping function; a key component representing a first component associated with the attribute for encryption; Representation and attributes a key component of the associated first component; a key component representing a first component that is independent of the attribute; a key component representing a second component associated with the attribute for encryption; Representation and attributes a key component of an associated second component; a key component representing a second component that is independent of the attribute; a key component representing a third component associated with the attribute for encryption; Representation and attributes a key component of an associated third component; A key component representing a third component that is independent of the attribute.

[0066] It should be noted that the first component corresponds to the "1" at the lower right corner of the character. The second component corresponds to the "2" at the lower right corner of the character. The third component corresponds to the "3" at the lower right corner of the character.

[0067] The first, second, and third components mentioned above refer to different parts or stages used to generate keys during the encryption and decryption process. These components are usually associated with specific attributes to ensure that only users with the correct attributes can decrypt the data. The first, second, and third pairs of components are used to distinguish here. In practical applications, this distinction may not always be necessary, especially in simple encryption scenarios. It can be set according to actual needs.

[0068] In an embodiment of the present application, by combining multiple attribute-related and unrelated key components, the combination method can ensure that only users who meet the attribute combination defined by the access structure can generate the correct intermediate key, which increases the difficulty of cracking the key, thereby enhancing the security of the system. Based on the above means, the system is allowed to flexibly define which attribute combinations can decrypt data according to the access structure AS, thereby achieving fine-grained access control. In addition, by using product symbols and index sets, it can be easily expanded to support more attributes and key components to adapt to different security requirements and business scenarios, and this operation is very important when generating intermediate keys because it ensures that all related key components are correctly combined to generate a complete intermediate key.

[0069] In an optional embodiment, the intermediate key is sent to the target service provider CSP. The interactive decryption task previously included: The target service provider CSP is determined using the following formula: ; in, Indicates the candidate service provider CSPs; represents the set of all candidate service providers; Indicates The current load of each CSP; Indicates Network latency of each CSP; Indicates The computing power or capacity of each CSP; Represents a set of attributes; Representation attributes Importance weight in the access structure AS; Representation attributes Type; Indicates the distance factor, such as local or remote; Indicates the task priority; Indicates The geographic location factor of each CSP; Represents the average value of the geographic location factor of all CSPs.

[0070] In the embodiment of the present application, for the load and delay ratio , this ratio measures the relationship between the current workload and network latency of the CSP and its computing power. By minimizing this ratio, the system can select CSPs with strong computing power, low load, and low latency, thereby improving the execution efficiency of decryption tasks. By weighting these factors, the most appropriate CSP can be selected according to the specific requirements of the decryption task (such as the urgency of decryption). By considering the geographical location, the system can select the CSP with the best geographical location, thereby reducing the delay and cost of data transmission. The above formula is used to ensure that the geographical location factor does not excessively affect the selection due to the particularly favorable or unfavorable geographical location of a single CSP. By dividing by the sum of the geographical location factors of all CSPs, a standardized geographical location factor can be obtained, thereby more fairly evaluating the impact of each CSP's geographical location on task execution.

[0071] Among them, local CSP usually refers to a service provider that is geographically close to the data source or user location. Due to the short distance, the network latency of data transmission is low, which helps to improve the response speed of decryption tasks. Short data transmission distance usually means lower data transmission cost. If a CSP is local, its distance factor will be relatively small, which helps to lower the value of the entire formula, making this CSP a more attractive option.

[0072] Among them, the distance factor is usually used to quantify the "distance" between the data source and the CSP. The distance here can be the actual geographical distance or a measure of network latency. It reflects the delays and costs that may be encountered during data transmission. The distance factor is used to adjust the priority of decryption tasks. The smaller the distance factor, the closer the distance between the CSP and the data source or user, the lower the network latency may be, and the lower the data transmission cost may be. Selecting a CSP with a smaller distance factor can reduce data transmission time, improve decryption efficiency, and reduce costs.

[0073] The geolocation factor generally refers to the geolocation attributes of a CSP, which may include information such as the physical location of the CSP, service area, etc. This factor is used to compare among multiple CSPs to select the CSP with the most favorable geographical location. The geolocation factor is used to calculate the relative geographical location advantage of the CSP. It is compared with the average geolocation factor of all CSPs to determine the impact of each CSP's geographical location on the decryption task.

[0074] The distance factor focuses more on the efficiency and cost of data transmission, while the geographic location factor focuses on the impact of the CSP's geographic location on service delivery. The distance factor may be based on actual network measurements or estimates, while the geographic location factor may be based on the CSP's geographic location data. The distance factor directly affects the execution efficiency and cost of the decryption task, while the geographic location factor affects the selection of CSPs and the quality of service. In practical applications, both factors are important factors to consider when selecting a suitable CSP. By comprehensively considering the distance factor and the geographic location factor, a CSP that can provide high-quality services can be selected more effectively.

[0075] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0076] Corresponding to the interactive attribute-based encryption and decryption method described in the above embodiment, Figure 2 A structural block diagram of an interactive attribute-based encryption and decryption system provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0077] Reference Figure 2 ,The interactive attribute based encryption and decryption system includes: an attribute authority AA, a data owner DO, an authorized user USER and a target service provider CSP; The attribute authorization agency AA is used to execute the initialization algorithm to generate the system public parameter PP, the master key MSK and the attribute-based encrypted access structure AS; for each attribute The attribute authority AA generates a key component that is independent of the attribute according to the master key MSK and the access structure AS. and the key component associated with the attribute ;in, Represents different components; The data owner DO is used to encrypt the data D using the system public parameter PP and the access structure AS to generate a ciphertext CT; wherein the ciphertext CT includes a ciphertext component generated by the data owner DO and key components ; The data owner DO publishes the ciphertext CT and the access structure AS to the blockchain network; The authorized user USER obtains the ciphertext CT and the access structure AS from the blockchain network; the authorized user USER executes the interactive attribute-based decryption algorithm to generate an intermediate key and sends a packet containing the intermediate key to the target service provider CSP. interactive decryption task; the authorized user USER receives the decryption result fed back by the target service provider CSP.

[0078] In a possible implementation, the interactive attribute-based encryption and decryption system further includes: an execution module, configured to: The authorized user USER verifies whether the attribute of the authorized user USER satisfies the data access policy defined by the access structure AS; If the data access policy defined by the access structure AS is met, the step of authorizing the user USER to execute the interactive attribute-based decryption algorithm is executed.

[0079] In one possible implementation, an intermediate key is generated The calculation formula is: ; in, represents the ciphertext component generated by the data owner DO; Represents the product symbol, used to represent the Each element in Perform multiplication operations; Represents an index set, which represents a collection of attributes; Representation and attributes a key component of the associated first component; A key component representing an attribute-independent first component for encryption; Representation and attributes a key component of an associated second component; a key component representing an attribute-independent second component for encryption; Representation and attributes a key component of an associated third component; represents a bilinear mapping function; a key component representing a first component associated with the attribute for encryption; Representation and attributes a key component of the associated first component; a key component representing a first component that is independent of the attribute; a key component representing a second component associated with the attribute for encryption; Representation and attributes a key component of an associated second component; a key component representing a second component that is independent of the attribute; a key component representing a third component associated with the attribute for encryption; Representation and attributes a key component of an associated third component; A key component representing a third component that is independent of the attribute.

[0080] In a possible implementation, the interactive attribute-based encryption and decryption system further includes: a determination module, configured to: The target service provider CSP is determined using the following formula: ; in, Indicates the candidate service provider CSPs; represents the set of all candidate service providers; Indicates The current load of each CSP; Indicates Network latency of each CSP; Indicates The computing power or capacity of each CSP; Represents a set of attributes; Representation attributes Importance weight in the access structure AS; Representation attributes Type; represents the distance factor; Indicates the task priority; Indicates The geographic location factor of each CSP; Represents the average value of the geographic location factor of all CSPs.

[0081] In a possible implementation, the authorized user USER is used to: receiving a decryption result from a target service provider CSP through a communication channel; Using blockchain technology to verify whether the hash value of the decryption result matches the expected value; If they match, the decryption result is stored; if they do not match, the smart contract will trigger an error handling mechanism.

[0082] It should be noted that the information interaction, execution process and other contents between the above-mentioned modules are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0083] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0084] An embodiment of the present application also provides a computer device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor implements the steps of any of the above-mentioned method embodiments when executing the computer program.

[0085] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0086] An embodiment of the present application provides a computer program product. When the computer program product is run on a computer device, the computer device can implement the steps in the above-mentioned method embodiments when executing the computer device.

[0087] Figure 3 This is a schematic diagram of the structure of a computer device provided in one embodiment of the present application. Figure 3 As shown, the computer device of this embodiment includes: at least one processor 20 ( Figure 3 Only one is shown), a memory 21, and a computer program 22 stored in the memory 21 and executable on the at least one processor 20, wherein the processor 20 implements the steps of any of the above-mentioned interactive attribute-based encryption and decryption method embodiments when executing the computer program 22.

[0088] The computer device may include, but is not limited to, a processor 20 and a memory 21. Those skilled in the art will appreciate that Figure 3 It is only an example of a computer device and does not constitute a limitation of the computer device. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.

[0089] The processor 20 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0090] In some embodiments, the memory 21 may be an internal storage unit of the computer device, such as a hard disk or memory of the computer device. In other embodiments, the memory 21 may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device. Further, the memory 21 may also include both an internal storage unit of the computer device and an external storage device. The memory 21 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 21 may also be used to temporarily store data that has been output or is to be output.

[0091] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the device / computer device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0092] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0093] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0094] In the embodiments provided in the present application, it should be understood that the disclosed apparatus / computer equipment and methods can be implemented in other ways. For example, the apparatus / computer equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of the apparatus or unit, which can be electrical, mechanical or other forms.

[0095] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0096] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. An interactive attribute-based encryption and decryption method, characterized in that: include: The attribute authority AA executes the initialization algorithm to generate the system public parameter PP, the master key MSK and the attribute-based encrypted access structure AS; For each attribute The attribute authority AA generates a key component that is independent of the attribute according to the master key MSK and the access structure AS. and the key component associated with the attribute ;in, Represents different components; The data owner DO uses the system public parameter PP and the access structure AS to encrypt the data D to generate a ciphertext CT; wherein the ciphertext CT includes the ciphertext components generated by the data owner DO and key components ; The data owner DO publishes the ciphertext CT and the access structure AS to the blockchain network; The authorized user USER obtains the ciphertext CT and the access structure AS from the blockchain network; The authorized user USER executes the interactive attribute-based decryption algorithm to generate an intermediate key and sends the intermediate key to the target service provider CSP Interactive decryption task; The authorized user USER receives the decryption result fed back by the target service provider CSP.

2. The interactive attribute-based encryption and decryption method according to claim 1, characterized in that: The authorized user USER executes the interactive attribute-based decryption algorithm, which also includes: The authorized user USER verifies whether the attribute of the authorized user USER satisfies the data access policy defined by the access structure AS; If the data access policy defined by the access structure AS is met, the step of authorizing the user USER to execute the interactive attribute-based decryption algorithm is executed.

3. The interactive attribute-based encryption and decryption method according to claim 2, characterized in that: Generate intermediate keys The calculation formula is: ; in, represents the ciphertext component generated by the data owner DO; Represents the product symbol, used to represent the Each element in Perform multiplication operations; Represents an index set, which represents a collection of attributes; Representation and attributes a key component of the associated first component; A key component representing an attribute-independent first component for encryption; Representation and attributes a key component of an associated second component; a key component representing an attribute-independent second component for encryption; Representation and attributes a key component of an associated third component; represents a bilinear mapping function; a key component representing a first component associated with the attribute for encryption; Representation and attributes a key component of the associated first component; a key component representing a first component that is independent of the attribute; a key component representing a second component associated with the attribute for encryption; Representation and attributes a key component of an associated second component; a key component representing a second component that is independent of the attribute; a key component representing a third component associated with the attribute for encryption; Representation and attributes a key component of an associated third component; A key component representing a third component that is independent of the attribute.

4. The interactive attribute-based encryption and decryption method according to claim 3, characterized in that: The intermediate key is sent to the target service provider CSP. The interactive decryption task previously included: The target service provider CSP is determined using the following formula: ; in, Indicates the candidate service provider CSPs; represents the set of all candidate service providers; Indicates The current load of each CSP; Indicates Network latency of each CSP; Indicates The computing power or capacity of each CSP; Represents a set of attributes; Representation attributes Importance weight in the access structure AS; Representation attributes Type; represents the distance factor; Indicates the task priority; Indicates The geographic location factor of each CSP; Represents the average value of the geographic location factor of all CSPs.

5. The interactive attribute-based encryption and decryption method according to claim 1, characterized in that: The authorized user USER receives the decryption result fed back by the target service provider CSP, including: The authorized user USER receives the decryption result from the target service provider CSP through the communication channel; Using blockchain technology to verify whether the hash value of the decryption result matches the expected value; If they match, the decryption result is stored; if they do not match, the smart contract will trigger an error handling mechanism.

6. An interactive attribute-based encryption and decryption system, characterized in that: include: Attribute authority AA, data owner DO, authorized user USER and target service provider CSP; The attribute authorization agency AA is used to execute the initialization algorithm to generate the system public parameter PP, the master key MSK and the attribute-based encrypted access structure AS; for each attribute The attribute authority AA generates a key component that is independent of the attribute according to the master key MSK and the access structure AS. and the key component associated with the attribute ;in, Represents different components; The data owner DO is used to encrypt the data D using the system public parameter PP and the access structure AS to generate a ciphertext CT; wherein the ciphertext CT includes a ciphertext component generated by the data owner DO and key components ; The data owner DO publishes the ciphertext CT and the access structure AS to the blockchain network; The authorized user USER obtains the ciphertext CT and the access structure AS from the blockchain network; the authorized user USER executes the interactive attribute-based decryption algorithm to generate an intermediate key and sends a packet containing the intermediate key to the target service provider CSP. interactive decryption task; the authorized user USER receives the decryption result fed back by the target service provider CSP.

7. The interactive attribute-based encryption and decryption system according to claim 6, characterized in that: Generate intermediate keys The calculation formula is: ; in, represents the ciphertext component generated by the data owner DO; Represents the product symbol, used to represent the Each element in Perform multiplication operations; Represents an index set, which represents a collection of attributes; Representation and attributes a key component of the associated first component; A key component representing an attribute-independent first component for encryption; Representation and attributes a key component of an associated second component; a key component representing an attribute-independent second component for encryption; Representation and attributes a key component of an associated third component; represents a bilinear mapping function; a key component representing a first component associated with the attribute for encryption; Representation and attributes a key component of the associated first component; a key component representing a first component that is independent of the attribute; a key component representing a second component associated with the attribute for encryption; Representation and attributes a key component of an associated second component; a key component representing a second component that is independent of the attribute; a key component representing a third component associated with the attribute for encryption; Representation and attributes a key component of an associated third component; A key component representing a third component that is independent of the attribute.

8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

10. A computer program product, characterized in that When the computer program product is executed on a computer device, the computer device is caused to execute the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Outsourcing decryption method of attribute-based encryption based on ciphertext policy

    CN104022868A

  • Lightweight access method and system based on block chain

    CN113434875A

  • White-box responsibility-traceable attribute-based encryption system and method for solving key escrow problem

    CN114629640A

  • CP-ABE outsourcing decryption method and device with homomorphic characteristic

    CN116318647A

  • Outsourcing access control method for fog computing and system thereof

    WO2018049601A1