CN115766040A - High-throughput cross-chain transaction method based on atomic exchange - Google Patents

High-throughput cross-chain transaction method based on atomic exchange Download PDF

Info

Publication number
CN115766040A
CN115766040A CN202211557241.7A CN202211557241A CN115766040A CN 115766040 A CN115766040 A CN 115766040A CN 202211557241 A CN202211557241 A CN 202211557241A CN 115766040 A CN115766040 A CN 115766040A
Authority
CN
China
Prior art keywords
block chain
blockchain
transaction
chain
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211557241.7A
Other languages
Chinese (zh)
Inventor
陈铁明
方鑫鑫
李英龙
王婷
吕明琪
朱建明
季白杨
周君良
俞荣栋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang University of Technology ZJUT
Original Assignee
Zhejiang University of Technology ZJUT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang University of Technology ZJUT filed Critical Zhejiang University of Technology ZJUT
Priority to CN202211557241.7A priority Critical patent/CN115766040A/en
Publication of CN115766040A publication Critical patent/CN115766040A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明公开了一种基于原子交换的高通量跨链交易方法,包括:先通过第一区块链和第二区块链各自的唯一身份加密后通过网关智能合约向中继端发起注册请求;创建交互通道后,第一区块链使用想要与第二区块链信息交互,第一区块链通过第二区块链的唯一身份标识将第一区块链的信息进行加密,发起交易请求;第二区块链通过网关进行轻客户端简单支付验证交易,如验证成功,第二区块链根据自己的私钥通过解密算法将信息解密,存入自己的区块链。本发明进行交易的双方直接进行跨链数据交换,避免了原有的哈希时间锁技术中攻击者创建大量的交易通道所带来的堵塞网络的风险,从而提高了跨链数据传输的吞吐量。

Figure 202211557241

The invention discloses a high-throughput cross-chain transaction method based on atomic swap, which includes: first encrypting the unique identities of the first block chain and the second block chain, and then sending a registration request to the relay terminal through a gateway smart contract ; After creating the interaction channel, the first blockchain uses the information that wants to interact with the second blockchain, the first blockchain encrypts the information of the first blockchain through the unique identity of the second blockchain, and initiates Transaction request; the second block chain conducts a simple payment verification transaction of the light client through the gateway. If the verification is successful, the second block chain decrypts the information through a decryption algorithm according to its own private key and stores it in its own block chain. In the present invention, both sides of the transaction directly exchange data across chains, avoiding the risk of blocking the network caused by attackers creating a large number of transaction channels in the original hash time lock technology, thereby improving the throughput of cross-chain data transmission .

Figure 202211557241

Description

一种基于原子交换的高通量跨链交易方法A high-throughput cross-chain transaction method based on atomic swap

技术领域technical field

本发明涉及区块链跨链技术领域,具体涉及一种基于原子交换的高通量跨链交易方法。The invention relates to the technical field of block chain cross-chain, in particular to a high-throughput cross-chain transaction method based on atomic swap.

背景技术Background technique

近年来,以区块链为代表的分布式信任与价值体系正在以前所未有的速度和规模形成,区块链的发展也备受关注但同时区块链也存在着吞吐量低、传播时延高和网络孤立等明显缺点。在区块链面临的所有问题中,网络孤立性对区块链发展空间影响最大,严重阻碍了同区块链之间的协同操作。In recent years, the distributed trust and value system represented by the blockchain is forming at an unprecedented speed and scale. The development of the blockchain has also attracted much attention. However, the blockchain also has low throughput and high propagation delay. And obvious disadvantages such as network isolation. Among all the problems faced by the blockchain, the isolation of the network has the greatest impact on the development space of the blockchain, which seriously hinders the collaborative operation between the same blockchain.

跨链应运而生,跨链技术是针对区块链所面临的网络孤立性问题的解决方案,架起了信息孤岛间通信的桥梁,使得价值互联网变成现实,是一个链到另一个链的通信协议,是区块链3.0阶段的核心内容。现有的跨链方式包括公证人机制、侧链/中继、哈希锁定以及分布式私钥控制。Cross-chain emerged as the times require. Cross-chain technology is a solution to the network isolation problem faced by the blockchain. It builds a bridge for communication between information islands and makes the value Internet a reality. It is a link from one chain to another. The communication protocol is the core content of the blockchain 3.0 stage. Existing cross-chain methods include notary mechanisms, side chains/relays, hash locks, and distributed private key control.

