Multi-party charging data sharing method and device based on attribute encryption and electronic equipment
Through the method based on attribute encryption, the charging data is dynamically decrypted, which solves the problems of rigid authorization mechanism and security risks in the traditional multi-party charging data sharing model, and realizes efficient and flexible data sharing and refined permission management.
Patent Information
- Application Number
- CN202411763166.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-12-03
AI Technical Summary
The traditional multi-party charging data sharing model is difficult to achieve efficient and flexible data sharing while ensuring data security, and the static authorization mechanism cannot adapt to the needs of large-scale users and complex permissions, which poses security risks.
Using an attribute-based encryption method, flexible sharing and refined permission management of charging data are achieved by obtaining ciphertext data and dynamically decrypting according to the user's attributes and access matrix.
It improves the flexibility and security of the system, can dynamically adjust permissions according to the user's real-time needs and attribute changes, avoids the security risks of single point of trust, and significantly improves the security and sharing flexibility of data.
Smart Images

Figure CN119628833A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power data access control, and specifically relates to a multi-party charging data sharing method, device and electronic equipment based on attribute encryption. Background Art
[0002] With the popularity of new energy vehicles, the deployment of charging piles and the management of charging data have become crucial. New energy charging data plays an important role in supporting power grid optimization, improving charging efficiency, and promoting the use of new energy. However, how to achieve efficient and flexible data sharing among multiple parties while ensuring data security has become the main challenge facing the current technology field.
[0003] In the traditional multi-party charging data sharing model, the security and privacy of data often rely on fixed access control lists or role-based access control models. These models usually adopt a static authorization mechanism to manage user access to data through pre-defined roles and permission allocation. However, this method has exposed many shortcomings in practical applications. First, the scope of authorization is difficult to expand. When the user scale or permission requirements change, the system needs to frequently update the authorization policy, resulting in complex and inefficient management. The traditional authorization model is difficult to adapt to such large-scale needs, and the scalability of the system is limited, resulting in the inability to effectively support the access and management of large-scale users. Secondly, the access matching mechanism lacks dynamism and cannot adjust permissions according to user attribute changes or real-time needs, resulting in the system being rigid when dealing with complex permission requirements. In multi-party charging data sharing, the permission requirements of different users may change over time. For example, different users may need to access different data in different scenarios. However, the traditional static permission allocation cannot be dynamically adjusted according to the user's real-time needs and attribute changes, resulting in the inflexible permission management process and difficulty in coping with complex access control requirements. In addition, traditional authorization mechanisms usually rely on a central management agency. This single-point trust model has great security risks. Once the central agency is attacked or fails, the security of the entire system will be seriously threatened, and the privacy of data will be difficult to guarantee. Summary of the invention
[0004] In view of the above problems, the present invention proposes a multi-party charging data sharing method, device and electronic device based on attribute encryption, which can flexibly respond to the different authority requirements of large-scale users and avoid the rigidity problem caused by static authority allocation.
[0005] In order to achieve the above technical objectives and the above technical effects, the present invention is implemented through the following technical solutions:
[0006] In a first aspect, the present invention provides a multi-party charging data sharing method based on attribute encryption, which is applied to a user end and includes:
[0007] Acquire ciphertext data, the ciphertext data including data encapsulation ciphertext, secret value encapsulation ciphertext, first ciphertext and second ciphertext, the data encapsulation ciphertext is generated based on charging data, public parameters and secret value, the secret value encapsulation ciphertext is generated based on public parameters and secret value, the first ciphertext is generated based on secret value, master public key and access matrix, and the second ciphertext is generated based on public parameters, master public key and secret value;
[0008] If the user's public key has been registered to the master public key, a first decryption component is calculated based on the user's own private key, the public parameter, the secret value encapsulated ciphertext and the second ciphertext;
[0009] If the user's own attributes meet the policy requirements corresponding to the access matrix, a second decryption component is calculated based on the user's own private key and the first ciphertext;
[0010] The data encapsulation ciphertext is decrypted and calculated based on the first decryption component and the second decryption component to obtain charging data.
[0011] In combination with the first aspect, optionally, the expression of the common parameter is:
[0012]
[0013] Among them, pp is a public parameter; G represents a cyclic group; G T represents a bilinear group; the cyclic group G includes three subgroups G1, G2, and G3; g1, g2, and g3 are the generators of the three subgroups G1, G2, and G3 respectively; the orders of the three subgroups G1, G2, and G3 are p1, p2, and p3, and the product of p1, p2, and p3 is N, where N represents the order of the cyclic group; Z, h, A, and B all represent group initialization parameters, and Z = e(g1, g1) α , e represents the bilinear pairing operation, α, t, τ and β are in the integer field Z N Randomly select four random numbers from; Register the user attribute, ω i is the i-th user attribute, ω i ∈U, i = 1, 2, ... n, n represents the total number of user attributes, U is the set of all user attributes, For the integer field Z N A random number randomly selected from ;
[0014] The expression of the master public key is:
[0015]
[0016] in, A collection of public key registration identifiers. The element in is the public key T of the registered user. r is the private key of the registered user; Register the user attribute identification set, and set each user attribute ω in the set U i Compare with the user attribute set S submitted by the registered user. i ∈S, then to the set Write 1 in; when the user attribute When Write in
[0017] In combination with the first aspect, optionally, the calculation formula of the data encapsulation ciphertext is:
[0018] C1=data·Z s ;
[0019] Z=e(g1,g1) α ;
[0020] Among them, C1 is the data encapsulation ciphertext; data is the charging data; s is the secret value;
[0021] The calculation formula of the secret value encapsulated ciphertext is:
[0022]
[0023] Among them, C2 is the secret value encapsulated ciphertext.
[0024] In combination with the first aspect, optionally, the method for generating the first ciphertext includes the following steps:
[0025] The access policy is converted into an access matrix M using a linear secret sharing scheme, where each row of the access matrix M corresponds to the specified user attribute x1,...,x K associated;
[0026] Based on the principle of h=h1h2, randomly select N Select parameters h1 and h2;
[0027] Random in the integer field Z N Select parameters v2,...,v n , combined with the secret value s, construct the vector v,
[0028] Calculate the matrix sharing share u of vector v, u = Mv, where the k-th row component u of the matrix sharing share u k is the same as the attribute x k The associated matrix shares the share;
[0029] For each specified user attribute x1,...,x K , respectively calculate the corresponding first ciphertext C 3,k ,
[0030] In combination with the first aspect, optionally, the method for generating the second ciphertext includes the following steps:
[0031] Based on the secret value s, the public parameter and the master public key, a second ciphertext C4 is calculated. The calculation formula of the second ciphertext C4 is:
[0032]
[0033] In combination with the first aspect, optionally, the calculation formula of the first decryption component is:
[0034]
[0035] Among them, D r is the first decryption component, C4 is the second ciphertext, C2 is the secret value encapsulated ciphertext, r is the user's own private key, and s is the secret value.
[0036] In combination with the first aspect, optionally, the calculation formula of the second decryption component is:
[0037]
[0038] Among them, D p is the second decryption component, is an intermediate parameter calculated based on the first ciphertext;
[0039] Intermediate parameters The calculation is obtained by the following method:
[0040] When the user's own attributes meet the policy requirements corresponding to the access matrix, calculate The first ciphertext C 3,k It can be simplified to:
[0041] When the user's own attribute set S and the first ciphertext C 3,k The matrix share u in k If it matches, there must be a weight vector ω S , so that M S is the access matrix subset corresponding to the attribute set S extracted from the access matrix M, and then we get
[0042] In combination with the first aspect, optionally, the charging data is obtained by decrypting through the following formula:
[0043] Using D p and D r Calculate e(h,g1) st , the calculation formula used is:
[0044] D p ·D r =e(h2,g1) st ·e(h1,g1) st =e(h,g1) st
[0045] Based on e(h,g1) st , data encapsulation ciphertext, secret value encapsulation ciphertext and public parameters, and calculate the charging data data according to the following formula:
[0046]
[0047] In a second aspect, the present invention provides a multi-party charging data sharing device based on attribute encryption, which is applied to a user end and includes:
[0048] a ciphertext data acquisition module, configured to acquire ciphertext data, wherein the ciphertext data includes a data encapsulation ciphertext, a secret value encapsulation ciphertext, a first ciphertext, and a second ciphertext, wherein the data encapsulation ciphertext is generated based on charging data, a public parameter, and a secret value, the secret value encapsulation ciphertext is generated based on a public parameter and a secret value, the first ciphertext is generated based on a secret value, a master public key, and an access matrix, and the second ciphertext is generated based on a public parameter, a master public key, and a secret value;
[0049] A first decryption component calculation module, configured to calculate a first decryption component based on the user's own private key, public parameters, secret value encapsulated ciphertext and second ciphertext if the user's public key has been registered to the master public key;
[0050] A second decryption component calculation module, configured to calculate a second decryption component based on the user's own private key and the first ciphertext if the user's own attributes meet the policy requirements corresponding to the access matrix;
[0051] The decryption module is used to perform decryption calculation on the data encapsulation ciphertext based on the first decryption component and the second decryption component to obtain charging data.
[0052] In a third aspect, the present invention provides a multi-party charging data sharing system based on attribute encryption, including an authorization center, a cloud server and a user terminal;
[0053] The authorization center generates a ciphertext number and sends it to the cloud server;
[0054] The user terminal is configured to perform the following steps:
[0055] Acquire ciphertext data, the ciphertext data including data encapsulation ciphertext, secret value encapsulation ciphertext, first ciphertext and second ciphertext, the data encapsulation ciphertext is generated based on charging data, public parameters and secret value, the secret value encapsulation ciphertext is generated based on public parameters and secret value, the first ciphertext is generated based on secret value, master public key and access matrix, and the second ciphertext is generated based on public parameters, master public key and secret value;
[0056] If the user's public key has been registered to the master public key, a first decryption component is calculated based on the user's own private key, the public parameter, the secret value encapsulated ciphertext and the second ciphertext;
[0057] If the user's own attributes meet the policy requirements corresponding to the access matrix, a second decryption component is calculated based on the user's own private key and the first ciphertext;
[0058] The data encapsulation ciphertext is decrypted and calculated based on the first decryption component and the second decryption component to obtain charging data.
[0059] In a fourth aspect, the present invention provides an electronic device, comprising a storage medium and a processor;
[0060] The storage medium is used to store instructions;
[0061] The processor is configured to operate according to the instructions to execute the method according to any one of the first aspects.
[0062] Compared with the prior art, the present invention has the following beneficial effects:
[0063] Traditional permission control schemes often rely on static access control lists or role-based access control. The present invention generates a first ciphertext based on a secret value, a master public key, and an access matrix, providing a dynamic and flexible permission control mechanism. The flexibility of the access matrix makes the allocation and update of permissions more convenient, and the access rights can be adjusted in real time according to changes in user attributes, achieving more refined and dynamic permission management. This innovation greatly improves the system's ability to cope with complex permission requirements, and is particularly suitable for multi-party charging data sharing scenarios with multiple parties involved and complex permission requirements.
[0064] This invention innovatively introduces attribute matching into permission management, and uses user attributes and policy vectors for fine-grained access control. With this method, the encryption and decryption of charging data no longer rely on a single key, but are determined by the user's attribute set, greatly enhancing data security and sharing flexibility. The security of the system is significantly improved, so that data can only be decrypted in the hands of users who meet specific conditions, thereby effectively preventing illegal access and leakage of data.
[0065] Unlike traditional methods, the present invention does not rely on a central key management agency, but decentralizes the key management process and dynamically generates and manages keys through user registration information. After each user registers in the system, a unique key is generated based on their registered identity information. This mechanism avoids single point failures and trust issues in central agencies, making the system more secure and resilient. Decentralized key management not only reduces the risk of key leakage, but also simplifies the process of key distribution and management, which is particularly suitable for large-scale, multi-party charging data sharing application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor, among which:
[0067] Figure 1 A flowchart of a multi-party charging data sharing method according to an embodiment of the present invention;
[0068] Figure 2 A data access flow chart of an application scenario related to an embodiment of the present invention;
[0069] Figure 3 This is an execution sequence diagram of a multi-party charging data sharing method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0070] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0071] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0072] Example 1
[0073] An embodiment of the present invention provides a multi-party charging data sharing method based on attribute encryption, which is applied to a user end and includes the following steps:
[0074] Step (1) obtaining ciphertext data, the ciphertext data including data encapsulation ciphertext, secret value encapsulation ciphertext, first ciphertext and second ciphertext, the data encapsulation ciphertext is generated based on charging data, public parameters and secret value, the secret value encapsulation ciphertext is generated based on public parameters and secret value, the first ciphertext is generated based on secret value, master public key and access matrix, and the second ciphertext is generated based on public parameters, master public key and secret value;
[0075] Step (2) If the user's public key has been registered to the master public key, the first decryption component is calculated based on the user's own private key, public parameters, secret value encapsulated ciphertext and second ciphertext;
[0076] Step (3) If the user's own attributes meet the policy requirements corresponding to the access matrix, a second decryption component is calculated based on the user's own private key and the first ciphertext;
[0077] Step (4) performs decryption calculation on the data encapsulation ciphertext based on the first decryption component and the second decryption component to obtain charging data.
[0078] In a specific implementation of the embodiment of the present invention, the expression of the common parameter is:
[0079]
[0080] Among them, pp is a public parameter; G represents a cyclic group; G T represents a bilinear group; the cyclic group G includes three subgroups G1, G2, and G3; g1, g2, and g3 are the generators of the three subgroups G1, G2, and G3 respectively; the orders of the three subgroups G1, G2, and G3 are p1, p2, and p3, and the product of p1, p2, and p3 is N, where N represents the order of the cyclic group; Z, h, A, and B all represent group initialization parameters, and Z = e(g1, g1) α , A=(g1g3) t , e represents the bilinear pairing operation, α, t, τ and β are in the integer field Z N Randomly select four random numbers from; Register the user attribute, ω i is the i-th user attribute, ω i ∈U, i = 1, 2, ... n, n represents the total number of user attributes, U is the set of all user attributes, For the integer field Z NA random number randomly selected from ;
[0081] The expression of the master public key is:
[0082]
[0083] in, A collection of public key registration identifiers. The element in is the public key T of the registered user. r is the private key of the registered user; Register the user attribute identification set, and set each user attribute ω in the set U i Compare with the user attribute set S submitted by the registered user. i ∈S, then to the set Write 1 in; when the user attribute When Write in
[0084] In the specific implementation process, the public parameters and the master public key are generated by the authorization center and sent to the cloud server. In a specific implementation of the embodiment of the present invention, the calculation formula of the data encapsulation ciphertext is:
[0085] C1=data·Z s ;
[0086] Z=e(g1,g1) α ;
[0087] Among them, C1 is the data encapsulation ciphertext; data is the charging data; s is the secret value;
[0088] The calculation formula of the secret value encapsulated ciphertext is:
[0089]
[0090] Among them, C2 is the secret value encapsulated ciphertext.
[0091] During the specific implementation process, the data encapsulation ciphertext and the secret value encapsulation ciphertext are both generated by the data middle station.
[0092] In a specific implementation of the embodiment of the present invention, the method for generating the first ciphertext includes the following steps:
[0093] The access policy is converted into an access matrix M using a linear secret sharing scheme, where each row of the access matrix M corresponds to the specified user attribute x1,...,x K associated;
[0094] Based on the principle of h=h1h2, randomly select NSelect parameters h1 and h2;
[0095] Random in the integer field Z N Select parameters v2,...,v n , combined with the secret value s, construct the vector v,
[0096] Calculate the matrix sharing share u of vector v, u = Mv, where the k-th row component u of the matrix sharing share u k is the same as the attribute x k The associated matrix shares the share;
[0097] For each specified user attribute x1,...,x K , respectively calculate the corresponding first ciphertext C 3,k ,
[0098] In a specific implementation of the embodiment of the present invention, the method for generating the second ciphertext includes the following steps:
[0099] Based on the secret value s, the public parameter and the master public key, a second ciphertext C4 is calculated. The calculation formula of the second ciphertext C4 is:
[0100]
[0101] In a specific implementation of the embodiment of the present invention, the calculation formula of the first decryption component is:
[0102]
[0103] Among them, D r is the first decryption component, C4 is the second ciphertext, C2 is the secret value encapsulated ciphertext, r is the user's own private key, and s is the secret value.
[0104] In a specific implementation of the embodiment of the present invention, the calculation formula of the second decryption component is:
[0105]
[0106] Among them, D p is the second decryption component, is an intermediate parameter calculated based on the first ciphertext;
[0107] Intermediate parameters The calculation is obtained by the following method:
[0108] When the user's own attributes meet the policy requirements corresponding to the access matrix, calculate The first ciphertext C 3,k It can be simplified to:
[0109] When the user's own attribute set S and the first ciphertext C 3,k The matrix share u in k If it matches, there must be a weight vector ω S , so that M S is the access matrix subset corresponding to the attribute set S extracted from the access matrix M, and then we get
[0110] In combination with the first aspect, optionally, the charging data is obtained by decrypting through the following formula:
[0111] Using D p and D r Calculate e(h,g1) st , the calculation formula used is:
[0112] D p ·D r =e(h2,g1) st ·e(h1,g1) st =e(h,g1) st
[0113] Based on e(h,g1) st , data encapsulation ciphertext, secret value encapsulation ciphertext and public parameters, and calculate the charging data data according to the following formula:
[0114]
[0115] Example 2
[0116] Based on the same inventive concept as that of Embodiment 1, an embodiment of the present invention provides a multi-party charging data sharing device based on attribute encryption, which is applied to a user end and includes:
[0117] a ciphertext data acquisition module, configured to acquire ciphertext data, wherein the ciphertext data includes a data encapsulation ciphertext, a secret value encapsulation ciphertext, a first ciphertext, and a second ciphertext, wherein the data encapsulation ciphertext is generated based on charging data, a public parameter, and a secret value, the secret value encapsulation ciphertext is generated based on a public parameter and a secret value, the first ciphertext is generated based on a secret value, a master public key, and an access matrix, and the second ciphertext is generated based on a public parameter, a master public key, and a secret value;
[0118] A first decryption component calculation module, configured to calculate a first decryption component based on the user's own private key, public parameters, secret value encapsulated ciphertext and second ciphertext if the user's public key has been registered to the master public key;
[0119] A second decryption component calculation module, configured to calculate a second decryption component based on the user's own private key and the first ciphertext if the user's own attributes meet the policy requirements corresponding to the access matrix;
[0120] A decryption module is used to perform decryption calculation on the data encapsulation ciphertext based on the first decryption component and the second decryption component to obtain charging data.
[0121] Example 3
[0122] An embodiment of the present invention provides a multi-party charging data sharing system based on attribute encryption, including an authorization center, a cloud server and a user terminal;
[0123] The authorization center generates ciphertext data and sends it to the cloud server;
[0124] The user terminal is configured to perform the following steps:
[0125] Acquire ciphertext data, the ciphertext data including data encapsulation ciphertext, secret value encapsulation ciphertext, first ciphertext and second ciphertext, the data encapsulation ciphertext is generated based on charging data, public parameters and secret value, the secret value encapsulation ciphertext is generated based on public parameters and secret value, the first ciphertext is generated based on secret value, master public key and access matrix, and the second ciphertext is generated based on public parameters, master public key and secret value;
[0126] If the user's public key has been registered to the master public key, a first decryption component is calculated based on the user's own private key, the public parameter, the secret value encapsulated ciphertext and the second ciphertext;
[0127] If the user's own attributes meet the policy requirements corresponding to the access matrix, a second decryption component is calculated based on the user's own private key and the first ciphertext;
[0128] The data encapsulation ciphertext is decrypted and calculated based on the first decryption component and the second decryption component to obtain charging data.
[0129] The working principle of the multi-party charging data sharing system based on attribute encryption in the embodiment of the present invention is described in detail below in conjunction with a specific implementation manner.
[0130] Specifically, see Figure 1 and Figure 3 As shown, the multi-party charging data sharing system based on attribute encryption includes an authorization center, a data middle station, a cloud server and several user terminals:
[0131] The authorization center represents all user attributes involved in the charging data sharing access as a set U; initializes pairing calculation parameters based on composite order bilinear pairing operation, and the pairing calculation parameters include G, G T, N, g, e, where G represents the cyclic group, G T represents a bilinear group, N represents the order of the cyclic group, g represents the generator of the cyclic group, and e represents the bilinear pairing operator.
[0132] Let G1, G2, and G3 represent the three subgroups of the cyclic group G, where g1, g2, and g3 are the generators of the three subgroups; p1, p2, and p3 are the orders of the three subgroups, and their product is N. Next, in the integer field Z N Four random numbers are randomly selected as the values of parameters α, t, τ and β, and the group initialization parameters Z, h, A, B are calculated, where Z = e(g1, g1) α , A=(g1g3) t , For each user attribute ω i Initialize, where ω i ∈U, i=1,2,…n, n represents the total number of user attributes, and the calculation attribute initialization parameters For the integer field Z N A random number randomly selected from . Finally, the public parameter pp is obtained:
[0133]
[0134] The authorization center receives the user's registration request: Specifically, the user enters the integer domain Z N Randomly select r as your private key, that is, sk = r; and Submit it as your own public key pk to the authorization center for registration. When the authorization center receives the user's registration request and the user's user attribute set S, it saves the user's public key T to the authorization center's public key registration identification set Then the authorization center will assign each user attribute ω in the set U i Compare with the user attribute set S submitted by the user. When the user attribute ω i ∈S, then to the set Write 1 in; when the user attribute When Write in Finally, the master public key mpk of the authorization center is generated. The expression of the master public key mpk is:
[0135]
[0136] The data center uses the master public key mpk to encrypt the charging data. The charging data is represented as data, and the data encapsulation ciphertext and the secret value encapsulation ciphertext are calculated in combination with the secret value s to complete the data encapsulation:
[0137] C1=data·Z s
[0138]
[0139] Among them, C1 is the data encapsulation ciphertext, and C2 is the secret value encapsulation ciphertext.
[0140] The secret value s is a random number randomly selected by the data center.
[0141] (3) Calculate the first ciphertext and the second ciphertext:
[0142] The access policy is converted into an access matrix M using a linear secret sharing scheme, where each row of the access matrix M corresponds to the specified user attribute x1,...,x K The access matrix M is used to perform permission verification of access users and dynamically control data access according to the user attributes of the user.
[0143] In the integer field Z N Randomly select parameters h1 and h2, which must satisfy:
[0144] Random in the integer field Z N Select n-1 elements from Used to encapsulate the secret value s and construct a vector Calculate the matrix sharing share u of vector v, u = Mv, where the k-th row component u k is the same as the attribute x k The associated matrix shares the shares.
[0145] For each user attribute x1,...,x K Calculate the corresponding first ciphertext C respectively 3,k , the first ciphertext C 3,k The calculation formula is:
[0146]
[0147] Where, k = 1, 2, ... K;
[0148] Next, the second ciphertext C4 is calculated. The calculation formula of the second ciphertext C4 is:
[0149]
[0150] The first ciphertext C 3,k , the second ciphertext C4 is uploaded to the cloud server together with the data encapsulation ciphertext C1 and the secret value encapsulation ciphertext C2 for subsequent shared access by large-scale users.
[0151] (4) Calculate the first decryption component Dr :
[0152] Before requesting data access, the user must first verify the identity registration information. That is, the user performs calculations based on his own private key r, the second ciphertext C4, and the secret value encapsulated ciphertext C2. If the public key corresponding to his private key has been registered with the authorization center (that is, the public key has been stored in the public key registration identifier set Then, through calculation, the user can obtain the first decryption component D r , the first decryption component D r The calculation formula is:
[0153]
[0154] (5) Calculate the second decryption component D p :
[0155] When the user's own attributes meet the policy requirements corresponding to the access matrix, calculate The first ciphertext C 3,k It can be simplified to: When the user's own attribute set S and the first ciphertext C 3,k The matrix share u in k If it matches, there must be a weight vector ω S , so that M S is the access matrix subset corresponding to the attribute set S extracted from the access matrix M, and then we get If the user's own attributes cannot meet the policy requirements corresponding to the access matrix, then The first ciphertext C 3,k It cannot be simplified, and thus the intermediate parameters cannot be calculated
[0156] Secondly, using the calculated Perform a bilinear pairing operation with A in the public parameter to obtain the second decryption component D p :
[0157]
[0158] In the above D p In the calculation, the properties of the linear secret sharing matrix are implicitly utilized.
[0159] (6) Charging data decryption and sharing:
[0160] User uses decryption component D r and D p Construct a decryption equation to obtain the plaintext of charging data.
[0161] Since h = h1h2, the user can use D p and D r Calculate e(h,g1) st :
[0162] D p ·D r =e(h2,g1) st ·e(h1,g1) st =e(h,g1) st
[0163] Then, the user continues to construct the following decryption equation to obtain the charging data plaintext data:
[0164]
[0165] The decryption process is based on user attributes and permission policies. Charging data can only be decrypted when the user's attributes meet the policy requirements corresponding to the access matrix.
[0166] Based on the above calculation process, the following is the evaluation analysis of the present invention.
[0167] The construction of the scheme of the present invention is based on the Subgroup Decision Assumption (SDA), that is, given an element u∈G and a bilinear pairing e(u,g), determine whether u belongs to the subgroup G1, G2 or G3 of G. The difficulty of this assumption means that even if the attacker has access to the public key and the related bilinear pairing value, it is impossible to effectively distinguish which subgroup an element belongs to. Consider an adversary A, whose goal is to crack the encrypted data in the system or bypass the access control of the permission matrix. The security goals of this scheme are defined as indistinguishability and unforgeability, respectively. Indistinguishability: The attacker cannot distinguish between the two encrypted data C0 and C1, even if he knows the corresponding attributes of these data and some system parameters: Unforgeability: The attacker cannot forge a decryption key that can decrypt the ciphertext without valid attributes.
[0168] Assuming that attacker A can distinguish between two ciphertexts C0 and C1, an algorithm B can be constructed to solve the SDA problem, thereby destroying the subgroup determination assumption. Due to the difficulty of the SDA assumption, this situation is impossible, so the attacker cannot successfully distinguish the ciphertext. Assuming that attacker A can generate a valid decryption key sk to decrypt the ciphertexts C0 and C1 without legal attributes, we can construct another algorithm B' to crack the SDA problem. Due to the difficulty of the SDA assumption, the attacker cannot generate a valid decryption key, ensuring the unforgeability of the system. Based on the subgroup determination difficulty problem, the multi-party charging data sharing scheme described in the present invention is secure in terms of indistinguishability and unforgeability. Under the premise that the attacker cannot crack the SDA problem, he cannot effectively distinguish the ciphertext or generate a forged decryption key, thereby ensuring the security of the data sharing process.
[0169] Example 4
[0170] Based on the same inventive concept as that of Embodiment 1, an electronic device is provided in an embodiment of the present invention, including a storage medium and a processor;
[0171] The storage medium is used to store instructions;
[0172] The processor is configured to operate according to the instructions to execute the method according to any one of the embodiments 1.
[0173] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0174] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0175] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0176] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0177] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims, which all fall within the protection of the present invention.
[0178] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A multi-party charging data sharing method based on attribute encryption, characterized in that: Applied to the user side, including: Acquire ciphertext data, the ciphertext data including data encapsulation ciphertext, secret value encapsulation ciphertext, first ciphertext and second ciphertext, the data encapsulation ciphertext is generated based on charging data, public parameters and secret value, the secret value encapsulation ciphertext is generated based on public parameters and secret value, the first ciphertext is generated based on secret value, master public key and access matrix, and the second ciphertext is generated based on public parameters, master public key and secret value; If the user's public key has been registered to the master public key, a first decryption component is calculated based on the user's own private key, the public parameter, the secret value encapsulated ciphertext and the second ciphertext; If the user's own attributes meet the policy requirements corresponding to the access matrix, a second decryption component is calculated based on the user's own private key and the first ciphertext; The data encapsulation ciphertext is decrypted and calculated based on the first decryption component and the second decryption component to obtain charging data.
2. The multi-party charging data sharing method based on attribute encryption according to claim 1 is characterized in that: The expression of the common parameter is: Among them, pp is a public parameter; G represents a cyclic group; G T represents a bilinear group; the cyclic group G includes three subgroups G1, G2, and G3; g1, g2, and g3 are the generators of the three subgroups G1, G2, and G3 respectively; the orders of the three subgroups G1, G2, and G3 are p1, p2, and p3, and the product of p1, p2, and p3 is N, where N represents the order of the cyclic group; Z, h, A, and B all represent group initialization parameters, and Z = e(g1, g1) α , A=(g1g3) t , e represents the bilinear pairing operation, α, t, τ and β are in the integer field Z N Randomly select four random numbers from; Register the user attribute, ω i is the i-th user attribute, ω i ∈U, i = 1, 2, ... n, n represents the total number of user attributes, U is the set of all user attributes, For the integer field Z N A random number randomly selected from ; The expression of the master public key is: in, A collection of public key registration identifiers. The element in is the public key T of the registered user. r is the private key of the registered user; Register the user attribute identification set, and set each user attribute ω in the set U i Compare with the user attribute set S submitted by the registered user. i ∈S, then to the set Write 1 in; when the user attribute When Write in 3. The multi-party charging data sharing method based on attribute encryption according to claim 2 is characterized in that: The calculation formula of the data encapsulation ciphertext is: C1=data·Z s ; Z=e(g1,g1) α ; Among them, C1 is the data encapsulation ciphertext; data is the charging data; s is the secret value; The calculation formula of the secret value encapsulated ciphertext is: Among them, C2 is the secret value encapsulated ciphertext.
4. The multi-party charging data sharing method based on attribute encryption according to claim 2 is characterized in that: The method for generating the first ciphertext comprises the following steps: The access policy is converted into an access matrix M using a linear secret sharing scheme, where each row of the access matrix M corresponds to the specified user attribute x1,...,x K associated; Based on the principle of h=h1h2, randomly select N Select parameters h1 and h2; Random in the integer field Z N Select parameters v2,...,v n , combined with the secret value s, construct the vector v, Calculate the matrix sharing share u of vector v, u = Mv, where the k-th row component u of the matrix sharing share u k is related to the attribute x k The associated matrix shares the share; For each specified user attribute x1,...,x K , respectively calculate the corresponding first ciphertext C 3,k , 5. The multi-party charging data sharing method based on attribute encryption according to claim 4 is characterized in that: The method for generating the second ciphertext comprises the following steps: Based on the secret value s, the public parameter and the master public key, a second ciphertext C4 is calculated. The calculation formula of the second ciphertext C4 is:
6. The multi-party charging data sharing method based on attribute encryption according to claim 5 is characterized in that: The calculation formula of the first decryption component is: Among them, D r is the first decryption component, C4 is the second ciphertext, C2 is the secret value encapsulated ciphertext, r is the user's own private key, and s is the secret value.
7. The multi-party charging data sharing method based on attribute encryption according to claim 2 is characterized in that: The calculation formula of the second decryption component is: Among them, D p is the second decryption component, is an intermediate parameter calculated based on the first ciphertext; Intermediate parameters The calculation is obtained by the following method: When the user's own attributes meet the policy requirements corresponding to the access matrix, calculate The first ciphertext C 3,k It can be simplified to: When the user's own attribute set S and the first ciphertext C 3,k The matrix share u in k If it matches, there must be a weight vector ω S , so that M S is the access matrix subset corresponding to the attribute set S extracted from the access matrix M, and then we get 8. The multi-party charging data sharing method based on attribute encryption according to claim 7 is characterized in that: The charging data is decrypted by the following formula: Using D p and D r Calculate e(h,g1) st , the calculation formula used is: D p ·D r h(h2,g1) st ·e(h1,g1) st h(h,g1) st Based on e(h,g1) st , data encapsulation ciphertext, secret value encapsulation ciphertext and public parameters, and calculate the charging data data according to the following formula:
9. A multi-party charging data sharing device based on attribute encryption, characterized in that: Applied to the user side, including: a ciphertext data acquisition module, configured to acquire ciphertext data, wherein the ciphertext data includes a data encapsulation ciphertext, a secret value encapsulation ciphertext, a first ciphertext, and a second ciphertext, wherein the data encapsulation ciphertext is generated based on charging data, a public parameter, and a secret value, the secret value encapsulation ciphertext is generated based on a public parameter and a secret value, the first ciphertext is generated based on a secret value, a master public key, and an access matrix, and the second ciphertext is generated based on a public parameter, a master public key, and a secret value; A first decryption component calculation module, configured to calculate a first decryption component based on the user's own private key, public parameters, secret value encapsulated ciphertext and second ciphertext if the user's public key has been registered to the master public key; A second decryption component calculation module, configured to calculate a second decryption component based on the user's own private key and the first ciphertext if the user's own attributes meet the policy requirements corresponding to the access matrix; A decryption module is used to perform decryption calculation on the data encapsulation ciphertext based on the first decryption component and the second decryption component to obtain charging data.
10. A multi-party charging data sharing system based on attribute encryption, characterized in that: Includes authorization center, cloud server and user end; The authorization center generates a ciphertext number and sends it to the cloud server; The user terminal is configured to perform the following steps: Acquire ciphertext data, the ciphertext data including data encapsulation ciphertext, secret value encapsulation ciphertext, first ciphertext and second ciphertext, the data encapsulation ciphertext is generated based on charging data, public parameters and secret value, the secret value encapsulation ciphertext is generated based on public parameters and secret value, the first ciphertext is generated based on secret value, master public key and access matrix, and the second ciphertext is generated based on public parameters, master public key and secret value; If the user's public key has been registered to the master public key, a first decryption component is calculated based on the user's own private key, the public parameter, the secret value encapsulated ciphertext and the second ciphertext; If the user's own attributes meet the policy requirements corresponding to the access matrix, a second decryption component is calculated based on the user's own private key and the first ciphertext; The data encapsulation ciphertext is decrypted and calculated based on the first decryption component and the second decryption component to obtain charging data.
11. An electronic device, characterized in that: including storage media and processors; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to perform the method according to any one of claims 1-8.
Citation Information
Patent Citations
Data sharing method, device and system, client and storage medium
CN111163036A
Intelligent power grid electricity utilization information encryption method and system based on attribute base
CN115529123A
Robust cloud storage access control method based on attribute encryption
CN116707854A
Attribute-based encryption method and system
WO2023109056A1