Attribute-based encryption method and attribute-based decryption method

By using a polynomial quotient ring and time-varying parameters to generate access strategies in the attribute-based cryptography method, combined with one-time attribute token decryption, the problem of dynamic cryptographic strategies in existing technologies is solved, improving the encryption and decryption efficiency and reliability in scenarios such as blockchain.

CN119484142BActive Publication Date: 2026-01-20CHINA MOBILE GROUP DESIGN INST +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411759443.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2026-01-20
Estimated Expiration
2044-12-03

AI Technical Summary

Technical Problem

Existing attribute-based encryption methods are difficult to meet the dynamic cryptographic strategy requirements of scenarios such as blockchain and computing power networks. Furthermore, the cryptographic strategy is statically bound to the encrypted data, resulting in a time-consuming data re-encryption operation when the strategy changes.

Method used

The first parameter is generated using a polynomial quotient ring, and encrypted using hash processing and the public key and session key of the policy management entity. This generates a time-varying parameter access policy, and decrypts it using attribute credentials and cryptographic policies to generate a one-time attribute token, thus realizing a dynamic cryptographic policy.

Benefits of technology

It achieves dynamic binding of cryptographic strategies and encrypted data, improves system reliability and encryption/decryption efficiency, reduces dependence on user private keys, and has the ability to resist quantum attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119484142B_ABST
    Figure CN119484142B_ABST
Patent Text Reader

Abstract

The application provides an attribute-based encryption method and an attribute-based decryption method, and belongs to the technical field of data security, which comprises the following steps: a resource provider randomly selects a first parameter from a polynomial quotient ring; a target resource identifier is subjected to hash processing to obtain a hash mapping result, wherein the target resource identifier is the identification information of a resource to be encrypted; the first parameter, the hash mapping result, a public key of a policy management entity and a session key are used to encrypt a preset encryption algorithm to obtain a ciphertext; or the ciphertext is decrypted based on an attribute credential and a cryptographic policy to obtain a session key, wherein the attribute credential is a one-time attribute token generated based on time and attributes. The cryptographic policy in the attribute-based encryption method and the attribute-based decryption method has timeliness, the dynamic binding of the cryptographic policy and the encrypted data is realized, the attribute credential is generated in real time in the decryption process, and the reliability of the system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data security technology, and in particular to an attribute-based encryption method and an attribute-based decryption method. Background Technology

[0002] In computing power networks, blockchain technology is used to achieve decentralized data storage and computational task distribution, improving data security while avoiding single points of failure and malicious attacks. For the distributed broadcast network characteristics of blockchain, group encryption provides a more effective solution for secure sharing of blockchain transaction data. As a "one-to-many" encryption method, in group encryption, the authorizer is no longer a single user but a set of multiple users. The sender first selects the set of authorizers to encrypt the message and broadcasts the ciphertext. Any party in the authorizer set can decrypt the ciphertext using their private key. Furthermore, for new users joining the system, if they belong to the authorizer set, they can still decrypt existing ciphertext after obtaining the relevant private key, without additional processing.

[0003] Currently, based on the different methods of selecting the authorization set, group encryption can be broadly categorized into the following types: Identity-based Broadcast Encryption (IBBE), Role-based Encryption (RBE), and Attribute-based Encryption (ABE). These specify the authorization set using "identity," "role," and "attribute," respectively, as the smallest unit. Specifically, in CP-ABE (Ciphertext-Policy Attribute-Based Encryption), the data owner is allowed to encrypt messages under a policy defined by the recipient's attributes. For example, the access policy for personal health records could be defined as "((Hospital = Rehabilitation AND Role = Clinician) OR Institution = Insurance company)". This means that in addition to clinicians in rehabilitation hospitals, employees of insurance companies are also allowed to view health records. Compared to IBBE and RBE, the authorization user description method in CP-ABE is more granular and flexible. It is suitable for protecting sensitive data in blockchains and offers more flexible authorization methods. However, in existing cryptographic techniques like ABE, cryptographic strategies are usually statically bound to encrypted data. If the strategy changes, time-consuming operations such as data re-encryption are required.