公证人机制是一种弱中心化的跨链项目解决方案,它支持双向跨链、实现原理简单、无须复杂的工作量证明。The notary mechanism is a weakly centralized cross-chain project solution, which supports two-way cross-chain, has a simple implementation principle, and does not require complicated proof-of-work.

侧链/中继模式,采用第三方媒介充当客户链的中继器,将跨链子交易的区块中继至相应的区块链上。它的优点是使跨链网络更高效,能支持跨链资产变换转移、跨链合约和资产抵押,交易的确认和验证由应用链负责。The side chain/relay mode uses a third-party medium to act as the repeater of the customer chain, and relays the blocks of cross-chain transactions to the corresponding blockchain. Its advantage is to make the cross-chain network more efficient, and it can support cross-chain asset transformation and transfer, cross-chain contract and asset mortgage, and the application chain is responsible for the confirmation and verification of transactions.

哈希锁定是一种实现异链间资产交换的跨链技术,它要求交易的中间人和接收者在给定时间内给出正确哈希值。哈希锁定的优点是区块链之间通过在两条链上运行特定的智能合约,实现跨链信息交互,哈希锁定严格依赖于智能合约的执行。Hash locking is a cross-chain technology that realizes the exchange of assets between different chains. It requires the middleman and receiver of the transaction to give the correct hash value within a given time. The advantage of hash locking is that the blockchains can realize cross-chain information interaction by running specific smart contracts on the two chains, and hash locking is strictly dependent on the execution of smart contracts.

分布式私钥控制是将数字资产的所有权和使用权分离来降低中心化的风险。分布式私钥控制的优点是用户只拥有私钥就拥有资产的控制权。Distributed private key control is to separate the ownership and use rights of digital assets to reduce the risk of centralization. The advantage of distributed private key control is that users only have private keys to control assets.

现有的跨链存在以下问题:The existing cross-chain has the following problems:

1.目前跨链技术没有完整且全面的支持异构区块链跨链;1. At present, cross-chain technology does not fully and comprehensively support heterogeneous blockchain cross-chain;

2.公证人的类中心化容易造成中心化风险,存在单点失效问题;2. Quasi-centralization of notaries is likely to cause centralization risks, and there is a problem of single point of failure;

3.侧链/中继模式缺点是需要对应用链底层扩展,开发成本较高;3. The disadvantage of the side chain/relay mode is that it needs to expand the bottom layer of the application chain, and the development cost is relatively high;

4.哈希锁定目前应用场景相对受限,会出现由于正常的网络延迟的原因而超出时间锁限制导致关闭交易通道,影响正常的跨链数据交换;4. The current application scenarios of hash lock are relatively limited, and the transaction channel will be closed due to the normal network delay exceeding the time lock limit, which will affect the normal cross-chain data exchange;

5.分布式私钥控制智能合约需要更多方面实现。5. Distributed private key control smart contracts require more implementations.

发明内容Contents of the invention

本发明提供了一种基于原子交换的高通量跨链交易方法,旨在解决现有跨链交易技术中吞吐量低的问题。The present invention provides a high-throughput cross-chain transaction method based on atomic swap, aiming to solve the problem of low throughput in the existing cross-chain transaction technology.

本发明的主要特点为:基于区块链身份的加密方法(identity-basedencryption,IBE)、网关智能合约、简单支付验证(Simplified Payment Verification,SPV)。所述基于区块链身份的加密方法包括:密码生成模块。网关智能合约包括:身份注册合约、SPV验证模块。简单支付验证模块包括:交易验证模块。The main features of the present invention are: an encryption method based on blockchain identity (identity-based encryption, IBE), a gateway smart contract, and simple payment verification (Simplified Payment Verification, SPV). The encryption method based on block chain identity includes: a password generation module. The gateway smart contract includes: identity registration contract, SPV verification module. The simple payment verification module includes: transaction verification module.

本发明基于原子交换的高通量跨链交易方法采用三元组算法,三元组包括生成公私钥算法、加密算法、解码算法。The high-throughput cross-chain transaction method based on atomic swap in the present invention adopts a triplet algorithm, and the triplet includes an algorithm for generating public and private keys, an encryption algorithm, and a decoding algorithm.

一种基于原子交换的高通量跨链交易方法,包括如下步骤:A high-throughput cross-chain transaction method based on atomic swap, comprising the following steps:

(1)采用在不同场景下的第一区块链和第二区块链,先通过第一区块链和第二区块链各自的唯一身份加密后通过网关智能合约向中继端发起注册请求,根据注册请求给返回对应区块链注册成功的命令;(1) Using the first block chain and the second block chain in different scenarios, first encrypt the unique identity of the first block chain and the second block chain, and then initiate registration to the relay terminal through the gateway smart contract Request, according to the registration request, return the command corresponding to the successful registration of the blockchain;

(2)第一区块链和第二区块链接收到注册成功的命令后,创建交互通道;(2) After the first block chain and the second block chain receive the command of successful registration, they create an interactive channel;

(3)创建交互通道后,第一区块链想要与第二区块链信息交互,第一区块链通过第二区块链的唯一身份标识将第一区块链的信息进行加密,发起交易请求;(3) After creating the interaction channel, the first blockchain wants to interact with the information of the second blockchain, and the first blockchain encrypts the information of the first blockchain through the unique identity of the second blockchain, Initiate a transaction request;

(4)发起交易请求后,第二区块链通过网关进行轻客户端简单支付验证交易,如验证成功,第二区块链根据自己的私钥通过解密算法将信息解密,存入自己的区块链。(4) After the transaction request is initiated, the second block chain performs a simple payment verification transaction on the light client through the gateway. If the verification is successful, the second block chain decrypts the information through the decryption algorithm according to its own private key and stores it in its own area. blockchain.

本发明通过基于区块链身份的加密方法建立交易通道和简单支付验证技术验证交易,降低在跨链交易场景下交易时间,提高交易的吞吐量。The invention establishes a transaction channel through an encryption method based on a block chain identity and verifies transactions with a simple payment verification technology, thereby reducing transaction time in a cross-chain transaction scenario and improving transaction throughput.

步骤(1)中,第一区块链和第二区块链各自的唯一身份加密采用公私钥算法生成私钥,具体包括:In step (1), the unique identity encryption of the first block chain and the second block chain uses a public-private key algorithm to generate a private key, specifically including:

通过生成公私钥算法将输入区块链的唯一身份

Figure 316036DEST_PATH_IMAGE001
输出对应于该身份的公钥PK和私钥SK,公钥PK作为身份的唯一身份标识。The unique identity that will be entered into the blockchain by generating a public-private key algorithm
Figure 316036DEST_PATH_IMAGE001
Output the public key PK and private key SK corresponding to the identity, and the public key PK serves as the unique identity of the identity.

基于唯一身份的加密方法属于非对称加密算法,安全性比对称加密更高,且给予身份的加密方法相比较于其他非对称加密更高效,公钥信息也更完整。The encryption method based on unique identity is an asymmetric encryption algorithm, which is more secure than symmetric encryption, and the encryption method based on identity is more efficient than other asymmetric encryption, and the public key information is also more complete.

步骤(3)中,第一区块链的信息为第一区块链带有交易信息的区块哈希值。In step (3), the information of the first block chain is the block hash value of the first block chain with transaction information.

步骤(3)中,第一区块链通过第二区块链的唯一身份标识将第一区块链的信息进行加密,发起交易请求,具体包括:将第一区块链带有交易信息的区块哈希值与第二区块链的唯一身份标识进行哈希计算,通过计算后的哈希值发起交易请求。In step (3), the first block chain encrypts the information of the first block chain through the unique identity of the second block chain, and initiates a transaction request, which specifically includes: Hash calculation is performed on the block hash value and the unique identity of the second blockchain, and a transaction request is initiated through the calculated hash value.

哈希计算不可逆运算的特性,可以确保交易信息不会被轻易破解到,从而保护了交易信息不被非法访问者直接获取。The characteristics of the irreversible operation of the hash calculation can ensure that the transaction information will not be easily cracked, thus protecting the transaction information from being directly obtained by illegal visitors.

