Data capsule packaging method, system and equipment for public data authorization opening

Through the data capsule encapsulation method for public data authorization and opening, using SM2 asymmetric encryption and attribute-based encryption technology, combined with blockchain supervision, the problem of data security and efficiency in public data authorization and opening is solved, and data security is achieved. , flexible authorization and efficient supervision.

CN118586014APending Publication Date: 2024-09-03ZHEJIANG PINGSHU TECHNOLOGY (GROUP) CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202410555503.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-07
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

In the process of public data authorization and opening, how to improve the efficiency of the authorization and opening process while ensuring data security, and achieve in-depth mining and innovative applications of data, while meeting regulatory requirements for recording and tracking.

Method used

A data capsule encapsulation method that is open to public data authorization is designed. Through purchasing qualification issuance, supervision factor embedding, access matrix generation, data capsule encapsulation, access task generation, authorization record on-chain, access task decryption, data capsule decryption and access Record the steps such as on-chain use of SM2 asymmetric encryption technology and attribute-based encryption technology to ensure data security and flexible authorization, and realize authorization and access supervision through the blockchain.

Benefits of technology

It achieves security and flexible authorization of public data, reduces the possibility of unauthorized access, improves authorization granularity and supervision efficiency, and ensures in-depth data protection and compliance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118586014A
    Figure CN118586014A
Patent Text Reader

Abstract

The invention discloses a data capsule packaging method, system and equipment for public data authorization opening. An access strategy, an access task and watermark information are introduced, and the controllability and compliance of authorization and access of the public data are further guaranteed. According to the method, multiple cryptographic algorithms including SM2 asymmetric encryption, a fast attribute-based encryption technology and the like are adopted to protect the confidentiality of public data. Wherein the public data processing party can generate a random secret key, encrypts the public data under a specified access strategy, and packages the public data into a data capsule. In addition, the public data processing party can also generate an access task so as to additionally specify public data users with decryption authority and specific information capable of being decrypted. By recovering the authorization record, the access task decryption record and the data capsule decryption record recorded on the block chain, the supervision mechanism can completely recover the authorized specific plaintext and carry out subsequent supervision according to the specific plaintext.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of cryptographic algorithms and application systems, and in particular relates to a data capsule packaging method, system and equipment for public data authorization and opening. Background Art

[0003] The purpose of public data authorization operation is to effectively utilize public data resources and promote in-depth mining and innovative application of data by authorizing third-party operations. This not only improves the efficiency of data utilization, but also promotes the innovation of new services and products, thereby promoting social and economic development. At the same time, this practice increases government transparency and public participation, helps to form new economic growth points, and improves the quality of policy formulation and implementation.

[0004] Therefore, the present invention focuses on enhancing the privacy, confidentiality and security of public data in the process of public data authorization and opening through the data capsule paradigm, and on the premise of ensuring data security, improves the efficiency of the authorization and opening process as much as possible. In addition, the present invention also realizes the on-chain storage and tracking of authorization records and access records through blockchain and other means based on the regulatory requirements of the regulator in the process of public data authorization, and can restore the specific information of the authorized data as needed. Summary of the invention

[0005] The purpose of the present invention is to design a data capsule packaging method, system and device for public data authorization and opening, so as to effectively utilize public data resources and promote in-depth mining and innovative application of data.

[0006] The data capsule encapsulation method for public data authorization and opening described in the present invention involves the following main functional modules in the implementation process: issuance of purchase qualification, embedding of regulatory factors, generation of access matrix, data capsule encapsulation, generation of access tasks, uploading of authorization records to the chain, decryption of access tasks, decryption of data capsules, uploading of access records to the chain, and authorization and access supervision. The present invention also includes seven types of roles: the superior public data authorization operation platform, the people's government at this level, the public data processor (public data authorization operation subject), the public data user, the superior regulatory agency, the regulatory agency at this level (data bureau), and the blockchain.

[0007] In order to achieve the above object, the present invention is implemented by the following technical solutions:

[0008] A data capsule packaging method for public data authorization and opening includes the following steps:

[0009] Step 1. System initialization: When establishing a data capsule encapsulation method for public data authorization and opening, initialization parameters are constructed according to various standards, mainly focusing on the initialization of the system encryption scheme, including the initialization of the public data processor (public data authorization operator), the initialization of the public data user, and the initialization of the regulatory agency (data bureau) at this level.

[0010] Step 2. Issuance of data product purchase qualifications: Public data users apply to public data processors (public data authorized operating entities) for data product purchase qualifications. First, public data users submit data product purchase qualification application forms to public data processors (public data authorized operating entities). After the public data processors (public data authorized operating entities) review and approve the application, they will generate a private key for the application and issue data product purchase qualifications, and the regulatory agency (data bureau) at the same level will embed regulatory factors.

[0011] Step 3. Purchase of data products and packaging of data capsules: Public data users purchase data products from public data processors (public data authorized operating entities), and public data processors (public data authorized operating entities) package the data products into data capsules.

[0012] Step 4. Data capsule decryption: Public data users use the data capsule and other information received in step 3, combined with their own qualifications, to decrypt the data capsule and restore the data product plaintext.

