Data cross-chain access method in relay chain environment

By selecting the decryption node based on the incoming and outgoing degree of the proxy node in the relay chain environment, and using user attributes and identity identification to generate a decryption key, the problems of high complexity of ciphertext data and insecure third-party decryption in cross-chain scenarios are solved, and fast and secure data decryption and user traceability are achieved.

CN120498740APending Publication Date: 2025-08-15NANJING UNIV OF INFORMATION SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510585807.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-08
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

In cross-chain scenarios, the embedding of ciphertext in the prior art in user attributes leads to high complexity of ciphertext data, difficulty in decryption, and insecure in decryption by entrusting third parties.

Method used

The proxy understanding node is determined based on the incoming and outgoing degree of each proxy node in the relay chain, the ciphertext is decrypted using the proxy understanding node, and the secondary ciphertext data is decrypted by the decryption key generated based on the user attributes and identity identification, and the leaked user is traced and revoked in combination with the pre-generated trace key and trace list.

Benefits of technology

It realizes secure and fast data decryption in cross-chain scenarios, reduces the overhead of decryption calculation for users, and ensures the security of data access through accurate traceability and revocation mechanisms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120498740A_ABST
    Figure CN120498740A_ABST
Patent Text Reader

Abstract

The invention discloses a data cross-chain access method in a relay chain environment, which belongs to the technical field of relay chains, and comprises the following steps: based on in-degree and out-degree of each agent node of a relay chain, determining an agent decryption node, and decrypting a ciphertext by using agent decryption to reduce the decryption calculation overhead of a user, so that the user can quickly obtain data, and the user experience is improved. According to the method, the security guarantee is provided for the proxy decryption process through the secondary ciphertext data which can be verified by the user, and finally, the decryption key generated based on the user attribute and the identity identifier is adopted to decrypt the secondary ciphertext data which can be verified by the user to obtain the plaintext data, so that the data can be safely and quickly decrypted in a cross-chain scene, and the user experience is improved. The problems of high ciphertext data complexity, difficult decryption and unsafe third-party decryption entrusting due to the fact that the user attribute is embedded into the ciphertext at present are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for cross-chain data access in a relay chain environment, and belongs to the technical field of relay chains. Background Art

[0002] Different users typically possess different attributes, which often determine whether they can own and access data. Das et al. proposed an ECC-based CP-ABE method to achieve fine-grained access control for data or resources. While this method eliminates the complex process of bilinear pairing computation and uses cloud service providers for proxy services, the reliability and correctness of the proxy service are not guaranteed, and security risks still exist. Ruan et al. proposed a privacy-aware and revocable fair outsourced decryption method for blockchains (CP-ABE). Although this method uses outsourced decryption, it relies solely on the blockchain to verify transaction records and ignores decryption verification, which poses security risks in the decryption process. Yu et al. proposed a post-quantum cross-blockchain data exchange method based on attribute encryption. Although this method addresses the scalability issues of blockchain access control based on CP-ABE, because CP-ABE implements access control based on attributes, the ciphertext becomes more complex when more attributes are included. In a cross-chain environment, users still face the problem of high decryption overhead without the help of a third party. From the problems exposed by the above methods, it can be seen that the current access control mechanism based on the combination of CP-ABE and cross-chain scenarios still has shortcomings and often requires third-party assistance. However, relying on third-party decryption also poses certain security risks because the third-party decryption process is usually invisible to users and cannot be verified. Summary of the Invention

[0003] The purpose of the present invention is to overcome the shortcomings of the existing technology and provide a cross-chain data access method in a relay chain environment, which can safely and quickly decrypt data in a cross-chain scenario, and solve the current problem that embedding user attributes into ciphertext makes the ciphertext data complex, decryption difficult, and entrusting third parties to decrypt is unsafe.

[0004] In order to solve the above technical problems, the present invention is implemented by adopting the following technical solutions: The present invention provides a method for cross-chain data access in a relay chain environment, comprising: Obtain the first-level ciphertext data corresponding to the encrypted plaintext data; Determine the proxy decryption node based on the in-degree and out-degree of each proxy node in the relay chain; Use the proxy decryption node to decrypt the first-level ciphertext data to obtain the second-level ciphertext data that can be verified by the user; The decryption key generated based on user attributes and identity is used to decrypt the secondary ciphertext data that can be verified by the user to obtain the plaintext data.