步骤(4)中,第二区块链通过网关进行轻客户端简单支付验证交易,具体包括:轻客户端发起请求,全节点收到交易后,会根据此交易属于哪个区块,运算这个区块的Merkle Tree。然后,轻节点收到部分 Merkle Tree之后,在自己本地运算这个交易的哈希,根据部分 Merkle Tree上的各个哈希值,一直运算获得 Merkle Root,如果这个值跟自己的区块头中的正好吻合,交易验证成功。In step (4), the second block chain performs a simple payment verification transaction on the light client through the gateway, which specifically includes: the light client initiates a request, and after the full node receives the transaction, it will calculate the block according to which block the transaction belongs to. Merkle Tree of blocks. Then, after the light node receives part of the Merkle Tree, it calculates the hash of the transaction locally, and obtains the Merkle Root according to the hash values on the part of the Merkle Tree. If the value matches the value in its own block header , the transaction verification is successful.

使用轻客户端验证的优势在于Merkle Tree,要确认一个交易是不是从属于一个Merkle Root,不需要把整个 Merkle Tree 都发送给轻节点,而只需要发送跟当前交易相关的部分Merkle Tree即可。The advantage of using light client verification lies in the Merkle Tree. To confirm whether a transaction belongs to a Merkle Root, it is not necessary to send the entire Merkle Tree to the light node, but only the part of the Merkle Tree related to the current transaction.

与现有技术对比,本发明的有益效果主要体现在:Compared with the prior art, the beneficial effects of the present invention are mainly reflected in:

1、基于身份的加密方法,将区块链注册至中继端,中继端只为跨链交易提供注册功能,而不参与跨链交换的具体细节;1. The identity-based encryption method registers the blockchain to the relay terminal, and the relay terminal only provides registration functions for cross-chain transactions, and does not participate in the specific details of cross-chain exchanges;

2、注册成功后,进行交易的双方直接进行跨链数据交换,不需要维持现有的方法的哈希时间原子交换所规定的时间周期,避免了原有的哈希时间原子交换技术中如果攻击者创建大量的交易带来的堵塞网络的风险,从而提高了跨链数据传输的吞吐量;2. After the registration is successful, the two parties conducting the transaction directly conduct cross-chain data exchange, without the need to maintain the time period stipulated by the hash time atomic swap of the existing method, avoiding the attack in the original hash time atomic swap technology The risk of blocking the network caused by the creation of a large number of transactions, thereby improving the throughput of cross-chain data transmission;

3、采用SPV简单支付验证技术,轻客户端SPV验证无需下载所有区块链信息,只需下载区块头进行验证,确保了交易的正确性的同时,降低了交易的时间,提高了交易的吞吐量。3. Using SPV simple payment verification technology, the light client SPV verification does not need to download all blockchain information, but only needs to download the block header for verification, which ensures the correctness of the transaction while reducing the transaction time and improving the transaction throughput. quantity.

附图说明Description of drawings

图1为本发明的系统结构示意图。Fig. 1 is a schematic diagram of the system structure of the present invention.

图2为本发明的跨链数据交互的时序图。Figure 2 is a sequence diagram of cross-chain data interaction in the present invention.

图3为本发明的数据加密、广播、验证、解密的示意图。Fig. 3 is a schematic diagram of data encryption, broadcasting, verification and decryption in the present invention.

图4为本发明的SPV简单支付验证方法的示意图。Fig. 4 is a schematic diagram of the SPV simple payment verification method of the present invention.

具体实施方式Detailed ways

下面将结合附图对本发明作进一步描述。The present invention will be further described below in conjunction with the accompanying drawings.

如图1所示,一种基于原子交换的高通量跨链交易方法,主要特点为:基于区块链身份的加密方法、网关智能合约、简单支付验证。基于区块链身份的加密方法包括:密码生成模块。网关智能合约包括:身份注册合约、SPV验证模块。简单支付验证模块包括:交易验证模块。主要包括如下步骤:As shown in Figure 1, a high-throughput cross-chain transaction method based on atomic swap, the main features are: encryption method based on blockchain identity, gateway smart contract, and simple payment verification. The encryption method based on blockchain identity includes: a password generation module. The gateway smart contract includes: identity registration contract, SPV verification module. The simple payment verification module includes: transaction verification module. It mainly includes the following steps:

(1)进行交易的区块链利用在此区块链网络中的唯一身份,通过IBE身份加密方法生成私钥,交易区块链双方使用唯一身份通过网关智能合约向中继端发起注册请求;(1) The blockchain for transactions uses the unique identity in this blockchain network to generate a private key through the IBE identity encryption method, and both parties to the transaction blockchain use the unique identity to initiate a registration request to the relay terminal through the gateway smart contract;