[0013] Step 5. The regulatory authority at this level (data bureau) performs authorization and access supervision.

[0014] Step 1:

[0015] 1-1. Initialization of public data processing party:

[0016] First, construct a bilinear group in are two p-order cyclic additive groups on the elliptic curve, is a cyclic multiplicative group of order p, and e is a Weil pairing: Right now and There is e(P a ,Q b )=e(P,Q) ab ; Then randomly select a The generator g1 in the group, a Generator g2 in the group; then, four hash functions are selected,

[0017] Afterwards, the public data processor randomly selects a random number And use it as the master private key msk, save msk locally; and initialize all data product purchase qualification sets that may be needed Finally, calculate And output and publish system parameters

[0018] 1-2. Public data user initialization:

[0019] Public data users each initialize a pair of SM2 public and private keys PK locally DU SK DU ; Publish its public key PK DU , save the private key SK locally DU ;

[0020] 1-3. Initialization of the regulatory agency at this level:

[0021] The regulator randomly generates a pair of SM2 public and private keys PK locally ra SK ra ; Publish its public key PK ra , save the private key SK locally ra .

[0022] Step 2:

[0023] ⑴ The public data user submits a data product purchase qualification application form to the public data processor. The application form contains the data product purchase qualification set S and the identity identifier ID DU ;

[0024] ⑵After receiving the application form, the public data processor first selects a random number If it has a set of data product purchasing qualifications S, for each of its qualifications s, calculate sk 1,s :

[0025]

[0026] Afterwards, calculate Where ID DU It is the applicant’s unique ID. The size of the full data product purchase qualification set; then, calculate

[0027]

[0028] Then, the ID DU , sk3, sk4 are forwarded to the regulatory authorities at the same level; among which sk 1,s , sk2, sk3 and sk4 are all components of the private key for purchasing data product qualifications; using PK DU Encryption S,{sk 1,s}s∈S ,sk2, encrypt the message E1=E SM2 (PK DU ,S||{sk 1,s} s∈S ||sk2) sent to public data users;

[0029] ⑶ The regulatory agency at this level receives the ID sent by the public data processor DU , sk3, sk4, and then embed it into its own regulatory factor, using PK DU Encrypted PK ra ,sk3,sk4, the encrypted message E2=E SM2 (PK DU ,PK ra ||sk3||sk4) sent to public data users;

[0030] ⑷ After receiving the above two encrypted messages, the public data user uses his own private key SK DU Decrypt, restore the plaintext and combine it into purchase qualification {ID DU ,sk DU = {PK ra ,S,{sk 1,s} s∈S ,sk2,sk3,sk4}}, where sk DU Indicates the data product qualification purchase private key.

[0031] Step 3:

[0032] Public data users purchase data products from public data processors, who package the data products into data capsules and generate watermark information and access tasks:

[0033] Public data users purchase data products from public data processors (public data authorized operators) and send the data they want to purchase and their own IDs. DU The public data processor (the authorized operator of public data) performs the following operations:

[0034] (1) Access policy construction: The public data processor (public data authorized operator) first constructs an access policy The access policy specifies what qualifications the data applicant must have to decrypt. For example, the access policy specified by the public data processor (public data authorized operator) is "Data applicants with a business license and (with a food sales license or (a temporary food sales license and a public security agency record) can access this data", where food sales license, temporary food sales license, and public security agency record are the qualification names. Then follow the following method to set the access policy Convert to access matrix

[0035] like Figure 3 As shown in the figure, assuming that the access strategy is "A and (D or (B and C))", the access strategy is converted into an access matrix as follows in is a matrix and π is a mapping:

[0036] ①First, access policy Converted into a binary tree, the leaf nodes of the binary tree represent the attributes, i.e. A, B, C, D in the access strategy, and the non-leaf nodes of the binary tree represent AND gates or OR gates;

[0037] ②Starting from the root node, mark the root node as v={1}, and initialize a counter c to 1; if the node is an or gate, then mark all the child nodes of the node as v={1}; if the node is an and gate, first extend the length of v by adding 0 at the end until its length reaches c; then mark its left child node as v||1, and the right child node as {0,...,0}||-1, where the length of {0,...,0} is c, and then set c to c+1; repeat the above steps until every node of the binary tree is marked;

[0038] ③Finally, the leaf node vector generated by the access strategy binary tree after marking is A:{1,1},B:{0,-1,1},C:{0,0,-1},D:{0,-1}; then, all vectors are padded with 0 at the end to make their length reach the length of the longest vector, that is, A:{1,1,0},B:{0,-1,1},C:{0,0,-1},D:{0,-1,0}, then the matrix It is composed of the above four row vectors. The mapping π is a dictionary {1:A, 2:B, 3:C, 4:D}, where the key of the dictionary is the matrix The row index of the dictionary, the value of the dictionary is the attribute represented by the row;

[0039] In addition, the public data processor also needs to specify the validity period of the data capsule Number of times a data capsule can be accessed Number of times the data capsule has been accessed (Initial value is 0).

