Unconstrained attribute-based encryption method and system
By using cryptographic hashing functions and symmetric encryption schemes in attribute-based encryption, combined with message authentication code schemes, the constraints of attribute-based encryption schemes on attribute space and access control policies in the existing technology are solved, and efficient unconstrained attributes are achieved Base encryption and decryption.
Patent Information
- Application Number
- CN202410888250.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-07-04
AI Technical Summary
The existing attribute-based encryption scheme has constraints on attribute space, access control policy, and decryptor attribute set size, and a large number of bilinear pairing operations are required during the decryption process, which is relatively inefficient.
Provide an attribute-based encryption method with no constraints, authorization is authorized by using the first and second encryption hash functions to generate user keys and bilinear paired group encryption intermediates. The user attribute string collection is encrypted and decrypted, and only a small number of bilinear pairing operations are performed during the decryption process.
It realizes efficient encryption and decryption without constraints on attribute space, access policy and attribute set size, significantly improving decryption efficiency.
Smart Images

Figure CN118413315B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data encryption, and in particular to an unconstrained attribute-based encryption method and an unconstrained attribute-based encryption system. Background Art
[0002] The statements in this section merely provide background art related to the present invention and do not necessarily constitute prior art.
[0003] Attribute-based encryption is a special type of public key encryption that allows the encryptor to encrypt with an access control policy as the public key, and the decryptor can decrypt when the attribute information meets the access control policy. The encryption key of symmetric encryption is the same as the decryption key, which solves the problem of key leakage caused by the transmission of symmetric encryption keys; moreover, attribute-based encryption implements fine-grained access control of encrypted data, that is, the data owner can specify who can access the encrypted data, and the data owner has full control over the data.
[0004] The inventors found that existing attribute-based encryption schemes often have constraints on the attribute space (the number of attributes in the system), access control policies, and the size of the decryptor's attribute set, and require a large number of bilinear pairing operations during the decryption process, which is inefficient. Summary of the invention
[0005] In order to address the deficiencies in the prior art, the present invention provides an unconstrained attribute-based encryption method and system, which has no constraints on the size of the attribute space, the size of the access policy, and the size of the attribute set. Only a small amount of bilinear pairing operations are required during the decryption process, thereby achieving efficient decryption.
[0006] In order to achieve the above object, the present invention adopts the following technical solution:
[0007] In a first aspect, the present invention provides an attribute-based encryption method without constraints.
[0008] An unconstrained attribute-based encryption method includes the following steps:
[0009] Encrypting the user attribute character string according to the first cryptographic hash function to generate a user key intermediate;
[0010] Encrypting a combination function of some parameters of the bilinear pairing group according to a second encrypted hash function to generate an encrypted intermediate amount of the bilinear pairing group;
[0011] According to the randomly selected exponent, user key intermediate quantity and bilinear pairing group encryption intermediate quantity, combined with the selected symmetric encryption scheme and message authentication code scheme, the message under the authorized user attribute string set is encrypted to generate the encrypted ciphertext.
[0012] As a further limitation of the first aspect of the present invention, encrypting the user attribute string according to the first cryptographic hash function to generate a user key intermediate includes: ,in, is the first cryptographic hash function, is a user attribute string, is the user key intermediate quantity.
[0013] As a further limitation of the first aspect of the present invention, encrypting a combination function of some parameters of a bilinear pairing group according to a second encrypted hash function to generate an encrypted intermediate amount of a bilinear pairing group includes:
[0014] ,in, Encrypting intermediate quantities for bilinear pairing groups, is a combination function of some parameters of the bilinear pairing group, s is a randomly selected index, and is a random number, is the parameter of the bilinear pairing group, is the second cryptographic hash function.
[0015] As a further limitation of the first aspect of the present invention, encrypting a message under the authorized user attribute string set includes:
[0016] Random Selection ,make , is the set of all numbers that are relatively prime to the prime number p;
[0017] calculate , and convert the binary string Split into length Substring and the length is Substring of ,in, , matches the key length of the symmetric encryption scheme, Matches the key length of the message authentication code scheme;
[0018] calculate and ;
[0019] Return ciphertext: ;
[0020] Among them, Mac is the label generation algorithm, Enc is the encryption algorithm, and KDF is the key derivation function.
[0021] As a further limitation of the first aspect of the present invention, decryption of the ciphertext includes:
[0022] exist Search With the user key With the same index , if the search fails, return the search failure identifier and stop; otherwise, let is the return value of the search result, and then calculates:
[0023] ;
[0024] calculate ;
[0025] calculate , and convert the binary string Split into length Substring of and the length is Substring of ,in, , matches the key length of the symmetric encryption scheme, Matches the key length of the message authentication code scheme;
[0026] calculate ,if If the search fails, the identifier is returned and the calculation stops; otherwise, ;by As the decrypted plaintext;
[0027] Among them, Dec is the decryption algorithm and Vrfy is the verification algorithm.
[0028] As a further limitation of the first aspect of the present invention, the user key is: , r, and is a random number, is the parameter of the bilinear pairing group, .
[0029] In a second aspect, the present invention provides an attribute-based encryption system without constraints.
[0030] An unconstrained attribute-based encryption system, comprising:
[0031] A first encryption unit is configured to: encrypt the user attribute character string according to a first encryption hash function to generate a user key intermediate;
[0032] The second encryption unit is configured to: encrypt the combination function of some parameters of the bilinear pairing group according to the second encrypted hash function to generate a bilinear pairing group encrypted intermediate amount;
[0033] The third encryption unit is configured to: encrypt the message under the authorized user attribute string set according to the randomly selected exponent, the user key intermediate quantity and the bilinear pairing group encryption intermediate quantity, combined with the selected symmetric encryption scheme and the message authentication code scheme, to generate an encrypted ciphertext.
[0034] As a further limitation of the second aspect of the present invention, in the third encryption unit, encrypting the message under the authorized user attribute string set includes:
[0035] Random Selection ,make ;
[0036] calculate , and convert the binary string Split into length Substring and the length is Substring of ,in, , matches the key length of the symmetric encryption scheme, Matches the key length of the message authentication code scheme;
[0037] calculate and ;
[0038] Return ciphertext: ;
[0039] Among them, Mac is the label generation algorithm, Enc is the encryption algorithm, and KDF is the key derivation function.
[0040] As a further limitation of the second aspect of the present invention, the present invention further includes a decryption unit configured to:
[0041] exist Search With the user key With the same index , if the search fails, return the search failure identifier and stop; otherwise, let is the return value of the search result, and then calculates:
[0042] ;
[0043] calculate ;
[0044] calculate , and convert the binary string Split into length Substring of and the length is Substring of ,in, , matches the key length of the symmetric encryption scheme, Matches the key length of the message authentication code scheme;
[0045] calculate ,if , then the search failure identifier is returned and the calculation stops; otherwise, ;by As the decrypted plaintext;
[0046] Among them, Dec is the decryption algorithm and Vrfy is the verification algorithm.
[0047] As a further limitation of the second aspect of the present invention, the user key is: , r, and is a random number, is the parameter of the bilinear pairing group, .
[0048] Compared with the prior art, the present invention has the following beneficial effects:
[0049] The present invention innovatively provides an unconstrained attribute-based encryption and decryption method, which has no constraints on the size of the attribute space, the size of the access policy, and the size of the attribute set. Only a small amount of bilinear pairing operations are required during the decryption process, which can achieve efficient decryption.
[0050] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0052] Figure 1 A schematic diagram of a flow chart of an attribute-based encryption method without constraints provided in Example 1 of the present invention; DETAILED DESCRIPTION
[0053] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0054] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0055] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0056] Embodiment 1:
[0057] This implementation proposes an unconstrained attribute-based encryption method, which has no constraints on the size of the attribute space, the size of the access policy, and the size of the attribute set. In addition, only a small amount of bilinear pairing operations are required during the decryption process, which can achieve efficient decryption. The following is a brief introduction to the technical terms and related concepts involved in this processing scheme, including:
[0058] (1) Bilinear pairing, let , , is three prime numbers Cyclic groups of order, mappings For bilinear pairing, it should have the following properties:
[0059] Bilinear: For any ,have:
[0060] ;
[0061] Non-degeneracy: For any , if for all Both If established, ;
[0062] Computability: Mapping is efficiently computable.
[0063] (2) A symmetric encryption scheme (SYM) is a pair of probabilistic polynomial-time algorithms (Enc, Dec) that satisfies the following conditions:
[0064] Encryption algorithm Enc with key ( Related to security parameters) and plaintext messages As input, output ciphertext ;
[0065] The decryption algorithm Dec is based on the key and ciphertext As input, output message ;
[0066] Required for all and , .
[0067] (3) A message authentication code scheme (MAC) is a pair of probabilistic polynomial-time algorithms (Mac, Vrfy) that satisfies the following conditions:
[0068] Label generation algorithm Mac with key As input ( Related to security parameters), message , returns a label ;
[0069] Verification algorithm Vrfy with key ,information and tags As input, returns 1 to indicate is valid, so It is credible, and returns 0. is invalid, so It is not credible;
[0070] Required for all and , .
[0071] (4) The key derivation function (KDF) takes a random number r and a key length l as input and outputs a key of length l. The uniform distribution on is indistinguishable.
[0072] like Figure 1 As shown, the attribute-based encryption scheme proposed in the present invention includes four steps: system establishment (Setup), key generation (KeyGen), encryption (Encrypt) and decryption (Decrypt), which are described in detail as follows:
[0073] S1: System Setup ).
[0074] With safety parameters As input, generate system parameters params, master public key mpk and master secret key msk. The algorithm performs the following steps:
[0075] S1.1: Selecting a bilinear pairing group ;
[0076] S1.2: Choose two cryptographic hash functions: and ;
[0077] S1.3: Select two random numbers and ;
[0078] S1.4: Select a secure symmetric encryption scheme SYM = (Enc, Dec), a secure message authentication code scheme MAC = (Mac, Vrfy), and a secure key derivation function KDF;
[0079] S1.5: Return system parameters, master public key and master secret key:
[0080] ;
[0081] ;
[0082] .
[0083] S2: Key Generation ).
[0084] User attribute string To generate a user key, the algorithm performs the following steps:
[0085] S2.1: Calculation ;
[0086] S2.2: Random selection And returns the key: .
[0087] S3: Encrypt ): Authorized user attribute string Messages under collection To encrypt, the algorithm performs the following steps:
[0088] S3.1: Random Selection Index ;
[0089] S3.2: Calculation , ;
[0090] S3.3: Calculation ;
[0091] S3.4: Perform the following actions:
[0092] (1) Random selection ,make ;
[0093] (2) Calculation And convert the binary string Split into length and Two substrings of and , and Must match the key length of the underlying SYM and MAC schemes;
[0094] (3) Calculation and ;
[0095] (4) Return ciphertext: .
[0096] S4: Decrypt ).
[0097] Using Keys Decrypting ciphertext , the algorithm performs the following steps:
[0098] S4.1: Found in and In With the same index If the search fails, it returns "⊥" (i.e. search failure identifier) and stops;
[0099] S4.2: Otherwise, let is the return value of the search result, and then calculates:
[0100] ;
[0101] S4.3: Calculation .
[0102] S4.4: Perform the following operations to recover :
[0103] (1) Calculation And convert the binary string Split into length and Two substrings of and , and Must match the key length of the underlying SYM and MAC schemes;
[0104] (2) Calculation ,if Then it returns "⊥" (i.e. search failure identifier) and stops;
[0105] (3) Otherwise, calculate .
[0106] S4.5: Return plain text .
[0107] Embodiment 2:
[0108] The present invention provides an attribute-based encryption system without constraints, comprising:
[0109] A first encryption unit is configured to: encrypt the user attribute character string according to a first encryption hash function to generate a user key intermediate;
[0110] The second encryption unit is configured to: encrypt the combination function of some parameters of the bilinear pairing group according to the second encrypted hash function to generate a bilinear pairing group encrypted intermediate amount;
[0111] The third encryption unit is configured to: encrypt the message under the authorized user attribute string set according to the randomly selected exponent, the user key intermediate quantity and the bilinear pairing group encryption intermediate quantity, combined with the selected symmetric encryption scheme and the message authentication code scheme, to generate an encrypted ciphertext.
[0112] The specific function implementation process of the first encryption unit, the second encryption unit and the third encryption unit is shown in step S1 to step S3 in embodiment 1, which will not be repeated here;
[0113] This implementation also includes a decryption unit. The functional implementation process of the decryption unit is shown in step S4 in Example 1 and will not be repeated here.
[0114] It is understandable that the above-mentioned units can be separately or completely combined into one or several other units to constitute, or one (some) of the units can be further divided into multiple smaller units in function to constitute, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In practical applications, the functions of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present application, the encryption system may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.
[0115] According to another embodiment of the present application, the system described in this embodiment can be constructed and the encryption method of the embodiment of the present application can be implemented by running a computer program (including program code) capable of executing the steps involved in the corresponding method described in Example 1 on a general computing device such as a computer including processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM). The computer program can be recorded on, for example, a computer-readable recording medium, and loaded into the above-mentioned computing device through the computer-readable recording medium and run therein.
[0116] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An unconstrained attribute-based encryption method, characterized in that: The following processes are included: Encrypting the user attribute character string according to a first cryptographic hash function to generate a user key intermediate; Encrypting a combination function of some parameters of the bilinear pairing group according to a second cryptographic hash function to generate an encrypted intermediate of the bilinear pairing group; Based on the randomly selected exponent, user key intermediate quantity, and bilinear pairing group encryption intermediate quantity, combined with the selected symmetric encryption scheme and message authentication code scheme, the message under the authorized user attribute string set is encrypted to generate the encrypted ciphertext; Encrypting the user attribute character string according to the first cryptographic hash function to generate a user key intermediate includes: ,in, is the first cryptographic hash function, is the user attribute string, is the intermediate quantity of the user key; Encrypting a combination function of some parameters of the bilinear pairing group according to a second cryptographic hash function to generate a bilinear pairing group encrypted intermediate quantity includes: ,in, Encrypting intermediate quantities for bilinear pairing groups, is a combination function of some parameters of the bilinear pairing group, s is a randomly selected index, and is a random number, are the parameters of the bilinear pairing group, is a second cryptographic hash function; Random selection ,make ; calculate , and convert the binary string Split into length Substring of and the length is Substring of ,in, , Matches the key length of the symmetric encryption scheme, Matches the key length of the message authentication code scheme; calculate and ; Return ciphertext: ; Among them, Mac is the label generation algorithm, Enc is the encryption algorithm, and KDF is the key derivation function.
2. The unconstrained attribute-based encryption method according to claim 1, wherein: Decryption of ciphertext, including: exist Search With the user key With the same index If the search fails, return the search failure identifier and stop; otherwise, let is the return value of the search result, and then calculate: ; calculate ; calculate , and convert the binary string Split into length Substring of and the length is Substring of ,in, , Matches the key length of the symmetric encryption scheme, Matches the key length of the message authentication code scheme; calculate ,if Then the search failure identifier is returned and the calculation stops; otherwise, ; Take m as the decrypted plaintext; Among them, Dec is the decryption algorithm and Vrfy is the verification algorithm.
3. The unconstrained attribute-based encryption method according to claim 2, wherein: The user key is: , r, and is a random number, are the parameters of the bilinear pairing group, .
4. An unconstrained attribute-based encryption system, characterized in that: include: A first encryption unit is configured to: encrypt the user attribute character string according to a first cryptographic hash function to generate a user key intermediate; The second encryption unit is configured to: encrypt a combination function of some parameters of the bilinear pairing group according to a second cryptographic hash function to generate a bilinear pairing group encrypted intermediate; The third encryption unit is configured to: encrypt the message under the authorized user attribute string set according to the randomly selected exponent, the user key intermediate quantity, and the bilinear pairing group encryption intermediate quantity in combination with the selected symmetric encryption scheme and message authentication code scheme to generate an encrypted ciphertext; Encrypting the user attribute character string according to the first cryptographic hash function to generate a user key intermediate includes: ,in, is the first cryptographic hash function, is the user attribute string, is the intermediate quantity of the user key; Encrypting a combination function of some parameters of the bilinear pairing group according to a second cryptographic hash function to generate a bilinear pairing group encrypted intermediate quantity includes: ,in, Encrypting intermediate quantities for bilinear pairing groups, is a combination function of some parameters of the bilinear pairing group, s is a randomly selected index, and is a random number, are the parameters of the bilinear pairing group, is a second cryptographic hash function; Random selection ,make ; calculate , and convert the binary string Split into length Substring of and the length is Substring of ,in, , Matches the key length of the symmetric encryption scheme, Matches the key length of the message authentication code scheme; calculate and ; Return ciphertext: ; Among them, Mac is the label generation algorithm, Enc is the encryption algorithm, and KDF is the key derivation function.
5. The unconstrained attribute-based encryption system according to claim 4, wherein: Also included is a decryption unit configured to: exist Search With the user key With the same index If the search fails, return the search failure identifier and stop; otherwise, let is the return value of the search result, and then calculate: ; calculate ; calculate , and convert the binary string Split into length Substring of and the length is Substring of ,in, , Matches the key length of the symmetric encryption scheme, Matches the key length of the message authentication code scheme; calculate ,if , then return the search failure identifier and stop; otherwise, calculate ; Take m as the decrypted plaintext; Among them, Dec is the decryption algorithm and Vrfy is the verification algorithm.
6. The unconstrained attribute-based encryption system according to claim 5, characterized in that: The user key is: , r, and is a random number, are the parameters of the bilinear pairing group, .
