WO2020024996A1 - 一种隐私交易方法及系统、设备和可存储介质 - Google Patents

一种隐私交易方法及系统、设备和可存储介质 Download PDF

Info

Publication number
WO2020024996A1
WO2020024996A1 PCT/CN2019/098672 CN2019098672W WO2020024996A1 WO 2020024996 A1 WO2020024996 A1 WO 2020024996A1 CN 2019098672 W CN2019098672 W CN 2019098672W WO 2020024996 A1 WO2020024996 A1 WO 2020024996A1
Authority
WO
WIPO (PCT)
Prior art keywords
public key
private
transaction
utxos
utxo
Prior art date
Application number
PCT/CN2019/098672
Other languages
English (en)
French (fr)
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 杭州复杂美科技有限公司
Publication of WO2020024996A1 publication Critical patent/WO2020024996A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/383Anonymous user system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3823Payment protocols; Details thereof insuring higher security of transaction combining multiple encryption tools for a transaction

Definitions

  • the present application relates to the field of computer technology, and in particular, to a privacy transaction method and system, device, and storable medium.
  • the present invention provides a privacy transaction method, including:
  • first public key pair (A, B) of the receiver generate a first random number r, generate an elliptic curve public key R according to the first random number r, and according to the first random number r and the first public key pair (A, B) Generate a one-time public key P;
  • the one-time public key P is used as the output destination public key of the private transaction
  • the elliptic curve public key R and several third UTXOs are used as the output information of the private transaction
  • the private transaction is packaged, in which each third UTXO is divided by the transfer amount according to a predetermined split Method split generation;
  • first UTXO private transactions each first UTXO and other second UTXO with the same quota for ring signature obfuscation
  • each private transaction is verified through the first private key pair (a, b) corresponding to the first public key pair (A, B), and after the verification is passed, the first private key pair (a, b) and the ellipse are verified.
  • the curve public key R generates a one-time private key x; the one-time private key x is used to spend the transfer amount.
  • the present invention provides a privacy transaction system, including:
  • the data acquisition unit is configured to select a plurality of available first UTXOs in the private address according to the transfer amount, and request the first UTXOs to the blockchain for a plurality of second UTXOs of the same amount; wherein each second UTXO is used for Ring signature obfuscation for UTXO of transfer transactions;
  • the one-time public key generating unit is configured to obtain the first public key pair (A, B) of the receiver, generate a first random number r, generate an elliptic curve public key R according to the first random number r, and according to the first random number r.
  • the first public key pair (A, B) generates a one-time public key P;
  • the transaction packing unit is configured to use the one-time public key P as the output destination public key of the private transaction, the elliptic curve public key R, and a number of third UTXO as the output information of the private transaction to package the private transaction, wherein each third UTXO is composed of The transfer amount is split and generated according to a predetermined split method;
  • the transaction sending unit is configured to send a privacy transaction containing a number of first UTXOs (each first UTXO and other second UTXOs with the same quota for ring signature obfuscation) to the blockchain for consensus and execution for reception
  • the party's client traverses all the private transactions and verifies each private transaction with the first private key pair (a, b) corresponding to the first public key pair (A, B), and after the verification is passed, the first private key pair (a, b) and the elliptic curve public key R to generate a one-time private key x; wherein the one-time private key x is used to spend the transfer amount.
  • the present invention further provides an apparatus, including one or more processors and a memory, where the memory contains instructions executable by the one or more processors to cause the one or more processors to perform operations according to the present invention.
  • the privacy transaction method provided by the embodiment.
  • the present invention also provides a storage medium storing a computer program that causes a computer to execute the privacy transaction method provided by the embodiments of the present invention.
  • the privacy transaction method and system, device and storable medium provided by many embodiments of the present invention ensure the relevant information of the sender and the receiver by using the ring signature technology and the one-time target address when the privacy transaction occurs, thereby realizing the transaction Unconnectable and untraceable. At the same time, by splitting the transfer amount, it is more convenient to obtain UTXO for obfuscation from the blockchain system after a long run.
  • FIG. 1 is a flowchart of a privacy transaction method according to an embodiment of the present invention.
  • FIG. 2 is a flowchart of step S13 of a preferred embodiment of the method shown in FIG. 1.
  • FIG. 3 is a schematic diagram of S12 and S13 in a preferred embodiment of the method shown in FIG. 1.
  • FIG. 4 is a schematic diagram of a preferred embodiment of the method shown in FIG. 1.
  • FIG. 5 is a flowchart of a preferred embodiment of the method shown in FIG. 1.
  • FIG. 6 is a schematic structural diagram of a privacy system provided by the present invention.
  • FIG. 7 is a schematic structural diagram of a preferred embodiment of the system shown in FIG. 6.
  • FIG. 8 is a schematic structural diagram of a device according to an embodiment of the present invention.
  • FIG. 1 is a flowchart of a privacy transaction method according to an embodiment of the present invention. Specifically, as shown in Figure 1,
  • the one-time public key P is used as the output destination public key of the private transaction, the elliptic curve public key R and a number of third UTXOs are used as the output information of the private transaction, and the private transaction is packaged. Generated by the split method;
  • sender A wants to send a transfer amount of 3721 to receiver B as an example.
  • the sender first selects several available first UTXO records from his private address to obtain 3721. Available quota, and then each of the first UTXOs in the plurality of pens requests 10 second UTXOs corresponding to the first UTXOs to the blockchain,
  • step S12 the sender A obtains the first public key pair (A, B) of the receiver B, and the sender locally generates a first random number r, and according to the first public key pair (A, B) and the first A random number r generates a one-time public key P according to a certain algorithm,
  • the sender splits the transfer amount 3721 into a number of third UTXOs according to a certain split method, and then uses each third UTXO, the one-time public key P, and the elliptic curve public key as the output information of the privacy transaction.
  • Using several first UTXOs (each first UTXO and other second UTXOs with the same quota for ring signature obfuscation) as input information to package the privacy transaction.
  • step S11 and step S12 may also be performed in parallel at the same time, or step S12 may be performed first, and then step S11 may be performed, which is not limited by the foregoing embodiment.
  • 10 UTXOs are requested from the blockchain. The numbers here can be changed in the algorithm and are not limited by the above embodiments.
  • the method for obtaining the first public key pair (A, B) of the receiver in step S12 may be that the sender splits the private address of the receiver and generates the first public key pair ( A, B), or the receiver can send the first public key pair (A, B) to the sender, or it can be other ways to generate the first public key pair (A, B), and it is not subject to any of them Limitations of the way.
  • the sender can send the same privacy transaction to multiple destination addresses at the same time, and only needs to generate different one-time destination public keys P from different first public key pairs (A i , B i ) i , where the one-time public key P is also suitable for the UTXO change, that is, setting the receiver's private address to the sender's own private address, and then proceeding to step S12, such as the above embodiment If the first UTXO of the sender A is recorded as 2 first TUXOs of 2000, then in addition to the receiver B 3721, there are 279 first UTXOs left.
  • 379 In addition to splitting the 3721 according to a predetermined splitting method, 279 also needs to be split into a number of third UTXOs according to the predetermined method, and all the third UTXOs that are split are used as output information to package the privacy transaction.
  • the third UTXO belongs to the one-time destination address P 1 of the receiver B, and a number of third UTXOs of 279 are sent as change to the one-time destination address P 2 of the sender.
  • FIG. 2 is a flowchart of step S13 of a preferred embodiment of the method shown in FIG. 1. As shown in FIG. 2, step S13 includes:
  • the one-time public key P is used as the output destination public key of the private transaction, and the elliptic curve public key R and several third UTXOs are used as the output information of the private transaction to package the private transaction.
  • the sender A still wants to send a transfer amount of 3721 to the receiver B as an example.
  • the sender selects a number of available UTXOs from the private address and the available UTXOs are exactly the transfer amount 3721.
  • the transfer amount is split according to a predetermined split method. Specifically, for example, if the minimum power of 10 is obtained,
  • the change 279 is split, that is:
  • the transfer amount is split into several transactions by a predetermined split method. After this transfer method has been running for a long time, the sender will easily obtain the required amount equal to each first UTXO from the blockchain.
  • the pen is used to obfuscate the second UTXO, so that the higher the degree of obfuscation, the higher the privacy.
  • the above embodiment is a relatively preferred implementation. In more embodiments, it is not limited to this splitting method.
  • FIG. 3 is a schematic diagram of S12 and S13 in a preferred embodiment of the method shown in FIG. 1.
  • the elliptic curve public key R is generated as follows:
  • the one-time public key P is generated as follows:
  • R is the elliptic curve public key
  • r is the first random number
  • G is a base point on the elliptic curve
  • A is the first public key in the first public key pair (A, B)
  • B is the first public key
  • H s () is a hash function.
  • FIG. 4 is a schematic diagram of a preferred embodiment of the method shown in FIG. 1.
  • FIG. 5 is a flowchart of a preferred embodiment of the method shown in FIG. 1. As shown in FIG. 5, in a preferred embodiment, the foregoing method further includes:
  • the validity of the privacy transaction can be verified on the one hand, and the privacy transaction can be prevented from being double-spread on the other.
  • FIG. 6 is a structural diagram of a privacy system provided by the present invention. As shown in FIG. 6, a privacy system 06 includes:
  • the data obtaining unit 061 is configured to select a plurality of available first UTXOs in the private address according to the transfer amount, and request the first UTXOs to the blockchain for a number of second UTXOs of the same amount; wherein each second UTXO is used for Obfuscate ring signatures on UTXO of transfer transactions;
  • the one-time public key P generating unit 062 is configured to obtain a first public key pair (A, B) of the receiver, generate a first random number r, and generate an elliptic curve public key R according to the first random number r.
  • the random number r and the first public key pair (A, B) generate a one-time public key P;
  • the transaction packaging unit 063 is configured to use the one-time public key P as the output destination public key of the private transaction, and use the elliptic curve public key R and a number of third UTXO as the output information of the private transaction to package the private transaction, wherein each third UTXO The transfer amount is split and generated according to a predetermined split method;
  • the transaction sending unit 065 is configured to send a privacy transaction including a number of first UTXOs (each first UTXO and other second UTXOs with the same quota for ring signature obfuscation) to the blockchain for consensus for the receiver ’s
  • the client verifies each privacy transaction through the first private key pair (a, b) corresponding to the first public key pair (A, B), and after the verification is passed, according to the first private key pair (a, b) and the elliptic curve
  • the public key R generates a one-time private key x; the one-time private key x is used to spend the transfer amount.
  • the data obtaining unit 061 includes:
  • the data selection subunit 0611 is configured to obtain a transfer amount
  • the data splitting sub-unit 0612 is configured to split UTXO of the transfer amount into several third UTXOs according to a predetermined splitting method
  • the data loading subunit 0613 is configured to use the one-time public key P as the output destination public key of the private transaction, and use the elliptic curve public key R and several third UTXOs as the output information of the private transaction to package the private transaction.
  • FIG. 7 is a schematic structural diagram of a preferred embodiment of the system shown in FIG. 6. As shown in FIG. 7, in a preferred embodiment, the above system further includes: a verification unit 064 configured to verify whether the first UTXO and the second UTXO exist; and verifying whether the first UTXO and the second UTXO have been spent.
  • a verification unit 064 configured to verify whether the first UTXO and the second UTXO exist; and verifying whether the first UTXO and the second UTXO have been spent.
  • FIG. 8 is a schematic structural diagram of a device according to an embodiment of the present invention.
  • the present application further provides a device 800 including one or more central processing unit (CPU) 801, which may be based on a program stored in a read-only memory (ROM) 802 or The program loaded from the storage section 808 into a random access memory (RAM) 803 performs various appropriate actions and processes.
  • CPU central processing unit
  • RAM random access memory
  • various programs and data required for the operation of the device 800 are also stored.
  • the CPU 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804.
  • An input / output (I / O) interface 805 is also connected to the bus 804.
  • the following components are connected to the I / O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output portion 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage portion 808 including a hard disk and the like ; And a communication section 809 including a network interface card such as a LAN card, a modem, and the like. The communication section 809 performs communication processing via a network such as the Internet.
  • the driver 810 is also connected to the I / O interface 805 as needed.
  • a removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read out therefrom is installed into the storage section 808 as needed.
  • the privacy transaction method described in any of the above embodiments may be implemented as a computer software program.
  • embodiments of the present disclosure include a computer program product including a computer program tangibly embodied on a machine-readable medium, the computer program containing program code for performing a privacy transaction method.
  • the computer program may be downloaded and installed from a network through the communication section 809, and / or installed from a removable medium 811.
  • each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, which contains one or more functions to implement a specified logical function Executable instructions.
  • the functions noted in the blocks may also occur in a different order than those marked in the drawings. For example, two blocks represented one after the other may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts can be implemented by a dedicated hardware-based system that performs the specified function or operation , Or it can be implemented by a combination of dedicated hardware and computer instructions.
  • each unit may be a software program provided in a computer or a mobile smart device, or may be a separately configured hardware device.
  • the names of these units or modules do not in any way constitute a limitation on the units or modules themselves.