[0040] (2) Data capsule packaging: The public data processor selects one or more structured data products and encodes the data products into binary form. Assume that n data products are selected. The length of the binary data formed after encoding is l (the binary string with a length less than l is padded with 0 in front).

[0041] First, randomly select a binary string Mask1 of length l and two random numbers calculate:

[0042]

[0043]

[0044] Assume that the access matrix selected in the first step is With n1 rows and n2 columns; randomly select a vector v of length n2-1, each element of vector v is a A random number on the vector y' is randomly selected with a length of τ, and each element of the vector y' is also a A random number on ρ(i)=|{z|π(i)=π(z),z≤i}|;

[0045] For j∈[τ], calculate For i∈[n1], calculate

[0046]

[0047] After that, choose a random number And calculate

[0048] Output data capsule identifier DCI, data capsule And local parameters Indicates the qualification conditions of the data capsule, Indicates the data capsule access condition;

[0049] (3) Watermark information construction: Construct watermark information WP, including: ID of the public data user DU , data capsule identifier DCI, data expiration time Number of times a data capsule can be accessed Data capsule verification value V;

[0050] (4) Access task generation: extracting its corresponding local parameters Then select the index I of the data particle to be shared, I∈[n];

[0051] First, calculate After that, use spp in calculate

[0052]

[0053]

[0054] Recalculate For w∈I, randomly select a And calculate

[0055]

[0056]

[0057] Among them, dg w means The data product with index w in Recorded as Select a task expiration date Number of task visits and the maximum number of times a task can be used Output Task in They are all part of the mission;

[0058] (5) Authorization record on-chain: Public key PK of the regulatory agency at this level ra , through the SM2 encryption algorithm

[0059]

[0060] where t auth Refers to the authorization time.<DCI,R1> Upload it to the blockchain as an authorization record; finally, the data capsule identifier DCI, data capsule DC, watermark information WP and access task Sent to public data consumers.

[0061] Step 4:

[0062] The public data user uses the data capsule received in step 3, decrypts the data capsule based on his / her own qualifications, and recovers the plaintext of the data product. The specific method is as follows:

[0063] Public data users receive data capsule identifier DCI, data capsule DC, watermark information WP and access task After that, decrypt and recover the public data as follows:

[0064] (1) Access task decryption: receiving access tasks After that, the system first checks whether the current time is within the task expiration time. Before; After, query the blockchain for the most recent access record corresponding to the data capsule identifier DCI If it does not exist, then is equal to 0, otherwise Set to Recorded in The value is increased by 1, and then the number of visits to the task is checked. Has the threshold been reached? Indicates the most recent access record The corresponding value, if all checks pass, is calculated

[0065]

[0066] After that, the number of visits to the task Increase by 1; finally, the system takes out the public key PK of the regulatory factor in the private key ra , through the SM2 encryption algorithm

[0067]

[0068] The key-value pair<DCI,R2> As an access record, the decryption record is uploaded to the chain, where the access task decryption time is t dtask 、Is the decryption successful? isSuccess task ; if isSuccess task If the key-value pair is "successful", Upload to the chain as a task access record

[0069] (2) Data capsule decryption: Using the SM2 algorithm, input the decryption key SK DU Decrypt DC to restore the data capsule plaintext Next, the system checks whether the current time is within the data capsule expiration time. After that, query the blockchain for the most recent access record Ac corresponding to the DCI DC , if it does not exist, then is equal to 0, otherwise Set to Recorded in The value is increased by 1, and then the number of visits to the task is checked. Has the threshold been reached? If all checks are passed, calculate Then verify the equation Is it established to verify the integrity of the data capsule?

[0070] After verification, the system checks whether the data user's qualifications meet the access policy. If the access strategy is satisfied, let the set T = {i|i∈[n1]∩π(i)∈S}, then there must be a set of coefficients γ i ,i∈T, such that Afterwards, calculate

[0071]

[0072] Based on the above results, calculate Reconstructed by the following formula

[0073]

[0074] For each item w in the set I, compute:

[0075]

[0076] Output {dg w} w∈I ; Finally, the system takes out the supervisory factor public key PK in the private key ra , through the SM2 encryption algorithm

[0077]

[0078] The key-value pair<DCI,R3> As a data capsule decryption record on the chain, the data capsule decryption time t dc 、Is the decryption successful? isSuccess dc ; if isSuccess dc If the key-value pair is "successful", Upload to the chain as a data capsule access record Ac DC ;

[0079] Finally, the system takes out the digital watermark WP and renders it on the data display page.

[0080] 6. A data capsule packaging method for public data authorization and opening according to claim 5, characterized in that when the regulatory agency at the same level needs to perform authorization and access supervision, the specific method is as follows:

[0081] Based on the problematic data capsule identifier DCI, the regulatory agency at this level can retrieve the most recent authorization record, the most recent task access record, and the most recent data capsule access record on the blockchain, and then use the locally stored private key to decrypt the record using the SM2 encryption algorithm to obtain the original data, and then supervise the authorization and decryption behaviors therein.

[0082] Step 5:

[0083] When the regulatory agency (data bureau) at this level needs to perform authorization and access supervision, the specific methods are as follows:

