TWI769738B - Asset cross-chain exchanging system based on threshold signature scheme and method thereof - Google Patents

Asset cross-chain exchanging system based on threshold signature scheme and method thereof Download PDF

Info

Publication number
TWI769738B
TWI769738B TW110108993A TW110108993A TWI769738B TW I769738 B TWI769738 B TW I769738B TW 110108993 A TW110108993 A TW 110108993A TW 110108993 A TW110108993 A TW 110108993A TW I769738 B TWI769738 B TW I769738B
Authority
TW
Taiwan
Prior art keywords
client host
host
asset
account
value
Prior art date
Application number
TW110108993A
Other languages
Chinese (zh)
Other versions
TW202236130A (en
Inventor
莊治耘
林祐德
Original Assignee
帳聯網路科技股份有限公司
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 帳聯網路科技股份有限公司 filed Critical 帳聯網路科技股份有限公司
Priority to TW110108993A priority Critical patent/TWI769738B/en
Application granted granted Critical
Publication of TWI769738B publication Critical patent/TWI769738B/en
Publication of TW202236130A publication Critical patent/TW202236130A/en

Links

Images

Landscapes

  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

An asset cross-chain exchanging system based on threshold signature scheme and method thereof is disclosed. By performing a distributed key generation (DKG) function based on secure multi-party computation (MPC) through a first client and a second client, so as to generate temporary accounts on different blockchain networks, at the same time, let a fair end host, the first client and the second client have different levels of shares corresponding to each temporary account. When the first client and the second client want to exchange assets of different blockchain networks, first transfer the assets to be exchanged to the corresponding temporary account, and then execute a threshold signature scheme (TSS) according to the shares to obtain of control the corresponding temporary account for completing cross-chain asset exchange. The mechanism is help to improve the high availability of cross-chain asset exchange.

Description

基於門檻式簽章的資產跨鏈交換系統及其方法Asset cross-chain exchange system and method based on threshold signature

本發明涉及一種跨區塊鏈交換資產的系統及其方法,特別是基於門檻式簽章的資產跨鏈交換系統及其方法。 The present invention relates to a system and method for exchanging assets across blockchains, in particular to a system and method for asset cross-chain exchanging based on threshold signatures.

近年來,隨著區塊鏈的普及與蓬勃發展,各種基於區塊鏈技術的數位貨幣便如雨後春筍般湧現,例如:比特幣、以太幣等等。 In recent years, with the popularization and vigorous development of blockchain, various digital currencies based on blockchain technology have sprung up, such as Bitcoin, Ethereum and so on.

一般而言,不同的數位貨幣由於基於不同的區塊鏈,所以無法直接進行交易、交換、轉移等等,而傳統的方式是透過交易所或預先約定的方式來實現。然而,透過交易所需要花費額外的手續費,而且操作繁瑣不便;透過預先約定的方式則存在違約或詐騙的可能性。因此,傳統的方式存在資產交換不便及安全性不佳的問題。 Generally speaking, different digital currencies cannot be directly traded, exchanged, transferred, etc. because they are based on different blockchains, and the traditional way is through exchanges or pre-agreed ways. However, through the exchange, it requires extra handling fees, and the operation is cumbersome and inconvenient; through the pre-agreed method, there is the possibility of default or fraud. Therefore, the traditional method has the problems of inconvenient asset exchange and poor security.

有鑑於此,便有廠商提出跨鏈交換資產的技術手段,其透過公證人機制(Notary Schemes),在交易雙方無法互相信任下,經由雙方共同信任且相對公正獨立的一個或一群第三方,充當公證人以驗證並確保交易的合法性。然而,此方式在公證人不夠公正而與其中一方合謀的情況下,將導致資產被非 法轉移,所以大幅限制了跨鏈交換資產的可用性,故具有跨鏈交換資產的可用性不佳的問題。 In view of this, some manufacturers have proposed a technical means of cross-chain exchange of assets. Through the Notary Schemes, when the two parties cannot trust each other, a relatively fair and independent third party or a group of third parties that are mutually trusted by both parties acts as the Notaries to verify and ensure the legitimacy of transactions. However, this approach will result in assets being illegally traded if the notary is not impartial enough to collude with one of the parties. Therefore, the availability of cross-chain exchange assets is greatly limited, so there is a problem of poor availability of cross-chain exchange assets.

綜上所述,可知先前技術中長期以來一直存在跨鏈交換資產的可用性不佳的問題,因此實有必要提出改進的技術手段,來解決此一問題。 To sum up, it can be seen that there has been a problem of poor availability of cross-chain exchange assets in the prior art for a long time, so it is necessary to propose improved technical means to solve this problem.

本發明揭露一種基於門檻式簽章的資產跨鏈交換系統及其方法。 The invention discloses an asset cross-chain exchange system and method based on a threshold signature.

首先,本發明揭露一種基於門檻式簽章的資產跨鏈交換系統,其包含:公正端主機、第一客戶端主機及第二客戶端主機。其中,公正端主機用以接收第一分片、另一第一分片、第二分片及另一第二分片,並且根據第一分片及所述另一第一分片組成低等級的第一新共享單元,以及根據第二分片及所述另一第二分片組成低等級的第二新共享單元;第一客戶端主機用以與公正端主機相互連接,以及在第一區塊鏈網路的第一帳戶具有第一資產,所述第一客戶端主機包含:第一確認模組、第一執行模組及第一交易模組。其中,第一確認模組用以在欲交換第一資產及第二資產時,向公正端主機確認第二區塊鏈網路的第二帳戶的擁有者,以及查詢此第二帳戶是否具有第二資產的所有權;第一執行模組連接第一確認模組,用以在確認及查詢無誤後,以安全多方計算(Secure Multi-Party Computation,MPC)執行分散式金鑰生成函式以在第一區塊鏈網路產生第一暫存帳戶及其相應且具有不同等級的第一共享單元,以及產生與第一共享單元相應且低等級的第一新共享單元的第一分片和與第二共享單元相應且低等級的該第二新共享單元的第二分片以傳送至公正端主機;第一交易模組連接第一執行模組,用以在第一暫存帳戶產生後,以區塊鏈交易方式將第 一資產傳送至第一暫存帳戶。接著,在第二客戶端主機的部分,其與公正端主機相互連接,以及在第二區塊鏈網路的第二帳戶具有第二資產,所述第二客戶端主機包含:第二確認模組、第二執行模組及第二交易模組。其中,第二確認模組用以在欲交易第一資產及第二資產時,向公正端主機確認第一區塊鏈的第一帳戶的擁有者,以及查詢第一帳戶是否具有第一資產的所有權;第二執行模組連接第二確認模組,用以在確認及查詢無誤後,以安全多方計算執行分散式金鑰生成函式以在第二區塊鏈網路產生第二暫存帳戶及其相應且具有不同等級的第二共享單元,以及產生與所述第二共享單元相應且低等級的第二新共享單元的另一第二分片和與所述第一共享單元相應且低等級的第一新共享單元的另一第一分片以傳送至公正端主機;第二交易模組連接第二執行模組,用以在第二暫存帳戶產生後,以區塊鏈交易方式將第二資產傳送至第二暫存帳戶。其中,第一客戶端主機儲存低等級的第一共享單元及高等級的第二共享單元,第二客戶端主機儲存高等級的第一共享單元及低等級的第二共享單元,並且允許第一客戶端主機及第二客戶端主機選擇與公正端主機一併執行門檻式簽章以分別根據第一共享單元及第一新共享單元控制第一暫存帳戶的第一資產,以及根據第二共享單元及第二新共享單元控制第二暫存帳戶的第二資產。 First, the present invention discloses an asset cross-chain exchange system based on a threshold signature, which includes: a fair end host, a first client host and a second client host. The fair-end host is used to receive the first fragment, another first fragment, a second fragment and another second fragment, and form a low level according to the first fragment and the other first fragment The first new shared unit, and a low-level second new shared unit is formed according to the second fragment and the other second fragment; the first client host is used to connect with the fair end host, and in the first The first account of the blockchain network has first assets, and the first client host includes: a first confirmation module, a first execution module and a first transaction module. Wherein, the first confirmation module is used for confirming the owner of the second account of the second blockchain network with the fair end host when the first asset and the second asset are to be exchanged, and inquiring whether the second account has the first The ownership of the second asset; the first execution module is connected to the first confirmation module to execute the distributed key generation function by Secure Multi-Party Computation (MPC) after the confirmation and query are correct A blockchain network generates a first temporary account and its corresponding first sharing unit with different levels, and generates a first shard of a first new sharing unit corresponding to the first sharing unit and having a lower level and a first share with the first sharing unit. The second shard of the second new shared unit corresponding to the two shared units and at a lower level is sent to the fair-end host; the first transaction module is connected to the first execution module, and is used for generating a first temporary account after the Blockchain transactions will be the first An asset is transferred to the first escrow account. Next, in the part of the second client host, which is interconnected with the impartial host, and has a second asset in the second account of the second blockchain network, the second client host includes: a second confirmation module group, a second execution module and a second transaction module. Wherein, the second confirmation module is used for confirming the owner of the first account of the first blockchain with the fair end host when the first asset and the second asset are to be traded, and inquiring whether the first account has the first asset Ownership; the second execution module is connected to the second confirmation module to execute the distributed key generation function through secure multi-party computation to generate a second temporary account in the second blockchain network after the confirmation and query are correct and its corresponding second shared unit with a different level, and another second slice that generates a second new shared unit corresponding to the second shared unit and with a lower level and a second shared unit corresponding to the first shared unit and with a lower level Another first shard of the first new shared unit of the level is sent to the fair end host; the second transaction module is connected to the second execution module, and is used for blockchain transactions after the second temporary account is generated Transfer the second asset to the second escrow account. The first client host stores the low-level first shared unit and the high-level second shared unit, the second client host stores the high-level first shared unit and the low-level second shared unit, and allows the first The client host and the second client host choose to execute the threshold signature together with the fair end host to control the first asset of the first temporary account according to the first sharing unit and the first new sharing unit respectively, and according to the second sharing unit The unit and the second new share unit control the second asset of the second escrow account.

另外,本發明還揭露一種基於門檻式簽章的資產跨鏈交換方法,其步驟包括:第一客戶端主機在第一區塊鏈網路的第一帳戶具有第一資產、第二客戶端主機在第二區塊鏈網路的第二帳戶具有第二資產,以及公正端主機與第一客戶端主機及第二客戶端主機相互連接;當第一客戶端主機及第二客戶端主機欲相互交換第一資產及第二資產時,第一客戶端主機及第二客戶端主機共同向公正端主機確認第一帳戶及第二帳戶的擁有者是否分別為第一客戶端主機 及第二客戶端主機,以及查詢第一帳戶及第二帳戶是否具有第一資產及第二資產的所有權;第一客戶端主機及第二客戶端主機在確認及查詢無誤後,以安全多方計算執行分散式金鑰生成函式,用以在第一區塊鏈網路產生第一暫存帳戶及其相應且具有不同等級的第一共享單元,以及在第二區塊鏈網路產生第二暫存帳戶及其相應且具有不同等級的第二共享單元,其中,第一客戶端主機儲存低等級的第一共享單元及高等級的第二共享單元,第二客戶端主機儲存高等級的第一共享單元及低等級的第二共享單元;第一客戶端主機以區塊鏈交易方式將第一資產傳送至第一暫存帳戶,第二客戶端主機以區塊鏈交易方式將第二資產傳送至第二暫存帳戶;第一客戶端主機及第二客戶端主機以安全多方計算執行分散式金鑰生成函式,用以分別產生與第一共享單元相應的第一分片及另一第一分片,以及分別產生與第二共享單元相應的第二分片及另一第二分片,其中,第一客戶端主機將產生的第一分片及第二分片傳送至公正端主機,第二客戶端主機將產生的另一第一分片及另一第二分片傳送至公正端主機;公正端主機根據接收到的第一分片及另一第一分片組成低等級的第一新共享單元,以及根據接收到的第二分片及另一第二分片組成低等級的第二新共享單元;以及第一客戶端主機及第二客戶端主機允許選擇與公正端主機一併執行門檻式簽章以分別根據第一共享單元及第一新共享單元控制第一暫存帳戶的第一資產,以及根據第二共享單元及第二新共享單元控制第二暫存帳戶的第二資產。 In addition, the present invention also discloses a cross-chain asset exchange method based on threshold signature, the steps of which include: a first client host has a first asset in a first account of a first blockchain network, and a second client host The second account in the second blockchain network has second assets, and the fair end host is connected to the first client host and the second client host; when the first client host and the second client host want to communicate with each other When exchanging the first asset and the second asset, the first client host and the second client host jointly confirm to the fair end host whether the owners of the first account and the second account are the first client host respectively and the second client host, and inquire whether the first account and the second account have the ownership of the first asset and the second asset; after the first client host and the second client host have confirmed and inquired that there is no error, the secure multi-party computing Execute a distributed key generation function to generate a first temporary account and its corresponding first shared units with different levels in the first blockchain network, and generate a second blockchain network in the second blockchain network. The temporary account and its corresponding second shared units with different levels, wherein the first client host stores the low-level first shared unit and the high-level second shared unit, and the second client host stores the high-level first shared unit. A shared unit and a low-level second shared unit; the first client host transfers the first asset to the first temporary account in a blockchain transaction, and the second client host transfers the second asset in a blockchain transaction Send to the second temporary account; the first client host and the second client host execute the distributed key generation function through secure multi-party computation, so as to respectively generate the first slice and the other corresponding to the first shared unit a first fragment, and respectively generating a second fragment and another second fragment corresponding to the second sharing unit, wherein the first client host transmits the generated first fragment and the second fragment to the fair end The host, the second client host transmits the generated another first fragment and another second fragment to the fair end host; the fair end host forms a low-level according to the received first fragment and another first fragment The first new shared unit, and the second new shared unit of lower level is formed according to the received second fragment and another second fragment; and the first client host and the second client host allow selection and fairness The host also executes the threshold signature to control the first asset of the first temporary storage account according to the first sharing unit and the first new sharing unit respectively, and control the second temporary storage account according to the second sharing unit and the second new sharing unit the second asset.

本發明所揭露之系統與方法如上,與先前技術的差異在於本發明是透過第一客戶端主機及第二客戶端主機以安全多方計算執行分散式金鑰生成函式,以便在不同的區塊鏈網路產生暫存帳戶,同時使公正端主機、第一客戶端主機及第二客戶端主機具有相應於各暫存帳戶且不同等級的共享單元,當第 一客戶端主機及第二客戶端主機欲交換不同區塊鏈網路的資產時,先將欲交換的資產轉移至相應暫存帳戶,再分別根據持有的共享單元執行門檻式簽章以獲得相應暫存帳戶的控制權,進而完成跨鏈交換資產。 The system and method disclosed in the present invention are as above, and the difference from the prior art lies in that the present invention executes the distributed key generation function through secure multi-party computation through the first client host and the second client host, so that in different blocks The link network generates a temporary account, and at the same time, the fair end host, the first client host and the second client host have different levels of sharing units corresponding to each temporary account. When a client host and a second client host want to exchange assets in different blockchain networks, first transfer the assets to be exchanged to the corresponding temporary accounts, and then execute threshold signatures according to the shared units held to obtain Control the corresponding temporary account, and then complete the cross-chain exchange of assets.

透過上述的技術手段,本發明可以達成提高跨鏈交換資產的高可用性之技術功效。 Through the above technical means, the present invention can achieve the technical effect of improving the high availability of cross-chain exchange assets.

101:第一區塊鏈網路 101: The first blockchain network

102:第二區塊鏈網路 102: Second Blockchain Network

100:公正端主機 100: fair end host

110:第一客戶端主機 110: First client host

111:第一確認模組 111: The first confirmation module

112:第一執行模組 112: The first execution module

113:第一交易模組 113: The first transaction module

120:第二客戶端主機 120: Second client host

121:第二確認模組 121: Second confirmation module

122:第二執行模組 122: The second execution module

123:第二交易模組 123: Second Transaction Module

311,312:一次多項式 311, 312: First degree polynomial

401:第一帳戶 401: First Account

402:第二帳戶 402: Second Account

411:第一暫存帳戶 411: First staging account

412:第二暫存帳戶 412: Second staging account

421,422:第一共享單元 421, 422: First Shared Unit

431,432:第二共享單元 431, 432: Second Shared Unit

423:第一新共享單元 423: First new shared unit

433:第二新共享單元 433: Second new shared unit

441:第一分片 441: first shard

442:第二分片 442: Second shard

451:另一第一分片 451: Another first shard

452:另一第二分片 452: Another second shard

步驟210:提供一第一客戶端主機,該第一客戶端主機在一第一區塊鏈網路的一第一帳戶具有一第一資產、提供一第二客戶端主機,該第二客戶端主機在一第二區塊鏈網路的一第二帳戶具有一第二資產,以及提供與該第一客戶端主機及該第二客戶端主機相互連接的一公正端主機 Step 210: Provide a first client host, the first client host has a first asset in a first account of a first blockchain network, and provide a second client host, the second client The host has a second asset in a second account of a second blockchain network, and provides a fair end host interconnected with the first client host and the second client host

步驟220:當該第一客戶端主機及該第二客戶端主機欲相互交換該第一資產及該第二資產時,共同向該公正端主機確認該第一帳戶及該第二帳戶的擁有者是否分別為該第一客戶端主機及該第二客戶端主機,以及查詢該第一帳戶及該第二帳戶是否具有該第一資產及該第二資產的所有權 Step 220: When the first client host and the second client host want to exchange the first asset and the second asset with each other, jointly confirm the owner of the first account and the second account to the fair host Whether it is the first client host and the second client host respectively, and query whether the first account and the second account have the ownership of the first asset and the second asset

步驟230:該第一客戶端主機及該第二客戶端主機在確認及查詢無誤後,以安全多方計算(Secure Multi-Party Computation,MPC)執行一分散式金鑰生成函式,用以在該第一區塊鏈網路產生一第一暫存帳 戶及其相應且具有不同等級的多個第一共享單元,以及在該第二區塊鏈網路產生一第二暫存帳戶及其相應且具有不同等級的多個第二共享單元,其中,該第一客戶端主機儲存低等級的所述第一共享單元及高等級的所述第二共享單元,該第二客戶端主機儲存高等級的所述第一共享單元及低等級的所述第二共享單元 Step 230: The first client host and the second client host execute a distributed key generation function using Secure Multi-Party Computation (MPC) after the confirmation and query are correct, so as to The first blockchain network generates a first temporary account account and its corresponding multiple first sharing units with different levels, and generate a second temporary account and its corresponding multiple second sharing units with different levels in the second blockchain network, wherein, The first client host stores the first shared unit of a low level and the second shared unit of a high level, and the second client host stores the first shared unit of a high level and the first shared unit of a low level Two shared units

步驟240:該第一客戶端主機將該第一資產傳送至該第一暫存帳戶,該第二客戶端主機將該第二資產傳送至該第二暫存帳戶 Step 240: The first client host transfers the first asset to the first temporary account, and the second client host transfers the second asset to the second temporary account

步驟250:該第一客戶端主機及該第二客戶端主機以安全多方計算執行該分散式金鑰生成函式,用以分別產生與所述第一共享單元相應的一第一分片及另一第一分片,以及分別產生與所述第二共享單元相應的一第二分片及另一第二分片,其中,該第一客戶端主機將產生的該第一分片及該第二分片傳送至該公正端主機,該第二客戶端主機將產生的該另一第一分片及該另一第二分片傳送至該公正端主機 Step 250: The first client host and the second client host execute the distributed key generation function through secure multi-party computation, so as to respectively generate a first segment and another corresponding to the first sharing unit. a first fragment, and respectively generating a second fragment and another second fragment corresponding to the second sharing unit, wherein the first client host will generate the first fragment and the first fragment The two fragments are sent to the fair host, and the second client host sends the generated another first fragment and the other second fragment to the fair host

步驟260:該公正端根據接收到的該第一分片及該另一第一分片組合成低等級的一第一新共享單元,以及根據接收到的該第二分片及該另一第二分片組合成低等級的一第二新共享單元 Step 260: The fair end combines the received first fragment and the other first fragment into a low-level first new sharing unit, and according to the received second fragment and the other first fragment The two shards are combined into a low-level one-second new shared unit

步驟270:該第一客戶端主機及該第二客戶端主機允許選擇與該公正端主機一併執行門檻式簽章以分別根據所述第一共享單元及該第一新共享單元產生一第一簽章訊息以轉移第一暫存帳戶的該第一資產,以及根據所述第二共享單元及該第二新共享單元產生一第二簽章訊息以轉移該第二暫存帳戶的該第二資產 Step 270: The first client host and the second client host are allowed to choose to execute threshold signatures together with the fair end host to generate a first sharing unit according to the first sharing unit and the first new sharing unit, respectively signing a message to transfer the first asset of the first temporary account, and generating a second signature message according to the second sharing unit and the second new sharing unit to transfer the second asset of the second temporary account assets

步驟280:該第一客戶端主機及該第二客戶端主機選擇執行一逐步交換協定(Gradual Exchange Protocol)以使該第一客戶端主機及該第二客戶端主機相互交換各自持有的低等級的所述第一共享單元及所述第二共享單元,並且在完成交換後,使該第一客戶端主機允許根據高等級的所述第二共享單元及低等級的所述第二共享單元控制該第二暫存帳戶,以及使該第二客戶端主機允許根據高等級的所述第一共享單元及低等級的所述第一共享單元控制該第一暫存帳戶簽章 Step 280 : The first client host and the second client host choose to execute a Gradual Exchange Protocol to enable the first client host and the second client host to exchange their respective low levels with each other the first shared unit and the second shared unit of the the second staging account, and enabling the second client host to allow control of the first staging account signature according to the first sharing unit at a high level and the first sharing unit at a lower level

步驟281:使該第一客戶端主機及該第二客戶端主機分別隨機選擇一rA,i值及一rB,i值,並且皆在[0,P-1]的區間,其中,A代表該第一客戶端主機、B代表該第二客戶端主機、P為橢圓曲線群的個數,以及i為正整數 Step 281: Make the first client host and the second client host randomly select a value of r A,i and a value of r B,i , and both are in the interval of [0,P-1], where A represents the first client host, B represents the second client host, P is the number of elliptic curve groups, and i is a positive integer

步驟282:將該第一客戶端主機的一密文x及該第二客戶端主機的一密文y拆分成k等分以生成多個xi值及多個yi值,所述xi值滿足該密文x=sumi 232ixi、所述yi值滿足該密文y=sumi 232iyi,其中,k=P/32,i為正整數滿足1<=i<=k,0<=xi<232且0<=yi<232 Step 282: Split a ciphertext x of the first client host and a ciphertext y of the second client host into k equal parts to generate multiple x i values and multiple y i values, the x The value of i satisfies the ciphertext x=sum i 2 32i x i , the value of y i satisfies the ciphertext y=sum i 2 32i y i , where k=P/32, i is a positive integer and satisfies 1<=i <=k, 0<=x i <2 32 and 0<=y i <2 32

步驟283:該第一客戶端主機計算一Di值及一Ei值,該Di值為{xiG+rA,iM},該Ei值為{rA,iG},其中,G為橢圓曲線群的基點、M為該第一客戶端主機的公鑰,該第二客戶端主機計算一Vi值及一Wi值,該Vi值為{yiG+rB,iN},該Wi值為{rB,iG},其中,N為該第二客戶端主機的公鑰 Step 283: The first client host calculates a D i value and an E i value, the D i value is {x i G+r A, i M}, the E i value is {r A, i G}, Among them, G is the base point of the elliptic curve group, M is the public key of the first client host, the second client host calculates a V i value and a Wi value , the V i value is {y i G + r B, i N}, the value of W i is {r B, i G}, where N is the public key of the second client host

步驟284:該第一客戶端主機及該第二客戶端主機相互交換各自計算出的所述Di值及所述Vi值,再依序交換所述Ei值及所述Wi值直到停止依序交換為止 Step 284: The first client host and the second client host exchange the D i value and the V i value calculated respectively with each other , and then sequentially exchange the E i value and the Wi value until until the sequential exchange is stopped

第1圖為本發明基於門檻式簽章的資產跨鏈交換系統之系統方塊圖。 Figure 1 is a system block diagram of the cross-chain asset exchange system based on threshold signatures of the present invention.

第2A圖至第2D圖為本發明基於門檻式簽章的資產跨鏈交換方法之方法流程圖。 Figures 2A to 2D are flowcharts of the method of the cross-chain asset exchange method based on the threshold signature of the present invention.

第3圖為應用本發明產生共享單元之示意圖。 FIG. 3 is a schematic diagram of generating a shared unit by applying the present invention.

第4A圖及第4B圖為應用本發明進行資產跨鏈交換之示意圖。 Figures 4A and 4B are schematic diagrams of cross-chain asset exchange by applying the present invention.

以下將配合圖式及實施例來詳細說明本發明之實施方式,藉此對本發明如何應用技術手段來解決技術問題並達成技術功效的實現過程能充分理解並據以實施。 The embodiments of the present invention will be described in detail below in conjunction with the drawings and examples, so as to fully understand and implement the implementation process of how the present invention applies technical means to solve technical problems and achieve technical effects.

首先,在說明本發明所揭露之基於門檻式簽章的資產跨鏈交換系統及其方法之前,先對本發明的應用環境作說明,本發明係應用在同時具有不同區塊鏈網路的環境,例如:比特幣區塊鏈網路(Bitcoin Blockchain Network)及以太坊區塊鏈網路(Ethereum Blockchain Network),這些區塊鏈網路中的各 節點能夠執行安全多方計算,用以相互交換資料及計算結果,進而執行門檻式簽章。接著,針對本發明自行定義的名詞作說明,本發明所述的共享單元(Share)是指在進行安全多方計算時,在不同的節點(如:第一客戶端主機、第二客戶端主機)之間進行相互交換資料及計算結果所生成的元素,此元素能夠在不需重組私鑰的情況下,直接以數學運算計算出符合橢圓曲線數位簽名演算法(Elliptic Curve Digital Signature Algorithm,ECDSA)的簽章格式之簽章(或稱為「簽名」),例如:「第一共享單元」、「第二共享單元」、「第一新共享單元」及「第二新共享單元」等等,相互之間的差異僅在於對應的暫存帳戶或持有者不同。其中,第一共享單元、第一新共享單元對應第一暫存帳戶;第二共享單元、第二新共享單元對應第二暫存帳戶;第一新共享單元及第二新共享單元的持有者為公正端主機,而第一客戶端主機及第二客戶端主機皆持有不同等級的第一共享單元及第二共享單元。另外,所述分片(如:第一分片、第二分片、另一第一分片及另一第二分片)是指透過分片(Sharding)技術將資料切分成的各分片,以便由不同主機相互獨立地處理各分片,再根據處理結果組成最終結果。舉例來說,第一分片及另一第一分片能夠組成第一新共享單元;第二分片及另一第二分片能夠組成第二新共享單元。 First, before describing the threshold-based signature-based asset cross-chain exchange system and method disclosed in the present invention, the application environment of the present invention is described first. The present invention is applied to an environment with different blockchain networks at the same time. For example: Bitcoin Blockchain Network and Ethereum Blockchain Network, each of these blockchain networks Nodes can perform secure multi-party computations to exchange data and computation results with each other, and then perform threshold signatures. Next, for the self-defined terms of the present invention, the sharing unit (Share) of the present invention refers to the different nodes (such as the first client host and the second client host) when performing secure multi-party computation. The element generated by the mutual exchange of data and calculation results, this element can directly calculate the elliptic curve digital signature algorithm (Elliptic Curve Digital Signature Algorithm, ECDSA) without reorganizing the private key. Signatures (or "signatures") in the signature format, such as: "First Shared Unit", "Second Shared Unit", "First New Shared Unit" and "Second New Shared Unit", etc. The only difference is that the corresponding staging account or holder is different. Wherein, the first sharing unit and the first new sharing unit correspond to the first temporary account; the second sharing unit and the second new sharing unit correspond to the second temporary account; the holding of the first new sharing unit and the second new sharing unit The one is the fair end host, and the first client host and the second client host both hold the first shared unit and the second shared unit of different levels. In addition, the shards (eg: a first shard, a second shard, another first shard, and another second shard) refer to shards into which data is divided by sharding technology , so that each shard is processed independently by different hosts, and the final result is composed according to the processing result. For example, a first slice and another first slice can form a first new shared unit; a second slice and another second slice can form a second new shared unit.

以下配合圖式對本發明基於門檻式簽章的資產跨鏈交換系統及其方法做進一步說明,請先參閱「第1圖」,「第1圖」為本發明基於門檻式簽章的資產跨鏈交換系統之系統方塊圖,此系統包含:公正端主機100、第一客戶端主機110及第二客戶端主機120。其中,公正端主機100用以接收第一分片、另一第一分片、第二分片、另一第二分片,並且根據第一分片及另一第一分片組成低等級的第一新共享單元,以及根據第二分片及另一第二分片組成低等級的 第二新共享單元。在實際實施上,低等級的第一新共享單元係與第一暫存帳戶及其第一共享單元相應;低等級的第二新共享單元則係與第二暫存帳戶及其第二共享單元相應。實際上,第一新共享單元及第二新共享單元均是以執行新增共享單元的方式產生,由第一客戶端主機110及第二客戶端主機120在執行分散式金鑰生成函式時,同時將公正端主機100的X座標及層級值帶入計算產生相應的分片,再由公正端主機100將分片組成新共享單元,舉例來說,假設第一客戶端主機110(簡稱為「A」)擁有高等級的共享單元,其值為數值「24」、X座標為數值「3」且層級值為數值「0」;第二客戶端主機120(簡稱為「B」)擁有低等級的共享單元,其值為數值「5」、X座標為數值「4」且層級值為數值「1」。A與B進行安全多方計算,在不透露私鑰的情況下生成新共享單元(即:第一新共享單元及第二新共享單元)給公正端主機100(簡稱為「AMIS」)的步驟如下: The following is a further description of the cross-chain asset exchange system and method based on threshold-type signatures of the present invention in conjunction with the drawings. Please refer to "Figure 1" first. "Figure 1" is the cross-chain assets based on threshold-type signatures of the present invention. The system block diagram of the switching system includes: the fair end host 100 , the first client host 110 and the second client host 120 . The fair-end host 100 is used to receive the first fragment, another first fragment, a second fragment, and another second fragment, and form a low-level fragment according to the first fragment and the other first fragment A first new shared unit, and a low-level Second new shared unit. In practice, the low-level first new sharing unit corresponds to the first temporary storage account and its first sharing unit; the low-level second new sharing unit corresponds to the second temporary storage account and its second sharing unit corresponding. In fact, both the first new shared unit and the second new shared unit are generated by executing the newly added shared unit, when the first client host 110 and the second client host 120 execute the distributed key generation function , at the same time, the X coordinate and the level value of the fair-end host 100 are brought into the calculation to generate corresponding fragments, and then the fair-end host 100 forms the fragments into a new shared unit. For example, suppose the first client host 110 (referred to as the "A") has a high-level shared unit with a value of "24", an X coordinate of a value of "3" and a level value of "0"; the second client host 120 (abbreviated as "B") has a low-level The shared unit of the level, whose value is the value "5", the X coordinate is the value "4" and the level value is the value "1". A and B perform secure multi-party computation, and generate new shared units (ie: the first new shared unit and the second new shared unit) to the fair-end host 100 (referred to as "AMIS") without revealing the private key. The steps are as follows :

1. AMIS產生X座標及層級值,如:X座標為數值「7」、層級值為數值「1」,並且分別傳送給A及B。 1. AMIS generates X coordinate and level value, such as: X coordinate is the value "7", level value is "1", and sends it to A and B respectively.

2. 當A接收到AMIS的X座標及層級值後,若正確便計算0*24。同樣地,B也計算1*5。其中,數值24是在多項式為「f(x)=5x+9」時,將X座標帶入所計算出的值;數值5則是「f’(x)=5」。特別要說明的是,層級值為0代表多項式不用微分;層級值為1代表多項式的一次微分;層級值為2代表多項式的二次微分,並以此類推。 2. When A receives the X coordinate and level value of AMIS, it calculates 0*24 if it is correct. Likewise, B also calculates 1*5. Among them, the value of 24 is the value calculated when the polynomial is "f(x)=5x+9", and the X-coordinate is added to it; the value of 5 is "f'(x)=5". In particular, a level value of 0 means that the polynomial does not need to be differentiated; a level value of 1 means the first-order differential of the polynomial; a level value of 2 means the second-order differential of the polynomial, and so on.

3. A隨機選擇一個數字a在[0,P-1]之中,其中,P為橢圓曲線的個數,則ab=a和aamis=-a滿足ab+aamis=0。同樣地,B也以前述方式隨機選取數字b,使得ba+bamis=5,且ba=b和bamis=5-b。 3. A randomly selects a number a in [0,P-1], where P is the number of elliptic curves, then a b =a and a amis =-a satisfy a b +a amis =0. Likewise, B also randomly chooses the number b in the aforementioned manner such that b a + b amis =5, and b a =b and b amis =5-b.

4. A將ab傳送至B,同時B將ba傳送至A。接著,A計算sA=ba+aamis=b+a。至於B則計算sB=ab+bamis=-a+5-b。此時,A會將sA傳送給AMIS;B則會將sB傳送給AMIS。 4. A sends a b to B, and B sends b a to A. Next, A calculates s A =b a +a amis =b+a. As for B, calculate s B =a b +b amis =-a+5-b. At this point, A will transmit s A to AMIS; B will transmit s B to AMIS.

5. AMIS根據接收到的sA和sB,將自己的新共享單元「samis」設定為「sA+sB=b+a+(-a)+5-b=5」。 5. AMIS sets its new shared unit "s amis " to "s A +s B =b+a+(-a)+5-b=5" according to the received s A and s B .

第一客戶端主機110用以與公正端主機100相互連接,以及在第一區塊鏈網路101的第一帳戶具有第一資產,此第一客戶端主機110包含:第一確認模組111、第一執行模組112及第一交易模組113。其中,第一確認模組111用以在欲交換第一資產及第二資產時,向公正端主機100確認第二區塊鏈網路102的第二帳戶的擁有者,以及查詢第二帳戶是否具有第二資產的所有權,其確認方式是根據帳戶地址進行確認及查詢。在實際實施上,所述第一資產是指在第一區塊鏈網路101的數位資產,例如:比特幣、以太幣、代幣(Token)化的商品或服務等等,假設第一區塊鏈網路101為以太坊區塊鏈網路,代幣化是指基於ERC(Ethereum Request for Comment)協議,如:ERC-20、ERC-721等等,所發行的代幣。 The first client host 110 is used for interconnecting with the fair end host 100, and has a first asset in the first account of the first blockchain network 101. The first client host 110 includes: a first confirmation module 111 , the first execution module 112 and the first transaction module 113 . Wherein, the first confirmation module 111 is used to confirm the owner of the second account of the second blockchain network 102 with the fair-end host 100 when the first asset and the second asset are to be exchanged, and to check whether the second account is It has the ownership of the second asset, and its confirmation method is to confirm and query according to the account address. In actual implementation, the first asset refers to digital assets in the first blockchain network 101, such as bitcoin, ether, tokenized goods or services, etc., assuming that the first area The blockchain network 101 is the Ethereum blockchain network, and tokenization refers to the tokens issued based on the ERC (Ethereum Request for Comment) protocol, such as ERC-20, ERC-721, etc.

第一執行模組112連接第一確認模組111,用以在確認及查詢無誤後,以安全多方計算執行分散式金鑰生成函式,以便在第一區塊鏈網路101產生第一暫存帳戶及其相應且具有不同等級的第一共享單元,例如:高等級的第一共享單元及低等級的第一共享單元,以及產生與所述第一共享單元相應且低等級的第一新共享單元的第一分片和與第二共享單元相應且低等級的第二新共享單元的第二分片以傳送至公正端主機100。實際上,產生這些共享單元(即:第 一共享單元、第一新共享單元)的目的便是為了在滿足門檻式簽章的門檻時,獲得第一暫存帳戶的控制權。 The first execution module 112 is connected to the first confirmation module 111 to execute the distributed key generation function by means of secure multi-party computation after the confirmation and query are correct, so as to generate the first temporary key in the first blockchain network 101 . deposit account and its corresponding first shared units with different levels, such as: high-level first shared units and low-level first shared units, and generate a first new shared unit corresponding to the first shared unit and low-level The first segment of the shared unit and the second segment of the second new shared unit corresponding to the second shared unit and of a lower level are transmitted to the impartial host 100 . In fact, these shared units (ie: the The purpose of a shared unit, a first new shared unit) is to obtain the control right of the first temporary account when the threshold of the threshold-type signature is met.

第一交易模組113連接第一執行模組112,用以在第一暫存帳戶產生後,以區塊鏈交易方式將第一資產傳送至第一暫存帳戶。舉例來說,假設第一資產為10個比特幣,第一交易模組113會從第一帳戶轉移10個比特幣至第一暫存帳戶。在實際實施上,第一暫存帳戶是根據執行分散式金鑰生成函式產生的公鑰所轉換後的區塊鏈的地址,第一資產與第一暫存帳戶位於同一個區塊鏈網路(即:第一區塊鏈網路101)。 The first transaction module 113 is connected to the first execution module 112, and is used for transferring the first asset to the first temporary account by means of a blockchain transaction after the first temporary account is generated. For example, assuming that the first asset is 10 bitcoins, the first transaction module 113 will transfer 10 bitcoins from the first account to the first temporary account. In practice, the first temporary account is the address of the blockchain converted from the public key generated by executing the distributed key generation function, and the first asset and the first temporary account are located in the same blockchain network. Road (ie: the first blockchain network 101).

接著,在第二客戶端主機120的部分,其用以與公正端主機100相互連接,以及在第二區塊鏈網路102的第二帳戶具有第二資產,所述第二客戶端主機120包含:第二確認模組121、第二執行模組122及第二交易模組123。其中,第二確認模組121用以在欲交換第一資產及第二資產時,向公正端主機100確認第一區塊鏈網路101的第一帳戶的擁有者,以及查詢第一帳戶是否具有第一資產的所有權。在實際實施上,其確認及查詢方式如同第一客戶端主機110的第一確認模組111。另外,所述第二資產是指在第二區塊鏈網路102的數位資產,其與第一資產的差異在於兩者位於不同的區塊鏈網路,舉例來說,假設第一資產為比特幣,則第二資產可能為以太幣。 Next, in the part of the second client host 120, which is used to interconnect with the fair host 100, and the second account in the second blockchain network 102 has a second asset, the second client host 120 It includes: a second confirmation module 121 , a second execution module 122 and a second transaction module 123 . Wherein, the second confirmation module 121 is used to confirm the owner of the first account of the first blockchain network 101 with the fair end host 100 when the first asset and the second asset are to be exchanged, and to check whether the first account is Has ownership of the first asset. In actual implementation, the confirmation and query methods are the same as the first confirmation module 111 of the first client host 110 . In addition, the second asset refers to the digital asset in the second blockchain network 102, and the difference from the first asset is that the two are located in different blockchain networks. For example, suppose the first asset is Bitcoin, the second asset may be Ether.

第二執行模組122連接第二確認模組121,用以在確認及查詢無誤後,以安全多方計算執行分散式金鑰生成函式,以便以在第二區塊鏈網路102產生第二暫存帳戶及其相應且具有不同等級的第二共享單元,以及產生與第二共享單元相應且低等級的第二新共享單元的另一第二分片和與第一共享單元相應且低等級的第一新共享單元的另一第一分片以傳送至公正端主機100。實際上, 產生這些共享單元(即:第二共享單元、第二新共享單元)的目的便是為了在滿足門檻式簽章的門檻時,獲得第二暫存帳戶的控制權。 The second execution module 122 is connected to the second confirmation module 121 for executing the distributed key generation function by means of secure multi-party computation after the confirmation and query are correct, so as to generate the second block chain network 102 A staging account and its corresponding second share unit with a different rank, and another second shard that generates a second new share unit corresponding to the second share unit and with a lower rank and a second share unit corresponding to the first share unit and with a lower rank The other first fragment of the first new shared unit is sent to the impartial host 100 . In fact, The purpose of generating these shared units (ie: the second shared unit, the second new shared unit) is to obtain the control right of the second temporary account when the threshold of the threshold-type signature is satisfied.

第二交易模組123連接第二執行模組122,用以在第二暫存帳戶產生後,以區塊鏈交易方式將第二資產傳送至第二暫存帳戶。舉例來說,假設第二資產為50個以太幣,第二交易模組123會從第二帳戶將50個以太幣轉移至第二暫存帳戶。在實際實施上,第二暫存帳戶是根據執行分散式金鑰生成函式產生的公鑰所轉換後的區塊鏈的地址,第二資產與第二暫存帳戶位於同一個區塊鏈網路(即:第二區塊鏈網路102)。 The second transaction module 123 is connected to the second execution module 122, and is used for transferring the second asset to the second temporary account by means of a blockchain transaction after the second temporary account is generated. For example, assuming that the second asset is 50 ETH, the second transaction module 123 will transfer 50 ETH from the second account to the second temporary account. In practice, the second temporary storage account is the address of the blockchain converted according to the public key generated by executing the distributed key generation function, and the second asset and the second temporary storage account are located in the same blockchain network road (ie: the second blockchain network 102).

其中,第一客戶端主機110儲存低等級的第一共享單元及高等級的第二共享單元,第二客戶端主機120儲存高等級的第一共享單元及低等級的第二共享單元,並且第一客戶端主機110及第二客戶端主機120允許選擇與公正端主機100一併執行門檻式簽章以分別根據所述第一共享單元及第一新共享單元控制第一暫存帳戶的第一資產,以及根據所述第二共享單元及第二新共享單元控制第二暫存帳戶的第二資產。另外,在實際實施上,第一客戶端主機110及第二客戶端主機120可選擇執行逐步交換協定(Gradual Exchange Protocol)以使第一客戶端主機110及第二客戶端主機120相互交換各自持有的低等級的第一共享單元及第二共享單元,並且在完成交換後,使第一客戶端主機110允許根據高等級的第二共享單元及低等級的第二共享單元控制第二暫存帳戶,以及使第二客戶端主機120允許根據高等級的第一共享單元及低等級的第一共享單元控制第一暫存帳戶。具體而言,逐步交換協定包含以下步驟: The first client host 110 stores the low-level first shared unit and the high-level second shared unit, the second client host 120 stores the high-level first shared unit and the low-level second shared unit, and the third A client host 110 and a second client host 120 are allowed to choose to perform threshold signing together with the fair end host 100 to control the first of the first temporary account according to the first sharing unit and the first new sharing unit, respectively assets, and control the second assets of the second escrow account according to the second sharing unit and the second new sharing unit. In addition, in actual implementation, the first client host 110 and the second client host 120 may choose to execute the Gradual Exchange Protocol to enable the first client host 110 and the second client host 120 to exchange their respective There are low-level first shared units and second shared units, and after the exchange is completed, the first client host 110 is allowed to control the second temporary storage according to the high-level second shared units and the low-level second shared units. account, and enabling the second client host 120 to allow control of the first staging account according to the high-level first sharing unit and the low-level first sharing unit. Specifically, the step-by-step exchange agreement consists of the following steps:

1.使第一客戶端主機110及第二客戶端主機120分別隨機選擇rA,i值及rB,i值,並且皆在[0,P-1]的區間,其中,A代表第一客戶端主機110、B代表第二客戶端主機120、P為橢圓曲線群的個數(例如:256),以及i為正整數。 1. Let the first client host 110 and the second client host 120 randomly select r A, i and r B, i values respectively, and both are in the interval of [0, P-1], where A represents the first The client host 110, B represents the second client host 120, P is the number of elliptic curve groups (for example: 256), and i is a positive integer.

2.將第一客戶端主機110的密文x及第二客戶端主機120的密文y拆分成k(即:k=P/32,在此例P=256,因此k=8)等分以生成多個xi值及多個yi值,所述xi值滿足密文x=sumi 232ixi、所述yi值滿足密文y=sumi 232iyi,其中,k=P/32,i為正整數滿足1<=i<=k,0<=xi<232且0<=yi<2322. Split the ciphertext x of the first client host 110 and the ciphertext y of the second client host 120 into k (ie: k=P/32, in this example P=256, so k=8), etc. to generate multiple x i values and multiple y i values, the x i values satisfy the ciphertext x=sum i 2 32i x i , and the y i values satisfy the ciphertext y=sum i 2 32i y i , where , k=P/32, i is a positive integer satisfying 1<=i<=k, 0<=x i <2 32 and 0<=y i <2 32 .

3.第一客戶端主機110計算Di值及Ei值,所述Di值為{xiG+rA,iM}、Ei值為{rA,iG},其中,G為橢圓曲線群的基點、M為第一客戶端主機的公鑰,第二客戶端主機120計算Vi值及Wi值,所述Vi值為{yiG+rB,iN},所述Wi值為{rB,iG},其中,N為第二客戶端主機120的公鑰。 3. The first client host 110 calculates the value of D i and the value of E i , where the value of D i is {x i G+r A, i M}, and the value of E i is {r A, i G}, where G is the base point of the elliptic curve group, M is the public key of the first client host, the second client host 120 calculates the V i value and the Wi value, and the V i value is {y i G+r B, i N } , the Wi value is {r B, i G }, where N is the public key of the second client host 120 .

4.第一客戶端主機110及第二客戶端主機120相互交換各自計算出的Di值及Vi值,再依序交換所述Ei值及所述Wi值直到停止依序交換為止。 4. The first client host 110 and the second client host 120 exchange the D i value and the V i value calculated respectively with each other, and then exchange the E i value and the Wi value in sequence until the sequential exchange is stopped . .

特別要說明的是,在實際實施上,本發明所述的模組皆可利用各種方式來實現,包含軟體、硬體或其任意組合,例如,在某些實施方式中,各模組可利用軟體及硬體或其中之一來實現,除此之外,本發明亦可部分地或完全地基於硬體來實現,例如,系統中的一個或多個模組可以透過積體電路晶片、系統單晶片(System on Chip,SoC)、複雜可程式邏輯裝置(Complex Programmable Logic Device,CPLD)、現場可程式邏輯閘陣列(Field Programmable Gate Array,FPGA)等來實現。本發明可以是系統、方法及/或電腦程式。電腦程式可以包括電腦可讀儲存媒體,其上載有用於使處理器實現本發明的各個方面的電腦可讀程式指令,電腦可讀儲存媒體可以是可以保持和儲存由指令執行設備使用的 指令的有形設備。電腦可讀儲存媒體可以是但不限於電儲存設備、磁儲存設備、光儲存設備、電磁儲存設備、半導體儲存設備或上述的任意合適的組合。電腦可讀儲存媒體的更具體的例子(非窮舉的列表)包括:硬碟、隨機存取記憶體、唯讀記憶體、快閃記憶體、光碟、軟碟以及上述的任意合適的組合。此處所使用的電腦可讀儲存媒體不被解釋為瞬時訊號本身,諸如無線電波或者其它自由傳播的電磁波、通過波導或其它傳輸媒介傳播的電磁波(例如,通過光纖電纜的光訊號)、或者通過電線傳輸的電訊號。另外,此處所描述的電腦可讀程式指令可以從電腦可讀儲存媒體下載到各個計算/處理設備,或者通過網路,例如:網際網路、區域網路、廣域網路及/或無線網路下載到外部電腦設備或外部儲存設備。網路可以包括銅傳輸電纜、光纖傳輸、無線傳輸、路由器、防火牆、交換器、集線器及/或閘道器。每一個計算/處理設備中的網路卡或者網路介面從網路接收電腦可讀程式指令,並轉發此電腦可讀程式指令,以供儲存在各個計算/處理設備中的電腦可讀儲存媒體中。執行本發明操作的電腦程式指令可以是組合語言指令、指令集架構指令、機器指令、機器相關指令、微指令、韌體指令、或者以一種或多種程式語言的任意組合編寫的原始碼或目的碼(Object Code),所述程式語言包括物件導向的程式語言,如:Common Lisp、Python、C++、Objective-C、Smalltalk、Delphi、Java、Swift、C#、Perl、Ruby與PHP等,以及常規的程序式(Procedural)程式語言,如:C語言或類似的程式語言。所述電腦程式指令可以完全地在電腦上執行、部分地在電腦上執行、作為一個獨立的軟體執行、部分在客戶端電腦上部分在遠端電腦上執行、或者完全在遠端電腦或伺服器上執行。 It should be noted that, in practice, the modules described in the present invention can be implemented in various ways, including software, hardware, or any combination thereof. For example, in some embodiments, each module can be implemented by using Software and hardware or one of them can be implemented. In addition, the present invention can also be implemented partially or completely based on hardware. For example, one or more modules in the system can be implemented through integrated circuit chips, system Single chip (System on Chip, SoC), Complex Programmable Logic Device (Complex Programmable Logic Device, CPLD), Field Programmable Gate Array (Field Programmable Gate Array, FPGA) etc. The present invention may be a system, method and/or computer program. The computer program may include a computer-readable storage medium on which computer-readable program instructions for causing a processor to implement various aspects of the present invention are loaded, and the computer-readable storage medium may be one that can hold and store instructions for use by the instruction execution device. Tangible device for instruction. Computer-readable storage media can be, but are not limited to, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: hard disks, random access memory, read-only memory, flash memory, optical disks, floppy disks, and any suitable combination of the foregoing. Computer-readable storage media, as used herein, are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (eg, optical signals through fiber optic cables), or through electrical wires. transmitted electrical signals. Additionally, the computer-readable program instructions described herein may be downloaded from computer-readable storage media to various computing/processing devices, or downloaded over a network such as the Internet, local area network, wide area network, and/or wireless network to an external computer device or external storage device. Networks may include copper transmission cables, fiber optic transmissions, wireless transmissions, routers, firewalls, switches, hubs and/or gateways. The network card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage on the computer-readable storage medium in each computing/processing device middle. The computer program instructions that perform the operations of the present invention may be assembled language instructions, instruction set architecture instructions, machine instructions, machine dependent instructions, microinstructions, firmware instructions, or source or object code written in any combination of one or more programming languages (Object Code), the programming language includes object-oriented programming languages, such as: Common Lisp, Python, C++, Objective-C, Smalltalk, Delphi, Java, Swift, C#, Perl, Ruby and PHP, etc., as well as conventional programs Procedural programming language, such as: C language or similar programming language. The computer program instructions may execute entirely on the computer, partly on the computer, as a stand-alone software, partly on the client computer and partly on the remote computer, or entirely on the remote computer or server execute on.

請參閱「第2A圖」至「第2D圖」,「第2A圖」至「第2D圖」為本發明基於門檻式簽章的資產跨鏈交換方法之方法流程圖,其步驟包括:提供第一客戶端主機110,此第一客戶端主機110在第一區塊鏈網路101的第一帳戶具有第一資產、提供第二客戶端主機120,此第二客戶端主機120在第二區塊鏈網路102的第二帳戶具有第二資產,以及提供與第一客戶端主機110及第二客戶端主機120相互連接的公正端主機100(步驟210);當第一客戶端主機110及第二客戶端主機120欲相互交換第一資產及第二資產時,共同向公正端主機100確認第一帳戶及第二帳戶的擁有者是否分別為第一客戶端主機110及第二客戶端主機120,以及查詢第一帳戶及第二帳戶是否具有第一資產及第二資產的所有權(步驟220);第一客戶端主機110及第二客戶端主機120在確認及查詢無誤後,以安全多方計算執行分散式金鑰生成函式,用以在第一區塊鏈網路101產生第一暫存帳戶及其相應且具有不同等級的第一共享單元,以及在第二區塊鏈網路102產生第二暫存帳戶及其相應且具有不同等級的第二共享單元,其中,第一客戶端主機110儲存低等級的第一共享單元及高等級的第二共享單元,第二客戶端主機120儲存高等級的第一共享單元及低等級的第二共享單元(步驟230);第一客戶端主機110以區塊鏈交易方式將第一資產傳送至第一暫存帳戶,第二客戶端主機120以區塊鏈交易方式將第二資產傳送至第二暫存帳戶(步驟240);第一客戶端主機110及第二客戶端主機120以安全多方計算執行分散式金鑰生成函式,用以分別產生與第一共享單元相應的第一分片及另一第一分片,以及分別產生與第二共享單元相應的第二分片及另一第二分片,其中,第一客戶端主機110將產生的第一分片及第二分片傳送至公正端主機100,以及第二客戶端主機120將產生的另一第一分片及另一第二分片傳送至公正端主機100(步驟250); 公正端主機100根據接收到的第一分片及另一第一分片組成第一新共享單元,以及根據接收到的第二分片及另一第二分片組成第二新共享單元(步驟260);第一客戶端主機110及第二客戶端主機120允許選擇與公正端主機100一併執行門檻式簽章以分別根據第一共享單元及第一新共享單元控制第一暫存帳戶的第一資產,以及根據第二共享單元及第二新共享單元控制第二暫存帳戶的第二資產(步驟270)。透過上述步驟,即可透過第一客戶端主機110及第二客戶端主機120以安全多方計算執行分散式金鑰生成函式,以便在不同的區塊鏈網路產生暫存帳戶,同時使公正端主機100、第一客戶端主機110及第二客戶端主機120具有相應於各暫存帳戶且不同等級的共享單元,當第一客戶端主機110及第二客戶端主機120欲交換不同區塊鏈網路的資產時,先將欲交換的資產轉移至相應暫存帳戶,再分別根據持有的共享單元執行門檻式簽章以獲得相應暫存帳戶的控制權,進而完成跨鏈交換資產。 Please refer to "Fig. 2A" to "Fig. 2D", "Fig. 2A" to "Fig. 2D" are the method flowcharts of the cross-chain asset exchange method based on the threshold signature of the present invention. The steps include: providing the first A client host 110, the first client host 110 has the first asset in the first account of the first blockchain network 101, and provides the second client host 120, the second client host 120 is in the second area The second account of the blockchain network 102 has the second asset, and provides the fair end host 100 interconnected with the first client host 110 and the second client host 120 (step 210); when the first client host 110 and When the second client host 120 wants to exchange the first asset and the second asset with each other, it jointly confirms with the fair end host 100 whether the owners of the first account and the second account are the first client host 110 and the second client host, respectively. 120, and query whether the first account and the second account have the ownership of the first asset and the second asset (step 220); Calculating and executing a distributed key generation function to generate a first temporary account and its corresponding first sharing unit with different levels in the first blockchain network 101 , and in the second blockchain network 102 Generate a second temporary account and its corresponding second shared units with different levels, wherein the first client host 110 stores the low-level first shared unit and the high-level second shared unit, and the second client host 120 Store the high-level first shared unit and the low-level second shared unit (step 230 ); the first client host 110 transfers the first asset to the first temporary account in a blockchain transaction, and the second client host 120 transmits the second asset to the second temporary account by means of a blockchain transaction (step 240); the first client host 110 and the second client host 120 execute the distributed key generation function by means of secure multi-party computation, using to respectively generate a first fragment and another first fragment corresponding to the first sharing unit, and respectively generate a second fragment and another second fragment corresponding to the second sharing unit, wherein the first client The host 110 transmits the generated first fragment and the second fragment to the fair host 100 , and the second client host 120 transmits the generated another first fragment and another second fragment to the fair host 100 (step 250); The fair-end host 100 forms a first new sharing unit according to the received first fragment and another first fragment, and forms a second new sharing unit according to the received second fragment and another second fragment (step 260); the first client host 110 and the second client host 120 are allowed to choose to execute the threshold signature together with the fair end host 100 to control the first temporary account according to the first sharing unit and the first new sharing unit, respectively. A first asset, and a second asset that controls the second escrow account according to the second sharing unit and the second new sharing unit (step 270). Through the above steps, the distributed key generation function can be executed by the first client host 110 and the second client host 120 through secure multi-party computation, so as to generate temporary accounts in different blockchain networks, and at the same time make fair The end host 100, the first client host 110 and the second client host 120 have different levels of sharing units corresponding to each temporary account. When the first client host 110 and the second client host 120 want to exchange different blocks When linking the assets of the network, first transfer the assets to be exchanged to the corresponding temporary account, and then execute the threshold signature according to the shared unit held to obtain the control right of the corresponding temporary account, and then complete the cross-chain exchange of assets.

另外,在步驟270之後,第一客戶端主機110及第二客戶端主機120可選擇執行逐步交換協定(Gradual Exchange Protocol)以使第一客戶端主機110及第二客戶端主機120相互交換各自持有的低等級的第一共享單元及第二共享單元,並且在完成交換後,使第一客戶端主機110允許根據高等級的第二共享單元及低等級的第二共享單元控制第二暫存帳戶,以及使第二客戶端主機120允許根據高等級的第一共享單元及低等級的第一共享單元控制第一暫存帳戶(步驟280)。換句話說,第一客戶端主機110或第二客戶端主機120可以直接根據自己原本持有的高等級的第一共享單元,以及交換後所得到的低等級的第一共享單元進行門檻式簽章運算,無須與其它方的主機配合即可自行將資產歸戶。在實際實施上,逐步交換協定如「第2D圖」所示意,其包含:使第一客戶端主機110 及第二客戶端主機120分別隨機選擇rA,i值及rB,i值,並且皆在[0,P-1]的區間,其中,A代表第一客戶端主機110、B代表第二客戶端主機120、P為橢圓曲線群的個數,以及i為正整數(步驟281);將第一客戶端主機110的密文x及第二客戶端主機120的密文y拆分成k等分(即:k=P/32,假設P=256,則k=8)以生成多個xi值及多個yi值,所述xi值滿足密文x=sumi 232ixi、所述yi值滿足密文y=sumi 232iyi,其中,k=P/32,i為正整數滿足0<=i<=k,0<=xi<232且0<=yi<232(步驟282);第一客戶端主機110計算Di值及Ei值,所述Di值為{xiG+rA,iM}、Ei值為{rA,iG},其中,G為橢圓曲線群的基點、M為第一客戶端主機110的公鑰,第二客戶端主機120計算Vi值及Wi值,所述Vi值為{yiG+rB,iN},所述Wi值為{rB,iG},其中,N為第二客戶端主機120的公鑰(步驟283);第一客戶端主機110及第二客戶端主機120相互交換各自計算出的Di值及Vi值,再依序交換所述Ei值及所述Wi值直到停止依序交換為止(步驟284)。如此一來,便可根據相互交換的值計算出對方的密文(即:密文x與密文y)進而實現交換低等級的共享單元的目的。 In addition, after step 270, the first client host 110 and the second client host 120 may optionally execute a Gradual Exchange Protocol to enable the first client host 110 and the second client host 120 to exchange their respective There are low-level first shared units and second shared units, and after the exchange is completed, the first client host 110 is allowed to control the second temporary storage according to the high-level second shared units and the low-level second shared units. account, and enabling the second client host 120 to allow control of the first staging account according to the high-level first sharing unit and the low-level first sharing unit (step 280). In other words, the first client host 110 or the second client host 120 can directly perform threshold signing according to the high-level first shared unit originally held by itself and the low-level first shared unit obtained after the exchange Chapter operations, without the need to cooperate with other parties' hosts, you can return the assets to your own account. In practical implementation, the step-by-step exchange protocol is shown in Figure 2D, which includes: causing the first client host 110 and the second client host 120 to randomly select the r A,i and r B,i values, respectively, and are in the interval [0, P-1], wherein A represents the first client host 110, B represents the second client host 120, P is the number of elliptic curve groups, and i is a positive integer (step 281) ; Split the ciphertext x of the first client host 110 and the ciphertext y of the second client host 120 into k equal parts (ie: k=P/32, assuming P=256, then k=8) to generate Multiple x i values and multiple y i values, the x i values satisfy the ciphertext x=sum i 2 32i x i , and the y i values satisfy the ciphertext y=sum i 2 32i y i , where k= P/32, i is a positive integer satisfying 0<=i<=k, 0<=x i <2 32 and 0<=y i <2 32 (step 282); the first client host 110 calculates the value of D i and The value of E i , the value of D i is {x i G+r A, i M}, and the value of E i is {r A, i G}, where G is the base point of the elliptic curve group, and M is the first client The public key of the host 110, the second client host 120 calculates the V i value and the Wi value, the V i value is {y i G+r B, i N }, and the Wi value is {r B, i G}, where N is the public key of the second client host 120 (step 283 ); the first client host 110 and the second client host 120 exchange their calculated values of D i and V i with each other, and then The E i value and the Wi value are sequentially exchanged until the sequential exchange is stopped ( step 284 ). In this way, the ciphertext of the other party (ie, the ciphertext x and the ciphertext y) can be calculated according to the mutually exchanged values, thereby realizing the purpose of exchanging low-level shared units.

以下配合「第3圖」至「第4B圖」以實施例的方式進行如下說明,請參閱「第3圖」,「第3圖」為應用本發明生成共享單元之示意圖。在執行分散式金鑰生成函式生成共享單元時,第一客戶端主機110(以下簡稱為「A」)與第二客戶端主機120(以下簡稱為「B」)會有自己的X座標,如:3及4,並且根據自己的等級選擇層級值,例如:高等級選擇的層級值為數值0;低等級選擇的層級值為數值1。假設A為高等級、B為低等級,兩者分別隨機選擇一個一次多項式(311、312),如:「f(x)=3*x+5」及「g(x)=10*x+19」。接著,基於安全多方計算,A會根據各方的X座標和層級值計算「f(3)=14」及「f’(4)=3」, 其中,由於B的層級值為數值1,代表需要對欲帶入B的X座標的一次多項式先進行一次微分後再帶入計算。同樣地,B會根據各方的X座標和層級值計算「g(3)=49」及「g’(4)=10」。然後,A將「f’(4)=3」傳給B;B將「g(3)=49」傳給A。此時,A即可令自己的共享單元(即:與第一暫存帳戶相應的第一共享單元)為「f(3)+g(3)=63」;B則令自己的共享單元(即:與第一暫存帳戶相應的另一個第一共享單元)為「f’(4)+g’(4)=13」,至此,A獲得自己的共享單元為「63」、B獲得自己的共享單元為「13」。特別要說明的是,為了方便說明,上述皆以簡單的數值進行示意,實際上,X座標及共享單元通常是非常大的數值。 The following description will be given in the form of an embodiment in conjunction with "FIG. 3" to "FIG. 4B", please refer to "FIG. 3", "FIG. 3" is a schematic diagram of applying the present invention to generate a shared unit. When the distributed key generation function is executed to generate the shared unit, the first client host 110 (hereinafter referred to as "A") and the second client host 120 (hereinafter referred to as "B") will have their own X-coordinates. Such as: 3 and 4, and select the level value according to its own level, for example: the level value selected by the high level is the value 0; the level value selected by the low level is the value 1. Assuming that A is a high level and B is a low level, the two randomly select a first-order polynomial (311, 312), such as: "f(x)=3*x+5" and "g(x)=10*x+ 19". Then, based on the secure multi-party calculation, A will calculate "f(3)=14" and "f'(4)=3" according to the X-coordinate and level value of each party, Among them, since the level value of B is a value of 1, it means that the first-order polynomial of the X coordinate of B needs to be differentiated first and then brought into the calculation. Similarly, B will calculate "g(3)=49" and "g'(4)=10" based on each party's X-coordinate and level value. Then, A passes "f'(4)=3" to B; B passes "g(3)=49" to A. At this point, A can make its own shared unit (ie: the first shared unit corresponding to the first temporary account) to be "f(3)+g(3)=63"; B can make its own shared unit ( That is: another first shared unit corresponding to the first temporary account) is "f'(4)+g'(4)=13", so far, A gets its own shared unit as "63", B gets its own The shared unit is "13". It should be noted that, for the convenience of description, the above are all shown with simple numerical values. In fact, the X coordinate and the shared unit are usually very large numerical values.

如「第4A圖」及「第4B圖」所示意,「第4A圖」及「第4B圖」為應用本發明進行資產跨鏈交換之示意圖。假設第一客戶端主機110在比特幣區塊鏈網路中有一個帳戶(即:第一帳戶401),此帳戶中的一筆資產(如:20個比特幣)為第一資產;第二客戶端主機120在以太坊區塊鏈網路中有一個帳戶(即:第二帳戶402),此帳戶中的一筆資產(如:10個以太幣)為第二資產。當第一客戶端主機110和第二客戶端主機120要交換第一資產及第二資產時,雙方會向公正端主機100確認第一帳戶401及第二帳戶402的擁有者,以及查詢第一帳戶401/第二帳戶402是否具有第一資產/第二資產的所有權。當確認及查詢無誤後,第一客戶端主機110及第二客戶端主機120會分別執行分散式金鑰生成函式,用以產生第一暫存帳戶411及第二暫存帳戶412,並且使第一客戶端主機110獲得與第一暫存帳戶411相應的低等級的共享單元(即:第一共享單元421),以及與第二暫存帳戶412相應的高等級的共享單元(即:第二共享單元431);使第二客戶端主機120獲得與第一暫存帳戶411相應的高等級的共享單元(即:第一共享單元422),以及與第二暫存帳戶412相應的低等級的共享單元(即: 第二共享單元432)。接下來,第一客戶端主機110將第一帳戶401內的第一資產轉入第一暫存帳戶411,第二客戶端主機120則將第二帳戶402內的第二資產轉入第二暫存帳戶412。 As shown in "Fig. 4A" and "Fig. 4B", "Fig. 4A" and "Fig. 4B" are schematic diagrams of applying the present invention to exchange assets across chains. Suppose the first client host 110 has an account (ie: the first account 401 ) in the Bitcoin blockchain network, and an asset (eg: 20 bitcoins) in this account is the first asset; the second client The end host 120 has an account (ie, the second account 402 ) in the Ethereum blockchain network, and an asset (eg, 10 ethers) in this account is the second asset. When the first client host 110 and the second client host 120 want to exchange the first asset and the second asset, the two parties will confirm the owners of the first account 401 and the second account 402 with the fair end host 100, and query the first account 401 and the second account 402. Whether account 401/second account 402 has ownership of the first asset/second asset. After the confirmation and query are correct, the first client host 110 and the second client host 120 will respectively execute the distributed key generation function to generate the first temporary account 411 and the second temporary account 412, and make The first client host 110 obtains a low-level sharing unit (ie, the first sharing unit 421 ) corresponding to the first temporary storage account 411 , and a high-level sharing unit (ie, the first sharing unit 421 ) corresponding to the second temporary storage account 412 . Two sharing units 431); enable the second client host 120 to obtain a high-level sharing unit (ie: first sharing unit 422) corresponding to the first temporary account 411, and a low-level corresponding to the second temporary account 412 of shared units (ie: the second sharing unit 432). Next, the first client host 110 transfers the first asset in the first account 401 to the first temporary account 411, and the second client host 120 transfers the second asset in the second account 402 to the second temporary account Deposit account 412.