[0004] Therefore, how to implement dynamic cryptographic strategies has become an urgent technical problem to be solved. Summary of the Invention

[0005] This invention provides an attribute-based encryption method and an attribute-based decryption method to solve the technical problem that the existing technology cannot meet the requirements of dynamic cryptographic strategies.

[0006] This invention provides an attribute-based encryption method, comprising:

[0007] The resource provider randomly selects the first parameter from the polynomial quotient ring;

[0008] The target resource identifier is hashed to obtain a hash mapping result, where the target resource identifier is the identifier information of the resource that needs to be encrypted;

[0009] Based on the first parameter, the hash mapping result, the public key of the policy management entity, and the session key, the ciphertext is obtained by encrypting using a preset encryption algorithm.

[0010] The policy management entity is an entity that stores and manages access policies specified by the data owner. The policy management entity is used to generate a cryptographic policy for the access policy based on the key pair of the policy management entity, the target resource identifier, time-varying parameters, and Gaussian parameters. The time-varying parameters are parameters that change over time.

[0011] According to an attribute-based encryption method provided by the present invention, before the resource provider randomly selects the first parameter from the polynomial quotient ring, the method further includes:

[0012] The manager generates a polynomial quotient cycle;

[0013] The policy management entity randomly selects a second parameter from a specified sub-Gaussian distribution and uses the second parameter as the private key of the policy management entity.

[0014] The policy management entity generates its public key based on the polynomial quotient ring.

[0015] The private key and public key of the policy management entity are used as the key pair of the policy management entity.

[0016] This invention provides an attribute base decryption method, comprising:

[0017] Based on attribute credentials and cryptographic strategies, the ciphertext is decrypted to obtain the session key. The attribute credentials are one-time attribute tokens generated based on time and attributes.

[0018] According to an attribute-based decryption method provided by the present invention, before decrypting the ciphertext based on attribute credentials and cryptographic strategies to obtain the session key, the method further includes:

[0019] The specified attribute authorization entity generates attribute credentials for the attribute under the time-varying parameters based on the private key, attribute, time-varying parameters, and Gaussian parameters of the policy management entity.

[0020] According to an attribute-based decryption method provided by the present invention, the step of decrypting ciphertext based on attribute credentials and cryptographic strategies to obtain a session key includes:

[0021] Based on the attribute credential set and the cryptographic strategy, a cryptographic strategy decision result is generated, wherein the attribute credential set includes attribute credentials of multiple attributes.

[0022] Based on the decision result of the cryptographic strategy, the ciphertext is decrypted to obtain the session key.

[0023] The present invention also provides an attribute-based encryption device, comprising the following modules:

[0024] The parameter acquisition module is used for: the resource provider to randomly select the first parameter from the polynomial quotient ring;

[0025] The hash processing module is used to: perform hash processing on the target resource identifier to obtain a hash mapping result, wherein the target resource identifier is the identifier information of the resource that needs to be encrypted;

[0026] The session encryption module is used to: encrypt the data using a preset encryption algorithm based on the first parameter, the hash mapping result, the public key of the policy management entity, and the session key to obtain ciphertext. The policy management entity is an entity used to store and manage access policies specified by the data owner.

[0027] The policy management entity is an entity that stores and manages access policies specified by the data owner. The policy management entity is used to generate a cryptographic policy for the access policy based on the key pair of the policy management entity, the target resource identifier, time-varying parameters, and Gaussian parameters. The time-varying parameters are parameters that change over time.

[0028] The present invention also provides an attribute-based decryption device, comprising the following modules:

[0029] The session decryption module is used to: decrypt ciphertext based on attribute credentials and cryptographic strategies to obtain a session key, wherein the attribute credentials are one-time attribute tokens generated based on time and attributes.

[0030] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements any of the attribute-based encryption methods or attribute-based decryption methods described above.

[0031] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the attribute-based encryption method or the attribute-based decryption method as described above.