[0084] According to the problematic data capsule identifier DCI, the regulatory agency (data bureau) at this level can retrieve the most recent authorization record, the most recent task access record, and the most recent data capsule access record on the blockchain, and then use the locally stored private key to decrypt the record using the SM2 encryption algorithm to obtain the original data, and then supervise the authorization, decryption, and other behaviors. The specific process is as follows:

[0085] ①Decryption authorization record:

[0086]

[0087] ②Decryption task access records:

[0088]

[0089] ③Decrypt data capsule access records

[0090]

[0091] Check the DCI and ID of the three records DU Are they consistent? If they are consistent, calculate

[0092]

[0093] For w∈I, calculate and output

[0094] The beneficial effects of the present invention are as follows:

[0095] A data capsule encapsulation method for public data authorization and opening is proposed, including encapsulation of public data into data capsules, authorization access strategy for public data, authorization of access tasks, and supervision of public data authorization and access. The main advantages of the present invention are as follows:

[0096] (1) Data security. A data capsule encapsulation method for authorized and open public data adopts a variety of advanced, secure and efficient cryptographic schemes, such as SM2 asymmetric encryption technology and attribute-based encryption technology, to achieve in-depth protection of the security of public data. Secondly, by utilizing access policies, access conditions and other restrictions, the access scenarios of data capsules encapsulating public data are restricted, reducing the possibility of unauthorized users accessing the public data in the data capsules. In addition, by embedding purchase qualifications in the private key of the public data user, only data users with specified purchase qualifications can successfully decrypt the data capsule. Finally, through the access task mechanism, the granularity of authorized data is further reduced. At the same time, the access task is bound to the unique ID of the data user, so that the access task cannot be forwarded.

[0097] (2) Flexible authorization. Multiple public data can be encrypted in a data capsule through XOR, padding, bilinear pairing, etc. When authorizing, it is often not necessary to authorize all public data in a data capsule to the data user. Therefore, through access tasks, several public data that need to be authorized can be specified, providing a convenient and secure way for flexible and fine-grained authorization of public data in data capsules.

[0098] (3) Efficient supervision. The regulatory agency at this level can embed regulatory factors in the qualifications of public data users. In addition, the regulatory agency at this level can obtain public data authorization records, access task decryption records, and data capsule decryption records encrypted with its public key on the blockchain, and decrypt them with its own private key to obtain the plain text and obtain the specific authorized data through simple calculations, and conduct supervision based on this.

[0099] Key features include:

[0100] (1) Application for purchase qualifications and embedding of regulatory factors. Before applying to purchase public data products, public data users need to apply to the public data processor for data product purchase qualifications. The public data processor will calculate its private key and embed its qualifications into the generated private key. After that, the public data processor will also send part of the private key to the regulatory agency at the same level, and the regulator at the same level will embed its own regulatory factors into it.

[0101] (2) Data capsule encapsulation and access task generation. Figure 4 As shown, the public data processor can encapsulate any number of public data products through the data capsule encapsulation algorithm proposed in the present invention to form an integrated data capsule. In addition, during the data capsule encapsulation process, an access policy is embedded to protect the data capsule, so that only public data users whose purchasing qualifications meet the specified access policy can access the data capsule. By adding an integrity verification value to the data capsule, the data capsule is protected from tampering. Finally, the public data processor can also specify certain data in the data capsule that need to be shared and generate access tasks. Public data users can only obtain data capsules if they meet the access policy and have the corresponding access tasks at the same time.

[0102] (3) Public data authorization and access supervision. The regulatory agency at this level can trace the public data authorization records, access task decryption records, and data capsule decryption records on the blockchain, use its own private key to decrypt the above three encrypted records, and check whether the necessary fields of the three records are consistent. After performing simple calculations, all information including the visitor, access time, and complete authorized data can be restored. Finally, authorization and access supervision are carried out based on this information. BRIEF DESCRIPTION OF THE DRAWINGS

[0103] Figure 1 System architecture diagram of an embodiment of the present invention;

[0104] Figure 2 System flow chart of an embodiment of the present invention;

[0105] Figure 3 Schematic diagram of access strategy tree according to an embodiment of the present invention;

[0106] Figure 4 Data capsule packaging flow chart of an embodiment of the present invention; DETAILED DESCRIPTION

[0107] In order to make the technical means, creative features, objectives and effects achieved by the present invention easy to understand, the present invention is further described below in conjunction with the accompanying drawings.

[0108]

[0109]

[0110] System architecture design, such as Figure 1 As shown, the present invention focuses on the part within the dotted frame:

[0111] (1) Public data processor (public data authorized operating entity): After the public data processor (public data authorized operating entity) applies for public data from the superior public data operating platform and processes the data products after the scenario notice issued by the people's government at the same level and the application is approved. Before the public data user applies for public data, the public data processor (public data authorized operating entity) issues the data product purchase qualification to the user. After that, the data applied by the public data user is packaged into a data capsule, and the data capsule access strategy, access number and timeliness control strategy are embedded; then, watermark information is constructed and access tasks are generated; finally, the data capsule, access task and watermark information are sent to the public data user. After authorization, the authorization record is uploaded to the blockchain. This role has the following functions: issuance of purchase qualification, generation of access matrix, data capsule packaging, generation of access task and uploading of authorization record to the blockchain.

