A cross-chain method based on national secret algorithm
By adopting a cross-chain method based on the Guoxin algorithm in the blockchain network, a multi-party computing cross-chain group network and a multi-party security computing model is constructed, and the security risks and compatibility issues of cross-chain data interaction between blockchain networks are solved. , realizes decentralized and secure cross-chain data interaction.
Patent Information
- Application Number
- CN202410599201.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2025-02-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Cross-chain data interactions between existing blockchain networks have security risks and incompatibility of key accounts, especially in multi-party computing cross-chain solutions using non-national crypto encryption algorithms.
Using a cross-chain method based on the national secret algorithm, by building a multi-party computing cross-chain group network, each node distributes its identity information and homomorphic encryption information of the national secret private key, builds a multi-party security computing model, and obtains public public key information. , and establish cross-chain accounts on the source blockchain and the target blockchain to realize decentralized cross-chain data interaction.
It realizes secure and compatible cross-chain data interaction between blockchains, avoids the credibility requirements of the middle party, is completely decentralized, and simplifies the interaction method between various blockchains.
Smart Images

Figure CN118396623B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and more specifically, to a cross-chain method based on a national secret algorithm. Background Art
[0002] Blockchain technology is a distributed ledger technology that was originally used to support the cryptocurrency system of Bitcoin. Its core concept is to link transaction records together in the form of blocks to form an immutable distributed database. The essential characteristics of blockchain are decentralization and distributed storage, which can achieve trusted transactions and information transmission without trusting a third party. However, the current mainstream blockchain networks (such as Bitcoin and Ethereum) are independent of each other, and each network has its own rules and protocols. This has led to barriers between different blockchain networks, making it impossible to achieve cross-chain interaction and value transmission.
[0003] The closed nature of existing blockchain networks is also one of the backgrounds for the development of cross-chain technology. Since the security and stability requirements of blockchain networks are very high, network upgrades and improvements often require long-term testing and verification to ensure that there are no loopholes and security risks. This makes it difficult to quickly upgrade and update the protocols and functions of different blockchain networks, limiting the development of cross-chain technology.
[0004] In order to solve these problems, cross-chain technology came into being. Cross-chain technology aims to achieve interoperability between different blockchain networks, allowing users to freely transfer and exchange value on different blockchain networks. Cross-chain technology can achieve the connection and interaction between different blockchain networks by establishing cross-chain protocols and cross-chain bridges. The cross-chain protocol defines the communication rules and protocols between different blockchains, while the cross-chain bridge is the middle layer that realizes the value transfer between different blockchains.
[0005] In the prior art, there are two main ways of data interaction between two blockchains: centralized and decentralized. Centralized exchanges are a common centralized cross-chain method. This method has a big disadvantage, which is that exchanges are prone to insider trading, data falsification, and misappropriation of funds. Therefore, decentralized cross-chain data interaction is more easily recognized by users. The current cross-chain technologies mainly include notary mechanism, side chain, relay, atomic lock, and multi-party computing. The detailed introduction of cross-chain technology is beyond the scope of this specification. Among them, multi-party computing has become a popular cross-chain method due to its good compatibility between heterogeneous blockchains.
[0006] Most of the current multi-party computing cross-chain solutions use non-national secret encryption algorithms. Using them in domestic blockchain projects may cause the following problems:
[0007] 1. The use of multi-party computing cross-chain solutions for encryption algorithms that are not national secrets in domestic blockchain projects may pose security risks; 2. The use of multi-party computing cross-chain solutions for encryption algorithms that are not national secrets and blockchains that use national secrets as the encryption system will lead to incompatibility of key accounts.
[0008] In view of the above, under the domestic blockchain information security requirements, a multi-party computing cross-chain method using national secret algorithm technology is needed. Summary of the invention
[0009] The present invention provides a cross-chain method based on a national secret algorithm to solve the technical problems raised in the above background technology.
[0010] The present invention provides a cross-chain method based on a national secret algorithm, comprising the following steps:
[0011] Step 101, building a multi-party computing cross-chain group network;
[0012] Step 102: Each participating node distributes its identity information in the multi-party computing cross-chain group network and the homomorphic encryption information of the node's national secret private key to other nodes;
[0013] Step 103, construct a multi-party secure computing model, use the multi-party secure computing model to perform multi-party computing on the nodes, and obtain public key information;
[0014] Step 104, establishing a cross-chain account, and establishing a cross-chain account in the source blockchain and the target blockchain according to the public key information;
[0015] Step 105, the current number of online nodes is m, t≤m≤n, t is the minimum number of nodes that can be cross-chain, and n is the number of all nodes in the multi-party computing cross-chain group network;
[0016] Step 106: When the synchronization node on the source blockchain listens to the cross-chain data request, it broadcasts the cross-chain data to the cross-chain group network;
[0017] Step 107, the current m nodes authenticate and sign the cross-chain data respectively. When all signature data are collected, the final cross-chain data signature transaction is generated. The m nodes in the cross-chain group network use the national secret algorithm to sign the cross-chain request data. After collecting at least t signatures, a final cross-chain transaction is generated;
[0018] Step 108, broadcast the transaction to the target blockchain network, and the target blockchain verifies the correctness of the transaction before executing it, completing the data cross-chain.
[0019] In a preferred embodiment, in step 102, the distribution method includes the following steps:
[0020] Step 1: Each participating node provides its unique identification information in the cross-chain group network to other nodes;
[0021] Step 2: Each participating node provides the homomorphic encryption information encrypted by its own national secret private key using the homomorphic encryption algorithm to other nodes.
[0022] In a preferred embodiment, in step 102, the calculation formula for encrypting the node national secret private key is:
[0023]
[0024] in, Represents the encrypted homomorphic encryption information of the national secret private key of the i-th node, represents the secret of the i-th node, represents the private key of the i-th node, , They represent the first and t-1th random number sequences of the i-th node respectively.
[0025] In a preferred embodiment, in step 103, the method for obtaining public key information includes the following steps:
[0026] Step 1: Build a multi-party secure computing model that complies with national encryption standards in a multi-party computing cross-chain group network;
[0027] Step 2: Using the multi-party secure computing model, multiple participating nodes perform distributed computing operations;
[0028] Step 3: After multi-party calculation, each node obtains the public key information.
[0029] In a preferred embodiment, in step 103, the multi-party secure computing model includes:
[0030] After the node collects all the data, it calculates the shard data;
[0031] The calculation formula for shard data is:
[0032]
[0033] in, represents the aggregate and value of the aggregate signatures collected by the i-th node containing all node information, Represents the node information of the jth node collected by the i-th node, j=1, 2, ..., n, i j;
[0034] When the system reaches threshold t, there are t nodes, and each node i holds a private key and the corresponding ciphertext ;
[0035] According to t points, the coefficients of each item in the polynomial equation originally used for encryption are determined by Lagrange interpolation:
[0036]
[0037] in, represents the Lagrange basic polynomial, represents the identity information of the jth point, Represents the identity information of the i-th point;
[0038] Restore the secrets owned by all nodes. The restoration calculation formula is:
[0039]
[0040] in, represents the Lagrange basic polynomial, express Secret sharding in threshold mode.
[0041] In a preferred embodiment, in step 101 to step 106, the nt multi-party secure computation process is:
[0042] , , has a secret ;
[0043]
[0044] And have random numbers , is the public coefficient;
[0045] Have homomorphic encryption keys And broadcast and share to the group;
[0046] calculate And broadcast and share to the group;
[0047] After receiving the encrypted data from other computing parties in the group, a random number can be selected ;
[0048] Compute homomorphic encrypted information and share it with ;
[0049]
[0050] in, represents homomorphically encrypted information, represents the homomorphic encryption key, Represents the random number owned by the i-th node, represents the public coefficient of the i-th node, Represents the homomorphic encryption information of the national secret private key of the i-th node, Represents the random number selected by the i-th node.
[0051] In a preferred embodiment, in steps 101 to 106, After receiving the shared data, decrypt and calculate:
[0052]
[0053] in, Represents the information of the i-th node after decryption, represents the public coefficient of the i-th node, Represents the homomorphic encryption information of the national secret private key of the i-th node, represents the random number owned by the jth node, Indicates the random number selected by the first node, Represents the random number selected by the i-th node;
[0054] but Computable:
[0055]
[0056] in, Represents the decrypted information. Represents the random number owned by the i-th node, represents the public coefficient of the i-th node, Represents the homomorphic encryption information of the national secret private key of the i-th node;
[0057] calculate:
[0058]
[0059] in, Represents the decrypted transaction data of the ith node, Represents the random number owned by the i-th node;
[0060] After receiving the decrypted data, it can be calculated:
[0061]
[0062] in, Represents the decrypted private key, Represents the decrypted transaction data of the i-th node.
[0063] In a preferred embodiment, in step 107, the signing process is as follows:
[0064] Choose a random number k, , the point selected on the elliptic curve is ;
[0065] The signature calculation process is as follows:
[0066]
[0067]
[0068]
[0069]
[0070] in, Indicates signature, represents the private key of user k, r represents the intermediate variable coefficient, m represents the message, G is the base point, k represents the random number, Represents the sm3 hash calculation function;
[0071] The signature calculation formula is as follows:
[0072]
[0073]
[0074] in, Indicates signature, represents the identity information of user k, k represents a random number, and r represents the intermediate variable coefficient.
[0075] A storage medium storing non-temporary computer-readable instructions, which, when executed by a computer, can execute the steps of a cross-chain method based on a national encryption algorithm as described above.
[0076] A cross-chain device based on a national secret algorithm includes a processor and a storage medium, wherein the processor includes the following modules:
[0077] Construction module 100, used to build a multi-party computing cross-chain group network and a multi-party secure computing model;
[0078] The distribution module 200 is used to allow each participating node to distribute its identity information in the multi-party computing cross-chain group network and the homomorphic encryption information of the node's national secret private key to other nodes:
[0079] The computing module 300 is used to perform multi-party computing on the nodes using a multi-party secure computing model to obtain public key information;
[0080] Account module 400, used to establish cross-chain accounts in the source blockchain and the target blockchain respectively according to the public key information;
[0081] The node confirmation module 500 is used to confirm the current number of online nodes m;
[0082] The broadcast module 600 is used to broadcast the cross-chain data to the cross-chain group network after the synchronization node on the source blockchain monitors the cross-chain data request;
[0083] The signature module 700 is used to enable the current m nodes to sign the cross-chain data respectively, and generate the final cross-chain data signature transaction after collecting at least t signatures;
[0084] The transmission module 800 is used to broadcast the final transaction to the target blockchain network. The target blockchain verifies the correctness of the transaction and then executes it to complete the cross-chain data.
[0085] The beneficial effects of the present invention are as follows: the cross-chain method of the present invention has no special requirements for the architecture of the blockchain and is compatible with data cross-chain between various heterogeneous chains; the cross-chain method does not require a trusted intermediary and is completely decentralized; the cross-chain method enables cross-chain operations to be performed on both sides of the cross-chain without the need for a specific data cross-chain contract; the cross-chain method enables access to blockchains of various architectures and simplifies the interaction mode between blockchains; the cross-chain method can monitor the data status of multiple chains in real time and complete data cross-chain routing. BRIEF DESCRIPTION OF THE DRAWINGS
[0086] Figure 1 It is a flow chart of the cross-chain method based on the national encryption algorithm of the present invention.
[0087] Figure 2 It is a block diagram of the cross-chain system based on the national encryption algorithm of the present invention.
[0088] In the figure: 100, construction module; 200, distribution module; 300, calculation module; 400, account module; 500, node confirmation module; 600, broadcast module; 700, signature module; 800, transmission module. DETAILED DESCRIPTION
[0089] The subject matter described herein will now be discussed with reference to example embodiments. It should be understood that the discussion of these embodiments is only to enable those skilled in the art to better understand and implement the subject matter described herein, and the functions and arrangements of the elements discussed may be changed without departing from the scope of protection of the present specification. Various examples may omit, replace or add various processes or components as needed. In addition, the features described relative to some examples may also be combined in other examples.
[0090] like Figure 1 As shown, a cross-chain method based on the national secret algorithm includes the following steps:
[0091] Step 101, building a multi-party computing cross-chain group network;
[0092] n nodes are combined into a multi-party computing cross-chain group network. The nodes represent the institutional nodes participating in the multi-party computing. The institutional nodes can be hardware devices that meet the computing and security requirements.
[0093] There are one or more secure and stable network channels between institutions, which meet the bandwidth and latency requirements for inter-institutional communication;
[0094] Each institution has its own blockchain access device, which can be connected to the blockchain network that requires cross-chain support;
[0095] The cross-chain access device can be one or more physical devices, and the appropriate physical device is selected according to the requirements and characteristics of different blockchain data access.
[0096] Step 102: Each participating node distributes its identity information in the multi-party computing cross-chain group network and the homomorphic encryption information of the node's national secret private key to other nodes;
[0097] In step 102, the distribution method includes the following steps:
[0098] Step 1: Each participating node provides its unique identification information in the cross-chain group network to other nodes (for subsequent identity authentication)
[0099] Step 2: Each participating node encrypts its own national secret private key using a homomorphic encryption algorithm and provides it to other nodes; (Homomorphic encryption is used here to use the private key for distributed signing in the future without directly leaking the private key)
[0100] It should be noted that step 102 lays the foundation for subsequent multi-party computing operations and signature verification, completes the establishment of a mutual trust system among participating nodes in the cross-chain group network; initializes node identity registration and private key management; step 102 uses homomorphic encryption to provide the necessary mathematical foundation and security guarantee for the multi-party computing model.
[0101] Step 103, construct a multi-party secure computing model, use the multi-party secure computing model to perform multi-party computing on the nodes, and obtain public key information;
[0102] The method for obtaining public key information comprises the following steps:
[0103] Step 1: Build a multi-party secure computing model that complies with national encryption standards in a multi-party computing cross-chain group network;
[0104] Step 2: Use the multi-party secure computing model to perform distributed computing operations by multiple participating nodes; (Use the homomorphically encrypted private keys of each node to calculate a public and anonymous public key)
[0105] Step 3: After multi-party calculations, each node can obtain the public key information.
[0106] Step 104, establishing a cross-chain account, and establishing a cross-chain account in the source blockchain and the target blockchain according to the public key information;
[0107] It should be noted that the address generated using the public key is the cross-chain account address; one public key corresponds to one cross-chain account, which can exchange assets on the source chain and the target chain.
[0108] Step 105, the current number of online nodes is m, t ≤ m ≤ n, t is the minimum number of nodes that can be cross-chain (t is the preset minimum node threshold);
[0109] n represents the total number of nodes in the multi-party computing cross-chain group network, m represents the number of nodes currently online and actively performing cross-chain task calculations, ranging from t to n; t represents the minimum participating node threshold, below which subsequent multi-party computing and signatures cannot be performed;
[0110] It should be noted that this step ensures the reliability and efficiency of the signing process by limiting the number of participating nodes; and by controlling the number of nodes, it can also prevent some malicious nodes from interfering with normal cross-chain.
[0111] Step 106: After the synchronization node on the source blockchain receives the cross-chain data request, it broadcasts the cross-chain data to the cross-chain group network;
[0112] Spread the data of the cross-chain request so that other nodes in the cross-chain group network can also know the cross-chain request and participate in the subsequent multi-party computing signature process;
[0113] It should be noted that only by broadcasting the request data can the nodes in the cross-chain group network jointly participate in cross-chain operations and achieve consensus through distributed signatures.
[0114] Step 107, the current m nodes authenticate and sign the cross-chain data respectively. When all signature data are collected, the final cross-chain data signature transaction is generated. The m nodes in the cross-chain group network use the national secret algorithm to sign the cross-chain request data. After collecting a sufficient number of signatures (at least t), a final cross-chain transaction is generated;
[0115] After step 106, the m nodes in the cross-chain group network receive the cross-chain request data broadcast;
[0116] Each of these m nodes signs the data using a distributed signature algorithm and its own key;
[0117] After all m nodes complete the signature, the signature results are summarized;
[0118] When the number of collected signatures reaches the threshold t, a final multi-party signature transaction can be formed; this multi-party signature transaction is the result of the entire cross-chain request reaching a consensus through distributed signatures within the cross-chain group network.
[0119] Step 108, broadcast the transaction to the target blockchain network, and the target blockchain verifies the correctness of the transaction before executing it, completing the data cross-chain.
[0120] The final multi-party signature transaction generated in step 107 needs to be sent to the target blockchain network;
[0121] At this time, the multi-signature transaction will be broadcast and sent to the nodes on the target blockchain;
[0122] The nodes on the target blockchain will verify the correctness of the transaction, including the legitimacy of information such as multi-party signatures.
[0123] If the verification is successful, the transaction will be executed on the target blockchain, thereby completing the expected cross-chain data and asset transfer operations in the cross-chain group network.
[0124] At this point, the cross-chain verification and execution between the source blockchain and the target blockchain are truly completed through distributed multi-party signature.
[0125] The multi-party secure computing model includes:
[0126] represents the i-th node, , the secret owned by the i-th node , and have identity information ,
[0127] The secret calculation formula owned by all nodes is:
[0128]
[0129] represents the secrets owned by all nodes, Indicates the number of all nodes;
[0130] The secret owned by the i-th node The encryption calculation formula is:
[0131]
[0132] in, (x) represents the homomorphic encryption information of the national secret private key of the i-th node, represents the secret owned by the i-th node, represents the private key of the i-th node, , Respectively represent the first and t-1th random number sequences of the i-th node;
[0133] The formula for calculating the identity information of the i-th node based on the identity information of other users is:
[0134]
[0135] in, The encrypted ciphertext representing the identity information of the i-th node, represents the identity information of the i-th node, Represents the public key of the cross-chain group network, , Represents the first, t-1th random number sequence;
[0136] Share the encrypted identity information and secret of the i-th node with , represents the jth node, where ,and ;
[0137] After all the data is collected, the calculation formula for the shard data is:
[0138]
[0139] in, represents the aggregate and value of the aggregate signatures collected by the i-th node containing all node information, Represents the node information of the jth node collected by the i-th node, j=1, 2, ..., n, i j;
[0140] When the system reaches threshold t, there are t nodes, and each node i holds a private key and the corresponding ciphertext ;
[0141] According to t points, the coefficients of each item in the original polynomial equation used for encryption can be determined by Lagrange interpolation:
[0142]
[0143] in, represents the Lagrange basic polynomial, represents the identity information of the jth point, Represents the identity information of the i-th point;
[0144] The secrets owned by all nodes can be restored, and the restoration calculation formula is:
[0145]
[0146] in, represents the Lagrange basic polynomial, express Secret sharding in threshold mode;
[0147] The nt multi-party secure computation process is:
[0148] , , has a secret ;
[0149]
[0150] And have random numbers , is the public coefficient;
[0151] Have homomorphic encryption keys And broadcast and share to the group;
[0152] calculate And broadcast and share to the group;
[0153] After receiving the encrypted data from other computing parties in the group, a random number can be selected ;
[0154] Compute homomorphic encrypted information and share it with ;
[0155]
[0156] in, represents homomorphically encrypted information, represents the homomorphic encryption key, Represents the random number owned by the i-th node, represents the public coefficient of the i-th node, Represents the homomorphic encryption information of the national secret private key of the i-th node, Represents the random number selected by the i-th node;
[0157] After receiving the shared data, decrypt and calculate:
[0158]
[0159] in, Represents the information of the i-th node after decryption, represents the public coefficient of the i-th node, Represents the homomorphic encryption information of the national secret private key of the i-th node, represents the random number owned by the jth node, Indicates the random number selected by the first node, Represents the random number selected by the i-th node;
[0160] but Computable:
[0161]
[0162] in, Represents the decrypted information. Represents the random number owned by the i-th node, represents the public coefficient of the i-th node, Represents the homomorphic encryption information of the national secret private key of the i-th node;
[0163] calculate:
[0164]
[0165] in, Represents the decrypted transaction data of the ith node, Represents the random number owned by the i-th node;
[0166] After receiving the decrypted data, it can be calculated:
[0167]
[0168] in, Represents the decrypted private key, Represents the decrypted transaction data of the i-th node.
[0169] In one embodiment of the present invention, a national secret signature method is provided, and the signature process is as follows:
[0170] Choose a random number k, , the point selected on the elliptic curve is ;
[0171] The signature calculation process is as follows:
[0172]
[0173]
[0174]
[0175]
[0176] in, Indicates signature, represents the private key of user k, r represents the intermediate variable coefficient, m represents the message, G is the base point, k represents the random number, Represents the sm3 hash calculation function;
[0177] The signature calculation formula is as follows:
[0178]
[0179]
[0180] in, Indicates signature, represents the identity information of user k, k represents a random number, and r represents the intermediate variable coefficient;
[0181] In one embodiment of the present invention, a specific process of an example of applying a method of NT threshold national secret multi-party computing is provided, including the following steps:
[0182] user Hold the key :
[0183]
[0184] in, Indicates user identity information, Indicates user The secret key you hold, represents the public coefficient of the i-th node, Indicates the preset minimum node threshold;
[0185] Obtained through multi-party computation:
[0186]
[0187] The public key is: ;
[0188] The signature is:
[0189]
[0190] Among them, and the random number used for signature , ;
[0191] It can be obtained through multi-party calculation:
[0192]
[0193] The signature fragmentation calculation formula is:
[0194]
[0195] in, express, ;
[0196] The signature fragmentation calculation formula is:
[0197]
[0198] in, express The signature fragment of
[0199] The computable signature is:
[0200]
[0201] in, Indicates signature, express The signature fragment of .
[0202] In one embodiment of the present invention, an application example of the cross-chain method of the present invention is provided: for example, there are two blockchain networks, one is a bank alliance chain (source chain), and the other is a third-party payment chain (target chain);
[0203] The specific implementation process of the cross-chain method of the present invention includes the following steps:
[0204] (1) Banks A, B, and C join the multi-party computing cross-chain group network as nodes and establish communication with the key management system through identity authentication;
[0205] Each node uses a private key to homomorphically encrypt its own information and distribute it to other nodes without revealing the original private key;
[0206] (2) The user opens an inter-bank transfer account at Bank A and requests to transfer assets from Bank A to the account provided by the payment company;
[0207] (3) Bank A detects the request and broadcasts it to the cross-chain group nodes;
[0208] (4) Banks A, B, and C sign the request homomorphically and form a multi-party signature transaction through consensus;
[0209] (5) The transaction is broadcast to the payment chain and executed after compliance and multi-party signature verification. The assets are locked from Bank A’s account and released from the payment company’s account.
[0210] (6) Users view and use assets in the payment company through third-party applications.
[0211] This embodiment realizes cross-chain transfer between the bank alliance chain and the third-party payment chain through distributed multi-party accounting, thereby improving the security and efficiency of capital flow.
[0212] A storage medium storing non-temporary computer-readable instructions, which, when executed by a computer, can execute the steps of a cross-chain method based on a national encryption algorithm as described above.
[0213] like Figure 2 As shown, a cross-chain device based on a national secret algorithm includes a processor and a storage medium, wherein the processor includes the following modules:
[0214] Construction module 100, used to build a multi-party computing cross-chain group network and a multi-party secure computing model;
[0215] The distribution module 200 is used to allow each participating node to distribute its identity information in the multi-party computing cross-chain group network and the homomorphic encryption information of the node's national secret private key to other nodes:
[0216] The computing module 300 is used to perform multi-party computing on the nodes using a multi-party secure computing model to obtain public key information;
[0217] Account module 400, used to establish cross-chain accounts in the source blockchain and the target blockchain respectively according to the public key information;
[0218] The node confirmation module 500 is used to confirm the current number of online nodes m;
[0219] The broadcast module 600 is used to broadcast the cross-chain data to the cross-chain group network after the synchronization node on the source blockchain monitors the cross-chain data request;
[0220] The signature module 700 is used to enable the current m nodes to sign the cross-chain data respectively, and generate the final cross-chain data signature transaction after collecting at least t signatures;
[0221] The transmission module 800 is used to broadcast the final transaction to the target blockchain network. The target blockchain verifies the correctness of the transaction and then executes it to complete the cross-chain data.
[0222] The cross-chain method of the present invention has no special requirements for the architecture of the blockchain and is compatible with data cross-chain between various heterogeneous chains; the cross-chain method does not require a trusted intermediary and is completely decentralized; and the cross-chain method enables cross-chain operations to be performed on both sides of the cross-chain without the need for a specific data cross-chain contract; the cross-chain method also enables access to blockchains of various architectures and simplifies the interaction between blockchains; the data status of multiple chains can be monitored in real time, and data cross-chain routing can be completed.
[0223] According to the different numbers and requirements of institutions participating in multi-party computing, the cross-chain method includes the following scenarios:
[0224] Scenario 1: Cross-chain method between two institutions;
[0225] Scenario 2: Cross-chain method with multiple institutions and no malicious institutions;
[0226] Scenario 3: Cross-chain methods where multiple institutions do not guarantee the absence of malicious institutions.
[0227] Determine the number of nodes and the minimum number of nodes that can be run based on actual needs; each node needs to be deployed on a computing device that meets the node's computing and storage requirements; build a dedicated network for interactive communication between nodes; each node needs to be connected to a supported blockchain network, and build the corresponding blockchain network access node and data interface based on the support list; establish cross-chain accounts in supported blockchain networks based on the public key information jointly generated by the nodes in the group; send the source blockchain cross-chain data request to the cross-chain account, and after the request is received, send the data to the target blockchain cross-chain account through the cross-chain network to complete the data cross-chain.
[0228] The above describes an embodiment of the present embodiment, but the present embodiment 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 embodiment, ordinary technicians in this field can also make many forms, all of which are within the protection of the present embodiment.
Claims
1. A cross-chain method based on a national secret algorithm, characterized in that: The following steps are involved: Step 101, building a multi-party computing cross-chain group network; Step 102: Each participating node distributes its identity information in the multi-party computing cross-chain group network and the homomorphic encryption information of the node's national secret private key to other nodes; Step 103, construct a multi-party secure computing model, use the multi-party secure computing model to perform multi-party computing on the nodes, and obtain public key information; Step 104, establishing a cross-chain account, and establishing a cross-chain account in the source blockchain and the target blockchain according to the public key information; Step 105, the current number of online nodes is m, t≤m≤n, t is the minimum number of nodes that can be cross-chain, and n is the number of all nodes in the multi-party computing cross-chain group network; Step 106: When the synchronization node on the source blockchain listens to the cross-chain data request, it broadcasts the cross-chain data to the cross-chain group network; Step 107, the current m nodes authenticate and sign the cross-chain data respectively. When all signature data are collected, the final cross-chain data signature transaction is generated. The m nodes in the cross-chain group network use the national secret algorithm to sign the cross-chain request data. After collecting at least t signatures, a final cross-chain transaction is generated; Step 108, broadcast the transaction to the target blockchain network, and the target blockchain verifies the correctness of the transaction and then executes it, completing the data cross-chain; In step 101 to step 106, the nt multi-party secure computation process is: , , has a secret ; ; And have random numbers , is the public coefficient; Have homomorphic encryption keys And broadcast and share to the group; calculate And broadcast and share to the group; After receiving the encrypted data from other computing parties in the group, a random number can be selected ; Compute homomorphic encrypted information and share it with ; ; in, represents homomorphically encrypted information, represents the homomorphic encryption key, Represents the random number owned by the i-th node, represents the public coefficient of the i-th node, Represents the homomorphic encryption information of the national secret private key of the i-th node, Represents the random number selected by the i-th node; In steps 101 to 106, After receiving the shared data, decrypt and calculate: ; in, Represents the information of the i-th node after decryption, represents the public coefficient of the i-th node, Represents the homomorphic encryption information of the national secret private key of the i-th node, represents the random number owned by the jth node, Indicates the random number selected by the first node, Represents the random number selected by the i-th node; but Computable: ; in, Represents the decrypted information. Represents the random number owned by the i-th node, represents the public coefficient of the i-th node, Represents the homomorphic encryption information of the national secret private key of the i-th node; calculate: ; in, Represents the decrypted transaction data of the ith node, Represents the random number owned by the i-th node; After receiving the decrypted data, it can be calculated: ; in, Represents the decrypted private key, Represents the decrypted transaction data of the i-th node.
2. According to claim 1, a cross-chain method based on a national secret algorithm is characterized in that: In step 102, the distribution method includes the following steps: Step 1: Each participating node provides its unique identification information in the cross-chain group network to other nodes; Step 2: Each participating node provides the homomorphic encrypted information encrypted by its own national secret private key using the homomorphic encryption algorithm to other nodes.
3. According to claim 2, a cross-chain method based on a national secret algorithm is characterized in that: In step 102, the calculation formula for encrypting the node national secret private key is: ; in, Represents the encrypted homomorphic encryption information of the national secret private key of the i-th node, represents the secret of the i-th node, represents the private key of the i-th node, , They represent the first and t-1th random number sequences of the i-th node respectively.
4. According to claim 3, a cross-chain method based on a national secret algorithm is characterized in that: In step 103, the method for obtaining public key information includes the following steps: Step 1: Build a multi-party secure computing model that complies with national encryption standards in a multi-party computing cross-chain group network; Step 2: Use the multi-party secure computing model to perform distributed computing operations by multiple participating nodes; Step 3: After multi-party calculation, each node obtains the public key information.
5. According to claim 4, a cross-chain method based on a national secret algorithm is characterized in that: In step 103, the multi-party secure computation model includes: After the node collects all the data, it calculates the shard data; The calculation formula for shard data is: ; in, represents the aggregate and value of the aggregate signatures collected by the i-th node containing all node information, Represents the node information of the jth node collected by the i-th node, j=1, 2, ..., n, i j; When the system reaches threshold t, there are t nodes, and each node i holds a private key and the corresponding ciphertext ; According to t points, the coefficients of each item in the polynomial equation originally used for encryption are determined by Lagrange interpolation: ; in, represents the Lagrange basic polynomial, represents the identity information of the jth point, Represents the identity information of the i-th point; Restore the secrets owned by all nodes. The restoration calculation formula is: ; in, represents the Lagrange basic polynomial, express Secret sharding in threshold mode.
6. According to claim 5, a cross-chain method based on a national secret algorithm is characterized in that: In step 107, the signing process is as follows: Choose a random number k, , the point selected on the elliptic curve is ; The signature calculation process is as follows: ; ; ; ; in, Indicates signature, represents the private key of user k, r represents the intermediate variable coefficient, m represents the message, G is the base point, k represents the random number, Represents the sm3 hash calculation function; The signature calculation formula is as follows: ; ; in, Indicates signature, represents the identity information of user k, k represents a random number, and r represents the intermediate variable coefficient.
7. A storage medium storing non-transitory computer-readable instructions, characterized in that: When the non-temporary computer-readable instructions are executed by a computer, the steps in a cross-chain method based on a national encryption algorithm as claimed in claim 6 can be executed.
8. A cross-chain device based on a national secret algorithm, comprising a processor and a storage medium as claimed in claim 7, characterized in that: The processor includes the following modules: A construction module (100) is used to construct a multi-party computing cross-chain group network and a multi-party secure computing model; The distribution module (200) is used to allow each participating node to distribute its identity information in the multi-party computing cross-chain group network and the homomorphic encryption information of the node's national secret private key to other nodes: A computing module (300) is used to perform multi-party computing on the nodes using a multi-party secure computing model to obtain public key information; An account module (400) is used to establish cross-chain accounts in the source blockchain and the target blockchain respectively according to the public key information; The node confirmation module (500) is used to confirm the current number of online nodes m; The broadcast module (600) is used to broadcast the cross-chain data to the cross-chain group network after the synchronization node on the source blockchain monitors the cross-chain data request; The signature module (700) is used to enable the current m nodes to sign the cross-chain data respectively, and generate the final cross-chain data signature transaction after collecting at least t signatures; The transmission module (800) is used to broadcast the final transaction to the target blockchain network. The target blockchain verifies the correctness of the transaction and then executes it to complete the data cross-chain.
Citation Information
Patent Citations
Secure multi-party computing method and system based on block chain
CN114124347A
Cross-chain transaction method and device, electronic equipment and storage medium
CN116132052A