接著,如「第4B圖」所示意,第一客戶端主機110與第二客戶端主機120在得知公正端主機100的X座標及層級值後,將再次執行分散式金鑰生成函式,用以新增與第一共享單元(421、422)相應且低等級的第一新共享單元423,以及與第二共享單元(431、432)相應且低等級的第二新共享單元433。具體來說,第一客戶端主機110會產生與第一共享單元(421、422)相應的第一分片441和與第二共享單元(431、432)相應的第二分片442;第二客戶端主機120會產生與第一共享單元(421、422)相應的另一第一分片451和與第二共享單元(431、432)相應的另一第二分片452,接著,第一客戶端主機110將產生的第一分片441及第二分片442傳送至公正端主機100;第二客戶端主機120將產生的另一第一分片451及另一第二分片452傳送至公正端主機100,如此一來,公正端主機100便能夠根據接收到的第一分片441及另一第一分片451組成第一新共享單元423,以及根據接收到的第二分片442及另一第二分片452組成第二新共享單元433。此時,第二客戶端主機120與公正端主機100分別有以太幣地址的低等級共享單元(即:第二共享單元431和第二新共享單元433),第一客戶端主機110則擁有以太幣地址的高等級共享單元(即:第二共享單元432);第一客戶端主機110與公正端主機100分別有比特幣地址的低等級共享單元(即:第一共享單元421和第二新共享單元433),第二客戶端主機120則擁有比特幣地址的高等級共享單元(即:第一共享單元422)。因此,要控制第一暫存帳戶的第一資產一定須要第二客戶端主機120以其共享單元參與門檻式簽章運算。同樣地, 要控制第二暫存帳戶的第二資產一定須要第一客戶端主機110以其共享單元參與門檻式簽章運算。如此一來,第二客戶端主機120與公正端主機100可以共同根據高等級的第一共享單元422和低等級的第一新共享單元423取得第一暫存帳戶411的控制權;第一客戶端主機110與公正端主機100可以共同根據高等級的第二共享單元432和低等級的第二新共享單元433取得第二暫存帳戶412的控制權,進而實現資產跨鏈交換的目的。除此之外,第一客戶端主機110及第二客戶端主機120可選擇執行逐步交換協定以使第一客戶端主機110及第二客戶端主機120相互交換各自持有的低等級的第一共享單元及第二共享單元,並且在完成交換後,使第一客戶端主機110允許根據高等級的第二共享單元及低等級的第二共享單元控制第二暫存帳戶,以及使第二客戶端主機120允許根據高等級的第一共享單元及低等級的第一共享單元控制第一暫存帳戶。如此一來,即可在減少交易成本的前提下完成跨鏈交換資產,並且可以支援沒有智能合約(Smart Contract)的區塊鏈網路,同時也不用耗費佈署智能合約的成本,大幅提高跨鏈交換資產的可用性。 Next, as shown in FIG. 4B , after the first client host 110 and the second client host 120 know the X-coordinate and the level value of the peer host 100 , the distributed key generation function will be executed again, It is used to add a first new shared unit 423 corresponding to the first shared unit (421, 422) and having a lower level, and a second new shared unit 433 corresponding to the second shared unit (431, 432) and having a lower level. Specifically, the first client host 110 generates a first fragment 441 corresponding to the first sharing unit (421, 422) and a second fragment 442 corresponding to the second sharing unit (431, 432); The client host 120 generates another first fragment 451 corresponding to the first sharing unit (421, 422) and another second fragment 452 corresponding to the second sharing unit (431, 432). The client host 110 transmits the generated first segment 441 and the second segment 442 to the fair end host 100; the second client host 120 transmits the generated another first segment 451 and another second segment 452 to the fair-end host 100, in this way, the fair-end host 100 can form the first new sharing unit 423 according to the received first fragment 441 and another first fragment 451, and according to the received second fragment 442 and another second slice 452 form a second new shared unit 433 . At this time, the second client host 120 and the fair end host 100 respectively have low-level share units of ether addresses (ie, the second share unit 431 and the second new share unit 433 ), and the first client host 110 owns ether The first client host 110 and the fair end host 100 respectively have low-level sharing units of bitcoin addresses (ie: the first sharing unit 421 and the second new sharing unit 432). sharing unit 433), the second client host 120 has a high-level sharing unit (ie, the first sharing unit 422) of the bitcoin address. Therefore, to control the first asset of the first temporary account, the second client host 120 must participate in the threshold signature operation with its shared unit. Similarly, To control the second asset of the second temporary account, the first client host 110 must participate in the threshold signature operation with its shared unit. In this way, the second client host 120 and the fair end host 100 can jointly obtain the control right of the first temporary account 411 according to the high-level first sharing unit 422 and the low-level first new sharing unit 423; the first client The end host 110 and the impartial end host 100 can jointly obtain the control right of the second temporary account 412 according to the high-level second sharing unit 432 and the low-level second new sharing unit 433, thereby realizing the purpose of asset cross-chain exchange. In addition to this, the first client host 110 and the second client host 120 may optionally execute a step-by-step exchange protocol for the first client host 110 and the second client host 120 to exchange their respective low-level first sharing the unit and the second sharing unit, and after completing the exchange, enable the first client host 110 to allow control of the second staging account according to the high-level second sharing unit and the low-level second sharing unit, and enable the second client The end host 120 is allowed to control the first temporary account according to the high-level first sharing unit and the low-level first sharing unit. In this way, it is possible to complete cross-chain exchange of assets under the premise of reducing transaction costs, and can support blockchain networks without smart contracts, without spending the cost of deploying smart contracts. Availability of on-chain exchange assets.