[0032] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements any of the attribute-based encryption methods or attribute-based decryption methods described above.

[0033] The attribute-based encryption and decryption methods provided by this invention involve: a resource provider randomly selecting a first parameter from a polynomial quotient ring; hashing a target resource identifier to obtain a hash mapping result, where the target resource identifier is the identifier information of the resource to be encrypted; and encrypting the data using a preset encryption algorithm based on the first parameter, the hash mapping result, the public key of the policy management entity, and the session key to obtain ciphertext. The policy management entity is an entity that stores and manages access policies specified by the data owner. The policy management entity generates a cryptographic policy for the access policy based on its key pair, the target resource identifier, a time-varying parameter, and a Gaussian parameter, where the time-varying parameter is a parameter that changes over time. Alternatively, the ciphertext is decrypted based on attribute credentials and the cryptographic policy to obtain a session key, where the attribute credentials are one-time attribute tokens generated based on time and attributes. In the attribute-based encryption method of this scheme, the cryptographic strategy for generating the access policy is based on time-varying parameters. That is, the cryptographic strategy is generated based on time parameters, which makes the cryptographic strategy time-sensitive and realizes the dynamic binding of the cryptographic strategy and the encrypted data. In the attribute-based decryption method of this scheme, a one-time attribute token is generated based on time and attribute. That is, the attribute and the current time are encoded simultaneously, which makes the generated attribute credential time-sensitive. The decryption process does not depend on the user's private key, but uses the attribute credential generated in real time, thereby improving the reliability of the system. Attached Figure Description

[0034] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0035] Figure 1This is a flowchart illustrating the attribute-based encryption method provided by the present invention.

[0036] Figure 2 This is a flowchart illustrating the attribute base decryption method provided by the present invention.

[0037] Figure 3 This is a schematic diagram of the attribute-based encryption device provided by the present invention.

[0038] Figure 4 This is a schematic diagram of the attribute base decryption device provided by the present invention.

[0039] Figure 5 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0040] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0041] It should be noted that in the description of the embodiments of the present invention, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. The terms "upper," "lower," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention. Unless otherwise expressly specified and limited, the terms "installed," "connected," and "linked" should be interpreted broadly, for example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two elements. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0042] The terms "first," "second," etc., used in this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class, without limiting the number of objects; for example, a first object can be one or more. Furthermore, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects have an "or" relationship.

[0043] Existing ABE (Automatic Encryption Token) schemes struggle to meet the demands of blockchain, computing networks, and cloud services for real-time attribute credentials and dynamic cryptographic strategies. Typically, most ABEs treat user private keys as long-term decryption credentials, failing to reflect real-time attributes such as time and location. Furthermore, cryptographic strategies are usually statically bound to encrypted data; changes to these strategies require time-consuming operations such as data re-encryption.

[0044] To address the above problems, the present invention proposes the following embodiments. The following is a detailed explanation... Figures 1-5 This invention describes the attribute-based encryption method and attribute-based decryption method provided in the embodiments of the present invention.

[0045] Figure 1 This is a flowchart illustrating the attribute-based encryption method provided by the present invention, as shown below. Figure 1 As shown, including but not limited to the following steps:

[0046] S110, the resource provider randomly selects the first parameter from the polynomial quotient ring;

[0047] S120, perform hash processing on the target resource identifier to obtain a hash mapping result, wherein the target resource identifier is the identifier information of the resource that needs to be encrypted;

[0048] S130, based on the first parameter, the hash mapping result, the public key of the policy management entity and the session key, the ciphertext is obtained by encrypting using a preset encryption algorithm.

[0049] Here, the policy management entity is an entity that stores and manages access policies specified by the data owner. The policy management entity is used to generate a cryptographic policy for the access policy based on the key pair of the policy management entity, the target resource identifier, time-varying parameters, and Gaussian parameters. The time-varying parameters are parameters that change over time.

[0050] It should be noted that the execution subject of the attribute base method provided in the embodiments of the present invention can be a server or a computer device.