[0005] Furthermore, the encryption of the encrypted plaintext data includes: Public parameters are established based on a finite field, where the public parameters are expressed as: ; in: Indicates public parameters; Represents a prime order of p finite fields of ; It means that it is defined in a finite field An elliptic curve on Respectively E Two different points on L Represents a set of user attributes, , Represents a set of attributes L The number of attributes in For the first i attributes Select random numbers respectively 、 , Indicates that the modulus is a prime number p finite field, represents a positive value of the attribute, To indicate a negative value for an attribute, use Indicates two possible values of an attribute; represents a collision hash function, 、 、 , Indicates G for E The cyclic group generated by the basis points of represents the set of all binary strings of arbitrary length, represents the cyclic group of points on the elliptic curve after removing the identity element, Represents a function mapping; Based on the public parameters, generate the decryption key and identity key corresponding to the user; Encrypt plaintext data based on the OBDD access structure, public parameters, decryption key and identity key.

[0006] Furthermore, the encrypting of plaintext data based on the OBDD access structure, public parameters, decryption key and identity key includes: Calculate the ciphertext component based on the public parameters, decryption key and identity key; The ciphertext component includes a fixed ciphertext component and a dynamic ciphertext component; The ciphertext components are calculated as follows: ; , ; ; in: 、 Represents a fixed ciphertext component, Indicates that the path in the OBDD access structure is Dynamic ciphertext component, R Represents a valid path in the OBDD access structure; , z represents a random number, represents the blinding factor; Represents the user's identity key, represents the exclusive OR operation, represents a hash function that maps from a cyclic group to a bit string of 0s and 1s, M Represents plaintext data; The OBDD access structure and each ciphertext component are combined and encrypted to obtain the first-level ciphertext data; The first-level ciphertext data is represented as: ; in: Indicates the first-level ciphertext data, Represents the OBDD access structure, Indicates fixed ciphertext data, Indicates that the path in the OBDD access structure is Dynamic ciphertext data.

[0007] Furthermore, determining the proxy decryption node based on the in-degree and out-degree of each proxy node in the relay chain includes: The following formula is used to calculate the PageRank value: ; in: Indicates the i Agent nodes of PageRank value; represents the time probability function, Indicates the time when the proxy node joins the relay chain. d represents the damping factor; Indicates the i Agent nodes is the node set of the transaction recipient, Indicates the j Agent nodes A collection of nodes that initiates the transaction; Indicates the j Agent nodes of PageRank value; Indicates the total number of proxy nodes; Select PageRank The proxy node whose value meets the preset value serves as the proxy decryption node.

[0008] Furthermore, the use of a proxy decryption node to decrypt the first-level ciphertext data to obtain the second-level ciphertext data that can be verified by the user includes: Calculate the proxy key based on the decryption key and the public parameters; The proxy key is calculated as follows: ; in: represents the proxy key, Represents the decryption key; Decrypt the first-level ciphertext data based on the proxy key, public parameters and dynamic ciphertext to obtain the second-level ciphertext data; The first-level ciphertext data is decrypted using the following formula: ; in: Represents secondary ciphertext data, Represents a proxy key.

[0009] Furthermore, the decryption key generated based on the user attributes and identity identifier is used to decrypt the secondary ciphertext data that can be verified by the user to obtain the plaintext data, including: Based on the proxy key and the secondary ciphertext data, the proxy key commitment and the secondary ciphertext commitment are calculated respectively; Verify the proxy key commitment and the secondary ciphertext commitment. If the verification passes, the secondary ciphertext data is also verified. The decryption key is used to decrypt the verified secondary ciphertext data to obtain the plaintext data.

[0010] Furthermore, the verification of the proxy key commitment and the secondary ciphertext commitment includes: If the following equation holds, the proxy key commitment verification passes: ; in: represents the intermediate commitment point, , Represents two random numbers, ; represents the proxy key commitment value, Based on zero-knowledge Pedersen Commitment generation, , , Represents a random number; represents a secure hash function generated by a random oracle; represents the first part of random responses, ; represents the second part of random responses, ; Calculate the first and second-level ciphertext commitments corresponding to the second-level ciphertext decrypted by the decryption proxy node and the second and second-level ciphertext commitments corresponding to the second-level ciphertext received by the user; The first and second level ciphertext commitments are calculated using the following formula: ; in: Indicates the first and second level ciphertext commitment, Indicates the secondary ciphertext decrypted by the decryption proxy node; represents a random number, ; The second level ciphertext commitment is calculated by the following formula: ; in: Represents the second level ciphertext commitment, Indicates the secondary ciphertext received by the user; If the first and second level ciphertext commitments are the same as the second level ciphertext commitments, then the second level ciphertext commitment verification is successful. .

[0011] Furthermore, if the decryption key is leaked, the leaking user can be traced based on the pre-generated tracing key and tracing list; The generation of the pre-generated traceability key includes: Based on the decryption key and identity key, generate the traceability key corresponding to the user: ; represents the traceability key, represents the identity key, , represents a hash function that maps a bit string consisting of 0s and 1s to a cyclic group, Indicates the user's identity. Represents the decryption key; The generation of pre-generated traceability lists includes: Based on each user's identity, Store in the form of , generate a traceability list corresponding to each user; A hash function that maps from a cyclic group to a bit string of 0s and 1s; Revoke the leaked user and replace the leaked decryption key and secondary ciphertext data.