綜上所述,可知本發明與先前技術之間的差異在於透過第一客戶端主機及第二客戶端主機以安全多方計算執行分散式金鑰生成函式,以便在不同的區塊鏈網路產生暫存帳戶,同時使公正端主機、第一客戶端主機及第二客戶端主機具有相應於各暫存帳戶且不同等級的共享單元,當第一客戶端主機及第二客戶端主機欲交換不同區塊鏈網路的資產時,先將欲交換的資產轉移至相應暫存帳戶,再分別根據持有的共享單元執行門檻式簽章以獲得相應暫存帳戶的控制權,進而完成跨鏈交換資產,藉由此一技術手段可以解決先前技術所存在的問題,進而達成提高跨鏈交換資產的高可用性之技術功效。 From the above, it can be seen that the difference between the present invention and the prior art is that the distributed key generation function is executed by the first client host and the second client host through secure multi-party computation, so as to be used in different blockchain networks. Generate a temporary account, and at the same time make the fair end host, the first client host and the second client host have different levels of sharing units corresponding to each temporary account, when the first client host and the second client host want to exchange When the assets of different blockchain networks are used, first transfer the assets to be exchanged to the corresponding temporary account, and then execute the threshold signature according to the shared unit held to obtain the control right of the corresponding temporary account, and then complete the cross-chain. By exchanging assets, this technical means can solve the problems existing in the previous technology, and then achieve the technical effect of improving the high availability of cross-chain exchange assets.