[0112] (2) Public data users: Public data users can receive data capsules and access tasks that encapsulate application data, and decrypt data capsules to obtain data based on access tasks and their own data product purchase qualifications. At the same time, access records will be automatically uploaded to the blockchain. This role has the following functions: decrypting access tasks, decrypting data capsules, and uploading access records to the blockchain.

[0113] (3) Superior regulatory agency: supervises all system activities and can make specific configurations when necessary.

[0114] (4) Regulatory agencies at this level (data bureau): Regulatory agencies at this level (data bureau) are responsible for supervising various user behaviors, decrypting from the blockchain and supervising the data product authorization of public data processors (public data authorized operators) and the use of public data by public data users. This role has the following functions: regulatory factor embedding, authorization and access supervision.

[0115] (5) Blockchain: Blockchain stores the authorization records of public data processors (authorized operators of public data) and the records of data access by public data users. Blockchain is a consortium chain with the regulatory authorities at the same level, the higher-level regulatory authorities and public data processors (authorized operators of public data) as nodes.

[0116] like Figure 2 As shown in the figure, the operation process is as follows: after the government releases the scenario notice and the public data processor (public data authorization operator) applies for the scenario and it is approved, the public data processor (public data authorization operator) will enter the superior public data authorization operation platform and develop data products. The main process of the data capsule packaging method for public data authorization is as follows: Figure 2 As shown in the figure, before a data user applies for a data product, the public data processor (public data authorization operator) first issues the data product purchase qualification to the data user and the regulatory agency (data bureau) at the same level embeds the regulatory factor. After that, the public data processor (public data authorization operator) generates data capsules, access tasks, and watermark information through four steps: access strategy construction, data capsule packaging, watermark information construction, and access task generation, and sends them to the public data user. After that, the public data authorization record is uploaded to the chain. After receiving the data capsule and access task, the public data user decrypts the access task and data capsule. Regardless of whether the decryption is successful, the access record will be uploaded to the blockchain. In addition, after the decryption is successful, the watermark information will be taken out and displayed on the front end of the page. When necessary, the regulatory agency (data bureau) at this level can supervise the authorization of public data by consulting the public data authorization records on the blockchain. In addition, the behavior of public data users can be recorded and held accountable by supervising the public data access records on the blockchain.

[0117] A data capsule packaging method for public data authorization and opening includes the following steps:

[0118] Step 1 System initialization:

[0119] When establishing a data capsule encapsulation method for public data authorization and opening, initialization parameters are constructed according to various standards, mainly focusing on the initialization of the system encryption scheme, including the initialization of the public data processor (public data authorization operating entity), the initialization of the public data user, and the initialization of the regulatory agency (data bureau) at this level.

[0120] Step 2: Issuance of data product purchase qualifications:

[0121] Public data users apply to public data processors (public data authorized operators) for data product purchase qualifications. First, public data users submit data product purchase qualification application forms to public data processors (public data authorized operators). After the public data processors (public data authorized operators) review and approve the application, they will generate a private key for the application and issue data product purchase qualifications, and the regulatory agency (data bureau) at the same level will embed regulatory factors.

[0122] Step 3. Purchase of data products and packaging of data capsules: Public data users purchase data products from public data processors, and public data processors package the data products into data capsules, such as Figure 4 As shown;

[0123] Step 4. Data capsule decryption: The public data user uses the data capsule received in step 3 and decrypts the data capsule in combination with his / her own qualifications to restore the data product plaintext;

[0124] Step 5. The regulatory authority at this level performs authorization and access supervision.

[0125] Based on the problematic data capsule identifier, the regulatory agency at this level can retrieve the most recent authorization record, the most recent task access record, and the most recent data capsule access record on the blockchain, and then use the locally stored private key to decrypt the record using the SM2 encryption algorithm to obtain the original data, and then supervise the authorization and decryption behaviors therein.

[0126] Furthermore, the present invention also provides a system for implementing a data capsule packaging method for public data authorization and opening, including an initialization module, a data product purchase qualification issuance module, a data product purchase and data capsule packaging module, a data capsule decryption module and an authorization and access supervision module;

[0127] Initialization module: mainly for the initialization of the system encryption scheme, including the initialization of public data processors, public data users and the initialization of the regulatory agency at this level;

[0128] Data product purchase qualification issuance module: Public data users apply to public data processors for data product purchase qualifications; first, public data users submit data product purchase qualification application forms to public data processors; after the public data processors review and approve the application, they will generate a private key for the application and issue data product purchase qualifications, and the regulatory authorities at the same level will embed regulatory factors;

[0129] Data product purchase and data capsule packaging module: Public data users purchase data products from public data processors, and public data processors package the data products into data capsules;

[0130] Data capsule decryption module: Public data users use the data product purchase and the data capsule received in the data capsule encapsulation module, and decrypt the data capsule based on their own qualifications to restore the data product plaintext;

