A cross-chain data sharing method, device, medium and product
By using the distributed key generation algorithm and LSSS algorithm within the SynergyChain framework, the data islands between blockchain systems and cross-chain data sharing security challenges are solved, achieving high efficiency and security of cross-chain data sharing, and ensuring Only users who meet certain attributes can access the data.
Patent Information
- Application Number
- CN202410881201.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-07-03
AI Technical Summary
Isolated data islands between blockchain systems and security and access control challenges of cross-chain data sharing, especially due to existing technologies such as CP-ABE and FH-CP-ABE, which have problems with computing and storage overhead and are difficult to implement Simple, safe and efficient cross-chain data access.
Within the SynergyChain framework, a distributed key generation algorithm is used for parameter initialization, the user's private key and public key are generated through the system key generation algorithm and the attribute key generation algorithm, combined with the LSSS algorithm for encryption, and data is achieved through partial order relationships. Layered access control ensures that only users who meet specific attributes can decrypt data.
It achieves strong security and efficient data dissemination of cross-chain data sharing, reduces storage and computing overhead, enhances control of data dissemination, and ensures the reliability and security of cross-chain access.
Smart Images

Figure CN118413325B
Abstract
Description
Technical Field
[0001] The present application relates to the field of data sharing, and in particular to a cross-chain data sharing method, device, medium and product. Background Art
[0002] Blockchain technology is hailed as a reliable ledger for storing immutable data. Blockchain can be applied to various Internet of Things (IoT) fields, such as smart homes, digital logistics, and smart cities. However, despite the wide applicability of blockchain technology, its widespread adoption has brought challenges related to different consensus protocols and interoperability, resulting in isolated data silos in numerous blockchain-supported business systems. Based on factors such as network accessibility and degree of openness, blockchain architecture is generally divided into public chain, consortium chain, and private chain. Among them, the consortium chain architecture is closely integrated with real-world application scenarios, and many common use cases support this approach. However, consortium chains usually have strict permission management and access mechanisms, which limit access to specific smart contracts and data to authorized users within the chain. As a result, each consortium chain application tends to develop its own data ecosystem, hindering seamless access and communication across platforms. To meet this challenge, cross-chain technologies that can bridge different blockchain networks are urgently needed. These technologies promote interoperability and are the key to unlocking the untapped potential of data in various applications.
[0003] Ethereum founder Vitalik Buterin sees cross-chain functionality as application-specific, in contrast to the broader concept of “blockchain interoperability.” Currently, cross-chain technology is primarily used in three key areas: asset transfer, data sharing, and service collaboration. Among these applications, data sharing stands out as a fundamental requirement for blockchain cross-chain operations, ensuring the security of shared data and preventing unauthorized access or theft. One way to address this challenge is through attribute-based encryption, specifically ciphertext policy attribute based encryption (CP-ABE). CABAE embeds access control directly into ciphertext, enabling data owners to autonomously define access structures. The approach operates by matching each user’s private key with an associated set of attributes, ensuring that only users with the corresponding attributes can decrypt the ciphertext. CP-ABE provides fine-grained access control, scalability, and flexibility, but current systems face challenges due to the computational overhead of bilinear mapping operations and the complexity involved in designing access structures. While CP-ABE holds promise for enhancing data security and access control in cross-chain scenarios, overcoming these challenges is critical to mitigating the overhead associated with existing implementations.
[0004] In the field of cloud computing, Wang et al. proposed an efficient file hierarchical attribute-based encryption FH-CP-ABE technology. This method combines the hierarchical access structure into a unified structure, and then uses this structure to encrypt the hierarchical files. By associating shares with attributes, this method can reduce encryption time and ciphertext storage requirements. However, the FH-CP-ABE technology still faces some limitations because it uses a tree access structure, which affects its overall effectiveness. In addition, attribute revocation in the FH-CP-ABE technology is also a sensitive challenge that requires increased computational and communication overhead to manage. To address the hierarchical multi-group communication challenge, a hierarchical key distribution scheme (HKAS) can be adopted, which was originally proposed by Akl and Taylor. Although the hierarchical key distribution scheme provides significant advantages for access control, it also brings huge computational and storage problems. It also brings significant computational and storage overhead. Considering these factors, it is particularly important to develop a simple, secure, and efficient access control mechanism. Summary of the invention
[0005] In order to solve the above-mentioned problems existing in the prior art, the present application provides a cross-chain data sharing method, device, medium and product.
[0006] To achieve the above objectives, this application provides the following solutions:
[0007] In a first aspect, the present application provides a cross-chain data sharing method, which implements hierarchical access control within a SynergyChain framework; the SynergyChain framework includes a collaborative chain and an authenticated alliance chain; the alliance chain is registered in the collaborative chain and completes identity authentication; the cross-chain data sharing method includes:
[0008] A distributed key generation algorithm is used to initialize parameters to obtain public parameters; the public parameters include the private key of the attribute authorization center, the public key of the user, and the private key of the user;
[0009] Based on the public parameters, a system key generation algorithm is used to generate a system public key;
[0010] The attribute key generation algorithm is used to generate the user's attribute private key based on the attribute authorization center's private key, the user's public key, the system's public key and the user's attribute set;
[0011] Generate a data plaintext set based on user data, and select a symmetric key set; the symmetric key set includes a plurality of symmetric encryption keys corresponding to threshold nodes in the access policy structure;
[0012] Encrypting the data plaintext set using the symmetric key set to obtain data ciphertext;
[0013] Encrypt the symmetric key set using the LSSS algorithm to obtain a key password set;
[0014] When a user performs cross-chain data access, it is checked whether there is a partial order relationship between two cross service nodes; the two cross service nodes are located on two cross chains; the two cross service nodes are an ancestor node and a descendant node;
[0015] If there is a partial order relationship, the information of the chain where the descendant node is located is directly decrypted through the chain where the ancestor node is located to achieve data transmission;
[0016] If there is no partial order relationship, the user's attribute private key, the key password set and the data ciphertext are transmitted to the collaborative chain; the smart contract of the collaborative chain generates a decryption token set for the key password set;
[0017] Based on the matching degree between the attribute in the user's attribute private key and the access structure, obtain the corresponding decryption token in the decryption token set;
[0018] Decrypt the corresponding decryption token in the decryption token set obtained using the user's private key to obtain a symmetric key;
[0019] The symmetric key is used to decrypt the data ciphertext to achieve data sharing.
[0020] Optionally, the symmetric key set is encrypted using an LSSS algorithm to obtain a key password set, which specifically includes:
[0021] The LSSS algorithm is used to perform attribute-based encryption on the symmetric key set to obtain the key password set.
[0022] Optionally, in the process of obtaining the corresponding decryption token in the decryption token set based on the matching degree between the attribute in the attribute private key of the user and the access structure, the matching degree is proportional to the number of decryption tokens obtained.
[0023] Optionally, an application data interface on the collaborative chain is used to check whether a partial order relationship exists between two cross-service nodes.
[0024] In a second aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the cross-chain data sharing method provided above.
[0025] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the cross-chain data sharing method provided above.
[0026] In a fourth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the cross-chain data sharing method provided above.
[0027] According to the specific embodiments provided in this application, this application discloses the following technical effects:
[0028] This application provides a cross-chain data sharing method, device, medium and product. By implementing hierarchical access control within the SynergyChain framework and using a distributed key generation algorithm for parameter initialization, it can ensure key security and achieve reliable cross-chain data sharing, thereby ensuring strong cross-chain security and efficient data sharing; by establishing a partial order relationship, hierarchical access to data is achieved, which can enhance control over data propagation and achieve efficient cross-chain access control. In addition, this application uses the LSSS algorithm for encryption, which can effectively control access to private data stored on the blockchain. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0030] Figure 1 This is an application environment diagram of a cross-chain data sharing method in one embodiment of the present application;
[0031] Figure 2 A schematic diagram of a cross-chain data sharing method provided in one embodiment of the present application;
[0032] Figure 3 A schematic diagram of the implementation architecture of a cross-chain data sharing method provided in one embodiment of the present application;
[0033] Figure 4 An overall flow chart of the cross-chain data sharing method provided in one embodiment of the present application;
[0034] Figure 5 A cross-chain data sharing operation diagram provided for an embodiment of the present application;
[0035] Figure 6 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0036] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0037] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0038] The issue of multi-chain interoperability has become a critical issue as different blockchain systems struggle to interact with each other reliably and efficiently. This fragmentation often leads to isolated data silos across multi-chain environments, highlighting the urgent need to promote seamless data sharing between these systems. Meeting this challenge requires overcoming two major obstacles. First, it is necessary to reliably share data across multiple blockchains to leverage the inherent tamper-proof advantages of blockchain technology. Second, fine-grained control over the data access process is critical to protecting sensitive information and maintaining user privacy. Based on this, an embodiment of the present application provides a cross-chain data sharing method-a cross-chain data sharing scheme with hierarchical access control and distributed key generation (CDSS-HD). The implementation process of this scheme is as follows: Figure 3 As shown. First, define the partial order relationship and improve the linear secret sharing algorithm to perform hierarchical access control. At the same time, initialize the system parameters, generate public and private keys for users and all attribute authorization nodes (AA) to generate distributed keys. Based on this, when cross-chain data sharing is performed, the following operations are mainly performed:
[0039] 1. Identity authentication and registration of service nodes. Register all alliance chains in the collaborative chain and complete identity authentication.
[0040] 2. Issue a cross-chain request.
[0041] 3. Verify the partial order relationship of service nodes.
[0042] 4. Data sharing.
[0043] 5. Broadcast verification results.
[0044] The cross-chain data sharing method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, integrated on the server 104, or placed on the cloud or other servers. The terminal 102 can send identity authentication and user information to the server 104. After the server 104 receives the data to be processed, it first defines the partial order relationship and improves the linear secret sharing algorithm to perform hierarchical access control. At the same time, initialize the system parameters, generate public and private keys for the user and all attribute authorization nodes AA to generate distributed keys. Then cross-chain data sharing is performed based on the generated distributed keys. The server 104 can feedback the obtained cross-chain data to the terminal 102. In addition, in some embodiments, the cross-chain data sharing method can also be implemented by the server 104 or the terminal 102 alone, such as the terminal 102 can directly perform cross-chain sharing processing on the data to be processed, or the server 104 can obtain the data to be processed from the data storage system and perform cross-chain sharing processing on the data to be processed.
[0045] The terminal 102 may be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers, or may be a cloud server.
[0046] Based on the above implementation architecture, in an exemplary embodiment of the present application, the cross-chain data sharing method provided is mainly executed by a computer device, which can be executed by a computer device such as a terminal or a server alone, or by a terminal and a server together. In the embodiment of the present application, the method is applied to Figure 1 The server shown in the figure is used as an example. When this method is applied to the server, it mainly implements hierarchical access control within the SynergyChain framework. On this basis, a cross-chain data sharing method is designed using a distributed key generation algorithm. Its main implementation architecture includes: initialization parameters, data encryption, key encryption, and data access. Figure 2 As shown, it includes the following steps 200 to 211. Among them:
[0047] Step 200: Initialize parameters using a distributed key generation algorithm to obtain public parameters. In addition to the private key of the attribute authorization center, the public key of the user and the private key of the user, the public parameter may also include the public key of the attribute authorization center.
[0048] Step 201: Based on the public parameters, a system key generation algorithm is used to generate a system public key.
[0049] Step 202: Generate the user's attribute private key using an attribute key generation algorithm based on the attribute authorization center's private key, the user's public key, the system's public key, and the user's attribute set.
[0050] Step 203: Generate a data plaintext set based on user data , and select a symmetric key set The symmetric key set includes multiple symmetric encryption keys corresponding to threshold nodes in the access policy structure.
[0051] Step 204: Encrypt the data plaintext set using the symmetric key set to obtain the data ciphertext .
[0052] Step 205: Encrypt the symmetric key set using the layered linear secret sharing (LSSS) algorithm , get the key password set In this step, the LSSS algorithm is mainly used to symmetric key set Perform attribute-based encryption to obtain the key password set .
[0053] Step 206: When the user performs cross-chain data access, check whether there is a partial order relationship between the two cross service nodes. The two cross service nodes are located on two cross chains. The two cross service nodes are an ancestor node and a descendant node.
[0054] Step 207: If a partial order relationship exists, the information of the chain where the descendant node is located is directly decrypted through the chain where the ancestor node is located to achieve data transmission.
[0055] Step 208: If there is no partial order relationship, the user's attribute private key and key password set And data ciphertext Transmitted to the collaborative chain. The smart contract of the collaborative chain is a key password set Generate decryption token set .
[0056] Step 209: Based on the matching degree between the attribute in the user's attribute private key and the access structure, obtain the corresponding decryption token in the decryption token set DT.
[0057] Step 210: Decrypt the obtained decryption token set using the user's private key The corresponding decryption token in gets the symmetric key.
[0058] Step 211: Use the symmetric key to decrypt the data ciphertext to achieve data sharing.
[0059] By implementing the above steps 200 to 211, the solution provided by this application is mainly implemented within the SynergyChain framework, realizing hierarchical access control. In addition, the distributed key generation algorithm is integrated to improve the security of key distribution during data sharing. The access request mechanism in the smart contract is used to authenticate each requester, providing decentralized and reliable automatic access authorization. In order to ensure the reliability of access control, data requesters use their unique attributes to access shared data.
[0060] In another exemplary embodiment of the present application, in order to ensure the reliability of access control, in this embodiment, the data requester uses its unique attributes to access shared data. This process involves calling the access control contract, which is then deployed and verified by all participating nodes in the system through consensus. System participants mainly include data owners (DO), data accessors (DU), attribute authorization centers (AA) and multi-chain framework SynergyChain (SC). Figure 4 As shown, the implementation process of the cross-chain data sharing method provided in this embodiment includes:
[0061] In the first step, hierarchical access control is implemented within the SynergyChain framework. All consortium chains register with Synergychain and perform identity authentication. The system is initialized using a distributed key generation algorithm to obtain system public parameters and the system master public key and master private key. The processing flow of the system key generation algorithm is shown in Table 1.
[0062]
[0063] The second step is to design a cross-chain data sharing method using a distributed key generation algorithm. The specific architecture includes: initialization parameters, data encryption, key encryption, and data access. Among them:
[0064] (1) Initialization parameters. That is, initialization generates system public parameters, including the public and private keys of AA and the user, as well as the user's attribute key. Select two bilinear cyclic groups and , the order is a prime number p. And . Hash Function . A collection of users. . The quantity is , the threshold is .q, All are random numbers. Different subscripts of parameters in the full text correspond to different AA. Each AA executes the algorithm to generate its own public key and private key. As your own private key, calculate your own public key Each user (with a globally unique identifier )Generate a user private key A user public key Each user randomly selects , As its private key, and calculate its public key Each Use your own private key , the user's public key and a set of attributes Generate Public Key and the user's attribute private key Based on this, the system common parameters obtained mainly include , mainly by using security parameters To create the common parameters of the system. , , . Respectively The public and private keys of each AA, For each data accessor's public and private keys, They are the attribute public key and the attribute private key of the data accessor, Initialize the algorithm for the system, which is run by the SA to generate public parameters for the system, Initialize the algorithm for attribute authorization, which is run by the attribute authorization AA to generate the master public key and master private key for the system. It is a key generation algorithm, which is run by AA to generate a public-private key pair for the user. It is the attribute key generation algorithm, which is run by AA to generate attribute keys for users based on user attributes and identity information. The attribute key generation algorithm is shown in Table 2.
[0065]
[0066] (3) Data encryption. The data owner’s data is divided into a data plaintext set, denoted as . Select a symmetric key set . is the jth data plaintext, is the jth symmetric key. The symmetric key set contains The symmetric encryption key corresponding to each threshold node in the access policy structure is used for secret sharing. The data ciphertext is set to , Represents the jth data ciphertext.
[0067] (4) Key encryption. DO uses the LSSS algorithm to encrypt the symmetric key set. Perform attribute-based encryption to generate a key password set The specific encryption process of the LSSS algorithm is shown in Table 3.
[0068]
[0069] In Table 3, It is a ciphertext component designed for where e represents a bilinear map, g is a generator of the group G, is a random number, is a linear secret sharing matrix of l times n, is the system master public key, is the LSSS matrix The secret share, Mapping the kth row of matrix M to user attributes The random value picked. is a hash function, Mapping functions for accessing structure attributes, is a random number, A ciphertext component designed for verification.
[0070] (5) Data access. When DU wants to access data across chains, it first interacts with the intermediate chain and detects whether there is a partial order relationship between the service nodes of the two chains. If there is a partial order relationship, the ancestor node can decrypt the data. After completing the cross-chain request, DU sends its attribute key to the intermediate chain. Transmitted to the collaboration chain. The set of all attributes of DU is used The smart contract of the collaborative chain is a key password set Generate decryption token set When the attributes of the DU satisfy the entire access structure, the complete decryption token can be obtained. The attributes of the DU are determined based on the attribute private key of the user. Alternatively, when the attributes of the user only satisfy part of the structure, the decryption token corresponding to that part can be obtained. The user receives the data ciphertext from the business node , key password set and decryption token set DU receives decryption token set , using your own user key Decryption key password set , retrieve the symmetric key set All or part of the symmetric key set Decrypting data ciphertext , this process enables DU to recover all or part of the data .
[0071] In this step, a multi-chain structure is adopted, in which the collaborative chain acts as a bridge to connect any two chains (such as chain A and chain C), such as Figure 5 As shown. When interacting with data across chains, each chain must register its services on the collaborative chain. When cross-chain data communication is required, each chain initially registers as a service node on the collaborative chain. Subsequently, if chain A needs to communicate with chain C, the collaborative chain API (i.e., application data interface) of chain C is utilized. Check whether there is a partial order relationship between the two node ranks. If there is a partial order relationship, the ancestor node can decrypt the data on the descendant node's chain using its attribute private key. The ciphertext data is then sent back to chain A from chain C. In addition, collaborative chains can share information from all other chains. In , In the context of Represents a node of the blockchain, Indicates the ranking of each node. After completing the cross-chain request, DU will send its attribute key Transmitted to the collaboration chain. The set of all attributes of DU is used The smart contract of the collaborative chain is a key password set Generate decryption token set When the attributes of the DU satisfy the entire access structure, the complete symmetric key decryption token can be obtained. Alternatively, when the attributes satisfy only part of the structure, the symmetric key decryption token corresponding to that part can be obtained. The user receives the data password set from the business node. , key password set and decryption token set DU receives decryption token set , using your own user key Decryption key password set , retrieve the key set of the symmetric encryption algorithm All or part of the symmetric key set Decryption data password set , this process enables DU to recover all or part of the data The specific data decryption algorithm is shown in Table 4.
[0072]
[0073] The third step is experimental verification and security analysis. Establish a security model (indistinguishability) and achieve the security requirements in the design goals. Finally, through experiments and comparative analysis with other works, it is proved that the method provided in this embodiment of the present application has significant improvements in security and efficiency. Compared with other access control methods, the method provided in this application is experimentally analyzed from four aspects: AA initialization time, attribute key generation time, user encryption time, and user decryption time.
[0074] Based on the above description, compared with the prior art, the solution provided by this application implements hierarchical access control within the SynergyChain framework, and improves the security of key distribution during data sharing by integrating a distributed key generation algorithm. In addition, the access request mechanism in the smart contract is used to authenticate each requester, providing decentralized and reliable automatic access authorization. In addition, the access request mechanism adopts an identity-level connection method for each requester, providing decentralized and reliable automatic access authorization, ensuring the reliability of access control.
[0075] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data to be processed. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a cross-chain data sharing method is implemented.
[0076] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0077] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0078] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0079] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0080] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0081] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0082] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.
[0083] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0084] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A cross-chain data sharing method, characterized in that: The method implements hierarchical access control within the SynergyChain framework; the SynergyChain framework includes a collaborative chain and an authenticated consortium chain; The alliance chain is registered in the collaborative chain and completes identity authentication; The cross-chain data sharing method includes: Step 200: Initialize parameters using a distributed key generation algorithm to obtain public parameters; the public parameters include the private key of the attribute authorization center, the public key of the user, and the private key of the user; Step 201: Based on the public parameters, a system key generation algorithm is used to generate a system public key; Step 202: Generate the user's attribute private key using an attribute key generation algorithm based on the attribute authorization center's private key, the user's public key, the system's public key, and the user's attribute set; Step 203: Generate a data plaintext set based on the user data, and select a symmetric key set; the symmetric key set includes a plurality of symmetric encryption keys corresponding to threshold nodes in the access policy structure; Step 204: Encrypt the data plaintext set using the symmetric key set to obtain data ciphertext; Step 205: encrypt the symmetric key set using the LSSS algorithm to obtain a key password set; Step 206: When the user performs cross-chain data access, check whether there is a partial order relationship between two cross service nodes; the two cross service nodes are located on two cross chains; the two cross service nodes are an ancestor node and a descendant node; Step 207: If there is a partial order relationship, the information of the chain where the descendant node is located is directly decrypted through the chain where the ancestor node is located to achieve data transmission; Step 208: If there is no partial order relationship, the user's attribute private key, the key password set and the data ciphertext are transmitted to the collaborative chain; the smart contract of the collaborative chain generates a decryption token set for the key password set; Step 209: based on the matching degree between the attribute in the attribute private key of the user and the access structure, obtain the corresponding decryption token in the decryption token set; Step 210: Decrypt the corresponding decryption token in the obtained decryption token set using the user's private key to obtain a symmetric key; Step 211: Decrypt the data ciphertext using the symmetric key to achieve data sharing; The implementation process of step 200 to step 202 includes: Initialization parameters: Select two bilinear cyclic groups and , the order is a prime number p, and , hash function , For user collection, , the number of attribute authorization centers is , the threshold is ;q, All are random numbers; each attribute authorization center executes Generate your own public key and private key, and the attribute authorization center randomly selects As your own private key, calculate your own public key ; Each user generates a user private key and a user public key ; Each user randomly selects , As its private key, and calculate its public key ; Each attribute authorization center uses its own private key , the user's public key and a set of attributes Generate Public Key and the user's attribute private key The obtained system common parameters mainly include ; , , ; Respectively The public and private keys of the attribute authority, For each data accessor's public and private keys, They are the attribute public key and the attribute private key of the data accessor, Initialize the algorithm for the system and generate public parameters for the system; The attribute authorization initialization algorithm is run by the attribute authorization center to generate a master public key and a master private key for the system; The key generation algorithm is run by the attribute authority to generate a public and private key pair for the user; The attribute key generation algorithm is run by the attribute authorization center to generate attribute keys for users based on user attributes and identity information; The input of the attribute key generation algorithm is the attribute authority private key , user public key , attribute set and the system public key , the output is ; The implementation process of the attribute key generation algorithm is: Each Random attribute public key exist Select To generate its public key : ; User based on system public key Calculate and send attribute private key allocation request with user private key arrive : ; No. Attribute Authority Verify the user’s identity recorded on the blockchain; According to the user attribute private key component as well as Private key generation user attribute private key component And send to the user: ; The implementation process of step 205 includes: Key encryption: The data owner uses the LSSS algorithm to encrypt the symmetric key set. Perform attribute-based encryption to generate a key password set ; Among them, the input of the LSSS algorithm is a symmetric key set , access structure and the system public key , the output is the key ciphertext ; The encryption process of the LSSS algorithm is: User-based access structure Generate access matrix ,Will The kth row in The mapping to user attributes is denoted as ; exist Pick a random vector from , each key to be shared corresponds to a threshold node in the access control structure; ; calculate The secret share ,in ; Pick a random number , calculate the key The ciphertext ; ; in, It is a ciphertext component designed for Where e represents a bilinear map, g is the generator of the group G, is a linear secret sharing matrix of l times n, is the system master public key, is the LSSS matrix The secret share, Mapping the kth row of matrix M to user attributes The random value selected; is a hash function, Mapping functions for accessing structure attributes, is a random number, A ciphertext component designed for verification.
2. The cross-chain data sharing method according to claim 1, characterized in that: In the process of obtaining the corresponding decryption token in the decryption token set based on the matching degree between the attributes in the attribute private key of the user and the access structure, the matching degree is proportional to the number of decryption tokens obtained.
3. The cross-chain data sharing method according to claim 1, characterized in that: The application data interface on the collaborative chain is used to check whether there is a partial order relationship between two cross-service nodes.
4. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the cross-chain data sharing method according to any one of claims 1 to 3.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the cross-chain data sharing method described in any one of claims 1 to 3 is implemented.
6. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the cross-chain data sharing method described in any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Data cross-blockchain access control method and system in multi-blockchain scene, equipment and terminal
CN113364735A
Decryption outsourcing attribute encryption access method and system based on same sub-strategy
CN115603950A
Enabling Comparable Data Access Control for Lightweight Mobile Devices in Clouds
US20140289513A1