[0012] Furthermore, the tracing back of the leaking user based on the pre-generated tracing key and tracing list includes: By tracing the key, the tracing factor is calculated; The following formula is used to calculate the retrospective factor: ; in: represents the traceability factor; According to the tracing factor, the leaking user associated with the leaked decryption key in the tracing list is determined.

[0013] Furthermore, the revocation of the leaked user and replacement of the leaked decryption key and secondary ciphertext data include: Delete the binary corresponding to the leaked user from the traceability list to complete the revocation of the leaked user; For users who have not been revoked: Use the following formula to replace the leaked decryption key: ; in: Indicates the replaced decryption key, Indicates the i The value of each attribute, Indicates revoking a key. , k i * Indicates the i A newly selected attribute value; Use the following formula to replace the secondary ciphertext data: ; in: Indicates the secondary ciphertext data after replacement; Indicates that the path in the replaced OBDD access structure is Dynamic ciphertext component; ; Indicates that the path in the OBDD access structure is Dynamic ciphertext component, represents the identity key, , z represents a random number, represents the blinding factor; Represents the replaced proxy key, .

[0014] Compared with the prior art, the present invention has the following beneficial effects: 1. The present invention determines the proxy decryption node based on the in-degree and out-degree of each proxy node in the relay chain, and uses proxy decryption to decrypt the ciphertext to reduce the user's decryption computational overhead, facilitating users to quickly obtain data. The secondary ciphertext data that can be verified by the user is used to provide security for the proxy decryption process. Finally, the decryption key generated based on the user's attributes and identity is used to decrypt the secondary ciphertext data that can be verified by the user to obtain the plaintext data. This method can decrypt data securely and quickly in cross-chain scenarios, solving the current problem of embedding user attributes in ciphertext, which makes the ciphertext data complex, difficult to decrypt, and unsafe to entrust third-party decryption.

[0015] 2. The present invention uses pre-generated tracing keys and tracing lists to accurately trace the leaking users, directly delete the leaking users from the tracing list, and at the same time achieve indirect revocation by replacing ciphertext and keys, ensuring that malicious users cannot access the data again. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 This is a flowchart of a method for cross-chain data access in a relay chain environment provided by an embodiment of the present invention; Figure 2 This is a flowchart of decrypting secondary ciphertext data that can be verified by a user, provided by an embodiment of the present invention; Figure 3 1. This is a schematic diagram comparing the key generation time between the method proposed in the embodiment of the present invention and the existing method; Figure 4 This is a schematic diagram comparing encryption time between the method proposed in the embodiment of the present invention and the existing method; Figure 5 This is a schematic diagram comparing the proxy decryption time between the method proposed in the embodiment of the present invention and the existing method; Figure 6 This is a schematic diagram comparing the user decryption time between the method proposed in the embodiment of the present invention and the existing method. DETAILED DESCRIPTION

[0017] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and are not intended to limit the scope of protection of the present invention. Example

[0018] like Figure 1 As shown, a method for cross-chain data access in a relay chain environment includes: Get the first-level ciphertext data corresponding to the encrypted plaintext data, specifically: Encryption of plaintext data includes: Public parameters are established based on a finite field, where the public parameters are expressed as: ; in: Indicates public parameters; Represents a prime order of p finite fields of ; It means that it is defined in a finite field An elliptic curve on Respectively E Two different points on L Represents a set of user attributes, , Represents a set of attributes L The number of attributes in For the first i attributes Select random numbers respectively 、 , Indicates that the modulus is a prime number p finite field, Represents a positive value for the attribute, To indicate a negative value for an attribute, use Indicates two possible values of an attribute; represents a collision hash function, 、 、 , Indicates G for E The cyclic group generated by the basis points of is the generator; represents the set of all binary strings of arbitrary length, represents the cyclic group of points on the elliptic curve after removing the identity element, Represents a function mapping; The user requests to obtain the corresponding key for access control. The user requesting access has a unique user identity. Based on the public parameters and user identity, the decryption key and identity key corresponding to the user are generated; The decryption key is expressed as and , Indicates the j Attribute value; The identity key is represented as , represents a hash function that maps a bit string consisting of 0s and 1s to a cyclic group, Indicates user identity; Encrypt plaintext data based on the OBDD access structure, public parameters, decryption keys, and identity keys, including: The OBDD access structure is represented as: , ; ; represents the set of non-terminal node numbers, Indicates the i attributes The number in the OBDD variable sequence is i , Indicates that the branch is 1, Indicates that the branch is 0, let the root node be root , then the effective path is defined as the path from the root node of the access structure tree to the terminal node with branch 1. If the number of effective paths in the OBDD access structure is N , then the valid path in the OBDD access structure is expressed as , ; Calculate the ciphertext component based on the public parameters, decryption key and identity key; The ciphertext component includes a fixed ciphertext component and a dynamic ciphertext component; The ciphertext components are calculated as follows: ; , ; ; in: 、 Represents a fixed ciphertext component, Indicates that the path in the OBDD access structure is Dynamic ciphertext component; , z represents a random number, represents the blinding factor; Represents the user's identity key, represents the exclusive OR operation, represents a hash function that maps from a cyclic group to a bit string of 0s and 1s, M Represents plaintext data; The OBDD access structure and each ciphertext component are combined and encrypted to obtain the first-level ciphertext data; The first-level ciphertext data is represented as: ; in: Indicates the first-level ciphertext data, Represents the OBDD access structure, Indicates fixed ciphertext data, Indicates that the path in the OBDD access structure is Dynamic ciphertext data.