[0131] Authorization and access supervision: Based on the problematic data capsule identifier, the regulatory agency at this level can retrieve the most recent authorization record, the most recent task access record, and the most recent data capsule access record on the blockchain, and then use the locally stored private key to decrypt the record using the SM2 encryption algorithm to obtain the original data, and then supervise the authorization and decryption behaviors therein.

[0132] Furthermore, the present invention also provides a device, in which the packaging method of the present invention is arranged.

[0133] Example

[0134] The present invention provides experimental data as follows, wherein Table 1 is the time of the data capsule encapsulation algorithm, Table 2 is the access task generation time; Table 3 is the data capsule decryption time.

[0135] Table 1

[0136] psize dgn time 10.0 10.0 0.0540642261505126 20.0 20.0 0.0724651813507080 30.0 30.0 0.103446483612060 40.0 40.0 0.118870353698730 50.0 50.0 0.128411722183227 60.0 60.0 0.143509006500244 70.0 70.0 0.159952020645141 80.0 80.0 0.21773681640625 90.0 90.0 0.230649423599243 100.0 100.0 0.223718118667602

[0137] The time table of the data capsule encapsulation algorithm described in Table 1 in this embodiment is mainly for the first and second steps of step 3, and does not include the E_SM2 encryption time; where psize refers to the number of attributes included in the access policy, dgn refers to the number of data products (the value of n), and the unit of time is s.

[0138] Table 2

[0139]

[0140]

[0141] In the access task generation time described in Table 2 in this embodiment, ls refers to the number of authorized data products (that is, the length of set I), and the unit of time is s.

[0142] Table 3

[0143] psize dgn time 10.0 10.0 0.0227764606475830 20.0 20.0 0.0254818201065063 30.0 30.0 0.0256458282470703 40.0 40.0 0.0258862257003784 50.0 50.0 0.0258247137069702 60.0 60.0 0.0267576932907104 70.0 70.0 0.0263552665710449 80.0 80.0 0.0262303829193115 90.0 90.0 0.0277003765106201 100.0 100.0 0.0280548334121704

[0144] In this embodiment, the data capsule decryption time described in Table 3 is in seconds. The calculation process of this decryption time specifically refers to:

[0145] calculate Then verify the equation Is it established to verify the integrity of the data capsule?

[0146] After verification, the system checks whether the data user's qualifications meet the access policy. If the access strategy is satisfied, let the set T = {i|i∈[n1]∩π(i)∈S}, then there must be a set of coefficients γ i ,i∈T, such that Afterwards, calculate

[0147]

[0148] Based on the above results, calculate Reconstructed by the following formula

[0149]

[0150] For each item w in the set I, compute:

[0151]

[0152] In summary, the present invention can support the security, privacy and controllability of public data itself when public data is authorized to be opened to the outside. At the same time, access policies, access tasks and watermark information are introduced to further ensure the controllability and compliance of authorization and access to public data. The present invention adopts a variety of cryptographic algorithms, including SM2 asymmetric encryption, fast attribute-based encryption technology, etc., to protect the confidentiality of public data. Among them, the public data processor can generate a random key, and under the specified access policy, encrypt the public data and package it into a data capsule. In addition, the public data processor can also generate an access task to additionally specify the public data users with decryption authority and the specific information that can be decrypted. By restoring the authorization records, access task decryption records and data capsule decryption records recorded on the blockchain, the regulatory agency can completely restore the specific plaintext of the authorization and conduct subsequent supervision accordingly.

Claims

1. A data capsule packaging method for public data authorization and opening, It is characterized in that The steps include: Step 1. System initialization: mainly focuses on the initialization of the system encryption scheme, including the initialization of the public data processor, the public data user, and the regulatory agency at this level; Step 2. Issuance of data product purchase qualifications: Public data users apply to public data processors for data product purchase qualifications. First, public data users submit data product purchase qualification application forms to public data processors. After the public data processors review and approve the application, they will generate a private key and issue data product purchase qualifications, and the regulatory authorities at the same level will embed regulatory factors. Step 3. Purchase of data products and packaging of data capsules: Public data users purchase data products from public data processors, and public data processors package the data products into data capsules; Step 4. Data capsule decryption: The public data user uses the data capsule received in step 3 and decrypts the data capsule in combination with his / her own qualifications to restore the data product plaintext; Step 5. The regulatory authority at this level performs authorization and access supervision.

2. A data capsule packaging method for public data authorization and opening according to claim 1, It is characterized in that Step 1: 1-1. Initialization of public data processing party: First, construct a bilinear group in are two p-order cyclic additive groups on the elliptic curve, is a cyclic multiplicative group of order p, and e is a Weil pairing: Right now and There is e(P a ,Q b )=e(P,Q) ab ; Then randomly select a Generator g in the group 1 ,one Generator g in the group 2 ; Next, select four hash functions, Afterwards, the public data processor randomly selects a random number And use it as the master private key msk, save msk locally; and initialize all data product purchase qualification sets that may be needed Finally, calculate And output and publish system parameters 1-2. Public data user initialization: Public data users each initialize a pair of SM2 public and private keys PK locally DU SK DU ; Publish its public key PK DU , save the private key SK locally DU ; 1-3. Initialization of the regulatory agency at this level: The regulator randomly generates a pair of SM2 public and private keys PK locally ra SK ra ; Publish its public key PK ra , save the private key SK locally ra .