雖然本發明以前述之實施例揭露如上,然其並非用以限定本發明,任何熟習相像技藝者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾,因此本發明之專利保護範圍須視本說明書所附之申請專利範圍所界定者為準。 Although the present invention is disclosed above by the aforementioned embodiments, it is not intended to limit the present invention. Anyone who is familiar with the similar arts can make some changes and modifications without departing from the spirit and scope of the present invention. The scope of patent protection shall be determined by the scope of the patent application attached to this specification.

101:第一區塊鏈網路 101: The first blockchain network

102:第二區塊鏈網路 102: Second Blockchain Network

100:公正端主機 100: fair end host

110:第一客戶端主機 110: First client host

111:第一確認模組 111: The first confirmation module

112:第一執行模組 112: The first execution module

113:第一交易模組 113: The first transaction module

120:第二客戶端主機 120: Second client host

121:第二確認模組 121: Second confirmation module

122:第二執行模組 122: The second execution module

123:第二交易模組 123: Second Transaction Module

Claims (8)

一種基於門檻式簽章的資產跨鏈交換系統,該系統包含:一公正端主機,用以接收一第一分片、另一第一分片、一第二分片及另一第二分片,並且根據該第一分片及該另一第一分片組成低等級的一第一新共享單元,以及根據該第二分片及該另一第二分片組成低等級的一第二新共享單元;一第一客戶端主機,用以與該公正端主機相互連接,以及在一第一區塊鏈網路的一第一帳戶具有一第一資產,該第一客戶端主機包含:一第一確認模組,用以在欲交換該第一資產及一第二資產時,向該公正端主機確認一第二區塊鏈網路的一第二帳戶的擁有者,以及查詢該第二帳戶是否具有該第二資產的所有權;一第一執行模組,連接該第一確認模組,用以在確認及查詢無誤後,以安全多方計算(Secure Multi-Party Computation,MPC)執行一分散式金鑰生成函式以在該第一區塊鏈網路產生一第一暫存帳戶及其相應且具有不同等級的多個第一共享單元,以及產生與所述第一共享單元相應且低等級的該第一新共享單元的該第一分片和與多個第二共享單元相應且低等級的該第二新共享單元的該第二分片以傳送至該公正端主機;以及 一第一交易模組,連接該第一執行模組,用以在該第一暫存帳戶產生後,以區塊鏈交易方式將該第一資產傳送至該第一暫存帳戶;以及一第二客戶端主機,用以與該公正端主機相互連接,以及在該第二區塊鏈網路的該第二帳戶具有該第二資產,該第二客戶端主機包含:一第二確認模組,用以在欲交換該第一資產及該第二資產時,向該公正端主機確認該第一區塊鏈網路的該第一帳戶的擁有者,以及查詢該第一帳戶是否具有該第一資產的所有權;一第二執行模組,連接該第二確認模組,用以在確認及查詢無誤後,以安全多方計算執行該分散式金鑰生成函式以在該第二區塊鏈網路產生一第二暫存帳戶及其相應且具有不同等級的所述第二共享單元,以及產生與所述第二共享單元相應且低等級的該第二新共享單元的該另一第二分片和與所述第一共享單元相應且低等級的該第一新共享單元的該另一第一分片以傳送至該公正端主機;以及一第二交易模組,連接該第二執行模組,用以在該第二暫存帳戶產生後,以區塊鏈交易方式將該第二資產傳送至該第二暫存帳戶;其中,該第一客戶端主機儲存低等級的所述第一共享單元及高等級的所述第二共享單元,該第二客戶端主機儲存高等級 的所述第一共享單元及低等級的所述第二共享單元,並且該第一客戶端主機及該第二客戶端主機允許選擇與該公正端主機一併執行門檻式簽章以分別根據所述第一共享單元及該第一新共享單元控制第一暫存帳戶的該第一資產,以及根據所述第二共享單元及該第二新共享單元控制該第二暫存帳戶的該第二資產。 An asset cross-chain exchange system based on threshold signature, the system includes: a fair end host for receiving a first shard, another first shard, a second shard and another second shard , and form a low-level first new shared unit according to the first fragment and the other first fragment, and form a low-level second new sharing unit according to the second fragment and the other second fragment a sharing unit; a first client host for interconnecting with the fair end host, and a first account in a first blockchain network having a first asset, the first client host comprising: a The first confirmation module is used for confirming the owner of a second account of a second blockchain network with the fair end host, and inquiring about the second account when the first asset and a second asset are to be exchanged Whether the account has the ownership of the second asset; a first execution module, connected to the first confirmation module, for executing a decentralized operation using Secure Multi-Party Computation (MPC) after confirmation and query are correct formula key generation function to generate a first temporary account and a plurality of first shared units corresponding to different levels in the first blockchain network, and to generate a corresponding and low level of the first shared unit transmitting the first slice of the first new shared unit of the rank and the second slice of the second new shared unit of a lower rank corresponding to a plurality of second shared units to the impartial host; and a first transaction module, connected to the first execution module, for transferring the first asset to the first temporary account in a blockchain transaction mode after the first temporary account is generated; and a first Two client hosts are used for interconnecting with the fair end host, and the second account in the second blockchain network has the second asset, the second client host includes: a second confirmation module , for confirming the owner of the first account of the first blockchain network with the fair end host, and querying whether the first account has the first account when the first asset and the second asset are to be exchanged The ownership of an asset; a second execution module, connected to the second confirmation module, for executing the distributed key generation function through secure multi-party computation after the confirmation and query are correct to execute the distributed key generation function in the second blockchain The network generates a second temporary account and its corresponding second sharing unit with a different level, and generates the other second sharing unit corresponding to the second sharing unit and having a lower level of the second new sharing unit sharding and the other first shard of the first new sharing unit corresponding to the first sharing unit and of a lower level to transmit to the fair end host; and a second transaction module connected to the second execution a module for transferring the second asset to the second temporary account by means of block chain transaction after the second temporary account is generated; wherein the first client host stores the low-level first A shared unit and the second shared unit of the high level, the second client host storing the high level The first sharing unit and the second sharing unit of the lower level, and the first client host and the second client host are allowed to choose to perform threshold signing together with the fair end host to respectively according to the The first sharing unit and the first new sharing unit control the first asset of the first temporary storage account, and control the second temporary storage account according to the second sharing unit and the second new sharing unit assets. 如請求項1之基於門檻式簽章的資產跨鏈交換系統,其中該第一客戶端主機及該第二客戶端主機選擇執行一逐步交換協定(Gradual Exchange Protocol)以使該第一客戶端主機及該第二客戶端主機相互交換各自持有的低等級的所述第一共享單元及所述第二共享單元,並且在完成交換後,使該第一客戶端主機允許根據高等級的所述第二共享單元及低等級的所述第二共享單元控制該第二暫存帳戶,以及使該第二客戶端主機允許根據高等級的所述第一共享單元及低等級的所述第一共享單元控制該第一暫存帳戶。 The threshold-based signature-based asset cross-chain exchange system as claimed in claim 1, wherein the first client host and the second client host choose to execute a Gradual Exchange Protocol to enable the first client host and the second client host to exchange the first shared unit and the second shared unit of the lower level held by each other, and after the exchange is completed, the first client host allows the first shared unit according to the higher level. The second sharing unit and the second sharing unit of the low level control the second staging account, and cause the second client host to allow the first sharing unit according to the high level and the first sharing unit of the low level The unit controls the first staging account. 如請求項2之基於門檻式簽章的資產跨鏈交換系統,其中該逐步交換協定包含執行下列步驟:使該第一客戶端主機及該第二客戶端主機分別隨機選擇一rA,i值及一rB,i值,並且皆在[0,P-1]的區間,其中,A代表該第一客戶端主機、B代表該第二客戶端主機、P為橢圓曲線群的個數,以及i為正整數; 將該第一客戶端主機的一密文x及該第二客戶端主機的一密文y拆分成k等分以生成多個xi值及多個yi值,所述xi值滿足該密文x=sumi 232ixi、所述yi值滿足該密文y=sumi 232iyi,其中,k=P/32,i為正整數滿足1<=i<=k,0<=xi<232且0<=yi<232;該第一客戶端主機計算一Di值及一Ei值,該Di值為{xiG+rA,iM},該Ei值為{rA,iG},其中,G為橢圓曲線群的基點、M為該第一客戶端主機的公鑰,該第二客戶端主機計算一Vi值及一Wi值,該Vi值為{yiG+rB,iN},該Wi值為{rB,iG},其中,N為該第二客戶端主機的公鑰;以及該第一客戶端主機及該第二客戶端主機相互交換各自計算出的所述Di值及所述Vi值,再依序交換所述Ei值及所述Wi值直到停止依序交換為止。 The threshold-based signature-based asset cross-chain exchange system of claim 2, wherein the step-by-step exchange agreement includes executing the following steps: causing the first client host and the second client host to randomly select an r A, i value respectively and a r B,i value, and both are in the interval [0,P-1], where A represents the first client host, B represents the second client host, and P is the number of elliptic curve groups, and i is a positive integer; a ciphertext x of the first client host and a ciphertext y of the second client host are split into k equal parts to generate multiple x i values and multiple y i values, The x i value satisfies the ciphertext x=sum i 2 32i x i , and the y i value satisfies the ciphertext y=sum i 2 32i y i , where k=P/32, i is a positive integer and satisfies 1 <=i<=k, 0<=x i <2 32 and 0<=y i <2 32 ; the first client host calculates a D i value and an E i value, and the D i value is {x i G+r A, i M}, the value of E i is {r A, i G}, where G is the base point of the elliptic curve group, M is the public key of the first client host, and the second client host Calculate a V i value and a Wi value, the V i value is {y i G+r B, i N }, the Wi value is {r B, i G }, where N is the second client The public key of the host; and the first client host and the second client host exchange the D i value and the V i value calculated by each other with each other, and then exchange the E i value and the W i value in sequence. i values until the sequential swapping stops. 如請求項1之基於門檻式簽章的資產跨鏈交換系統,其中該第一新共享單元的該第一分片及該另一第一分片,以及該第二新共享單元的該第二分片及該另一第二分片係該第一客戶端主機及該第二客戶端主機在執行該分散式金鑰生成函式時,同時將該公正端主機的X座標及層級值帶入計算所產生。 The threshold-based signature-based asset cross-chain exchange system of claim 1, wherein the first shard and the other first shard of the first new sharing unit, and the second shard of the second new sharing unit The shard and the other second shard are when the first client host and the second client host execute the distributed key generation function, the X coordinate and the level value of the fair end host are brought into the generated by the calculation. 一種基於門檻式簽章的資產跨鏈交換方法,其步驟包括:一第一客戶端主機在一第一區塊鏈網路的一第一帳戶具有一第一資產、一第二客戶端主機在一第二區塊鏈網路的一第二帳戶具有一第二資產,以及一公正端主機與該第一客戶端主機及該第二客戶端主機相互連接; 當該第一客戶端主機及該第二客戶端主機欲相互交換該第一資產及該第二資產時,該第一客戶端主機及該第二客戶端主機共同向該公正端主機確認該第一帳戶及該第二帳戶的擁有者是否分別為該第一客戶端主機及該第二客戶端主機,以及查詢該第一帳戶及該第二帳戶是否具有該第一資產及該第二資產的所有權;該第一客戶端主機及該第二客戶端主機在確認及查詢無誤後,以安全多方計算(Secure Multi-Party Computation,MPC)執行一分散式金鑰生成函式,用以在該第一區塊鏈網路產生一第一暫存帳戶及其相應且具有不同等級的多個第一共享單元,以及在該第二區塊鏈網路產生一第二暫存帳戶及其相應且具有不同等級的多個第二共享單元,其中,該第一客戶端主機儲存低等級的所述第一共享單元及高等級的所述第二共享單元,該第二客戶端主機儲存高等級的所述第一共享單元及低等級的所述第二共享單元;該第一客戶端主機以區塊鏈交易方式將該第一資產傳送至該第一暫存帳戶,該第二客戶端主機以區塊鏈交易方式將該第二資產傳送至該第二暫存帳戶;該第一客戶端主機及該第二客戶端主機以安全多方計算執行該分散式金鑰生成函式,用以分別產生與所述第一共享單元相應的一第一分片及另一第一分片,以及分別產生與所述第二共享單元相應的一第二分片及另一第二分片,其中,該第一客 戶端主機將產生的該第一分片及該第二分片傳送至該公正端主機,該第二客戶端主機將產生的該另一第一分片及該另一第二分片傳送至該公正端主機;該公正端根據接收到的該第一分片及該另一第一分片組成低等級的一第一新共享單元,以及根據接收到的該第二分片及該另一第二分片組成低等級的一第二新共享單元;以及該第一客戶端主機及該第二客戶端主機允許選擇與該公正端主機一併執行門檻式簽章以分別根據所述第一共享單元及該第一新共享單元控制第一暫存帳戶的該第一資產,以及根據所述第二共享單元及該第二新共享單元控制該第二暫存帳戶的該第二資產。 A method for asset cross-chain exchange based on threshold signature, the steps of which include: a first client host having a first asset in a first account of a first blockchain network, a second client host in A second account of a second blockchain network has a second asset, and a fair end host is interconnected with the first client host and the second client host; When the first client host and the second client host want to exchange the first asset and the second asset with each other, the first client host and the second client host jointly confirm the first client host with the fair host Whether the owners of an account and the second account are the first client host and the second client host respectively, and query whether the first account and the second account have the first asset and the second asset Ownership; the first client host and the second client host execute a distributed key generation function using Secure Multi-Party Computation (MPC) after confirming and querying the correct A block chain network generates a first temporary account and its corresponding multiple first sharing units with different levels, and generates a second temporary account and its corresponding and has a second block chain network. A plurality of second shared units of different levels, wherein the first client host stores the first shared unit of a low level and the second shared unit of a high level, and the second client host stores all the high level of the shared unit. The first sharing unit and the lower-level second sharing unit; the first client host transmits the first asset to the first temporary account in a blockchain transaction, and the second client host The second asset is sent to the second temporary account by means of a block chain transaction; the first client host and the second client host execute the distributed key generation function by means of secure multi-party computation, so as to respectively generate and A first fragment and another first fragment corresponding to the first sharing unit, and a second fragment and another second fragment corresponding to the second sharing unit are generated respectively, wherein the first fragment one guest The client host transmits the generated first segment and the second segment to the fair end host, and the second client host transmits the generated other first segment and the other second segment to the fair end host; the fair end forms a low-level first new shared unit according to the received first fragment and the other first fragment, and according to the received second fragment and the other The second fragment constitutes a second new shared unit of low level; and the first client host and the second client host are allowed to choose to perform threshold signing together with the fair end host to respectively according to the first The sharing unit and the first new sharing unit control the first asset of the first temporary account, and control the second asset of the second temporary account according to the second sharing unit and the second new sharing unit. 如請求項5之基於門檻式簽章的資產跨鏈交換方法,其中該方法更包含該第一客戶端主機及該第二客戶端主機選擇執行一逐步交換協定(Gradual Exchange Protocol)以使該第一客戶端主機及該第二客戶端主機相互交換各自持有的低等級的所述第一共享單元及所述第二共享單元,並且在完成交換後,使該第一客戶端主機允許根據高等級的所述第二共享單元及低等級的所述第二共享單元控制該第二暫存帳戶,以及使該第二客戶端主機允許根據高等級的所述第一共享單元及低等級的所述第一共享單元控制該第一暫存帳戶的步驟。 The threshold-based signature-based asset cross-chain exchange method of claim 5, wherein the method further includes the first client host and the second client host choosing to execute a Gradual Exchange Protocol to enable the first client host to execute a Gradual Exchange Protocol. A client host and the second client host exchange the low-level first shared unit and the second shared unit respectively held by each other, and after the exchange is completed, the first client host allows the The second sharing unit of the lower level and the second sharing unit of the lower level control the second staging account and enable the second client host to allow all the first sharing units according to the higher level and the lower level Describe the steps of the first sharing unit controlling the first temporary account. 如請求項6之基於門檻式簽章的資產跨鏈交換方法,其中該逐步交換協定包含執行下列步驟: 使該第一客戶端主機及該第二客戶端主機分別隨機選擇一rA,i值及一rB,i值,並且皆在[0,P-1]的區間,其中,A代表該第一客戶端主機、B代表該第二客戶端主機、P為橢圓曲線群的個數,以及i為正整數;將該第一客戶端主機的一密文x及該第二客戶端主機的一密文y拆分成k等分以生成多個xi值及多個yi值,所述xi值滿足該密文x=sumi 232ixi、所述yi值滿足該密文y=sumi 232iyi,其中,k=P/32,i為正整數滿足1<=i<=k,0<=xi<232且0<=yi<232;該第一客戶端主機計算一Di值及一Ei值,該Di值為{xiG+rA,iM},該Ei值為{rA,iG},其中,G為橢圓曲線群的基點、M為該第一客戶端主機的公鑰,該第二客戶端主機計算一Vi值及一Wi值,該Vi值為{yiG+rB,iN},該Wi值為{rB,iG},其中,N為該第二客戶端主機的公鑰;以及該第一客戶端主機及該第二客戶端主機相互交換各自計算出的所述Di值及所述Vi值,再依序交換所述Ei值及所述Wi值直到停止依序交換為止。 As claimed in claim 6, the threshold-based signature-based asset cross-chain exchange method, wherein the step-by-step exchange agreement includes executing the following steps: causing the first client host and the second client host to randomly select a value of r A,i respectively and a r B,i value, and both are in the interval [0,P-1], where A represents the first client host, B represents the second client host, and P is the number of elliptic curve groups, and i is a positive integer; a ciphertext x of the first client host and a ciphertext y of the second client host are split into k equal parts to generate multiple x i values and multiple y i values, The x i value satisfies the ciphertext x=sum i 2 32i x i , and the y i value satisfies the ciphertext y=sum i 2 32i y i , where k=P/32, i is a positive integer and satisfies 1 <=i<=k, 0<=x i <2 32 and 0<=y i <2 32 ; the first client host calculates a D i value and an E i value, and the D i value is {x i G+r A, i M}, the value of E i is {r A, i G}, where G is the base point of the elliptic curve group, M is the public key of the first client host, and the second client host Calculate a V i value and a Wi value, the V i value is {y i G+r B, i N }, the Wi value is {r B, i G }, where N is the second client The public key of the host; and the first client host and the second client host exchange the D i value and the V i value calculated by each other with each other, and then exchange the E i value and the W i value in sequence. i values until the sequential swapping stops. 如請求項5之基於門檻式簽章的資產跨鏈交換方法,其中該第一新共享單元及該第二新共享單元係該第一客戶端主機及該第二客戶端主機在執行該分散式金鑰生成函式時,同時將該公正端主機的X座標及層級值帶入計算所產生。The threshold-based signature-based asset cross-chain exchange method according to claim 5, wherein the first new sharing unit and the second new sharing unit are the first client host and the second client host executing the distributed When the key generation function is used, the X coordinate and the level value of the fair end host are brought into the calculation and generated.
TW110108993A 2021-03-12 2021-03-12 Asset cross-chain exchanging system based on threshold signature scheme and method thereof TWI769738B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW110108993A TWI769738B (en) 2021-03-12 2021-03-12 Asset cross-chain exchanging system based on threshold signature scheme and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW110108993A TWI769738B (en) 2021-03-12 2021-03-12 Asset cross-chain exchanging system based on threshold signature scheme and method thereof