[0019] Based on the in-degree and out-degree of each proxy node in the relay chain, the proxy decryption node is determined. Specifically: The following formula is used to calculate the PageRank value: ; in: Indicates the i Agent nodes of PageRank value; represents the time probability function, Indicates the time when the proxy node joins the relay chain. d represents the damping factor; Indicates the i Agent nodes is the node set of the transaction recipient, Indicates the j Agent nodes A collection of nodes that initiates the transaction; Indicates the j Agent nodes of PageRank value; Indicates the total number of proxy nodes; Select PageRank The proxy node whose value meets the preset value serves as the proxy decryption node.

[0020] Use the proxy decryption node to decrypt the first-level ciphertext data to obtain the second-level ciphertext data that can be verified by the user. Specifically: Calculate the proxy key based on the decryption key and the public parameters; The proxy key is calculated as follows: ; in: represents the proxy key; Decrypt the first-level ciphertext data based on the proxy key, public parameters and dynamic ciphertext to obtain the second-level ciphertext data; The first-level ciphertext data is decrypted using the following formula: ; in: Indicates the secondary ciphertext decrypted by the decryption proxy node.

[0021] like Figure 2 As shown, the decryption key generated based on user attributes and identity is used to decrypt the secondary ciphertext data that can be verified by the user to obtain the plaintext data. Specifically: Based on the proxy key and the secondary ciphertext data, the proxy key commitment and the secondary ciphertext commitment are calculated respectively; Verify the proxy key commitment and the secondary ciphertext commitment. If the verification passes, the secondary ciphertext data is also verified, including: If the following equation holds, the proxy key commitment verification passes: ; in: represents the intermediate commitment point, , Represents two random numbers, ; represents the proxy key commitment value, Based on zero-knowledge Pedersen Commitment generation, , , Represents a random number; represents a secure hash function generated by a random oracle; represents the first part of random responses, ; represents the second part of random responses, ; Calculate the first and second-level ciphertext commitments corresponding to the second-level ciphertext decrypted by the decryption proxy node and the second and second-level ciphertext commitments corresponding to the second-level ciphertext received by the user; The first and second level ciphertext commitments are calculated using the following formula: ; in: Indicates the first and second level ciphertext commitment; represents a random number, ; The second level ciphertext commitment is calculated by the following formula: ; in: Represents the second level ciphertext commitment, Indicates the secondary ciphertext received by the user; If the first and second level ciphertext commitments are the same as the second level ciphertext commitments, then the second level ciphertext commitment verification is successful. ; Decrypt the verified secondary ciphertext data using the decryption key to obtain the plaintext data; Decrypt the verified secondary ciphertext data using the following formula:

[0022]

[0023] =

[0024] = .