(2)中继智能合约根据注册请求返回给对应区块链注册成功命令;(2) The relay smart contract returns a successful registration command to the corresponding blockchain according to the registration request;

(3)区块链使用想要与之信息交互的区块链的唯一身份标识将信息通过该身份标识加密,发起交易请求;(3) The blockchain uses the unique identity of the blockchain that wants to interact with the information to encrypt the information through the identity and initiate a transaction request;

(4)对应的区块链通过网关进行轻客户端SPV验证验证交易;(4) The corresponding block chain performs light client SPV verification and verification transactions through the gateway;

(5)对应的区块链通过身份标识对应的私钥解密信息,获取信息。(5) The corresponding block chain decrypts the information through the private key corresponding to the identity, and obtains the information.

跨链数据交互时序图如图2所示。The timing diagram of cross-chain data interaction is shown in Figure 2.

步骤(1)中,区块链双方通过IBE身份加密生成私钥,并用唯一身份通过网关智能合约向中继端发起注册请求的具体步骤如下:(1-1)使用基于身份认证的加解密方法,根据每条区块链在一个跨链系统中身份的唯一性作为公钥,使用椭圆曲线算法,生成对应的私钥。In step (1), both parties in the blockchain generate a private key through IBE identity encryption, and use the unique identity to initiate a registration request to the relay terminal through the gateway smart contract. The specific steps are as follows: (1-1) Use the encryption and decryption method based on identity authentication , according to the unique identity of each blockchain in a cross-chain system as the public key, use the elliptic curve algorithm to generate the corresponding private key.

设区块链

Figure 702018DEST_PATH_IMAGE002
为身份的集合,其中
Figure 950597DEST_PATH_IMAGE003
。假设M为待加密的明文信息,S表示明文加密后的密文。Set up blockchain
Figure 702018DEST_PATH_IMAGE002
is a collection of identities, where
Figure 950597DEST_PATH_IMAGE003
. Assume that M is the plaintext information to be encrypted, and S represents the ciphertext after plaintext encryption.

改进的基于IBE身份加密的方案

Figure 549069DEST_PATH_IMAGE004
由extract, encryption和decryption三个步骤组成,构成一个关于算法的三元组
Figure 832282DEST_PATH_IMAGE005
,其中extract为密钥生成算法,encryption为明文加密算法,decryption为密文解密算法,具体描述如下:Improved scheme based on IBE identity encryption
Figure 549069DEST_PATH_IMAGE004
It consists of three steps of extract, encryption and decryption, forming a triplet about the algorithm
Figure 832282DEST_PATH_IMAGE005
, where extract is the key generation algorithm, encryption is the plaintext encryption algorithm, and decryption is the ciphertext decryption algorithm. The specific description is as follows:

算法K在extract阶段执行, 输入为一个身份

Figure 123587DEST_PATH_IMAGE006
, 且
Figure 656199DEST_PATH_IMAGE007
, 输出对应于该身份的公钥PK和私钥SK:
Figure 58362DEST_PATH_IMAGE008
其中算法K为公私钥生成算法,PK为公钥,SK为私钥,ID为区块链在跨链系统中的唯一身份。Algorithm K is executed in the extract stage, and the input is an identity
Figure 123587DEST_PATH_IMAGE006
, and
Figure 656199DEST_PATH_IMAGE007
, output the public key PK and private key SK corresponding to the identity:
Figure 58362DEST_PATH_IMAGE008
The algorithm K is the public-private key generation algorithm, PK is the public key, SK is the private key, and ID is the unique identity of the blockchain in the cross-chain system.

(1-2)将私钥SK存入私钥生成器(Private Key Generator,PKG),PKG采用分层树型结构的管理机构建设方式,用于之后解密信息用。(1-2) Store the private key SK into the private key generator (Private Key Generator, PKG). PKG adopts a hierarchical tree structure management mechanism construction method for later decryption of information.

(1-3)根据步骤(1-1)中的唯一身份生成的公钥PK,通过在网关端编写智能合约,智能合约包含对应区块链的唯一身份信息。(1-3) According to the public key PK generated by the unique identity in step (1-1), by writing a smart contract on the gateway side, the smart contract contains the unique identity information of the corresponding blockchain.

(1-4)通过网关将智能合约发送至中继端发起对区块链的注册请求。(1-4) Send the smart contract to the relay terminal through the gateway to initiate a registration request for the blockchain.