Publications (2)

Publication Number Publication Date
TWI769738B true TWI769738B (en) 2022-07-01
TW202236130A TW202236130A (en) 2022-09-16

Family

ID=83439448

Family Applications (1)

Application Number Title Priority Date Filing Date
TW110108993A TWI769738B (en) 2021-03-12 2021-03-12 Asset cross-chain exchanging system based on threshold signature scheme and method thereof

Country Status (1)

Country Link
TW (1) TWI769738B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117592991A (en) * 2024-01-18 2024-02-23 暨南大学 Efficient blockchain cross-chain data exchange method based on threshold signature

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200195437A1 (en) * 2018-12-17 2020-06-18 Insights Network System and method for authenticating user identity
TW202024977A (en) * 2018-12-25 2020-07-01 香港商阿里巴巴集團服務有限公司 Identity verification method and system therefor
CN112150284A (en) * 2020-09-22 2020-12-29 浙江数秦科技有限公司 Block chain heterogeneous chain cross-chain transaction method
CN112396427A (en) * 2021-01-19 2021-02-23 北京连琪科技有限公司 Cross-chain interchange operation method for general scenes

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200195437A1 (en) * 2018-12-17 2020-06-18 Insights Network System and method for authenticating user identity
TW202024977A (en) * 2018-12-25 2020-07-01 香港商阿里巴巴集團服務有限公司 Identity verification method and system therefor
CN112150284A (en) * 2020-09-22 2020-12-29 浙江数秦科技有限公司 Block chain heterogeneous chain cross-chain transaction method
CN112396427A (en) * 2021-01-19 2021-02-23 北京连琪科技有限公司 Cross-chain interchange operation method for general scenes

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117592991A (en) * 2024-01-18 2024-02-23 暨南大学 Efficient blockchain cross-chain data exchange method based on threshold signature
CN117592991B (en) * 2024-01-18 2024-04-26 暨南大学 Efficient blockchain cross-chain data exchange method based on threshold signature