[0025] Example 2 like Figure 1 As shown, a method for cross-chain data access in a relay chain environment includes: Get the first-level ciphertext data corresponding to the encrypted plaintext data, specifically: Encryption of plaintext data includes: Public parameters are established based on a finite field, where the public parameters are expressed as: ; in: Indicates public parameters; Represents a prime order of p finite fields of ; It means that it is defined in a finite field An elliptic curve on Respectively E Two different points on L Represents a set of user attributes, , Represents a set of attributes L The number of attributes in For the first i attributes Select random numbers respectively 、 , Indicates that the modulus is a prime number p finite field, Represents a positive value for the attribute, To indicate a negative value for an attribute, use Indicates two possible values of an attribute; represents a collision hash function, 、 、 , Indicates G for E The cyclic group generated by the basis points of is the generator; represents the set of all binary strings of arbitrary length, represents the cyclic group of points on the elliptic curve after removing the identity element, Represents a function mapping; The user requests to obtain the corresponding key for access control. The user requesting access has a unique user identity. Based on the public parameters and user identity, the decryption key and identity key corresponding to the user are generated; The decryption key is represented as and , Indicates the j The value of an attribute; The identity key is represented as , represents a hash function that maps a bit string consisting of 0s and 1s to a cyclic group, Indicates user identity; Encrypt plaintext data based on the OBDD access structure, public parameters, decryption keys, and identity keys, including: The OBDD access structure is represented as: , ; ; represents the set of non-terminal node numbers, Indicates the i attributes The number in the OBDD variable sequence is i , Indicates that the branch is 1, Indicates that the branch is 0, let the root node be root , then the effective path is defined as the path from the root node of the access structure tree to the terminal node with branch 1. If the number of effective paths in the OBDD access structure is N , then the valid path in the OBDD access structure is expressed as R , ; Calculate the ciphertext component based on the public parameters, decryption key and identity key; The ciphertext component includes a fixed ciphertext component and a dynamic ciphertext component; The ciphertext components are calculated as follows: ; , ; ; in: 、 Represents a fixed ciphertext component, Indicates that the path in the OBDD access structure is Dynamic ciphertext component; , z represents a random number, represents the blinding factor; Represents the user's identity key, represents the exclusive OR operation, represents a hash function that maps from a cyclic group to a bit string of 0s and 1s, M Represents plaintext data; The OBDD access structure and each ciphertext component are combined and encrypted to obtain the first-level ciphertext data; The first-level ciphertext data is represented as: ; in: Indicates the first-level ciphertext data, Represents the OBDD access structure, Indicates fixed ciphertext data, Indicates that the path in the OBDD access structure is Dynamic ciphertext data.

[0026] Based on the in-degree and out-degree of each proxy node in the relay chain, the proxy decryption node is determined. Specifically: The following formula is used to calculate the PageRank value: ; in: Indicates the i Agent nodes of PageRank value; represents the time probability function, represents the time when the proxy node joins the relay chain, and d represents the damping factor; Indicates the i Agent nodes is the node set of the transaction recipient, Indicates the j Agent nodes A collection of nodes that initiates the transaction; Indicates the j Agent nodes of PageRank value; Indicates the total number of proxy nodes; Select PageRank The proxy node whose value meets the preset value serves as the proxy decryption node.

[0027] Use the proxy decryption node to decrypt the first-level ciphertext data to obtain the second-level ciphertext data that can be verified by the user. Specifically: Calculate the proxy key based on the decryption key and the public parameters; The proxy key is calculated as follows: ; in: represents the proxy key; Decrypt the first-level ciphertext data based on the proxy key, public parameters and dynamic ciphertext to obtain the second-level ciphertext data; The first-level ciphertext data is decrypted using the following formula: ; in: Indicates the secondary ciphertext decrypted by the decryption proxy node.

[0028] like Figure 2 As shown, the decryption key generated based on user attributes and identity is used to decrypt the secondary ciphertext data that can be verified by the user to obtain the plaintext data. Specifically: Based on the proxy key and the secondary ciphertext data, the proxy key commitment and the secondary ciphertext commitment are calculated respectively; Verify the proxy key commitment and the secondary ciphertext commitment. If the verification passes, the secondary ciphertext data is also verified, including: If the following equation holds, the proxy key commitment verification passes: ; in: represents the intermediate commitment point, , Represents two random numbers, ; represents the proxy key commitment value, Based on zero-knowledge Pedersen Commitment generation, , , Represents a random number; represents a secure hash function generated by a random oracle; represents the first part of random responses, ; represents the second part of random responses, ; Calculate the first and second-level ciphertext commitments corresponding to the second-level ciphertext decrypted by the decryption proxy node and the second and second-level ciphertext commitments corresponding to the second-level ciphertext received by the user; The first and second level ciphertext commitments are calculated using the following formula: ; in: Indicates the first and second level ciphertext commitment; represents a random number, ; The second level ciphertext commitment is calculated by the following formula: ; in: Represents the second level ciphertext commitment, Indicates the secondary ciphertext received by the user; If the first and second level ciphertext commitments are the same as the second level ciphertext commitments, then the second level ciphertext commitment verification is successful. ; Decrypt the verified secondary ciphertext data using the decryption key to obtain the plaintext data; Decrypt the verified secondary ciphertext data using the following formula:

[0029]

[0030] =

[0031] = .