3. A data capsule packaging method for public data authorization and opening according to claim 2, It is characterized in that Step 2: ⑴ The public data user submits a data product purchase qualification application form to the public data processor. The application form contains the data product purchase qualification set S and the identity identifier ID DU ; ⑵After receiving the application form, the public data processor first selects a random number If it has a set of data product purchasing qualifications S, for each of its qualifications s, calculate sk 1,s : Afterwards, calculate Where ID DU It is the applicant’s unique ID. The size of the full data product purchase qualification set; then, calculate Then, the ID DU ,sk 3 ,sk 4 Forwarded to the regulatory authority at the same level; 1,s ,sk 2 ,sk 3 and sk 4 All of them are part of the data product qualification to purchase the private key; using PK DU Encryption S,{sk 1,s } s∈S ,sk 2 , the encrypted message E1 = E SM2 (PK DU ,S||{sk 1,s } s∈S ||sk 2 ) sent to public data users; ⑶ The regulatory agency at this level receives the ID sent by the public data processor DU ,sk 3 ,sk 4 After that, it is embedded into its own regulatory factor and the PK DU Encrypted PK ra ,sk 3 ,sk 4 , the encrypted message E2 = E SM2 (PK DU ,PK ra ||sk 3 ||sk 4 ) sent to public data users; ⑷ After receiving the above two encrypted messages, the public data user uses his own private key SK DU Decrypt, restore the plaintext and combine it into purchase qualification {ID DU ,sk DU = {PK ra ,S,{sk 1,s } s∈S ,sk 2 ,sk 3 ,sk 4 }}, where sk DU Indicates the data product qualification purchase private key.

4. The data capsule packaging method for public data authorization and opening according to claim 3, It is characterized in that Step 3: Public data users purchase data products from public data processors, who package the data products into data capsules and generate watermark information and access tasks: Public data users purchase data products from public data processors by sending the data products they want to purchase and their own IDs. DU ; The public data processor performs the following operations: (1) Access strategy construction: The public data processor first constructs an access strategy The access policy It specifies what kind of data applicants can decrypt. The access policy is as follows: Convert to access matrix Assume Access Policy "A and(D or(B and C))", the access strategy is converted into an access matrix as follows in is a matrix and π is a mapping: ① First, set the access policy Converted into a binary tree, the leaf nodes of the binary tree represent the attributes, i.e. A, B, C, D in the access strategy, and the non-leaf nodes of the binary tree represent AND gates or OR gates; ②Starting from the root node, mark the root node as v={1}, and initialize a counter c to 1; if the node is an or gate, then mark all the child nodes of the node as v={1}; if the node is an and gate, first extend the length of v by adding 0 at the end until its length reaches c; then mark its left child node as v||1, and the right child node as {0,...,0}||-1, where the length of {0,...,0} is c, and then set c to c+1; repeat the above steps until every node of the binary tree is marked; ③Finally, the leaf node vector generated by the access strategy binary tree after marking is A:{1,1},B:{0,-1,1},C:{0,0,-1},D:{0,-1}; then, all vectors are padded with 0 at the end to make their length reach the length of the longest vector, that is, A:{1,1,0},B:{0,-1,1},C:{0,0,-1},D:{0,-1,0}, then the matrix It is composed of the above four row vectors. The mapping π is a dictionary {1:A, 2:B, 3:C, 4:D}, where the key of the dictionary is the matrix The row index of the dictionary, the value of the dictionary is the attribute represented by the row; In addition, the public data processor also needs to specify the validity period of the data capsule Number of times a data capsule can be accessed Number of times the data capsule has been accessed (2) Data capsule packaging: The public data processor selects one or more structured data products and encodes the data products into binary form. Assume that n data products are selected. The length of the binary data after encoding is First, randomly select a Binary string Mask 1 , and two random numbers calculate: Assume that the access matrix selected in the first step is With n 1 Line n 2 Column; randomly select a length of n 2 -1 vector v, each element of vector v is a A random number on the vector y' is randomly selected with a length of τ, and each element of the vector y' is also a A random number on For j∈[τ], calculate For i∈[n 1 ],calculate After that, choose a random number And calculate Output data capsule identifier DCI, data capsule And local parameters Indicates the qualification conditions of the data capsule, Indicates the data capsule access condition; (3) Watermark information construction: Construct watermark information WP, including: ID of the public data user DU , data capsule identifier DCI, data expiration time Number of times a data capsule can be accessed Data capsule verification value V; (4) Access task generation: extracting its corresponding local parameters Then select the index I of the data particle to be shared, I∈[n]; First, calculate After that, use spp in calculate Recalculate For w∈I, randomly select a And calculate Among them, dg w means The data product with index w in Recorded as Select a task expiration date Number of task visits and the maximum number of times a task can be used Output Task in They are all part of the mission; (5) Authorization record on-chain: Public key PK of the regulatory agency at this level ra , through the SM2 encryption algorithm where t auth Refers to the authorization time. <DCI,R 1 >Upload it to the blockchain as an authorization record; finally, upload the data capsule identifier DCI, data capsule DC, watermark information WP and access task Sent to public data consumers.

