A distributed key-based alliance chain cross-chain transaction method and device
By adopting distributed key generation algorithm and threshold signature technology in the alliance chain, the problem of relying on trusted third-party distribution keys in the alliance chain cross-chain transaction is solved, and higher security and reliability are achieved.
Patent Information
- Application Number
- CN202110970156.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-23
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2041-08-23
AI Technical Summary
In the cross-chain transaction of alliance chains, the existing technology needs to rely on trusted third parties to distribute keys, resulting in single point failure and key custody problems, especially when trusted third parties cannot be found, affecting the security of the transaction.
A distributed key generation algorithm is used to generate keys for alliance chain nodes, and combined with threshold signature technology, key distribution without relying on trusted third parties is realized, improving the security of cross-chain transactions.
Through the combination of distributed key generation algorithm and threshold signature technology, it can effectively prevent node misbehavior behavior from causing losses to the alliance chain and improve the security and reliability of cross-chain transactions.
Smart Images

Figure CN113902440B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer software technology, and in particular to a distributed key-based alliance chain cross-chain transaction method, device and electronic device. Background Art
[0002] Unlike public chains, consortium chains are usually deployed within a company or within a consortium of several companies. When a consortium chain conducts a cross-chain transaction with another consortium chain, it is necessary to confirm that the transaction is a collective behavior of the entire consortium chain, rather than an individual behavior of a certain consortium chain node. A very intuitive way to solve this requirement is to use threshold signature technology. The most commonly used threshold signature technology implementation method is usually: using smart contracts to collect signature shares of each node, and finally calculating a signature that represents the overall will of the consortium chain. Ordinary threshold signatures require a trusted third party to generate key shares for each node. In some scenarios, it is difficult to find a trusted third party, so it is necessary to design a consortium chain cross-chain solution that does not rely on a trusted third party to distribute keys, especially each node of the consortium chain uses the same key generation method, which is of great significance to the security of consortium chain cross-chain transactions. Summary of the invention
[0003] The purpose of the embodiments of this specification is to provide a consortium chain cross-chain transaction method and device based on a distributed key generation algorithm to address the above-mentioned problems.
[0004] To solve the above technical problems, the embodiments of this specification are implemented as follows:
[0005] In the first aspect, a distributed key-based alliance chain cross-chain transaction method is proposed, including a first alliance chain and a second alliance chain, wherein the first alliance chain includes an aggregate signature contract and a signature verification contract, and after determining the public parameter and threshold t for the signature of the first alliance chain node, the public parameter threshold t is used to characterize the number of signatures of different nodes in the first alliance chain that agree to send cross-chain messages; applied to the first alliance chain, including:
[0006] Obtaining a key pair of the node using a distributed key generation algorithm;
[0007] When the node agrees to send the cross-chain message, the signature is generated and sent to the aggregate signature contract;
[0008] The aggregate signature contract generates a collective signature representing the first alliance chain, and sends the collective signature and the cross-chain message to the second alliance chain;
[0009] The verification contract receives the verification message from the second alliance chain and notifies each node of the first alliance chain.
[0010] In the second aspect, a distributed key-based alliance chain cross-chain transaction device is proposed, including:
[0011] A public parameter management module, used to determine the public parameters and threshold t for signing by the first alliance chain node, where the public parameter threshold t is used to represent the number of signatures of different nodes in the first alliance chain that agree to send cross-chain messages;
[0012] A key pair generation module, used to obtain the key pair of the first alliance chain node using a distributed key generation algorithm;
[0013] A signature management module, used for the first alliance chain node to generate the signature;
[0014] An aggregate signature contract module, used to generate a collective signature representing the first alliance chain after receiving the signature of the first alliance chain node, and send the collective signature and the cross-chain message to the second alliance chain;
[0015] The contract verification module receives the verification message from the second alliance chain and notifies the first alliance chain node.
[0016] In the third aspect, a distributed key-based alliance chain cross-chain transaction method is proposed, including a first alliance chain and a second alliance chain, the second alliance chain includes an aggregate signature contract and a signature verification contract, after determining the public parameters and threshold t' for the signature of the second alliance chain node, the public parameter threshold t' is used to characterize the number of signatures of different nodes in the second alliance chain that agree to send cross-chain messages; applied to the second alliance chain, including:
[0017] Obtaining a key pair of the node using a distributed key generation algorithm;
[0018] The signing and verification contract receives and verifies the collective signature and the cross-chain message sent by the first alliance chain, and sends the verified cross-chain message to each node of the second alliance chain;
[0019] When the second alliance chain node agrees to verify the cross-chain message, the signature is generated and sent to the aggregate signature contract;
[0020] The aggregate signature contract generates a collective signature representing the second alliance chain, and sends a verification message generated based on the collective signature to the first alliance chain.
[0021] In the fourth aspect, a distributed key-based alliance chain cross-chain transaction device is proposed, including:
[0022] A public parameter management module, used to determine the public parameters and threshold t′ for signatures of each node of the second alliance chain, wherein the public parameter threshold t′ is used to represent the number of signatures of different nodes in the second alliance chain that agree to send cross-chain messages;
[0023] A key pair generation module, used to calculate and obtain the key pair of the second alliance chain node using a distributed key generation algorithm;
[0024] A signature management module, used for each node of the second alliance chain to generate the signature;
[0025] An aggregate signature contract module, used to receive signatures of each node of the second alliance chain to generate a collective signature representing the second alliance chain, and send a signature verification message generated based on the collective signature to the first alliance chain;
[0026] The signing and verification contract module is used to receive and verify the collective signature and cross-chain message sent by the first alliance chain, and send the verified cross-chain message to each node of the second alliance chain.
[0027] In the fifth aspect, a distributed key-based alliance chain cross-chain transaction system is proposed, including a first alliance chain and a second alliance chain, wherein the first alliance chain is a cross-chain message sender, and the second alliance chain is a cross-chain message receiver; characterized in that both the first alliance chain and the second alliance chain include an aggregate signature contract and a signature verification contract, and after the first alliance chain and the second alliance chain respectively determine the public parameters and thresholds of the node signature, the system includes:
[0028] The first alliance chain uses a distributed key generation algorithm to obtain a node key pair. When the first alliance chain node agrees to send the cross-chain message, the signature is generated and sent to the first alliance chain aggregate signature contract. The first alliance chain aggregate signature contract generates a collective signature representing the first alliance chain, and sends the collective signature and the cross-chain message to the second alliance chain. The first alliance chain verification contract receives the verification message from the second alliance chain and notifies each node of the first alliance chain.
[0029] The second alliance chain uses a distributed key generation algorithm to obtain a node key pair. The second alliance chain verification contract receives and verifies the collective signature and the cross-chain message sent by the first alliance chain, and sends the verified cross-chain message to each node of the second alliance chain. When the second alliance chain node agrees to verify the cross-chain message, it generates the signature and sends it to the second alliance chain aggregate signature contract. The second alliance chain aggregate signature contract generates a collective signature representing the second alliance chain, generates the verification message and sends it to the first alliance chain.
[0030] In a sixth aspect, an electronic device is provided, comprising: a processor; and
[0031] A memory arranged to store computer executable instructions which, when executed, cause the processor to perform the method of the first aspect.
[0032] In a seventh aspect, a computer-readable storage medium is proposed, which stores one or more programs. When the one or more programs are executed by an electronic device including multiple application programs, the electronic device executes the method described in the first aspect.
[0033] In an eighth aspect, an electronic device is provided, comprising: a processor; and
[0034] A memory arranged to store computer executable instructions which, when executed, cause the processor to perform the method of the third aspect.
[0035] In a ninth aspect, a computer-readable storage medium is proposed, wherein the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by an electronic device including multiple application programs, the electronic device executes the method described in the third aspect.
[0036] This specification can achieve at least the following technical effects:
[0037] The present invention introduces a distributed key generation algorithm to generate keys for alliance chain nodes participating in cross-chain transactions. Combined with threshold signature technology, the security of cross-chain transactions is further improved, and it can effectively prevent improper node behavior from causing losses to the alliance chain. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0039] Figure 1 A schematic diagram of a distributed key-based consortium chain cross-chain transaction system provided in an embodiment of this specification.
[0040] Figure 2 This is one of the step diagrams of the distributed key-based alliance chain cross-chain transaction method provided in the embodiment of this specification.
[0041] Figure 3 A schematic diagram of the distributed key generation process provided in the embodiments of this specification.
[0042] Figure 4 The second step diagram of the distributed key-based alliance chain cross-chain transaction method provided in the embodiment of this specification.
[0043] Figure 5 The third step diagram of the distributed key-based alliance chain cross-chain transaction method provided in the embodiment of this specification.
[0044] Figure 6 One of the structural schematic diagrams of a consortium chain cross-chain transaction device based on distributed keys provided for an embodiment of this specification.
[0045] Figure 7 The second structural diagram of the consortium chain cross-chain transaction device based on distributed keys provided for an embodiment of the present specification.
[0046] Figure 8 A schematic diagram of the structure of an electronic device provided for one embodiment of the present specification. DETAILED DESCRIPTION
[0047] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0048] Key Terms
[0049] Consortium chain: only for members of a specific group and limited third parties, multiple pre-selected nodes are designated as bookkeepers. The generation of each block is jointly determined by all pre-selected nodes. Other access nodes can participate in transactions, but do not ask about the bookkeeping process. Other third parties can make limited queries through the open API of the blockchain. In order to obtain better performance, the consortium chain has certain requirements for the configuration and network environment of consensus or verification nodes. With the access mechanism, transaction performance can be improved more easily and some problems caused by uneven participants can be avoided. Most of the companies using consortium chains are banks, insurance, securities, business associations, group companies and upstream and downstream companies.
[0050] Blockchain cross-chain transactions: Existing blockchain technology has bottlenecks in performance, capacity, privacy, isolation, and expansion under a single-chain architecture. For example, a bank payment application with hundreds of millions of users has tens of thousands of transaction requests per second, hundreds of millions of transactions per day, and user transactions reach a second-level response experience. Another is that the data storage uses chained local storage, which makes it impossible to expand in parallel, and the consensus mechanism uses a synchronous state machine model, which makes it impossible to process transactions efficiently. Limited by the performance limit of a single node in the network, the single-chain architecture cannot meet the performance, capacity, user experience and other requirements of the application. In addition, the interoperability of blockchain, especially consortium chains, is itself a basic requirement for some applications. For example, the consortium chain scenario of a bank or financial institution: in a financial application, users can use a certain asset to exchange financial products of different institutions. Different assets need to be transferred and exchanged on multiple chains. Data applications also require cross-chain feeding interactions between multiple chains, such as exchange rates, weather, stock prices, specific indicators, etc. Therefore, some applications of consortium chains cannot be fully implemented on a single chain, and need to be implemented with the help of scalability, isolation, high performance, interoperability and other characteristics under a multi-chain architecture.
[0051] Distributed key generation algorithm: Many cryptographic applications require a trusted third party to hold the key. This system has the problems of single point failure and key escrow. Distributed Key Generation (DKG) calculates shared public and private keys through the participation of multiple parties. Distributed key generation does not rely on any trusted third party. The distributed key generation DKG protocol allows multiple nodes to jointly generate keys. As a distributed system, the nodes in the blockchain generate keys in a distributed manner through DKG, overcoming the problems of single point failure and untrustworthy individual nodes. In some consensus algorithms, DKG is combined with the threshold signature algorithm, and the key of DKG is used as the key of the threshold signature to ensure that a certain proportion of consensus nodes can recover the public key and verify it when performing threshold signature on a message, which has Byzantine fault tolerance.
[0052] Threshold signature technology: The threshold signature mechanism is divided into two parts, namely threshold key generation and threshold signature. Among them, threshold key generation is to construct a distributed key generation protocol DKG based on security parameters. The protocol runs to output a common public key and the private key shares of different participants. Aggregating the private key shares that meet the threshold number can construct a real private key. Threshold signature is based on a distributed communication network. Each participant completes the distributed collaborative signing of the message through its own private key share and outputs the final verifiable signature. This signature is exactly the same as the one signed with a private key alone. It can be locally verified using the verification function in the basic signature mechanism on which it is based, without the need for communication interaction verification. The BLS signature algorithm, which is currently widely concerned, is a threshold signature algorithm, that is, an algorithm that can realize signature aggregation and key aggregation, that is, it can aggregate multiple keys into one key and multiple signatures into one signature.
[0053] The following is a detailed description of a distributed key-based alliance chain cross-chain transaction solution involved in this specification through a specific example.
[0054] Embodiment 1
[0055] Designing a cross-chain alliance chain solution that does not rely on a trusted third party to distribute keys, especially each node of the alliance chain uses the same key generation method, which is of great significance to the security of cross-chain transactions of the alliance chain. To solve this problem, this embodiment proposes a cross-chain alliance chain transaction solution based on a distributed key generation algorithm. Figure 1 As shown, this solution can conduct cross-chain transactions between several alliance chains. This embodiment only uses cross-chain transactions between a pair of alliance chains as an application scenario for explanation. In the above pair of alliance chains, one of the alliance chains is the sender of the cross-chain transaction, which is defined as the first alliance chain in all embodiments of the present invention; the other alliance chain is the receiver of the cross-chain transaction, which is defined as the second alliance chain in all embodiments of the present invention. It should be noted that the transactions of the alliance chain also exist in the form of messages as carriers. Therefore, in all specific embodiments of the present invention, there is no strict distinction between transactions or messages. It can be understood that any message or transaction involving cross-chain transmission or other cross-chain communication can be implemented using the technical solution of the present invention.
[0056] According to the above business description, we must meet the following conditions when designing a cross-chain transaction solution for alliance chains based on distributed keys: First, all alliance chains participating in cross-chain transactions between several alliance chains should use the same distributed key generation algorithm. Only in this way can the generated keys (including public keys and private keys) be recognized and correctly verified by each node and alliance chain participating in the cross-chain transaction. Secondly, all alliance chains participating in cross-chain transactions between several alliance chains should use the same signature algorithm. Only in this way can the generated signatures be recognized and correctly verified by each node and alliance chain participating in the cross-chain transaction, so as to generate a collective signature mutually recognized by each alliance chain.
[0057] In summary, this embodiment proposes a consortium chain cross-chain transaction system based on distributed keys, including a first consortium chain and a second consortium chain, wherein the first consortium chain is a cross-chain message sender, and the second consortium chain is a cross-chain message receiver; the first consortium chain and the second consortium chain both include an aggregate signature contract and a signature verification contract, and after the first consortium chain and the second consortium chain respectively determine the public parameters and thresholds of the node signature, they include:
[0058] The first alliance chain uses a distributed key generation algorithm to obtain a node key pair. When the first alliance chain node agrees to send the cross-chain message, it generates the signature, such as Sig_A1(m), Sig_A2(m), ..., Sig_An(m) in this embodiment. These consent signatures are sent to the first alliance chain aggregate signature contract, and the first alliance chain aggregate signature contract generates a collective signature Sig_A(m) representing the first alliance chain, and sends the collective signature and the cross-chain message to the second alliance chain. The first alliance chain verification contract receives the verification message Sig_B(m) from the second alliance chain and notifies each node of the first alliance chain.
[0059] The second alliance chain uses a distributed key generation algorithm to obtain a node key pair. The second alliance chain verification contract receives and verifies the collective signature Sig_A(m) and the cross-chain message m sent by the first alliance chain, and sends the verified cross-chain message to each node of the second alliance chain. When the second alliance chain node agrees to verify the cross-chain message, it generates the signatures Sig_B1('Agree'), Sig_B2('Agree'),..., Sig_Bn('Agree'), and sends them to the second alliance chain aggregation signature contract. The second alliance chain aggregation signature contract generates the collective signature Sig_B(m) representing the second alliance chain, generates the verification message and sends it to the first alliance chain.
[0060] Embodiment 2
[0061] Reference Figure 2As shown, it is a schematic diagram of the steps of the alliance chain cross-chain transaction method based on distributed keys provided in the embodiment of this specification. This embodiment is only described by taking the cross-chain transaction between a pair of alliance chains as the application scenario. It should be noted here that the first alliance chain and the second alliance chain use the same distributed key generation algorithm and signature algorithm. In the embodiment, the executor of the cross-chain transaction method is the sender of the alliance chain cross-chain transaction, which is defined as the first alliance chain in this specification. The first alliance chain includes an aggregate signature contract and a verification contract. Among them, the aggregate signature contract is used in the embodiment of the present invention to generate a collective signature representing the first alliance chain after receiving the signature of the first alliance chain node, and send the collective signature and the cross-chain message to the second alliance; the verification contract is used to receive the verification message from the second alliance chain and notify the first alliance chain node.
[0062] In the embodiment of the present invention, there is another important parameter called public parameter. The public parameter varies depending on the selected signature algorithm. This embodiment takes the BLS signature algorithm as an example. Therefore, the public parameters selected in this embodiment are also selected according to the requirements of the BLS signature algorithm, specifically (G1, G2, G T , e, g1, g2, p, h), where G1 and G2 are multiplicative cyclic groups of order p, with generators g1 and g2 respectively, and e is a bilinear map: G1*G2→G T , h is a secure hash function: {0, 1} * →G1, that is, h can map a bit string of any length to an element on group G1. At the same time, a threshold t is selected for the public parameter, which represents the number of signatures of different nodes in the first alliance chain that agree to send cross-chain messages. It should be noted here that since the first alliance chain and the second alliance chain must use the same signature algorithm, the selection of public parameters should also be consistent. However, the selection of the public parameter threshold for the first alliance chain and the second alliance chain is determined by their respective characteristics, that is, the public parameter thresholds of the first alliance chain and the second alliance chain are not necessarily equal.
[0063] After the first alliance chain initializes the aggregate signature contract and the verification contract, and determines the public parameters and their thresholds t, the method may include the following steps:
[0064] Step 201: Use a distributed key generation algorithm to obtain a key pair of the node.
[0065] Optionally, the key pair of the node includes a public key and a private key, the public key is used by the aggregate signature contract to verify the signature of the node, and the private key is used by the node to generate the signature according to the signature algorithm. Figure 3As shown, the distributed key generation algorithm used in the embodiment of the present invention is performed in the following manner:
[0066] First, node i of the first alliance chain is in Z p Select a polynomial P of order t-1 i (z): P i (z) = a i0 +a i1 z+a i2 z 2 +…+a it-1 z t-1 Node i calculates and broadcasts Where k = 0, 1, 2, ..., t-1. Node i calculates the key s ij =P i (j) and sends it secretly to node j. Next, node j verifies the key sent to it by node i as follows: If the verification fails, node j broadcasts a complaint message to node i. Again, if at least t nodes complain about node i, then node i is obviously a malicious node and node i is disqualified; we use the set QUAL to represent the set of qualified nodes. All nodes can calculate the public verification value A k =∑ i∈QUAL A ik , the public key PK of the first alliance chain as a whole A A0 is published by the first alliance chain and can be obtained by any alliance chain entity. Finally, each node j in the set QUAL calculates its own private key as sk j =∑ i∈QUAL s ij mod p; the public key of each node j Node j sends the public key from L to the aggregate signature contract.
[0067] It can be understood that any key pair generated by each node of the alliance chain using any distributed key generation algorithm without using third-party authorization should be within the protection scope of the solution of the present invention.
[0068] Step 202: When the node agrees to send the cross-chain message, the signature is generated and sent to the aggregate signature contract.
[0069] In this embodiment, when the first alliance chain needs to send a message m to the second alliance chain, the signature of node i in the first alliance chain is
[0070] Step 203: The aggregate signature contract generates a collective signature representing the first alliance chain, and sends the collective signature and the cross-chain message to the second alliance chain.
[0071] Alternatively, if Figure 4 As shown, the aggregate signature contract generates a collective signature representing the first alliance chain, including:
[0072] Step 401: Receive the signature of the first alliance chain node.
[0073] Step 402: Verify the signature of the node according to the verification rules.
[0074] Specifically, in this embodiment, the aggregate signature contract receives the signature σ of node i. i Verify the signature correctness
[0075] Step 403: If the verification is successful, the signature of the node is recorded.
[0076] Step 404: After receiving signatures from t different nodes in the first alliance chain, a collective signature representing the first alliance chain is generated.
[0077] Specifically, in this embodiment, after verification, σ i Record it down, and after receiving signatures from t different nodes, calculate the collective signature representing the first alliance chain as:
[0078]
[0079] Step 204: The verification contract receives the verification message from the second alliance chain and notifies each node of the first alliance chain.
[0080] Reference Figure 5 As shown, it is a schematic diagram of the steps of the consortium chain cross-chain transaction method based on distributed keys provided in an embodiment of this specification. This embodiment is described only with the cross-chain transaction between a pair of consortium chains as the application scenario. It should be noted here that the first consortium chain and the second consortium chain use the same distributed key generation algorithm and signature algorithm. In the embodiment, the executor of the cross-chain transaction method is the recipient of the consortium chain cross-chain transaction, which is defined as the second consortium chain in this specification. The second consortium chain includes an aggregate signature contract and a verification contract. Among them, the aggregate signature contract is used in this embodiment to receive the signatures of each node of the second consortium chain to generate a collective signature representing the second consortium chain, and send the verification message generated based on the collective signature to the first consortium chain; the verification contract is used in this embodiment to receive and verify the collective signature and cross-chain message sent by the first consortium chain, and send the verified cross-chain message to each node of the second consortium chain.
[0081] In the embodiment of the present invention, there is another important parameter called a public parameter. The public parameter varies depending on the selected signature algorithm. It should be noted here that since the first alliance chain and the second alliance chain must use the same signature algorithm, the selection of the public parameter should also be consistent. In this embodiment, the BLS signature algorithm is still used, and the selection of the public parameter is not repeated. However, the selection of the public parameter threshold for the first alliance chain and the second alliance chain is determined by their respective characteristics, that is, the public parameter thresholds of the first alliance chain and the second alliance chain are not necessarily equal. Therefore, the public parameter in this embodiment selects its threshold t′, t′, which represents the number of signatures of different nodes in the second alliance chain that agree to send cross-chain messages.
[0082] After the second alliance chain initializes the aggregate signature contract and the verification contract, and determines the public parameters and their thresholds t′, the method may include the following steps:
[0083] Step 501: Use a distributed key generation algorithm to obtain a key pair of the node.
[0084] Step 502: The signing and verification contract receives and verifies the collective signature and the cross-chain message sent by the first alliance chain, and sends the verified cross-chain message to each node of the second alliance chain.
[0085] Step 503: When the second alliance chain node agrees to verify the cross-chain message, the signature is generated and sent to the aggregate signature contract.
[0086] Step 504: The aggregate signature contract generates a collective signature representing the second alliance chain, and sends a verification message generated based on the collective signature to the first alliance chain.
[0087] It should be noted that when applied to the second alliance chain, the distributed key generation algorithm and signature algorithm are the same as when applied to the first alliance chain, and will not be repeated here.
[0088] Embodiment 3
[0089] Figure 6 This is a schematic diagram of the structure of a distributed key-based alliance chain cross-chain transaction device 600 provided in one embodiment of this specification. Please refer to Figure 6 In one embodiment, a distributed key-based alliance chain cross-chain transaction device includes:
[0090] A public parameter management module 601 is used to select a public parameter and a threshold t for signing by a first alliance chain node, where the public parameter threshold t is used to represent the number of signatures of different nodes in the first alliance chain that agree to send a cross-chain message;
[0091] A key pair generation module 602, configured to obtain a key pair of the first alliance chain node using a distributed key generation algorithm;
[0092] Signature management module 603, used for the first alliance chain node to generate the signature;
[0093] The aggregate signature contract module 604 is used to generate a collective signature representing the first alliance chain after receiving the signature of the first alliance chain node, and send the collective signature and the cross-chain message to the second alliance chain;
[0094] The contract verification module 605 receives the verification message from the second alliance chain and notifies the first alliance chain node.
[0095] Figure 7 This is a schematic diagram of the structure of a distributed key-based alliance chain cross-chain transaction device 700 provided in one embodiment of this specification. Please refer to Figure 7 In one embodiment, a distributed key-based alliance chain cross-chain transaction device includes:
[0096] The public parameter management module 701 is used to select the public parameters and threshold t′ for signature of each node of the second alliance chain, and the public parameter threshold t′ is used to represent the number of signatures of different nodes in the second alliance chain that agree to send cross-chain messages;
[0097] A key pair generation module 702, configured to obtain a key pair of a second alliance chain node by using a distributed key generation algorithm;
[0098] Signature management module 703, used for each node of the second alliance chain to generate the signature;
[0099] The aggregate signature contract module 704 is used to receive the signatures of each node of the second alliance chain to generate a collective signature representing the second alliance chain, and send the signature verification message generated based on the collective signature to the first alliance chain;
[0100] The signing and verification contract module 705 is used to receive and verify the collective signature and cross-chain message sent by the first alliance chain, and send the verified cross-chain message to each node of the second alliance chain.
[0101] It should be understood that the distributed key-based alliance chain cross-chain transaction device of the embodiment of this specification can also execute Figures 1 to 5 A method for executing a distributed key-based alliance chain cross-chain transaction device (or device) in the present invention, and realizing a distributed key-based alliance chain cross-chain transaction device (or device) in the present invention Figures 1 to 5 The functions of the illustrated embodiment will not be described in detail here.
[0102] Embodiment 4
[0103] Figure 8 This is a schematic diagram of the structure of an electronic device according to an embodiment of this specification. Figure 8 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. Of course, the electronic device may also include hardware required for other services.
[0104] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0105] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.
[0106] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a shared resource access control device at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:
[0107] The method comprises a first alliance chain and a second alliance chain, wherein the first alliance chain comprises an aggregate signature contract and a signature verification contract, and after determining the public parameter and threshold t for signing by the first alliance chain node, the public parameter threshold t is used to characterize the number of signatures of different nodes in the first alliance chain that agree to send cross-chain messages; and is applied to the first alliance chain, comprising:
[0108] Obtaining a key pair of the node using a distributed key generation algorithm;
[0109] When the node agrees to send the cross-chain message, the signature is generated and sent to the aggregate signature contract;
[0110] The aggregate signature contract generates a collective signature representing the first alliance chain, and sends the collective signature and the cross-chain message to the second alliance chain;
[0111] The verification contract receives the verification message from the second alliance chain and notifies each node of the first alliance chain.
[0112] or,
[0113] The method comprises a first alliance chain and a second alliance chain, wherein the second alliance chain comprises an aggregate signature contract and a signature verification contract, and after determining the public parameter and the threshold t′ for the signature of the second alliance chain node, the public parameter threshold t′ is used to characterize the number of signatures of different nodes in the second alliance chain that agree to send cross-chain messages; and is applied to the second alliance chain, comprising:
[0114] Obtaining a key pair of the node using a distributed key generation algorithm;
[0115] The signing and verification contract receives and verifies the collective signature and the cross-chain message sent by the first alliance chain, and sends the verified cross-chain message to each node of the second alliance chain;
[0116] When the second alliance chain node agrees to verify the cross-chain message, it generates the signature and sends the signature to the aggregate signature contract;
[0117] The aggregate signature contract generates a collective signature representing the second alliance chain, and sends a verification message generated based on the collective signature to the first alliance chain.
[0118] The above is as in this manual Figures 1 to 5The embodiment disclosed in the present invention discloses a consortium chain cross-chain transaction method based on a distributed key generation algorithm, which can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or instructions in the form of software. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of this specification can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of this specification can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0119] Of course, in addition to software implementation, the electronic device of the embodiments of this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0120] Embodiment 5
[0121] The embodiment of the present specification also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by a portable electronic device including a plurality of application programs, enable the portable electronic device to execute Figures 1 to 4 The method of the embodiment shown is specifically used to perform the following method:
[0122] The method comprises a first alliance chain and a second alliance chain, wherein the first alliance chain comprises an aggregate signature contract and a signature verification contract, and after determining the public parameter and threshold t for signing by the first alliance chain node, the public parameter threshold t is used to characterize the number of signatures of different nodes in the first alliance chain that agree to send cross-chain messages; and is applied to the first alliance chain, comprising:
[0123] Obtaining a key pair of the node using a distributed key generation algorithm;
[0124] When the node agrees to send the cross-chain message, the signature is generated and sent to the aggregate signature contract;
[0125] The aggregate signature contract generates a collective signature representing the first alliance chain, and sends the collective signature and the cross-chain message to the second alliance chain;
[0126] The verification contract receives the verification message from the second alliance chain and notifies each node of the first alliance chain.
[0127] or,
[0128] The method comprises a first alliance chain and a second alliance chain, wherein the second alliance chain comprises an aggregate signature contract and a signature verification contract, and after determining the public parameter and the threshold t′ for the signature of the second alliance chain node, the public parameter threshold t′ is used to characterize the number of signatures of different nodes in the second alliance chain that agree to send cross-chain messages; and is applied to the second alliance chain, comprising:
[0129] Obtaining a key pair of the node using a distributed key generation algorithm;
[0130] The signing and verification contract receives and verifies the collective signature and the cross-chain message sent by the first alliance chain, and sends the verified cross-chain message to each node of the second alliance chain;
[0131] When the second alliance chain node agrees to verify the cross-chain message, it generates the signature and sends the signature to the aggregate signature contract;
[0132] The aggregate signature contract generates a collective signature representing the second alliance chain, and sends a verification message generated based on the collective signature to the first alliance chain.
[0133] In short, the above description is only a preferred embodiment of this specification and is not intended to limit the protection scope of this specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification shall be included in the protection scope of this specification.
[0134] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0135] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0136] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0137] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
Claims
1. A distributed key-based alliance chain cross-chain transaction method, comprising a first alliance chain and a second alliance chain, characterized in that: The first alliance chain includes an aggregate signature contract and a signature verification contract. After determining the public parameter and threshold t for the signature of the first alliance chain node, the public parameter threshold t is used to represent the number of signatures of different nodes in the first alliance chain that agree to send cross-chain messages; Applied to the first alliance chain, including: Obtaining a key pair of the node using a distributed key generation algorithm; When the node agrees to send the cross-chain message, the signature is generated and sent to the aggregate signature contract; The aggregate signature contract generates a collective signature representing the first alliance chain, and sends the collective signature and the cross-chain message to the second alliance chain; The verification contract receives the verification message from the second alliance chain and notifies each node of the first alliance chain, wherein: The aggregate signature contract generates a collective signature representing the first alliance chain, including: Receiving the signature of the first alliance chain node; The signature of the node is verified according to the verification rules; the verification rules are as follows: When the signature σ of node i i Verify the signature verification, where pk i is the public key of node i, e is a bilinear map, h(m) is a secure hash function, and g2 is the generator of the multiplicative cyclic group; If the verification is successful, the signature of the node is recorded; After receiving signatures from t different nodes in the first alliance chain, a collective signature representing the first alliance chain is generated.
2. The method according to claim 1, characterized in that: The key pair of the node includes a public key and a private key, the public key is used by the aggregate signature contract to verify the signature of the node, and the private key is used by the node to generate the signature according to the signature algorithm.
3. The method according to claim 1, characterized in that The first alliance chain and the second alliance chain adopt the same distributed key generation algorithm and signature algorithm.
4. A distributed key-based alliance chain cross-chain transaction device, characterized in that: include: A public parameter management module, used to determine the public parameters and threshold t for signing by the first alliance chain node, where the public parameter threshold t is used to represent the number of signatures of different nodes in the first alliance chain that agree to send cross-chain messages; A key pair generation module, used to obtain the key pair of the first alliance chain node using a distributed key generation algorithm; A signature management module, used for the first alliance chain node to generate the signature; An aggregate signature contract module, used to generate a collective signature representing the first alliance chain after receiving the signature of the first alliance chain node, and send the collective signature and the cross-chain message to the second alliance chain; The contract verification module receives the verification message from the second alliance chain and notifies the first alliance chain node, wherein: The aggregate signature contract module is used to receive the signature of the first alliance chain node; verify the signature of the node according to the verification rules; the verification rules are as follows: When the signature σ of node i i Verify the signature verification, where pk i is the public key of node i, e is a bilinear map, h(m) is a secure hash function, and g2 is a generator of a multiplication cyclic group; if the verification passes, the signature of the node is recorded; after receiving the signatures of t different nodes in the first alliance chain, a collective signature representing the first alliance chain is generated.
5. A distributed key-based alliance chain cross-chain transaction method, comprising a first alliance chain and a second alliance chain, characterized in that: The second alliance chain includes an aggregate signature contract and a signature verification contract. After determining the public parameters and threshold t' for the signature of the second alliance chain node, the public parameter threshold t' is used to represent the number of signatures of different nodes in the second alliance chain that agree to send cross-chain messages; Applied to the second alliance chain, including: Obtaining a key pair of the node using a distributed key generation algorithm; The signing and verification contract receives and verifies the collective signature and the cross-chain message sent by the first alliance chain, and sends the verified cross-chain message to each node of the second alliance chain; When the second alliance chain node agrees to verify the cross-chain message, it generates the signature and sends the signature to the aggregate signature contract; The aggregate signature contract generates a collective signature representing the second alliance chain, and sends a verification message generated based on the collective signature to the first alliance chain, wherein: The aggregate signature contract generates a collective signature representing the second alliance chain, including: Receiving the signature of the second alliance chain node; The signature of the node is verified according to the verification rules; the verification rules are as follows: When the signature σ of node i i Verify the signature verification, where pk i is the public key of node i, e is a bilinear map, h(m) is a secure hash function, and g2 is the generator of the multiplicative cyclic group; If the verification is successful, the signature of the node is recorded; After receiving signatures from t' different nodes in the second alliance chain, a collective signature representing the second alliance chain is generated.
6. A distributed key-based alliance chain cross-chain transaction device, characterized in that: include: A public parameter management module, used to determine the public parameters and threshold t' for signatures of each node of the second alliance chain, wherein the public parameter threshold t' is used to represent the number of signatures of different nodes in the second alliance chain that agree to send cross-chain messages; A key pair generation module, used to calculate and obtain the key pair of the second alliance chain node using a distributed key generation algorithm; A signature management module, used for each node of the second alliance chain to generate the signature; An aggregate signature contract module, used to receive signatures of each node of the second alliance chain to generate a collective signature representing the second alliance chain, and send a signature verification message generated based on the collective signature to the first alliance chain; The signing and verification contract module is used to receive and verify the collective signature and cross-chain message sent by the first alliance chain, and send the verified cross-chain message to each node of the second alliance chain, wherein: The aggregate signature contract module is used to receive the signature of the second alliance chain node; verify the signature of the node according to the verification rules; the verification rules are When the signature σ of node i i Verify the signature verification, where pk i is the public key of node i, e is a bilinear map, h(m) is a secure hash function, and g2 is a generator of a multiplication cyclic group; if the verification passes, the signature of the node is recorded; after receiving the signatures of t' different nodes in the second alliance chain, a collective signature representing the second alliance chain is generated.
7. A distributed key-based alliance chain cross-chain transaction system, comprising a first alliance chain and a second alliance chain, wherein the first alliance chain is a cross-chain message sender, and the second alliance chain is a cross-chain message receiver; characterized in that: The first alliance chain and the second alliance chain both include an aggregate signature contract and a signature verification contract. After the first alliance chain and the second alliance chain respectively determine the public parameters of the node signature and the threshold thereof, they include: The first alliance chain uses a distributed key generation algorithm to obtain a node key pair. When the first alliance chain node agrees to send the cross-chain message, the signature is generated and sent to the first alliance chain aggregate signature contract. The first alliance chain aggregate signature contract generates a collective signature representing the first alliance chain, and sends the collective signature and the cross-chain message to the second alliance chain. The first alliance chain verification contract receives the verification message from the second alliance chain and notifies each node of the first alliance chain. The second alliance chain uses a distributed key generation algorithm to obtain a node key pair. The second alliance chain verification contract receives and verifies the collective signature and the cross-chain message sent by the first alliance chain, and sends the verified cross-chain message to each node of the second alliance chain. When the second alliance chain node agrees to verify the cross-chain message, it generates the signature and sends it to the second alliance chain aggregate signature contract. The second alliance chain aggregate signature contract generates a collective signature representing the second alliance chain, generates the verification message and sends it to the first alliance chain, wherein: The aggregate signature contract generates a collective signature representing the first alliance chain, including: Receiving the signature of the first alliance chain node; The signature of the node is verified according to the verification rules; the verification rules are as follows: When the signature σ of node i i Verify the signature verification, where pk i is the public key of node i, e is a bilinear map, h(m) is a secure hash function, and g2 is the generator of the multiplicative cyclic group; If the verification is successful, the signature of the node is recorded; After receiving signatures from t different nodes in the first alliance chain, a collective signature representing the first alliance chain is generated; The aggregate signature contract generates a collective signature representing the second alliance chain, including: Receiving the signature of the second alliance chain node; The signature of the node is verified according to the verification rules; the verification rules are as follows: When the signature σ of node i i Verify the signature verification, where pk i is the public key of node i, e is a bilinear map, h(m) is a secure hash function, and g2 is the generator of the multiplicative cyclic group; If the verification is successful, the signature of the node is recorded; After receiving signatures from t' different nodes in the second alliance chain, a collective signature representing the second alliance chain is generated.
8. An electronic device, characterized in that: include: processor; as well as A memory arranged to store computer executable instructions which, when executed, cause the processor to perform the method of any one of claims 1 to 3.
9. An electronic device, characterized in that: include: processor; as well as A memory arranged to store computer executable instructions which, when executed, cause the processor to perform the method of claim 5.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, which, when executed by an electronic device including a plurality of application programs, cause the electronic device to execute the method according to any one of claims 1 to 3.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs which, when executed by an electronic device including a plurality of application programs, cause the electronic device to perform the method of claim 5 .
Citation Information
Patent Citations
Cross-Chain Messaging and Message Validation
US20200322175A1