[0032] If the decryption key is leaked, the leaking user will be traced based on the pre-generated tracing key and tracing list; The generation of the pre-generated traceability key includes: Based on the decryption key and identity key, generate the traceability key corresponding to the user: ; represents a traceability key; The generation of pre-generated traceability lists includes: Based on each user's identity, Store in the form of , generate a traceability list corresponding to each user; By tracing the key, the tracing factor is calculated; The following formula is used to calculate the retrospective factor: ; in: represents the traceability factor; According to the traceability factor, determine the leaking user associated with the leaked decryption key in the traceability list; Revoke the user who leaked the information and replace the leaked decryption key and secondary ciphertext data, including: Delete the binary corresponding to the leaked user from the traceability list to complete the revocation of the leaked user; For users who have not been revoked: Use the following formula to replace the leaked decryption key: ; Indicates the replaced decryption key, Indicates the i The value of each attribute, Indicates revoking a key. , k i * Indicates the i A newly selected attribute value; Use the following formula to replace the secondary ciphertext data: ; Indicates the secondary ciphertext data after replacement; Indicates that the path in the replaced OBDD access structure is Dynamic ciphertext component; ; Indicates any Not , Indicates any belong ; Represents the replaced proxy key, .

[0033] Select t polynomials, where i The polynomial is expressed as: , ; represents a polynomial, represents the number of polynomials, represents the degree of the polynomial, represents the highest degree term in a polynomial, x represents the independent variable of the polynomial; is a randomly selected integer; Based on the public parameters and polynomial, calculate the Chameleon hash public and private keys: The Chameleon hash public key is represented as: , Indicates the j A constant term of a polynomial; A Chameleon hashed private key is represented as: ; The target chain receives C 2 is the data transaction, which will be verified and packaged on the chain and stored in the block of the target chain. C 2, let its block header information be recorded as m , select a random number ,make , then the chameleon hash value ; represents the Chameleon hash function; c Indicates the random factor used to calculate the Chameleon hash value; make Represents the ciphertext in the block C 2 is replaced with new ciphertext data The block header information generated after the chameleon hash public key has been made public, and each user who has not been revoked has a share of the chameleon hash private key, then the i The share of Chameleon hash private key owned by a user is expressed as: ; Indicates the j The polynomial i A user-generated private key component; Any user on the target chain who has not been revoked needs to initiate a ciphertext modification request. After the request is verified by other users on the chain, each user recalculates a new random number share.i Users based on Calculate the new random number share as ,but ; Since each user gets a partial private key and random number, no user can independently calculate the new Chameleon Hash before modification, thus achieving decentralization. t Users completed t After the random number shares are calculated, they can be combined to get a new complete random number ; Because according to t Private key shares Can be recovered ,therefore ; According to the new random number A new Chameleon hash can be calculated ; ; That is, the new random number can successfully find a valid hash collision to make the block hash the same. Anyone can verify the correctness of the collision and use the new secondary ciphertext Replace the previous record on the target chain C 2.

[0034] In order to verify the effectiveness of the method proposed in this example, four existing methods were selected for comparative experiments: LACMMAA: This solution combines ECC and CP-ABE to propose a lightweight, fine-grained access control model suitable for blockchain and cross-chain scenarios. It uses the LSSS matrix as the access structure and provides a user assistant as an outsourced decryption method. SDAC-BBPP: This solution proposes a cross-chain CP-ABE access control model based on a dual-chain architecture. It uses the LSSS matrix as the access structure and uses cloud service providers for data pre-decryption. This solution protects user privacy and hides access policies. PRE-CPABE: This scheme proposes a blockchain-based fair outsourced decryption and revocable CP-ABE method in the context of the metaverse. Using the LSSS matrix as the access structure, this method records outsourced decryption via blockchain nodes and enables direct revocation of user ciphertext via the cloud service provider. SEBACSAU: This solution proposes a blockchain-based CP-ABE access control model with attribute updates, using LSSS as the access structure. This solution outsources user decryption to the cloud service provider and enables direct revocation via attribute updates. The experiment was conducted based on FISCO BCOS (version v2.9.0) and PyCharm. We integrated the cross-chain routing provided by WeCross into FISCO BCOS to perform operations such as monitoring, collection, and forwarding of cross-chain services. The FISCO BCOS blockchain is deployed on a 12th Gen Intel(R) Core(TM) i7-12700H@2.30 GHz CPU, using Ubuntu 22.04 as the operating system. Use Docker (version 24.0.5) and Docker-compose (version 1.24.7) to build and manage virtual machine environments; The experimental dataset comes from XBlock, a platform that contains massive transaction data from blockchains such as Bitcoin and Ethereum. We selected a portion of Ethereum's on-chain transaction records from February to August 2024 on the XBlock platform as the dataset. The transaction records in the dataset were used as the basis for calculating the proxy node's PR value. By selecting a curve on a 512-bit finite field and generating a 160-bit cyclic group to meet 80-bit security, the random large integers selected for each operation are all 160 bits; In the experiment, the number of attributes used for comparison was set to 5, 10, 15, 20, 25, and 30 respectively. The number of proxy nodes on the relay chain was set to 50. The experimental results were taken as the average of 20 rounds of experiments. The time overhead of key generation, encryption, proxy decryption, and decryption is compared with other methods through experiments in four aspects: like Figure 3 As shown in the figure, as the number of attributes gradually increases, the corresponding key generation time also increases. However, the overall time of the CP-ABE method proposed in this embodiment is kept at the lowest. This is because the method proposed in this embodiment maps attributes to values, and the key calculation overhead generated by the attribute value operation is smaller. When the number of attributes increases to 30, the time overhead is about 303ms. Among the compared methods, SDAC-BDPP has the largest time overhead, about 623ms. like Figure 4 As shown in the figure, the method proposed in this embodiment still has advantages in encryption. The other four methods use the LSSS matrix as the access structure for encryption, while the method proposed in this embodiment designs the OBDD access structure for encryption, which can avoid certain repeated operations in the encryption process. like Figure 5As shown in the figure, although the proxy decryption overhead of the method proposed in this embodiment increases with the number of attributes, the overall increase trend is minimal, and when the number of attributes is 30, it is only about 71ms, which is better than all the comparison methods. This is because the proxy nodes selected by the PageRank algorithm designed by the method proposed in this embodiment are more trustworthy and have stronger computing power. In addition, the access structure based on OBDD maps attributes to values, which can further reduce the proxy decryption overhead. like Figure 6 As shown in the figure, PRE-CPABE shows a trend of continuous growth and has the largest overall decryption time overhead, while the user decryption time of the other three comparison methods and the method proposed in this embodiment remains stable as the number of attributes increases; the decryption overhead of the method proposed in this embodiment remains in the range of 15-20ms. This is because the proxy decryption has completed some computationally intensive tasks in the decryption process, so the user only needs to spend a small computational overhead to decrypt and obtain the plaintext.