[0051] In S110, the resource provider generates a polynomial commerce cycle from the manager. The first parameter is randomly selected from the middle. This is used for generating subsequent ciphertext.

[0052] In S120, the target resource is identified. Perform hash processing, hash function Mapping a bit string of arbitrary length to Random elements on the hash map result. .

[0053] In S130, based on the first parameter δ and the target resource identifier... The public key of the policy management entity and session key ,calculate ,in, It is a vector and Connection; Extraction and The ciphertext is calculated based on the following formula. :

[0054] ;

[0055] in, q It is the modulus.

[0056] The attribute-based encryption method provided in this invention involves a resource provider randomly selecting a first parameter from a polynomial quotient ring; hashing a target resource identifier to obtain a hash mapping result, where the target resource identifier is the identifier information of the resource to be encrypted; and encrypting the data using a preset encryption algorithm based on the first parameter, the hash mapping result, the public key of the policy management entity, and the session key to obtain ciphertext. The policy management entity stores and manages access policies specified by the data owner. This entity generates a cryptographic policy for the access policy based on its key pair, the target resource identifier, a time-varying parameter, and a Gaussian parameter, where the time-varying parameter changes over time. In this attribute-based encryption method, the cryptographic policy for the access policy is generated based on the time-varying parameter, meaning the cryptographic policy is generated based on a time parameter, giving the cryptographic policy timeliness and enabling dynamic binding between the cryptographic policy and the encrypted data.

[0057] In an optional embodiment, before the resource provider randomly selects the first parameter from the polynomial quotient ring, the method further includes:

[0058] The manager generates a polynomial quotient cycle;

[0059] The policy management entity randomly selects a second parameter from a specified sub-Gaussian distribution and uses the second parameter as the private key of the policy management entity.

[0060] The policy management entity generates its public key based on the polynomial quotient ring.

[0061] The private key and public key of the policy management entity are used as the key pair of the policy management entity.

[0062] Specifically, the polynomial business cycle generated by the manager The attribute authorization entity and the policy management entity can generate public-private key pairs through the following steps. The system initialization is complete. The attribute authorization entity is used to manage specified attributes.

[0063] Randomly select from the specified subgaussian distribution ;

[0064] Random selection and ;

[0065] calculate ,in For vectors and The combination;

[0066] Finally, output the entity. key pair .

[0067] In an optional embodiment, cryptographic strategy generation It is managed by the strategy management entity Based on its key pair Access policies Resource Identifier Time-varying parameters and Gaussian parameters Generate cryptographic strategies . Specifically:

[0068] calculate ;

[0069] Extract , making ;

[0070] Random selection ,calculate , where the symbol This represents the XOR operation of any two bit strings. When the lengths of the input bit strings are different, the higher bits of the shorter bit string can be padded using a circular padding method.

[0071] Will Transform into dimensional policy matrix ;

[0072] Randomly select vector ,in To keep it secret, calculate the vector. ;

[0073] calculate and ,in , It is a management attribute Authorization entity with specified attributes, symbol This is a connector for two bit strings;

[0074] Extract ,calculate ,in ;

[0075] Extract ,calculate ;

[0076] Finally, output strategy cryptographic strategies ,in Used for cryptographic strategy decisions, and Used to recover session keys .

[0077] Figure 2 This is a flowchart illustrating the attribute base decryption method provided by the present invention, as follows: Figure 2 As shown, including but not limited to the following steps:

[0078] S210, based on attribute credentials and cryptographic strategies, the ciphertext is decrypted to obtain the session key, wherein the attribute credentials are one-time attribute tokens generated based on time and attributes.

[0079] The attribute-based decryption method provided in this invention decrypts ciphertext based on attribute credentials and cryptographic strategies to obtain a session key. The attribute credentials are one-time attribute tokens generated based on time and attributes. In this attribute-based decryption method, the one-time attribute tokens generated based on time and attributes simultaneously encode both the attributes and the current time, giving the generated attribute credentials time-sensitive properties. The decryption process does not rely on the user's private key but uses the real-time generated attribute credentials, thereby improving system reliability.