步骤(2)中,中继智能合约返回注册成功的具体步骤如下:(2-1)中继智能合约接收到来自网关端的注册请求后,核验该注册请求是否符合要求,若符合要求,则向网关返回注册成功的命令。In step (2), the specific steps for the relay smart contract to return the registration success are as follows: (2-1) After the relay smart contract receives the registration request from the gateway, it verifies whether the registration request meets the requirements, and if it meets the requirements, it sends the registration request to The gateway returns a successful registration command.

(2-2)返回信息中,还包含当前所有注册在中继端的区块链的身份ID对应的公钥,以便后续信息交互使用。(2-2) The returned information also includes the public keys corresponding to the identity IDs of all blockchains currently registered at the relay end, so that subsequent information can be used interactively.

数据加密、广播、验证、解密的示意图如图3所示。A schematic diagram of data encryption, broadcast, verification, and decryption is shown in Figure 3.

步骤(3)中,发起交易请求的具体步骤如下:(3-1)区块链A通过其对应网关,将所需交互的信息使用对方区块链的唯一标识进行加密,然后网关端将加密的信息广播至全网,发起交易请求。In step (3), the specific steps for initiating a transaction request are as follows: (3-1) Blockchain A encrypts the required interaction information through its corresponding gateway using the unique identifier of the other blockchain, and then the gateway end encrypts The information is broadcast to the whole network to initiate a transaction request.

算法E在encrypt加密阶段执行, 输入为待加密消息

Figure 992819DEST_PATH_IMAGE009
,公钥PK, 输出关于M的加密后的密文S:
Figure 687981DEST_PATH_IMAGE010
其中算法E为加密算法,S为加密后的密文,M为交易信息,PK为生成的公钥。Algorithm E is executed in the encrypt phase, and the input is the message to be encrypted
Figure 992819DEST_PATH_IMAGE009
, the public key PK, output the encrypted ciphertext S about M:
Figure 687981DEST_PATH_IMAGE010
The algorithm E is the encryption algorithm, S is the encrypted ciphertext, M is the transaction information, and PK is the generated public key.

步骤(4)中,进行交易验证的具体步骤如下:(4-1)网关D收到区块链A广播出来的交易请求,先通过轻客户端SPV简单支付验证。SPV简单支付验证方法示意图如图4所示。In step (4), the specific steps for transaction verification are as follows: (4-1) Gateway D receives the transaction request broadcast from blockchain A, and first passes the light client SPV simple payment verification. The schematic diagram of SPV simple payment verification method is shown in Figure 4.

(4-2)计算该笔待验证的交易的哈希值。(4-2) Calculate the hash value of the transaction to be verified.

(4-3)从区块链网络中获取并存储所有区块头至本地。(4-3) Obtain and store all block headers locally from the blockchain network.

(4-4)从区块链获取待验证的对应的Merkle Tree的哈希认证路径。(4-4) Obtain the hash authentication path of the corresponding Merkle Tree to be verified from the blockchain.

(4-5)根据哈希认证路径,计算Merkle Tree的根哈希值,将计算结果与本地区块头的Merkle Tree的根哈希值进行比较,若相同,就能定位到包含该需验证的区块。(4-5) According to the hash authentication path, calculate the root hash value of the Merkle Tree, compare the calculation result with the root hash value of the Merkle Tree of the local block header, if they are the same, you can locate the blocks.

(4-6)根据区块头所处的位置,就能验证该区块的区块头是否已经在区块链中,从而确定该笔交易真实有效。(4-6) According to the location of the block header, it can be verified whether the block header of the block is already in the blockchain, so as to confirm that the transaction is true and valid.

步骤(5)中,获取信息的具体步骤如下:(5-1)确认交易请求后,网关D向密钥服务器请求私钥,进行解密操作。In step (5), the specific steps for obtaining information are as follows: (5-1) After confirming the transaction request, gateway D requests the private key from the key server for decryption.

(5-2)网关D获得密钥服务器发送的区块链B的私钥,进行解密,然后将区块链A发送过来的信息存入区块链B中。(5-2) Gateway D obtains the private key of blockchain B sent by the key server, decrypts it, and then stores the information sent by blockchain A into blockchain B.

算法J在decrypt解密阶段执行, 输入为加密后的密文S, 私钥SK, 输出密文S所对应的明文消息M:

Figure 707889DEST_PATH_IMAGE011
其中M为传输的交易信息,算法J为解密算法,S为上一算法生成的密文,SK为私钥。Algorithm J is executed in the decryption phase, the input is the encrypted ciphertext S, the private key SK, and the output is the plaintext message M corresponding to the ciphertext S:
Figure 707889DEST_PATH_IMAGE011
Among them, M is the transaction information transmitted, algorithm J is the decryption algorithm, S is the ciphertext generated by the previous algorithm, and SK is the private key.

至此,区块链A上的信息已写入区块链B中,完成信息交互。若区块链A想获取区块链B上的信息,则按上述步骤(4)(5)即可。使用IBE加密算法时,仅需要根据身份信息就可加密,不需求像其他加密算法那样申请数字证书,从而避免了证书发布、吊销、验证和保管等一系列繁琐流程。通过进行交易的双方直接进行跨链数据交换,采用SPV简单支付验证技术,不仅确保了交易的正确性,也提高了跨链数据传输的吞吐量。So far, the information on blockchain A has been written into blockchain B, completing the information exchange. If blockchain A wants to obtain the information on blockchain B, follow steps (4) and (5) above. When using the IBE encryption algorithm, it only needs to be encrypted according to the identity information, and there is no need to apply for a digital certificate like other encryption algorithms, thus avoiding a series of cumbersome procedures such as certificate issuance, revocation, verification, and storage. Through the direct exchange of cross-chain data between the two parties conducting the transaction, the adoption of SPV simple payment verification technology not only ensures the correctness of the transaction, but also improves the throughput of cross-chain data transmission.

以上所述仅是本说明书实施例的具体实施方法。应当指出,本发明的技术特征并不局限于此,而是符合与本文所公开的原理和新颖特点相一致的最大范围。任何本领域的普通技术人员在本发明的领域内,所做的改进或润饰皆涵盖在本发明的专利范围之中。The above description is only the specific implementation method of the embodiment of this specification. It should be noted that the technical features of the present invention are not limited thereto, but conform to the widest range consistent with the principles and novel features disclosed herein. Any improvements or modifications made by those skilled in the art within the scope of the present invention are covered by the patent scope of the present invention.

Claims (5)

1. A high-throughput cross-chain transaction method based on atomic exchange is characterized by comprising the following steps:
(1) The method comprises the steps that a first block chain and a second block chain under different scenes are adopted, a registration request is sent to a relay terminal through a gateway intelligent contract after respective unique identities of the first block chain and the second block chain are encrypted, and a command of successfully registering the corresponding block chain is returned according to the registration request;
(2) After the first block chain and the second block chain receive the command of successful registration, an interaction channel is established;
(3) After the interactive channel is established, the first block chain wants to interact with the information of the second block chain, and the first block chain encrypts the information of the first block chain through the unique identity of the second block chain and initiates a transaction request;
(4) And after a transaction request is initiated, the second block chain performs simple payment verification transaction of the light client through the gateway, and if the verification is successful, the second block chain decrypts the information through a decryption algorithm according to a private key of the second block chain and stores the information into the block chain of the second block chain.
2. The atomic exchange-based high-throughput cross-chain transaction method according to claim 1, wherein in the step (1), the unique identity encryption of each of the first blockchain and the second blockchain generates the private key by using a public-private key algorithm.
3. The method for high throughput cross-chain transaction based on atomic exchange according to claim 2, wherein in the step (1), the encryption of the unique identities of the first blockchain and the second blockchain respectively generates the private key by using a public-private key algorithm, which specifically includes:
and outputting the unique identity of the input block chain to a public key and a private key corresponding to the identity by generating a public-private key algorithm, wherein the public key is used as the unique identity of the identity.
4. The method for high throughput cross-chain transaction based on atomic exchange according to claim 1, wherein in step (3), the information of the first blockchain is a blockhash value of the first blockchain with the transaction information.
5. The method for high throughput cross-chain transaction based on atomic exchange according to claim 1, wherein in step (3), the first blockchain encrypts the information of the first blockchain through the unique id of the second blockchain, and initiates the transaction request, specifically comprising:
and carrying out hash calculation on the block hash value of the first block chain with the transaction information and the unique identity of the second block chain, and initiating a transaction request through the calculated hash value.
CN202211557241.7A 2022-12-06 2022-12-06 High-throughput cross-chain transaction method based on atomic exchange Pending CN115766040A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211557241.7A CN115766040A (en) 2022-12-06 2022-12-06 High-throughput cross-chain transaction method based on atomic exchange

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211557241.7A CN115766040A (en) 2022-12-06 2022-12-06 High-throughput cross-chain transaction method based on atomic exchange