[0035] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage CD-ROMs, optical storage, etc.) containing computer-usable program code.

[0036] The present application is described with reference to the flowcharts of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process in the flowchart can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 a process or multiple processes or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0037] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A function specified in a process or multiple processes.

[0038] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1The steps of a specified function in a process or multiple processes.

[0039] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims, which are all protected by the present invention.

Claims

1. A method for cross-chain data access in a relay chain environment, characterized in that: include: Obtain the first-level ciphertext data corresponding to the encrypted plaintext data; Determine the proxy decryption node based on the in-degree and out-degree of each proxy node in the relay chain; Use the proxy decryption node to decrypt the first-level ciphertext data to obtain the second-level ciphertext data that can be verified by the user; The decryption key generated based on user attributes and identity is used to decrypt the secondary ciphertext data that can be verified by the user to obtain the plaintext data.

2. The method for cross-chain data access under the relay chain environment according to claim 1 is characterized in that: The encryption of the encrypted plaintext data includes: Public parameters are established based on a finite field, where the public parameters are expressed as: ; in: Indicates public parameters; Represents a prime order of p finite fields of ; It means that it is defined in a finite field An elliptic curve on Respectively E Two different points on L Represents a set of user attributes, , Represents a set of attributes L The number of attributes in For the first i attributes Select random numbers respectively 、 , Indicates that the modulus is a prime number p finite field, Represents a positive value for the attribute, To indicate a negative value for an attribute, use Indicates two possible values of an attribute; represents a collision hash function, 、 、 , Indicates G for E The cyclic group generated by the basis points of represents the set of all binary strings of arbitrary length, represents the cyclic group of points on the elliptic curve after removing the identity element, Represents a function mapping; Based on the public parameters, generate the decryption key and identity key corresponding to the user; Encrypt plaintext data based on the OBDD access structure, public parameters, decryption key and identity key.

3. The method for cross-chain data access under the relay chain environment according to claim 2 is characterized in that: The method of encrypting plaintext data based on the OBDD access structure, public parameters, decryption key, and identity key includes: Calculate the ciphertext component based on the public parameters, decryption key and identity key; The ciphertext component includes a fixed ciphertext component and a dynamic ciphertext component; The ciphertext components are calculated as follows: ; , ; ; in: 、 Represents a fixed ciphertext component, Indicates that the path in the OBDD access structure is Dynamic ciphertext component, R Represents a valid path in the OBDD access structure; , z represents a random number, represents the blinding factor; Represents the user's identity key, represents the exclusive OR operation, represents a hash function that maps from a cyclic group to a bit string of 0s and 1s, M Represents plaintext data; The OBDD access structure and each ciphertext component are combined and encrypted to obtain the first-level ciphertext data; The first-level ciphertext data is represented as: ; in: Indicates the first-level ciphertext data, Represents the OBDD access structure, Indicates fixed ciphertext data, Indicates that the path in the OBDD access structure is Dynamic ciphertext data.