[0080] In an optional embodiment, before decrypting the ciphertext based on attribute credentials and cryptographic strategies to obtain the session key, the method further includes:

[0081] The specified attribute authorization entity generates attribute credentials for the attribute under the time-varying parameters based on the private key, attribute, time-varying parameters, and Gaussian parameters of the policy management entity.

[0082] Authorizing entities with specified attributes based on private key ,property Time-varying parameters and Gaussian parameters The attribute credentials are calculated. Specifically:

[0083] Entity calculation with specified attributes and ;

[0084] Extract , making ;

[0085] Finally, output properties In time-varying parameters The attribute certificate below .

[0086] Based on any of the above embodiments, the step of decrypting the ciphertext based on attribute credentials and cryptographic strategies to obtain the session key includes:

[0087] Based on the attribute credential set and the cryptographic strategy, a cryptographic strategy decision result is generated, wherein the attribute credential set includes attribute credentials of multiple attributes.

[0088] Based on the decision result of the cryptographic strategy, the ciphertext is decrypted to obtain the session key.

[0089] Here, collect evidence. ,in accordance with and Generate judgment results Specifically, based on the policy matrix Attribute credential set Attribute sub-ciphertext Kazuko Secret Text Generate cryptographic strategy decision results:

[0090] from Searching for candidate invertible submatrices , making ;

[0091] for ,calculate ;

[0092] make ,calculate ,in for The first row of the inverse matrix;

[0093] calculate ;

[0094] ( Is it less than If so, then If not, then ),in , n For parameters;

[0095] Finally, output the judgment result. .

[0096] Here, if the attribute set Satisfaction Strategy From At least one candidate invertible submatrix was retrieved from the database. ,and Matchable (This process can be represented as) Then, calculate. ,in,

[0097] ,

[0098] Secondly for

[0099] ,

[0100] in, ,vector Thus we can obtain

[0101] .

[0102] for ,like The One coefficient is close to 0. The One coefficient is set to 0; otherwise The Each coefficient is set to 1. To ensure correctness, The coefficients Should meet .

[0103] Furthermore, utilizing To decrypt Session key in Specifically, based on the following steps, according to the attribute credentials and sub-ciphertext... and ciphertext Decrypt to obtain the session key:

[0104] calculate ;

[0105] calculate ;

[0106] calculate ( Is it less than If so, then If not, then ),in ;

[0107] Finally, output the session key. .

[0108] according to ,calculate

[0109] ;

[0110] in, Should meet , .

[0111] In summary, in business scenarios requiring large-scale secure data sharing, such as "east-to-west data sharing" and "east-to-west data rendering" in blockchain, IoT, cloud services, and computing networks, data security relies heavily on the security of the data owner's key. Once the data owner's key is stolen, the data will be leaked. However, key security in these scenarios is not optimistic. For IoT devices, there are cost and energy consumption requirements, and many users lack awareness of key security, with keys often hard-coded and easily accessible. For cloud services, blockchain, and computing networks, many users typically provide their original keys for hosting on the platforms, which exposes the data to the risk of being spied on by platform operators. Furthermore, the key generation, distribution, and access control policies of these platforms are generally independent processes, requiring multiple interactions for encryption and decryption, resulting in complex key management processes and impacting encryption and decryption efficiency. The attribute-based encryption and decryption methods provided by this invention simultaneously encode attributes and the current time during the sampling process to ensure the validity of the credentials. A time-based cryptographic strategy generation algorithm is proposed, ensuring the generated cryptographic strategy is valid and dynamically bound to the encrypted data. The decryption process does not rely on the user's private key but utilizes a one-time attribute token (i.e., credential), improving system reliability and effectively addressing the shortcomings of the aforementioned scenarios. This achieves one-time credential, a dynamic cryptographic strategy to simplify key management, and also possesses resistance to quantum attacks.