Abstract

本发明提供一种隐私交易方法及系统、设备和可存储介质,该方法包括根据转账金额在隐私地址中选择若干笔可用的第一UTXO,向区块链请求若干笔第二UTXO;获取接收方的第一公钥对,生成第一随机数,根据所述第一随机数生成第二随机数,根据所述第一随机数、所述第一公钥对生成一次性公钥;将所述一次性公钥作为隐私交易的输出目的公钥、将所述第二随机数作为所述隐私交易的输出信息,打包若干笔隐私交易;通过若干次所述环签名将各所述隐私交易发送至区块链网络进行共识。本发明利用环签名技术和一次性目标地址,保证了发送者和接收者的相关信息,从而实现了交易的不可连接性和不可追踪性。

Description

一种隐私交易方法及系统、设备和可存储介质 技术领域
本申请涉及计算机技术领域,具体涉及一种隐私交易方法及系统、设备和可存储介质。
背景技术
现有的绝大部分区块链系统的交易会公开存储在区块链上,任何人都可以在区块链上查看该笔交易的相关信息,不会做到完全的匿名,不能很好的做到不可连接性(追踪目的端)和不可追踪性(追踪发送端),这样的交易不能很好的保护隐私性。专利CN201611107703方案中提到的方法使用的是账户模型,攻击方很容易扫描所有存在账户的状态变化来跟踪关联交易,从而导致该区块链系统不具备不可追踪性,同时,使用一次性地址作为该区块链系统的账户地址,会导致随着系统的交易越来越多,产生很多冷账户,浪费不必要的存储资源和计算资源。
发明内容
鉴于现有技术中的上述缺陷或不足,期望提供一种能够对实现对发送者和接收者均能做到的隐私交易方法及系统、设备和可存储介质。
第一方面,本发明提供一种隐私交易方法,包括:
根据转账金额在隐私地址中选择若干笔可用的第一UTXO,对各笔第一UTXO向区块链请求若干与之相同额度的第二UTXO;其中,各第二UTXO用于对转账交易的UTXO进行环签名混淆;
获取接收方的第一公钥对(A,B),生成第一随机数r,根据第一随机数r生成椭圆曲线公钥R,根据第一随机数r、第一公钥对(A,B)生成一次性公钥P;
将一次性公钥P作为隐私交易的输出目的公钥、将椭圆曲线 公钥R和若干第三UTXO作为隐私交易的输出信息,打包隐私交易,其中各第三UTXO由转账金额按预定的拆分方法拆分生成;
将包含若干笔第一UTXO的隐私交易(每笔第一UTXO和其他同额度的第二UTXO进行环签名混淆)发送至区块链网络进行共识并执行,以供接收方的用户端遍历所有的隐私交易后通过对应于第一公钥对(A,B)的第一私钥对(a,b)验证各隐私交易,并在验证通过后根据第一私钥对(a,b)和椭圆曲线公钥R生成一次性私钥x;其中,一次性私钥x用于花费转账金额。
第二方面,本发明提供一种隐私交易系统,包括:
数据获取单元,配置用于根据转账金额在隐私地址中选择若干笔可用的第一UTXO,对各笔第一UTXO向区块链请求若干相同额度的第二UTXO;其中,各第二UTXO用于对转账交易的UTXO进行环签名混淆;
一次性公钥生成单元,配置用于获取接收方的第一公钥对(A,B),生成第一随机数r,根据第一随机数r生成椭圆曲线公钥R,根据第一随机数r、第一公钥对(A,B)生成一次性公钥P;
交易打包单元,配置用于将一次性公钥P作为隐私交易的输出目的公钥、将椭圆曲线公钥R和若干第三UTXO作为隐私交易的输出信息,打包隐私交易,其中各第三UTXO由转账金额按预定的拆分方法拆分生成;
交易发送单元,配置用于将将包含若干笔第一UTXO的隐私交易(每笔第一UTXO和其他同额度的第二UTXO进行环签名混淆)发送至区块链进行共识并执行,以供接收方的用户端遍历所有的隐私交易后通过对应于第一公钥对(A,B)的第一私钥对(a,b)验证各隐私交易,并在验证通过后根据第一私钥对(a,b)和椭圆曲线公钥R生成一次性私钥x;其中,一次性私钥x用于花费转账金额。
第三方面,本发明还提供一种设备,包括一个或多个处理器和存储器,其中存储器包含可由该一个或多个处理器执行的指令以使得该一个或多个处理器执行根据本发明各实施例提供的隐私 交易方法。
第四方面,本发明还提供一种存储有计算机程序的存储介质,该计算机程序使计算机执行根据本发明各实施例提供的隐私交易方法。
本发明的有益效果:
本发明诸多实施例提供的隐私交易方法及系统、设备和可存储介质通过在发生隐私交易时,利用环签名技术和一次性目标地址,保证了发送者和接收者的相关信息,从而实现了交易的不可连接性和不可追踪性。同时通过拆分转账金额,长时间运行后可以更加方便的从区块链系统中获取用于混淆的UTXO。
附图说明
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:
图1为本发明一实施例提供的一种隐私交易方法的流程图。
图2为图1所示方法的一种优选实施方式的步骤S13的流程图。
图3为图1所示方法的一种优选实施方式中的S12和S13的示意图。
图4为图1所示方法的一种优选实施方式示意图。
图5为图1所示方法的一种优选实施方式的流程图。
图6为本发明提供的一种隐私系统的结构示意图。
图7为图6所示系统的一种优选实施方式的结构示意图。
图8为本发明一实施例提供的一种设备的结构示意图。
具体实施方式
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与发明相关的部分。
需要说明的是,在不冲突的情况下,本申请中的实施例及实 施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。
图1为本发明一实施例提供的一种隐私交易方法的流程图。具体的,如图1所示,
S11、根据转账金额在隐私地址中选择若干笔可用的第一UTXO,对各笔第一UTXO向区块链请求若干相同额度的第二UTXO;其中,各第二UTXO用于对转账交易的UTXO进行环签名混淆;
S12、获取接收方的第一公钥对(A,B),生成第一随机数r,根据第一随机数r生成椭圆曲线公钥R,根据第一随机数r、第一公钥对(A,B)生成一次性公钥P;
S13、将一次性公钥P作为隐私交易的输出目的公钥、将椭圆曲线公钥R和若干第三UTXO作为隐私交易的输出信息,打包隐私交易,其中各第三UTXO由对转账金额按预定的拆分方法拆分生成;
S15、将包含若干笔第一UTXO的隐私交易(每笔第一UTXO和其他同额度的第二UTXO进行环签名混淆)发送至区块链网络进行共识,以供接收方的用户端通过对应于第一公钥对(A,B)的第一私钥对(a,b)验证各隐私交易,并在验证通过后根据第一私钥对(a,b)和椭圆曲线公钥R生成一次性私钥x;其中,一次性私钥x用于花费转账金额。
具体地,以发送者甲想向接收者乙发送一笔额度为3721的转账为例,在步骤S11中,发送者首先从自己的隐私地址中选择若干笔可用的第一UTXO记录从而获取到3721的可用额度,然后对该若干笔中的每笔第一UTXO向区块链请求10笔跟每笔第一UTXO对应额度的第二UTXO,
在步骤S12中,发送者甲获取接收方乙的第一公钥对(A,B),且发送方在本地生成第一随机数r,并根据第一公钥对(A,B)和第一随机数r按照一定的算法生成一次性公钥P,
步骤S13和15中,发送者按照一定的拆分方法将转账金额 3721拆分成若干笔第三UTXO后,将各第三UTXO与一次性公钥P、椭圆曲线公钥作为隐私交易的输出信息,将若干笔第一UTXO(每笔第一UTXO和其他同额度的第二UTXO进行环签名混淆)作为输入信息,打包该笔隐私交易。将该笔隐私交易发送至区块链进行共识并执行;接收方遍历收到的输出交易并用一定的算法进行验证,验证通过后,用预定的算法生成一次性私钥x来花费收到的UTXO。
在更多实施例中,步骤S11和步骤S12还可以是同时并行执行,也可以是先执行步骤S12,再执行步骤S11,并不受上述实施例的限制。另外,上述具体实施场景中向区块链请求10笔UTXO,这里的数字可以在算法中进行更改,并不受上述实施例的限制。
在更多实施例中,步骤S12中所说的获取接收方的第一公钥对(A,B)的方式可以是发送方将接收方的隐私地址进行拆分后生成第一公钥对(A,B),也可以是接收方主动给发送方第一公钥对(A,B),还可以是其他生成第一公钥对(A,B)的方式,并不受其中某一种方式的限制。
在更多实施例中,发送者可以同时将同一笔隐私交易发送到多个目的地址中,只需要由不同的第一公钥对(A i,B i)生成不同的一次性目的公钥P i即可,其中,一次性目的公钥P也适用于UTXO找零的情况,即把接收者的隐私地址设置为发送者本身的隐私地址,继续进行步骤S12的操作即可,比如上述实施例中,假如发送方甲的第一UTXO记录为2笔2000的第一TUXO,那么除了给接收方乙3721还剩余279的第一UTXO,这时,除了要将3721按照预定的拆分方法拆分成若干笔第三UTXO外,还需要将279也按该预定的方法拆分成若干笔第三UTXO,并将拆分的所有第三UTXO作为输出信息,打包该笔隐私交易,只是3721的若干笔第三UTXO属于接收方乙的一次性目标地址P 1,279的若干笔第三UTXO作为找零,发送到发送方的一次性目标地址P 2中。
图2为图1所示方法的一种优选实施方式的步骤S13的流程图,如图2所示,步骤S13包括:
S131、获取转账金额的UTXO;
S132、根据预定的拆分方法将该转账金额的UTXO拆分为若干笔第三UTXO;
S133、将一次性公钥P作为隐私交易的输出目的公钥、将椭圆曲线公钥R和若干第三UTXO作为隐私交易的输出信息,打包隐私交易。
具体的,仍以发送者甲想向接收者乙发送一笔额度为3721的转账为例,首先,发送者从隐私地址中选取若干可用的UTXO且该若干笔可用的UTXO正好为转账额度3721,然后按预定的拆分方法对转账额度进行拆分,具体地,如获取10的最小幂次,
将具体的数值N进行拆分,N∈[0,9]
9=5+2+2;
8=5+2+1;
7=5+2;
6=5+1;
5=5;
4=2+2;
3=2+1;
2=2;
1=1;
依次获取10的更高幂次,进行同样的拆分。
则3721会被拆分成3721=(2000+1000)+(500+200)+20+1,6笔第三UTXO,并作为隐私交易的输出信息。
在更多实施例中,会出现作为输入信息的可用的第一UTXO记录并不能正好达到3721的情况,比如发送方的可用第一UTXO只有两笔2000的UTXO记录,那么在拆分3721的同时,按照上述实施例的拆分方法对找零的余额279进行拆分,即:
279=200+(50+20)+(5+2+2)6笔第三UTXO。
该实施例通过预定的拆分方法将转账金额拆分成若干笔,按这种转账方式长时间运行后,发送方将很容易从区块链中获取所需与各笔第一UTXO等额的若干笔用于混淆的第二UTXO,从而使混淆度越高,隐私性越高。
上述实施例是一种比较优选的实施方式,在更多实施例中,并不局限于该种拆分方法。
图3为图1所示方法的一种优选实施方式中的S12和S13的示意图。
具体地,椭圆曲线公钥R的生成方式为:
R=rG;
一次性公钥P的生成方式为:
P=H s(rA)G+B;
其中,R为椭圆曲线公钥,r为第一随机数,G为椭圆曲线上的一个基点,A为第一公钥对(A,B)中的第一个公钥,B为第一公钥对(A,B)中的第二个公钥,H s()为一种哈希函数。
图4为图1所示方法的一种优选实施方式示意图。
具体地,用户接收到隐私交易后,遍历所有的输出交易,并通过第一私钥对(a,b)和椭圆曲线公钥R,计算P'=H s(aR)G+B,其中,a为所述第一个公钥A对应的第一私钥;若P'与一次性公钥P相同(因为aR=arG=rA,P'=H s(aR)G+B=H s(aA)G+B=P),则验证通过,说明该笔UTXO属于该地址,并通过计算出一次性私钥x=H s(aR)+b来花费该笔UTXO。
图5为图1所示方法的一种优选实施方式的流程图。如图5所示,在一优选实施例中,上述方法还包括:
S14、隐私交易在进行共识前,需要通过以下至少一项验证:
验证第一UTXO和第二UTXO是否存在;
验证第一UTXO和第二UTXO是否已被花费。
在本实施例中,通过在共识之前进行验证,一方面可以验证 该笔隐私交易的有效性,另一方面还可以避免该笔隐私交易被双花。
图6为本发明提供的一种隐私系统的结构图。如图6所示,一种隐私系统06,包括:
数据获取单元061,配置用于根据转账金额在隐私地址中选择若干笔可用的第一UTXO,对各笔第一UTXO向区块链请求若干相同额度的第二UTXO;其中,各第二UTXO用于对转账交易的UTXO进行环签名混淆;
一次性公钥P生成单元062,配置用于获取接收方的第一公钥对(A,B),生成第一随机数r,根据第一随机数r生成椭圆曲线公钥R,根据第一随机数r、第一公钥对(A,B)生成一次性公钥P;
交易打包单元063,配置用于将一次性公钥P作为隐私交易的输出目的公钥、将椭圆曲线公钥R和若干第三UTXO作为隐私交易的输出信息,打包隐私交易,其中各第三UTXO由转账金额按预定的拆分方法拆分生成;
交易发送单元065,配置用于将包含若干笔第一UTXO的隐私交易(每笔第一UTXO和其他同额度的第二UTXO进行环签名混淆)发送至区块链进行共识,以供接收方的用户端通过对应于第一公钥对(A,B)的第一私钥对(a,b)验证各隐私交易,并在验证通过后根据第一私钥对(a,b)和椭圆曲线公钥R生成一次性私钥x;其中,一次性私钥x用于花费转账金额。
进一步优选地,数据获取单元061包括:
数据选择子单元0611,配置用于获取转账金额;
数据拆分子单元0612,配置用于根据预定的拆分方法将转账金额的UTXO拆分为若干笔第三UTXO;
数据装填子单元0613,配置用于将一次性公钥P作为隐私交易的输出目的公钥、将椭圆曲线公钥R和若干第三UTXO作为隐私交易的输出信息,打包隐私交易。
图7为图6所示系统的一种优选实施方式的结构示意图。如图7所示,在一优选实施例中,上述系统还包括:验证单元064, 配置用于验证第一UTXO和第二UTXO是否存在;验证第一UTXO和第二UTXO是否已被花费。
图8为本发明一实施例提供的一种设备的结构示意图。
如图8所示,作为另一方面,本申请还提供了一种设备800,包括一个或多个中央处理单元(CPU)801,其可以根据存储在只读存储器(ROM)802中的程序或者从存储部分808加载到随机访问存储器(RAM)803中的程序而执行各种适当的动作和处理。在RAM803中,还存储有设备800操作所需的各种程序和数据。CPU801、ROM802以及RAM803通过总线804彼此相连。输入/输出(I/O)接口805也连接至总线804。
以下部件连接至I/O接口805:包括键盘、鼠标等的输入部分806;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分807;包括硬盘等的存储部分808;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分809。通信部分809经由诸如因特网的网络执行通信处理。驱动器810也根据需要连接至I/O接口805。可拆卸介质811,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器810上,以便于从其上读出的计算机程序根据需要被安装入存储部分808。
特别地,根据本公开的实施例,上述任一实施例描述的隐私交易方法可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括有形地包含在机器可读介质上的计算机程序,计算机程序包含用于执行隐私交易方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分809从网络上被下载和安装,和/或从可拆卸介质811被安装。
附图中的流程图和框图,图示了按照本发明各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一 个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这根据所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以通过执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以通过专用硬件与计算机指令的组合来实现。
描述于本申请实施例中所涉及到的单元或模块可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元或模块也可以设置在处理器中,例如,各单元可以是设置在计算机或移动智能设备中的软件程序,也可以是单独配置的硬件装置。其中,这些单元或模块的名称在某种情况下并不构成对该单元或模块本身的限定。
以上描述仅为本申请的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本申请中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离本申请构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本申请中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。

Claims (10)

  1. 一种隐私交易方法,其特征在于,包括:
    根据转账金额在隐私地址中选择若干笔可用的第一UTXO,对各笔所述第一UTXO向区块链请求若干相同额度的第二UTXO;其中,各所述第二UTXO用于对转账交易的第一UTXO进行环签名混淆;
    获取接收方的第一公钥对,生成第一随机数,根据所述第一随机数生成椭圆曲线公钥,根据所述第一随机数、所述第一公钥对生成一次性公钥;
    将所述一次性公钥作为隐私交易的输出目的公钥、将所述椭圆曲线公钥和若干第三UTXO作为所述隐私交易的输出信息,打包所述隐私交易,其中各所述第三UTXO由所述转账金额按预定的拆分方法拆分生成;
    将所述隐私交易发送至区块链网络进行共识并执行,以供所述接收方的用户端遍历所有的隐私交易后通过对应于所述第一公钥对的第一私钥对验证各所述隐私交易,并在验证通过后根据所述第一私钥对和所述椭圆曲线公钥生成一次性私钥;其中,所述一次性私钥用于花费所述转账金额。
  2. 根据权利要求1所述的方法,其特征在于,所述拆分方法包括:
    获取10的最小幂次,将具体的数值N进行拆分,其中N∈[0,9],
    9=5+2+2;
    8=5+2+1;
    7=5+2;
    6=5+1;
    5=5;
    4=2+2;
    3=2+1;
    1=1;
    获取10的更高幂次,对所述转账金额进行拆分。
  3. 根据权利要求1或2任一项所述的方法,其特征在于,所述椭圆曲线公钥的生成方式为:
    R=rG;
    所述一次性公钥的生成方式为:
    P=H s(rA)G+B;
    其中,R为椭圆曲线公钥,r为第一随机数,G为椭圆曲线上的一个基点,A为所述第一公钥对中的第一个公钥,B为所述第一公钥对中的第二个公钥,H s()为一种哈希函数。
  4. 根据权利要求3所述的方法,其特征在于,所述验证的方式为:
    计算出验证公钥P′:
    P'=H s(aR)G+B;
    其中,a为所述第一个公钥A对应的第一私钥;
    判断验证公钥P′与所述隐私交易中的一次性公钥P是否相同:是,则验证通过。
  5. 根据权利要求1或2任一项所述的方法,其特征在于,所述隐私交易在进行共识并执行前,需要通过以下至少一项验证:
    验证所述第一UTXO和第二UTXO是否存在;
    验证所述第一UTXO和第二UTXO是否已被花费。
  6. 一种隐私交易系统,包括:
    数据获取单元,配置用于根据转账金额在隐私地址中选择若干笔可用的第一UTXO,对各笔所述第一UTXO向区块链请求若干相同额度的第二UTXO;其中,各所述第二UTXO用于对转账交易的UTXO进行环签名混淆;
    一次性公钥生成单元,配置用于获取接收方的第一公钥对,生成第一随机数,根据所述第一随机数生成椭圆曲线公钥,根据所述第一随机数、所述第一公钥对生成一次性公钥;
    交易打包单元,配置用于将所述一次性公钥作为隐私交易的输出目的公钥、将所述椭圆曲线公钥和若干第三UTXO作为所述隐私交易的输出信息,打包所述隐私交易,其中各所述第三UTXO由所述转账金额按预定的拆分方法拆分生成;
    交易发送单元,配置用于将所述隐私交易发送至所述区块链进行共识并执行,以供所述接收方的用户端遍历所有的隐私交易后通过对应于所述第一公钥对的第一私钥对验证各所述隐私交易,并在验证通过后根据所述第一私钥对和所述椭圆曲线公钥生成一次性私钥;其中,所述一次性私钥用于花费所述转账金额。
  7. 根据权利要求6所述的系统,其特征在于,所述打包单元包括:
    拆分子单元,配置用于获取10的最小幂次,将具体的数值N进行拆分,其中N∈[0,9],
    9=5+2+2;
    8=5+2+1;
    7=5+2;
    6=5+1;
    5=5;
    4=2+2;
    3=2+1;
    1=1;
    获取10的更高幂次,对所述转账金额进行拆分。
  8. 根据权利要求6所述的系统,其特征在于,还包括:
    验证单元,配置用于验证所述第一UTXO和第二UTXO是否存在;验证所述第一UTXO和第二UTXO是否已被花费。
  9. 一种设备,其特征在于,所述设备包括:
    一个或多个处理器;
    存储器,用于存储一个或多个程序,
    当所述一个或多个程序被所述一个或多个处理器执行时,使 得所述一个或多个处理器执行如权利要求1-5中任一项所述的方法。
  10. 一种存储有计算机程序的存储介质,其特征在于,该程序被处理器执行时实现如权利要求1-5中任一项所述的方法。
PCT/CN2019/098672 2018-07-31 2019-07-31 一种隐私交易方法及系统、设备和可存储介质 WO2020024996A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810855507.3 2018-07-31
CN201810855507.3A CN109087099A (zh) 2018-07-31 2018-07-31 一种隐私交易方法及系统、设备和存储介质

Publications (1)

Publication Number Publication Date
WO2020024996A1 true WO2020024996A1 (zh) 2020-02-06

Family

ID=64831005

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/098672 WO2020024996A1 (zh) 2018-07-31 2019-07-31 一种隐私交易方法及系统、设备和可存储介质

Country Status (2)

Country Link
CN (1) CN109087099A (zh)
WO (1) WO2020024996A1 (zh)

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109034801A (zh) * 2018-07-31 2018-12-18 杭州复杂美科技有限公司 一种隐私交易方法及系统、设备和可存储介质
CN109034800A (zh) * 2018-07-31 2018-12-18 杭州复杂美科技有限公司 一种隐私交易方法、系统及设备
CN109087099A (zh) * 2018-07-31 2018-12-25 杭州复杂美科技有限公司 一种隐私交易方法及系统、设备和存储介质
CN109727031B (zh) * 2018-12-27 2021-10-19 数据通信科学技术研究所 一种中心隐匿的匿名数字货币交易监管方法
CN110335042B (zh) * 2019-06-26 2020-10-20 创新先进技术有限公司 基于环签名的匿名交易方法及装置
CN112418862A (zh) * 2019-06-26 2021-02-26 创新先进技术有限公司 采用环签名的机密区块链交易的实现方法及装置
US11238447B2 (en) 2019-06-26 2022-02-01 Advanced New Technologies Co., Ltd. Blockchain transactions with ring signatures
CN110675147B (zh) * 2019-09-11 2022-11-29 上海唯链信息科技有限公司 一种区块链交易方法、电子设备以及存储装置
CN110677246A (zh) * 2019-10-08 2020-01-10 北京中电普华信息技术有限公司 一种基于区块链的密钥生成方法及装置
CN113055177B (zh) * 2019-12-27 2022-08-16 深圳市迅雷网络技术有限公司 区块链系统及数值信息传输方法、系统、装置、介质
CN111105235B (zh) * 2019-12-31 2024-01-16 深圳市迅雷网络技术有限公司 基于区块链的供应链交易隐私保护系统、方法及相关设备
CN111160908B (zh) * 2019-12-31 2023-11-17 深圳市迅雷网络技术有限公司 基于区块链的供应链交易隐私保护系统、方法及相关设备
CN112819627A (zh) * 2021-02-01 2021-05-18 杭州复杂美科技有限公司 区块链投票方法、计算机设备和存储介质
CN112990904B (zh) * 2021-05-17 2022-02-08 北京荷月科技有限公司 基于区块链的转账方法、装置和电子设备
CN113706145B (zh) * 2021-08-02 2023-05-30 杭州复杂美科技有限公司 一种隐藏交易金额的代理交易方法、设备及储存介质
CN114726538B (zh) * 2022-04-02 2024-03-29 湖南天河国云科技有限公司 一种基于区块链环签名的隐蔽通信方法
CN116433340B (zh) * 2023-06-15 2023-09-15 西南石油大学 支持隐私保护的智慧能源交易方法

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106559211A (zh) * 2016-11-22 2017-04-05 中国电子科技集团公司第三十研究所 一种区块链中隐私保护智能合约方法
CN106779704A (zh) * 2016-12-06 2017-05-31 杭州趣链科技有限公司 一种基于环签名的区块链匿名交易方法
WO2018105038A1 (ja) * 2016-12-06 2018-06-14 三菱電機株式会社 通信装置及び分散型元帳システム
CN108335207A (zh) * 2018-02-14 2018-07-27 阿里巴巴集团控股有限公司 资产管理方法及装置、电子设备
CN109034801A (zh) * 2018-07-31 2018-12-18 杭州复杂美科技有限公司 一种隐私交易方法及系统、设备和可存储介质
CN109034800A (zh) * 2018-07-31 2018-12-18 杭州复杂美科技有限公司 一种隐私交易方法、系统及设备
CN109087099A (zh) * 2018-07-31 2018-12-25 杭州复杂美科技有限公司 一种隐私交易方法及系统、设备和存储介质

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016200885A1 (en) * 2015-06-08 2016-12-15 Blockstream Corporation Cryptographically concealing amounts transacted on a ledger while preserving a network's ability to verify the transaction
KR101841563B1 (ko) * 2016-10-11 2018-05-04 주식회사 코인플러그 Utxo 기반으로 머클트리 구조를 사용하여 전자 바우처를 발행, 사용, 환불, 정산 및 파기하는 방법과 이를 이용한 서버
CN106911470B (zh) * 2017-01-23 2020-07-07 北京航空航天大学 一种比特币交易隐私增强方法
CN107124278B (zh) * 2017-03-30 2021-03-30 腾讯科技(深圳)有限公司 业务处理方法、装置以及数据共享系统
CN107453865B (zh) * 2017-07-18 2020-09-11 众安信息技术服务有限公司 一种保护数据发送源隐私的多方数据共享方法及系统

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106559211A (zh) * 2016-11-22 2017-04-05 中国电子科技集团公司第三十研究所 一种区块链中隐私保护智能合约方法
CN106779704A (zh) * 2016-12-06 2017-05-31 杭州趣链科技有限公司 一种基于环签名的区块链匿名交易方法
WO2018105038A1 (ja) * 2016-12-06 2018-06-14 三菱電機株式会社 通信装置及び分散型元帳システム
CN108335207A (zh) * 2018-02-14 2018-07-27 阿里巴巴集团控股有限公司 资产管理方法及装置、电子设备
CN109034801A (zh) * 2018-07-31 2018-12-18 杭州复杂美科技有限公司 一种隐私交易方法及系统、设备和可存储介质
CN109034800A (zh) * 2018-07-31 2018-12-18 杭州复杂美科技有限公司 一种隐私交易方法、系统及设备
CN109087099A (zh) * 2018-07-31 2018-12-25 杭州复杂美科技有限公司 一种隐私交易方法及系统、设备和存储介质

Also Published As

Publication number Publication date
CN109087099A (zh) 2018-12-25

Similar Documents

Publication Publication Date Title
WO2020024996A1 (zh) 一种隐私交易方法及系统、设备和可存储介质
WO2020024995A1 (zh) 一种隐私交易方法、系统及设备
WO2020024994A1 (zh) 一种隐私交易方法及系统、设备和可存储介质
US11398914B2 (en) Blockchain-based data authorization method and apparatus
US20210160068A1 (en) Data sharing method, apparatus, and system, and electronic device
US11310051B2 (en) Blockchain-based data authorization method and apparatus
US10067810B2 (en) Performing transactions between application containers
US9088580B2 (en) Access control based on user and service
US10623190B2 (en) Mediated anonymity for permissioned, distributed-ledger networks
US20210092115A1 (en) Custom authorization of network connected devices using signed credentials
TW202008272A (zh) 區塊鏈交易方法及裝置、電子設備
US20210176058A1 (en) Consensus method used for miner node in blockchain system and blockchain system
US11509709B1 (en) Providing access to encrypted insights using anonymous insight records
US11496293B2 (en) Service-to-service strong authentication
US11848917B2 (en) Blockchain-based anonymous transfers zero-knowledge proofs
WO2022179115A1 (zh) 用户认证方法、装置、服务器及存储介质
US11757645B2 (en) Single-use authorization codes in self-contained format
US20230090387A1 (en) Blockchain-based dynamic storage provisioner
US20160013942A1 (en) Identity Verification Using Key Pairs
WO2020096996A2 (en) Methods, systems, and devices for concealing account balances in ledgers
US20210026971A1 (en) Privacy-preserving Sum-based Consistency Checks for Blockchains
US20220366381A1 (en) System and method for distributed storage of transactions
CN111275406A (zh) 区块链交易合约审计方法、装置、计算机设备和存储介质
US11558374B2 (en) Systems, apparatus, and methods for verifying a password utilizing commitments
CN116668033A (zh) 文件传输方法、装置、服务器、存储介质和程序产品

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19845256

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19845256

Country of ref document: EP

Kind code of ref document: A1