4. The method for cross-chain data access under the relay chain environment according to claim 2 is characterized in that: Determining the proxy decryption node based on the in-degree and out-degree of each proxy node in the relay chain includes: The following formula is used to calculate the PageRank value: ; in: Indicates the i Agent nodes of PageRank value; represents the time probability function, Indicates the time when the proxy node joins the relay chain. d represents the damping factor; Indicates the i Agent nodes is the node set of the transaction recipient, Indicates the j Agent nodes A collection of nodes that initiates the transaction; Indicates the j Agent nodes of PageRank value; Indicates the total number of proxy nodes; Select PageRank The proxy node whose value meets the preset value serves as the proxy decryption node.

5. The method for cross-chain data access under the relay chain environment according to claim 3 is characterized in that: The method of using a proxy decryption node to decrypt the first-level ciphertext data to obtain the second-level ciphertext data that can be verified by the user includes: Calculate the proxy key based on the decryption key and the public parameters; The proxy key is calculated as follows: ; in: represents the proxy key, Represents the decryption key; Decrypt the first-level ciphertext data based on the proxy key, public parameters and dynamic ciphertext to obtain the second-level ciphertext data; The first-level ciphertext data is decrypted using the following formula: ; in: Represents secondary ciphertext data, Represents a proxy key.

6. The method for cross-chain data access under the relay chain environment according to claim 5 is characterized in that: The decryption key generated based on the user attributes and identity identifier is used to decrypt the secondary ciphertext data that can be verified by the user to obtain the plaintext data, including: Based on the proxy key and the secondary ciphertext data, the proxy key commitment and the secondary ciphertext commitment are calculated respectively; Verify the proxy key commitment and the secondary ciphertext commitment. If the verification passes, the secondary ciphertext data is also verified. The decryption key is used to decrypt the verified secondary ciphertext data to obtain the plaintext data.

7. The method for cross-chain data access under the relay chain environment according to claim 6 is characterized in that: The verification proxy key commitment and secondary ciphertext commitment include: If the following equation holds, the proxy key commitment verification passes: ; in: represents the intermediate commitment point, , Represents two random numbers, ; represents the proxy key commitment value, Based on zero-knowledge Pedersen Commitment generation, , , Represents a random number; represents a secure hash function generated by a random oracle; represents the first part of random responses, ; represents the second part of random responses, ; Calculate the first and second-level ciphertext commitments corresponding to the second-level ciphertext decrypted by the decryption proxy node and the second and second-level ciphertext commitments corresponding to the second-level ciphertext received by the user; The first and second level ciphertext commitments are calculated using the following formula: ; in: Indicates the first and second level ciphertext commitment, Indicates the secondary ciphertext decrypted by the decryption proxy node; represents a random number, ; The second level ciphertext commitment is calculated by the following formula: ; in: Represents the second level ciphertext commitment, Indicates the secondary ciphertext received by the user; If the first and second level ciphertext commitments are the same as the second level ciphertext commitments, then the second level ciphertext commitment verification is successful. .

8. The method for cross-chain data access under the relay chain environment according to claim 2 is characterized in that: If the decryption key is leaked, the leaking user will be traced based on the pre-generated tracing key and tracing list; The generation of the pre-generated traceability key includes: Based on the decryption key and identity key, generate the traceability key corresponding to the user: ; represents the traceability key, represents the identity key, , represents a hash function that maps a bit string consisting of 0s and 1s to a cyclic group, Indicates the user's identity. Represents the decryption key; The generation of pre-generated traceability lists includes: Based on each user's identity, Store in the form of , generate a traceability list corresponding to each user; A hash function that maps from a cyclic group to a bit string of 0s and 1s; Revoke the leaked user and replace the leaked decryption key and secondary ciphertext data.

9. The method for cross-chain data access under the relay chain environment according to claim 8 is characterized in that: The tracing back of the leaking user based on the pre-generated tracing key and tracing list includes: By tracing the key, the tracing factor is calculated; The following formula is used to calculate the retrospective factor: ; in: represents the traceability factor; According to the tracing factor, the leaking user associated with the leaked decryption key in the tracing list is determined.

10. The method for cross-chain data access under the relay chain environment according to claim 8, characterized in that: The revocation process for the leaked user and the replacement of the leaked decryption key and secondary ciphertext data include: Delete the binary corresponding to the leaked user from the traceability list to complete the revocation of the leaked user; For users who have not been revoked: Use the following formula to replace the leaked decryption key: ; in: Indicates the replaced decryption key, Indicates the i The value of each attribute, Indicates revoking a key. , k i * Indicates the i A newly selected attribute value; Use the following formula to replace the secondary ciphertext data: ; in: Indicates the secondary ciphertext data after replacement; Indicates that the path in the replaced OBDD access structure is Dynamic ciphertext component; ; Indicates that the path in the OBDD access structure is Dynamic ciphertext component, represents the identity key, , z represents a random number, represents the blinding factor; Represents the replaced proxy key, .