Publications (1)

Publication Number Publication Date
CN115766040A true CN115766040A (en) 2023-03-07

Family

ID=85343663

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211557241.7A Pending CN115766040A (en) 2022-12-06 2022-12-06 High-throughput cross-chain transaction method based on atomic exchange

Country Status (1)

Country Link
CN (1) CN115766040A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112636930A (en) * 2020-12-31 2021-04-09 重庆邮电大学 Asset transaction method and system based on atomic exchange
CN113837760A (en) * 2021-11-25 2021-12-24 腾讯科技(深圳)有限公司 Data processing method, data processing device, computer equipment and storage medium
US20220166602A1 (en) * 2020-11-20 2022-05-26 Hong Kong Applied Science and Technology Research Institute Company Limited Apparatus and Method of Lightweight Communication Protocols between Multiple Blockchains
CN114615095A (en) * 2022-05-12 2022-06-10 北京邮电大学 Block chain cross-chain data processing method, relay chain, application chain and cross-chain network
CN114730421A (en) * 2019-11-08 2022-07-08 阿尔戈兰德公司 Trading using private and public blockchains

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114730421A (en) * 2019-11-08 2022-07-08 阿尔戈兰德公司 Trading using private and public blockchains
US20220166602A1 (en) * 2020-11-20 2022-05-26 Hong Kong Applied Science and Technology Research Institute Company Limited Apparatus and Method of Lightweight Communication Protocols between Multiple Blockchains
CN112636930A (en) * 2020-12-31 2021-04-09 重庆邮电大学 Asset transaction method and system based on atomic exchange
CN113837760A (en) * 2021-11-25 2021-12-24 腾讯科技(深圳)有限公司 Data processing method, data processing device, computer equipment and storage medium
CN114615095A (en) * 2022-05-12 2022-06-10 北京邮电大学 Block chain cross-chain data processing method, relay chain, application chain and cross-chain network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈园: ""基于区块链的物联网网关的研究与实现"", 《中国优秀硕士学位论文全文数据库 信息科技辑(月刊)》, no. 2021, 15 February 2021 (2021-02-15), pages 136 - 512 *

Similar Documents

Publication Publication Date Title
CN109345438B (en) Privacy-protection alliance taxi taking method and system
CN110046521A (en) Decentralization method for secret protection
CN101902476B (en) Method for authenticating identity of mobile peer-to-peer user
CN114329529A (en) Asset data management method and system based on block chain
CN110223064B (en) A non-repudiation secure data transmission method based on blockchain
CN114499898B (en) A method and device for cross-chain secure access of blockchain
CN113326541B (en) A cloud-edge collaborative multi-modal privacy data flow method based on smart contracts
CN110059503A (en) The retrospective leakage-preventing method of social information
CN109245894B (en) Distributed cloud storage system based on intelligent contracts
CN112134892B (en) Service migration method in mobile edge computing environment
CN111539718B (en) Block chain cross-chain identity authentication method based on side chain
CN111163109B (en) Block chain center-removing type node anti-counterfeiting method
CN115102695B (en) Internet of Vehicles Certificate Authentication Method Based on Blockchain
CN113360861A (en) Mortgage loan oriented decentralized identity method based on repeater cross-chain
CN115412568A (en) Distributed data transmission method, device and system
CN114531680A (en) Lightweight IBC bidirectional identity authentication system and method based on quantum key
CN114826593A (en) Quantum security data transmission method and digital certificate authentication system
CN117094825A (en) Cross-chain trusted land transaction system and method based on blockchain
CN115987519B (en) Block chain intelligent collaborative authentication method for multi-user common management
CN118713853A (en) Identity-driven trust management system for data center collaboration
CN115913513A (en) Distributed trusted data transaction method, system and device supporting privacy protection
CN117097476B (en) Data processing method, equipment and medium based on industrial Internet
CN113656818B (en) Trusted-free third party cloud storage ciphertext deduplication method and system meeting semantic security
CN115766040A (en) High-throughput cross-chain transaction method based on atomic exchange
CN114362998B (en) Network security protection method based on edge cloud system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20230307