[0112] The attribute-based encryption device provided in the embodiments of the present invention is described below. The attribute-based encryption device described below can be referred to in correspondence with the attribute-based encryption method described above.

[0113] Figure 3 This is a schematic diagram of the attribute-based encryption device provided by the present invention, as shown below. Figure 3 As shown, the attribute-based encryption device may include, but is not limited to;

[0114] Parameter acquisition module 310 is used for: the resource provider to randomly select and obtain the first parameter from the polynomial quotient ring;

[0115] The hash processing module 320 is used to: perform hash processing on the target resource identifier to obtain a hash mapping result, wherein the target resource identifier is the identifier information of the resource that needs to be encrypted;

[0116] The session encryption module 330 is used to: encrypt the data using a preset encryption algorithm based on the first parameter, the hash mapping result, the public key of the policy management entity, and the session key to obtain ciphertext, wherein the policy management entity is an entity used to store and manage access policies specified by the data owner;

[0117] The policy management entity is an entity that stores and manages access policies specified by the data owner. The policy management entity is used to generate a cryptographic policy for the access policy based on the key pair of the policy management entity, the target resource identifier, time-varying parameters, and Gaussian parameters. The time-varying parameters are parameters that change over time.

[0118] It should be noted that the attribute-based encryption device provided in this embodiment of the invention can execute the attribute-based encryption method described in any of the above embodiments during specific operation, and this embodiment will not elaborate on this.

[0119] The attribute-based encryption device provided in this embodiment of the invention obtains a first parameter by randomly selecting it from a polynomial quotient ring by a resource provider; performs hash processing on a target resource identifier to obtain a hash mapping result, where the target resource identifier is the identifier information of the resource to be encrypted; and encrypts the data using a preset encryption algorithm based on the first parameter, the hash mapping result, the public key of the policy management entity, and the session key to obtain ciphertext. The policy management entity is an entity that stores and manages access policies specified by the data owner. The policy management entity is used to generate a cryptographic policy for the access policy based on its key pair, the target resource identifier, a time-varying parameter, and a Gaussian parameter, where the time-varying parameter is a parameter that changes over time. In this attribute-based encryption method, the cryptographic policy for the access policy is generated based on the time-varying parameter, meaning the cryptographic policy is generated based on a time parameter, giving the cryptographic policy timeliness and enabling dynamic binding between the cryptographic policy and the encrypted data.

[0120] The attribute base decryption device provided in the embodiments of the present invention is described below. The attribute base decryption device described below and the attribute base decryption method described above can be referred to in correspondence.

[0121] Figure 4 This is a schematic diagram of the attribute base decryption device provided by the present invention, as shown below. Figure 4 As shown, the attribute base decryption device may include, but is not limited to;

[0122] The session decryption module 410 is used to: decrypt ciphertext based on attribute credentials and cryptographic strategies to obtain a session key, wherein the attribute credentials are one-time attribute tokens generated based on time and attributes.

[0123] It should be noted that the attribute base decryption device provided in this embodiment of the invention can execute the attribute base decryption method described in any of the above embodiments during specific operation, and this embodiment will not elaborate on this.

[0124] The attribute-based decryption device provided in this embodiment of the invention decrypts ciphertext based on attribute credentials and cryptographic strategies to obtain a session key. The attribute credentials are one-time attribute tokens generated based on time and attributes. In this attribute-based decryption method, the one-time attribute tokens generated based on time and attributes simultaneously encode both the attributes and the current time, giving the generated attribute credentials time-sensitive properties. The decryption process does not rely on the user's private key but uses the real-time generated attribute credentials, thereby improving system reliability.

[0125] Figure 5 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 5 As shown, the electronic device may include: a processor 510, a communications interface 520, a memory 530, and a communication bus 540, wherein the processor 510, the communications interface 520, and the memory 530 communicate with each other via the communication bus 540. The processor 510 can call logical instructions in the memory 530 to execute an attribute-based encryption method and an attribute-based decryption method, the method including:

[0126] The resource provider randomly selects the first parameter from the polynomial quotient ring;

[0127] The target resource identifier is hashed to obtain a hash mapping result, where the target resource identifier is the identifier information of the resource that needs to be encrypted;

[0128] Based on the first parameter, the hash mapping result, the public key of the policy management entity, and the session key, the ciphertext is obtained by encrypting using a preset encryption algorithm.

[0129] The policy management entity is an entity that stores and manages access policies specified by the data owner. The policy management entity is used to generate a cryptographic policy for the access policy based on the key pair of the policy management entity, the target resource identifier, time-varying parameters, and Gaussian parameters. The time-varying parameters are parameters that change over time.

[0130] Or, including:

[0131] Based on attribute credentials and cryptographic strategies, the ciphertext is decrypted to obtain the session key. The attribute credentials are one-time attribute tokens generated based on time and attributes.

[0132] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0133] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program, the computer program being able to be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer being able to execute the attribute-based encryption method and attribute-based decryption method provided by the above methods, the method comprising:

[0134] The resource provider randomly selects the first parameter from the polynomial quotient ring;

[0135] The target resource identifier is hashed to obtain a hash mapping result, where the target resource identifier is the identifier information of the resource that needs to be encrypted;

[0136] Based on the first parameter, the hash mapping result, the public key of the policy management entity, and the session key, the ciphertext is obtained by encrypting using a preset encryption algorithm.

[0137] The policy management entity is an entity that stores and manages access policies specified by the data owner. The policy management entity is used to generate a cryptographic policy for the access policy based on the key pair of the policy management entity, the target resource identifier, time-varying parameters, and Gaussian parameters. The time-varying parameters are parameters that change over time.

[0138] Or, including:

[0139] Based on attribute credentials and cryptographic strategies, the ciphertext is decrypted to obtain the session key. The attribute credentials are one-time attribute tokens generated based on time and attributes.

[0140] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the attribute-based encryption method and attribute-based decryption method provided by the above methods, the method comprising:

[0141] The resource provider randomly selects the first parameter from the polynomial quotient ring;

[0142] The target resource identifier is hashed to obtain a hash mapping result, where the target resource identifier is the identifier information of the resource that needs to be encrypted;

[0143] Based on the first parameter, the hash mapping result, the public key of the policy management entity, and the session key, the ciphertext is obtained by encrypting using a preset encryption algorithm.

[0144] The policy management entity is an entity that stores and manages access policies specified by the data owner. The policy management entity is used to generate a cryptographic policy for the access policy based on the key pair of the policy management entity, the target resource identifier, time-varying parameters, and Gaussian parameters. The time-varying parameters are parameters that change over time.

[0145] Or, including:

[0146] Based on attribute credentials and cryptographic strategies, the ciphertext is decrypted to obtain the session key. The attribute credentials are one-time attribute tokens generated based on time and attributes.

[0147] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0148] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0149] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An attribute-based encryption method, characterized in that, include: The resource provider randomly selects the first parameter from the polynomial quotient ring; The target resource identifier is hashed to obtain a hash mapping result, where the target resource identifier is the identifier information of the resource that needs to be encrypted; Based on the first parameter, the hash mapping result, the public key of the policy management entity, and the session key, the ciphertext is obtained by encrypting using a preset encryption algorithm. The policy management entity is an entity that stores and manages access policies specified by the data owner. The policy management entity is used to generate a cryptographic policy for the access policy based on the key pair of the policy management entity, the target resource identifier, time-varying parameters, and Gaussian parameters. The time-varying parameters are parameters that change over time.

2. The attribute-based encryption method according to claim 1, characterized in that, Before the resource provider randomly selects the first parameter from the polynomial quotient ring, the method further includes: The manager generates a polynomial quotient cycle; The policy management entity randomly selects a second parameter from a specified sub-Gaussian distribution and uses the second parameter as the private key of the policy management entity. The policy management entity generates its public key based on the polynomial quotient ring. The private key and public key of the policy management entity are used as the key pair of the policy management entity.