5. The data capsule packaging method for public data authorization and opening according to claim 4, It is characterized in that Step 4: The public data user uses the data capsule received in step 3, decrypts the data capsule based on his / her own qualifications, and recovers the plaintext of the data product. The specific method is as follows: Public data users receive data capsule identifier DCI, data capsule DC, watermark information WP and access task After that, decrypt and recover the public data as follows: (1) Access task decryption: receiving access tasks After that, the system first checks whether the current time is within the task expiration time. Before; After, query the blockchain for the most recent access record corresponding to the data capsule identifier DCI If it does not exist, then is equal to 0, otherwise Set to Recorded in The value is increased by 1, and then the number of visits to the task is checked. Has the threshold been reached? Indicates the most recent access record The corresponding value, if all checks pass, is calculated After that, the number of visits to the task Increase by 1; finally, the system takes out the public key PK of the regulatory factor in the private key ra , through the SM2 encryption algorithm The key-value pair <DCI,R 2 >As an access record, the decryption record is uploaded to the chain, where the access task decryption time is t dtask 、Is the decryption successful? isSuccess task ; if isSuccess task If it is "successful", then the key-value pair Upload to the chain as a task access record (2) Data capsule decryption: Using the SM2 algorithm, input the decryption key SK DU Decrypt DC to restore the data capsule plaintext Next, the system checks whether the current time is within the data capsule expiration time. After that, query the blockchain for the most recent access record Ac corresponding to the DCI DC , if it does not exist, then is equal to 0, otherwise Set to Recorded in The value is increased by 1, and then the number of visits to the task is checked. Has the threshold been reached? If all checks pass, calculate Then verify the equation Is it established to verify the integrity of the data capsule? After verification, the system checks whether the data user's qualifications meet the access policy. If the access policy is satisfied, let the set T = {i|i∈[n 1 ]∩π(i)∈S}, then there must be a set of coefficients γ i ,i∈T, such that Afterwards, calculate Based on the above results, calculate Reconstructed by the following formula For each item w in the set I, compute: Output {dg w } w∈I ; Finally, the system takes out the supervisory factor public key PK in the private key ra , through the SM2 encryption algorithm The key-value pair <DCI,R 3 >As a data capsule decryption record on the chain, where the data capsule decryption time t dc 、Is the decryption successful? isSuccess dc ; if isSuccess dc If it is "successful", then the key-value pair Upload to the chain as a data capsule access record Ac DC ; Finally, the system takes out the digital watermark WP and renders it on the data display page.

6. The data capsule packaging method for public data authorization and opening according to claim 5, It is characterized in that When the regulatory authority at this level needs to perform authorization and access supervision, the specific methods are as follows: Based on the problematic data capsule identifier DCI, the regulatory agency at this level can retrieve the most recent authorization record, the most recent task access record, and the most recent data capsule access record on the blockchain, and then use the locally stored private key to decrypt the record using the SM2 encryption algorithm to obtain the original data, and then supervise the authorization and decryption behaviors therein.

7. The data capsule packaging method for public data authorization and opening according to claim 5, It is characterized in that Step 4: ①Decryption authorization record: ②Decryption task access records: ③Decrypt data capsule access records Check the DCI and ID of the three records DU Are they consistent? If they are consistent, calculate For w∈I, calculate and output 8. A system for implementing the data capsule packaging method for public data authorization and opening according to claim 1, Features It includes an initialization module, a data product purchase qualification issuance module, a data product purchase and data capsule packaging module, a data capsule decryption module, and an authorization and access supervision module; Initialization module: mainly for the initialization of the system encryption scheme, including the initialization of public data processors, public data users and the initialization of the regulatory agency at this level; Data product purchase qualification issuance module: Public data users apply to public data processors for data product purchase qualifications; first, public data users submit data product purchase qualification application forms to public data processors; after the public data processors review and approve the application, they will generate a private key for the application and issue data product purchase qualifications, and the regulatory authorities at the same level will embed regulatory factors; Data product purchase and data capsule packaging module: Public data users purchase data products from public data processors, and public data processors package the data products into data capsules; Data capsule decryption module: Public data users use the data product purchase and the data capsule received in the data capsule encapsulation module, and decrypt the data capsule based on their own qualifications to restore the data product plaintext; Authorization and access supervision: Based on the problematic data capsule identifier, the regulatory agency at this level can retrieve the most recent authorization record, the most recent task access record, and the most recent data capsule access record on the blockchain, and then use the locally stored private key to decrypt the record using the SM2 encryption algorithm to obtain the original data, and then supervise the authorization and decryption behaviors therein.

9. A device, Features The device is provided with a packaging method as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Autonomous and controllable data sharing method in complex scene

    CN119402210A

  • Data trusted computing framework based on alliance block chain

    CN119885267A

  • Privacy calculation arrangement method, system and equipment based on dynamic trust and medium

    CN121561945A

  • Privacy computing arrangement method, system and device based on dynamic trust and medium

    CN121561945B