Also Published As

Publication number Publication date
TW202236130A (en) 2022-09-16

Similar Documents

Publication Publication Date Title
TWI828857B (en) Computer-implemented systems and methods for implementing transfers over a blockchain network
CN112492006B (en) Node management method and device based on block chain
CN110866823B (en) Public link-based transaction method and block chain system
TWI840358B (en) Computer-implemented systems and methods for using a blockchain to perform an atomic swap
US20170366347A1 (en) Technologies for data broker assisted transfer of device ownership
CN108683630A (en) The authentication method and device, electronic equipment of transregional piece of chain
WO2020059865A1 (en) Settlement system, settlement method, user device, and settlement program
JP2021507563A (en) Systems and methods for multi-party generation of blockchain-based smart contracts
CN110489486A (en) Generate method, seed node and the medium of block chain network
TWI769738B (en) Asset cross-chain exchanging system based on threshold signature scheme and method thereof
US20220172180A1 (en) Method for Storing Transaction that Represents Asset Transfer to Distributed Network and Program for Same
TWI759138B (en) Threshold signature scheme system based on inputting password and method thereof
CN111769945A (en) Auction processing method based on block chain and block chain link point
US20210217091A1 (en) Systems and methods for encrypted, dark messaging continuity and bid negotiation over peer to peer (p2p) communication
CN113783854A (en) Block chain-based credit data cross-chain sharing method and device
TWI689194B (en) Threshold signature system based on secret sharing without dealer and method thereof
TWI737956B (en) Threshold signature system based on secret sharing and method thereof
US20230334040A1 (en) Methods and systems for storing data using a distributed ledger
TWI782486B (en) Threshold and number of participation adjusting system for threshold signature scheme and method thereof
TWI694349B (en) Threshold signature system with prevent memory dump and method thereof
CN117726446B (en) Method, system and equipment for cross-chain transaction of supervision digital asset
TW202349241A (en) Random number generation system for threshold signature scheme and method thereof
CN118379058A (en) Cross-chain transaction method and device based on multiple signatures and zero knowledge proof
CN117014484A (en) Cross-region console interconnection method, device, equipment and storage medium