3. An attribute base decryption method, characterized in that, include: Based on attribute credentials and cryptographic strategies, the ciphertext is decrypted to obtain the session key. The attribute credentials are one-time attribute tokens generated based on time and attributes. The ciphertext is obtained by encrypting the first parameter, the hash mapping result, the public key of the policy management entity, and the session key using a preset encryption algorithm; The first parameter is randomly selected from the polynomial quotient ring; the hash mapping result is obtained by hashing the target resource identifier. The policy management entity is used to generate a cryptographic policy for the access policy based on the key pair of the policy management entity, the target resource identifier, the time-varying parameter, and the Gaussian parameter. Before the process of decrypting the ciphertext based on attribute credentials and cryptographic strategies to obtain the session key, the method further includes: The specified attribute authorization entity generates an attribute credential under the time-varying parameters based on the private key, attribute, time-varying parameters, and Gaussian parameters of the policy management entity. The method of decrypting ciphertext based on attribute credentials and cryptographic strategies to obtain the session key includes: Based on the attribute credential set and the cryptographic strategy, a cryptographic strategy decision result is generated, wherein the attribute credential set includes attribute credentials of multiple attributes. Based on the decision result of the cryptographic strategy, the ciphertext is decrypted to obtain the session key.

4. An attribute-based encryption device, characterized in that, include: The parameter acquisition module is used for: the resource provider to randomly select the first parameter from the polynomial quotient ring; The hash processing module is used to: perform hash processing on the target resource identifier to obtain a hash mapping result, wherein the target resource identifier is the identifier information of the resource that needs to be encrypted; The session encryption module is used to: encrypt the data using a preset encryption algorithm based on the first parameter, the hash mapping result, the public key of the policy management entity, and the session key to obtain ciphertext. The policy management entity is an entity used to store and manage access policies specified by the data owner. The policy management entity is an entity that stores and manages access policies specified by the data owner. The policy management entity is used to generate a cryptographic policy for the access policy based on the key pair of the policy management entity, the target resource identifier, time-varying parameters, and Gaussian parameters. The time-varying parameters are parameters that change over time.

5. An attribute-based decryption device, characterized in that, include: The session decryption module is used to: decrypt ciphertext based on attribute credentials and cryptographic strategies to obtain a session key, wherein the attribute credentials are one-time attribute tokens generated based on time and attributes; The ciphertext is obtained by encrypting the first parameter, the hash mapping result, the public key of the policy management entity, and the session key using a preset encryption algorithm; The first parameter is randomly selected from the polynomial quotient ring; the hash mapping result is obtained by hashing the target resource identifier. The policy management entity is used to generate a cryptographic policy for the access policy based on the key pair of the policy management entity, the target resource identifier, the time-varying parameter, and the Gaussian parameter. Before the process of decrypting the ciphertext based on attribute credentials and cryptographic strategies to obtain the session key, the method further includes: The specified attribute authorization entity generates an attribute credential under the time-varying parameters based on the private key, attribute, time-varying parameters, and Gaussian parameters of the policy management entity. The method of decrypting ciphertext based on attribute credentials and cryptographic strategies to obtain the session key includes: Based on the attribute credential set and the cryptographic strategy, a cryptographic strategy decision result is generated, wherein the attribute credential set includes attribute credentials of multiple attributes. Based on the decision result of the cryptographic strategy, the ciphertext is decrypted to obtain the session key.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the program, it implements the attribute-based encryption method as described in any one of claims 1 to 2, or the attribute-based decryption method as described in claim 3.

7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the attribute-based encryption method as described in any one of claims 1 to 2, or the attribute-based decryption method as described in claim 3.

8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the attribute-based encryption method as described in any one of claims 1 to 2, or the attribute-based decryption method as described in claim 3.

Citation Information

Patent Citations

  • Attribute-based hybrid encryption method capable of tracing leaked secret key

    CN104168108A

  • Cryptography attribute-based access control method and system based on dynamic rule

    CN107864139A