CN112418857B - Hidden transaction method and device based on UTXO model and related products - Google Patents

Hidden transaction method and device based on UTXO model and related products Download PDF

Info

Publication number
CN112418857B
CN112418857B CN202011377589.9A CN202011377589A CN112418857B CN 112418857 B CN112418857 B CN 112418857B CN 202011377589 A CN202011377589 A CN 202011377589A CN 112418857 B CN112418857 B CN 112418857B
Authority
CN
China
Prior art keywords
transaction
hidden
plaintext
address
additional field
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011377589.9A
Other languages
Chinese (zh)
Other versions
CN112418857A (en
Inventor
陈凯
阮安邦
魏明
陈旭明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Octa Innovations Information Technology Co Ltd
Original Assignee
Beijing Octa Innovations Information Technology Co Ltd
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 Beijing Octa Innovations Information Technology Co Ltd filed Critical Beijing Octa Innovations Information Technology Co Ltd
Priority to CN202011377589.9A priority Critical patent/CN112418857B/en
Publication of CN112418857A publication Critical patent/CN112418857A/en
Application granted granted Critical
Publication of CN112418857B publication Critical patent/CN112418857B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Finance (AREA)
  • Computer Security & Cryptography (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Databases & Information Systems (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Power Engineering (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Computing Systems (AREA)
  • Technology Law (AREA)
  • Health & Medical Sciences (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The embodiment of the application provides a hidden transaction method and device based on a UTXO model and related products. The hidden transaction method based on the UTXO model comprises the steps of determining the plaintext transaction amount and the plaintext transaction address of a transaction associated party in a blockchain system, wherein the transaction associated party comprises at least one of a sender, a receiver and a transaction verification party; packaging the plaintext transaction amount, the plaintext transaction address and an additional field to obtain a hidden transaction amount corresponding to the transaction-related party; generating a hidden transaction address of the transaction associated party according to the UTXO public key and the random one-time secret key of the transaction associated party; and generating a transaction request corresponding to the transaction association party according to the hidden transaction amount and the hidden transaction address, and broadcasting the transaction request in the blockchain system, wherein the transaction request comprises transaction information, so that the use of plaintext transaction amount and plaintext address in the transaction process is avoided, and different account transfers of the same payee cannot be associated by the public, thereby ensuring the privacy and safety of the transaction.

Description

Hidden transaction method and device based on UTXO model and related products
Technical Field
The application relates to the technical field of blockchains, in particular to a hidden transaction method and device based on a UTXO model and related products.
Background
Blockchains are novel application modes of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanisms, encryption algorithms, and the like. Blockchain (Blockchain), an important concept of bitcoin, is essentially a de-centralized database, and serves as a bottom technology of bitcoin, and is a series of data blocks which are generated by association through a cryptography method, wherein each data block contains information of a batch of bitcoin network transactions, and the information is used for verifying the validity (anti-counterfeiting) of the information and generating a next block. In popular explanation, the blockchain is essentially a distributed public ledger that anyone can check, but there is no single user in controlling him. Participants in the blockchain system together maintain updates to the ledger: it can only be modified according to strict rules and consensus.
However, the existing blockchain-based transactions are transparent in nature, so how to protect the privacy and security of the transactions is a technical problem to be solved.
Disclosure of Invention
Based on the above problems, the embodiments of the present application provide a hidden transaction method, device and related product based on UTXO model.
The embodiment of the application discloses the following technical scheme:
a hidden transaction method based on UTXO model, comprising:
determining a plaintext transaction amount and a plaintext transaction address of a transaction-related party in a blockchain system, wherein the transaction-related party comprises at least one of a sender, a receiver and a transaction verification party;
packaging the plaintext transaction amount, the plaintext transaction address and an additional field to obtain a hidden transaction amount corresponding to the transaction-related party;
generating a hidden transaction address of the transaction associated party according to the UTXO public key and the random one-time secret key of the transaction associated party;
and generating a transaction request corresponding to the transaction related party according to the hidden transaction amount and the hidden transaction address, and broadcasting the transaction request in the blockchain system, wherein the transaction request comprises transaction information.
Optionally, in an embodiment of the present application, the encapsulating the plaintext transaction amount, the plaintext transaction address, and the additional field to obtain the hidden transaction amount corresponding to the transaction-related party includes: and encrypting the plaintext transaction amount by using a set public key encryption function to obtain an additional field, and packaging the additional field and the plaintext transaction address to obtain a hidden transaction amount.
Optionally, in an embodiment of the present application, the encapsulating the plaintext transaction amount, the plaintext transaction address, and the additional field to obtain the hidden transaction amount corresponding to the transaction-related party includes: and carrying out hash processing on the plaintext transaction amount by using a set hash function to obtain an additional field, and packaging the additional field and the plaintext transaction address to obtain a hidden transaction amount.
Optionally, in an embodiment of the present application, the encapsulating the plaintext transaction amount, the plaintext transaction address, and the additional field to obtain the hidden transaction amount corresponding to the transaction-related party includes: and encrypting the plaintext transaction amount by using a set public key encryption function to obtain a first additional field, hashing the plaintext transaction amount by using a set hash function to obtain a second additional field, and packaging the first additional field, the second additional field and the plaintext transaction address to obtain a hidden transaction amount.
Optionally, in an embodiment of the present application, the encapsulating the plaintext transaction amount, the plaintext transaction address, and the additional field to obtain the hidden transaction amount corresponding to the transaction-related party includes:
Acquiring a randomly generated disposable random number;
encrypting the plaintext transaction amount by using a set public key encryption function to obtain a first additional field, and hashing the plaintext transaction amount by using a set hash function to obtain a second additional field;
and packaging the random number, the first additional field, the second additional field and the plaintext transaction address to obtain a hidden transaction amount.
Optionally, in an embodiment of the present application, the generating the hidden transaction address of the transaction partner according to the UTXO public key and the random one-time key of the transaction partner further includes: acquiring a public payment key of the payee in the blockchain system;
the generating the hidden transaction address of the transaction associated party according to the UTXO public key and the random one-time secret key of the transaction associated party comprises the following steps: and generating the hidden transaction address of the transaction association party according to the UTXO public key, the payment public key and the random one-time secret key of the transaction association party.
A concealed transaction device based on UTXO model, comprising:
the system comprises a data acquisition unit, a transaction verification unit and a block chain system, wherein the data acquisition unit is used for determining the plaintext transaction amount and plaintext transaction address of a transaction association party in the block chain system, and the transaction association party comprises at least one of a sender, a receiver and a transaction verification party;
The packaging unit is used for packaging the plaintext transaction amount, the plaintext transaction address and the additional field to obtain the hidden transaction amount corresponding to the transaction association party;
the address generation unit is used for generating a hidden transaction address of the transaction association party according to the UTXO public key and the random one-time secret key of the transaction association party;
and the request generation unit is used for generating a transaction request corresponding to the transaction association party according to the hidden transaction amount and the hidden transaction address and broadcasting the transaction request in the blockchain system, wherein the transaction request comprises transaction information.
Optionally, in an embodiment of the present application, the packaging unit is further configured to encrypt the plaintext transaction amount using a set public key encryption function to obtain an additional field, and package the additional field and the plaintext transaction address to obtain a hidden transaction amount.
Optionally, in an embodiment of the present application, the packaging unit is further configured to hash the plaintext transaction amount by using a set hash function to obtain an additional field, and package the additional field and the plaintext transaction address to obtain a hidden transaction amount.
Optionally, in an embodiment of the present application, the packaging unit is further configured to encrypt the plaintext transaction amount using a set public key encryption function to obtain a first additional field, hash the plaintext transaction amount using a set hash function to obtain a second additional field, and package the first additional field, the second additional field and the plaintext transaction address to obtain a hidden transaction amount.
Optionally, in an embodiment of the present application, the packaging unit is further configured to obtain a randomly generated one-time random number; encrypting the plaintext transaction amount by using a set public key encryption function to obtain a first additional field, and hashing the plaintext transaction amount by using a set hash function to obtain a second additional field; and packaging the random number, the first additional field, the second additional field and the plaintext transaction address to obtain a hidden transaction amount.
Optionally, in an embodiment of the present application, the key obtaining unit is further configured to obtain a public payment key of the payee in the blockchain system;
the address generation unit is further configured to generate a hidden transaction address of the transaction partner according to the UTXO public key, the payment public key, and the random one-time key of the transaction partner.
An electronic device comprising a memory having an executable program stored thereon, and a processor that when executing the executable program performs the steps of:
determining a plaintext transaction amount and a plaintext transaction address of a transaction-related party in a blockchain system, wherein the transaction-related party comprises at least one of a sender, a receiver and a transaction verification party;
packaging the plaintext transaction amount, the plaintext transaction address and an additional field to obtain a hidden transaction amount corresponding to the transaction-related party;
generating a hidden transaction address of the transaction associated party according to the UTXO public key and the random one-time secret key of the transaction associated party;
and generating a transaction request corresponding to the transaction related party according to the hidden transaction amount and the hidden transaction address, and broadcasting the transaction request in the blockchain system, wherein the transaction request comprises transaction information.
Optionally, in an embodiment of the present application, the step of performing, by the processor, packaging the plain text transaction amount, the plain text transaction address, and an additional field to obtain a hidden transaction amount corresponding to the transaction-related party includes: and encrypting the plaintext transaction amount by using a set public key encryption function to obtain an additional field, and packaging the additional field and the plaintext transaction address to obtain a hidden transaction amount.
Optionally, in an embodiment of the present application, the step of performing, by the processor, packaging the plain text transaction amount, the plain text transaction address, and an additional field to obtain a hidden transaction amount corresponding to the transaction-related party includes: and carrying out hash processing on the plaintext transaction amount by using a set hash function to obtain an additional field, and packaging the additional field and the plaintext transaction address to obtain a hidden transaction amount.
Optionally, in an embodiment of the present application, the step of performing, by the processor, packaging the plain text transaction amount, the plain text transaction address, and an additional field to obtain a hidden transaction amount corresponding to the transaction-related party includes: and encrypting the plaintext transaction amount by using a set public key encryption function to obtain a first additional field, hashing the plaintext transaction amount by using a set hash function to obtain a second additional field, and packaging the first additional field, the second additional field and the plaintext transaction address to obtain a hidden transaction amount.
Optionally, in an embodiment of the present application, the step of performing, by the processor, packaging the plain text transaction amount, the plain text transaction address, and an additional field to obtain a hidden transaction amount corresponding to the transaction-related party includes:
Acquiring a randomly generated disposable random number;
encrypting the plaintext transaction amount by using a set public key encryption function to obtain a first additional field, and hashing the plaintext transaction amount by using a set hash function to obtain a second additional field;
and packaging the random number, the first additional field, the second additional field and the plaintext transaction address to obtain a hidden transaction amount.
Optionally, in an embodiment of the present application, before performing the step of generating the hidden transaction address of the transaction partner according to the UTXO public key and the random one-time key of the transaction partner, the processor further includes: acquiring a public payment key of the payee in the blockchain system;
the processor performs the step of generating a hidden transaction address for the transaction partner from the UTXO public key and the random one-time key of the transaction partner, comprising: and generating the hidden transaction address of the transaction association party according to the UTXO public key, the payment public key and the random one-time secret key of the transaction association party.
A computer storage medium having a computer program stored thereon, the computer program being executed to perform the steps of:
Determining a plaintext transaction amount and a plaintext transaction address of a transaction-related party in a blockchain system, wherein the transaction-related party comprises at least one of a sender, a receiver and a transaction verification party;
packaging the plaintext transaction amount, the plaintext transaction address and an additional field to obtain a hidden transaction amount corresponding to the transaction-related party;
and generating a transaction request corresponding to the transaction related party according to the hidden transaction amount and the hidden transaction address, and broadcasting the transaction request in the blockchain system, wherein the transaction request comprises transaction information.
In the technical scheme of the embodiment of the application, the plaintext transaction amount and the plaintext transaction address of the transaction association party in the blockchain system are determined, wherein the transaction association party comprises at least one of a sender, a receiver and a transaction verification party; packaging the plaintext transaction amount, the plaintext transaction address and an additional field to obtain a hidden transaction amount corresponding to the transaction-related party; generating a hidden transaction address of the transaction associated party according to the UTXO public key and the random one-time secret key of the transaction associated party; and generating a transaction request corresponding to the transaction association party according to the hidden transaction amount and the hidden transaction address, and broadcasting the transaction request in the blockchain system, wherein the transaction request comprises transaction information, so that the use of plaintext transaction amount and plaintext address in the transaction process is avoided, and different account transfers of the same payee cannot be associated by the public, thereby ensuring the privacy and safety of the transaction.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive faculty for a person skilled in the art.
Fig. 1 is a schematic flow chart of a hidden transaction method based on UTXO model in the first embodiment of the present application;
fig. 2 is a schematic flow chart of a hidden transaction method based on a UTXO model in a second embodiment of the present application;
fig. 3 is a schematic flow chart of a hidden transaction method based on a UTXO model in a third embodiment of the present application;
fig. 4 is a flow chart of a hidden transaction method based on a UTXO model in a fourth embodiment of the present application;
fig. 5 is a flow chart of a hidden transaction method based on UTXO model in a fourth embodiment of the present application;
fig. 6 is a schematic structural diagram of a hidden transaction device based on a UTXO model in a sixth embodiment of the present application;
fig. 7 is a schematic structural diagram of a hidden transaction device based on a UTXO model in a seventh embodiment of the present application;
fig. 8 is a schematic structural diagram of a hidden transaction device based on UTXO model in an eighth embodiment of the present application;
Fig. 9 is a schematic structural diagram of a hidden transaction device based on UTXO model according to a ninth embodiment of the present application;
fig. 10 is a schematic structural diagram of a hidden transaction device based on a UTXO model according to a tenth embodiment of the present application;
fig. 11 is a schematic structural diagram of an electronic device in an eleventh embodiment of the present application;
FIG. 12 is a schematic structural diagram of a computer storage medium according to a twelfth embodiment of the present application;
fig. 13 is a schematic hardware structure of an electronic device in the thirteenth embodiment of the present application.
Detailed Description
It is not necessary for any of the embodiments of the present application to be practiced with all of the advantages described above.
In order to make the present invention better understood by those skilled in the art, the following description will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the technical scheme of the embodiment of the application, the plaintext transaction amount and the plaintext transaction address of the transaction association party in the blockchain system are determined, wherein the transaction association party comprises at least one of a sender, a receiver and a transaction verification party; packaging the plaintext transaction amount, the plaintext transaction address and an additional field to obtain a hidden transaction amount corresponding to the transaction-related party; generating a hidden transaction address of the transaction associated party according to the UTXO public key and the random one-time secret key of the transaction associated party; and generating a transaction request corresponding to the transaction association party according to the hidden transaction amount and the hidden transaction address, and broadcasting the transaction request in the blockchain system, wherein the transaction request comprises transaction information, so that the use of plaintext transaction amount and plaintext address in the transaction process is avoided, and different account transfers of the same payee cannot be associated by the public, thereby ensuring the privacy and safety of the transaction.
Fig. 1 is a schematic flow chart of a hidden transaction method based on UTXO model in the first embodiment of the present application; as shown in fig. 1, the hidden transaction method based on the UTXO model includes:
s101, determining a plaintext transaction amount and a plaintext transaction address of a transaction associated party in a blockchain system, wherein the transaction associated party comprises at least one of a sender, a receiver and a transaction verification party;
in this embodiment, step S101 may be implemented by a blockchain node participating in a transaction in the blockchain system, where the blockchain node plays a sender, a receiver, a transaction verifier, etc. in the transaction.
In this embodiment, the unit of the plain text transaction amount is not particularly limited.
In this embodiment, the plain text transaction address indicates an identity of a party associated with the transaction.
S102, packaging the plaintext transaction amount, the plaintext transaction address and an additional field to obtain a hidden transaction amount corresponding to the transaction-related party;
in this embodiment, the packaging is performed based on a UTXO packaging mode, which is also called Unspent Transaction Outputs, i.e. the output of an unexpired transaction, and in a blockchain system, all legal blockchain transactions can be traced back to the output of one or more transactions in the forward direction, the sources of the chains are mining rewards, and the end is the output of the transaction which is not currently spent. Each transaction has a number of transaction inputs, i.e., sources of funds, and a number of transaction outputs, i.e., funds destinations. Typically, each transaction takes a single input (spot) to produce an output, and the output produced is the "unexpired transaction output", i.e., UTXO. Only the last transaction needs to be seen in the UTXO.
In this embodiment, the plaintext transaction amount, the plaintext transaction address and the additional field are encapsulated to obtain the hidden transaction amount corresponding to the transaction-related party, so that the hidden transaction amount includes address information in addition to the plaintext amount information. In addition, the mode of hiding the transaction amount accurately caters to the fact that the verification node is only sensitive to the amount paid by the sender and the amount received by the receiver, and therefore resource waste caused by transmission of redundant data in the blockchain system is avoided. Furthermore, the hidden transaction amount only comprises the plaintext transaction amount and the plaintext transaction address, so that the verification node is convenient to verify, and the verification speed is high.
And when a specific transaction is carried out later, for example, the hidden transaction amount is unsealed by using the private key in an opposite unsealing mode, so that the plaintext transaction amount and the plaintext transaction address are obtained.
S103, generating a hidden transaction address of the transaction association party according to the UTXO public key and the random one-time secret key of the transaction association party;
In this embodiment, the generating the hidden transaction address of the transaction partner according to the UTXO public key and the random one-time secret key of the transaction partner includes: and generating the hidden transaction address of the transaction association party according to the UTXO public key, the payment public key and the random one-time secret key of the transaction association party.
Figure GDA0002905549020000071
Where r represents a random one-time key, G represents a selected elliptic curve, x represents a multiplication operation on the elliptic curve, M and N represent UTXO public keys, payment public keys, respectively, of the party involved in the transaction,
Figure GDA0002905549020000072
on behalf of the hidden transaction address generated for the payee in this transaction, SHA256 represents the secure hash algorithm SHA256.
It can be seen that, in this embodiment, the generating the hidden transaction address of the transaction associated party according to the UTXO public key, the payment public key and the random one-time secret key of the transaction associated party specifically includes: and carrying out hash operation on the UTXO public key and the random one-time secret key of the transaction association party to obtain a hash result, and generating a hidden transaction address of the transaction association party according to the hash result and the payment public key, so that the hidden transaction address is calculated rapidly by using the public and private key of the payee party, the security of the hidden transaction address is improved, and the privacy of the transaction process is ensured.
In this embodiment, the hidden transaction address may also be referred to as a one-time address, so that the public cannot associate different transfers of the same payee, thereby ensuring the security of the transaction.
S104, generating a transaction request corresponding to the transaction association party according to the hidden transaction amount and the hidden transaction address, and broadcasting the transaction request in the blockchain system, wherein the transaction request comprises transaction information.
In this embodiment, in step S104, the transaction request may be obtained by encapsulating according to the UTXO structure, and during encapsulating, some additional fields may be added to the transaction request to ensure the security and tamper resistance of the transaction request.
Fig. 2 is a schematic flow chart of a hidden transaction method based on a UTXO model in a second embodiment of the present application; as shown in fig. 2, the hidden transaction method based on the UTXO model includes:
s201, determining a plaintext transaction amount and a plaintext transaction address of a transaction associated party in a blockchain system, wherein the transaction associated party comprises at least one of a sender, a receiver and a transaction verification party;
s202, packaging the plaintext transaction amount, the plaintext transaction address and an additional field to obtain a hidden transaction amount corresponding to the transaction-related party;
In this embodiment, when the step S202 is executed to package the plain text transaction amount, the plain text transaction address, and the additional field to obtain the hidden transaction amount corresponding to the transaction-related party, the method includes: and encrypting the plaintext transaction amount by using a set public key encryption function to obtain an additional field, and packaging the additional field and the plaintext transaction address to obtain a hidden transaction amount.
The hidden transaction amount is packaged with reference to equation 1 below.
Figure GDA0002905549020000081
In the above equation 1, addr i Representing the plain text transaction address, E i Representing the function of public key encryption,
Figure GDA0002905549020000082
representing the additional field, U' i Indicating the hidden transaction amount.
In this embodiment, the public key encryption function is, for example, a public key encryption function used by a sender, a receiver, and an verifier, for example, if the public key encryption function is used to generate a hidden transaction amount of the sender, the public key encryption function used by the receiver is used to generate a hidden transaction amount of the receiver, and if the public key encryption function is used to generate a hidden transaction amount of the verifier, the public key encryption function used by the verifier is used. That is, the hidden transaction amount of the sender, the hidden transaction amount of the receiver, and the hidden transaction amount of the verifier can be generated for the sender, the receiver, and the verifier, respectively.
In this embodiment, the same public key encryption function is used to encrypt the plaintext transaction amount to obtain the additional field, so that the difficulty of algorithm processing and the architecture of algorithm implementation are reduced, and the efficiency of algorithm processing is improved.
S203, generating a hidden transaction address of the transaction association party according to the UTXO public key and the random one-time secret key of the transaction association party;
s204, generating a transaction request corresponding to the transaction association party according to the hidden transaction amount and the hidden transaction address, and broadcasting the transaction request in the blockchain system, wherein the transaction request comprises transaction information.
In this embodiment, steps S201, S203, S204 are shown in fig. 1.
Fig. 3 is a schematic flow chart of a hidden transaction method based on a UTXO model in a third embodiment of the present application; as shown in fig. 3, the hidden transaction method based on the UTXO model includes:
s301, determining a plaintext transaction amount and a plaintext transaction address of a transaction associated party in a blockchain system, wherein the transaction associated party comprises at least one of a sender, a receiver and a transaction verification party;
s302, packaging the plaintext transaction amount, the plaintext transaction address and an additional field to obtain a hidden transaction amount corresponding to the transaction-related party;
In this embodiment, in step S302, when the plain text transaction amount, the plain text transaction address, and the additional field are encapsulated to obtain the hidden transaction amount corresponding to the transaction-related party, the method may include: and carrying out hash processing on the plaintext transaction amount by using a set hash function to obtain an additional field, and packaging the additional field and the plaintext transaction address to obtain a hidden transaction amount.
In this embodiment, the additional field with uniqueness is obtained by hashing the plaintext transaction amount by a hashing function, thereby ensuring a high degree of privacy in hiding the transaction amount.
Illustratively, the hidden transaction amount is packaged with reference to equation 2 below.
Figure GDA0002905549020000091
In the above equation 2, addr i Representing the plaintext transaction address, SHA i The hash function is represented by a hash function,
Figure GDA0002905549020000092
representing the additional field, U' i Indicating the hidden transaction amount.
In this embodiment, the hash function is sha256, for example.
S303, generating a hidden transaction address of the transaction association party according to the UTXO public key and the random one-time secret key of the transaction association party;
s304, generating a transaction request corresponding to the transaction association party according to the hidden transaction amount and the hidden transaction address, and broadcasting the transaction request in the blockchain system, wherein the transaction request comprises transaction information.
In this embodiment, steps S301, S303, S304 are shown in fig. 1.
Fig. 4 is a flow chart of a hidden transaction method based on a UTXO model in a fourth embodiment of the present application; as shown in fig. 4, the hidden transaction method based on the UTXO model includes:
s401, determining a plaintext transaction amount and a plaintext transaction address of a transaction associated party in a blockchain system, wherein the transaction associated party comprises at least one of a sender, a receiver and a transaction verification party;
s402, packaging the plaintext transaction amount, the plaintext transaction address and an additional field to obtain a hidden transaction amount corresponding to the transaction-related party;
in this embodiment, in step S402, the encapsulating the plain text transaction amount, the plain text transaction address, and the additional field to obtain the hidden transaction amount corresponding to the transaction-related party includes: and encrypting the plaintext transaction amount by using a set public key encryption function to obtain a first additional field, hashing the plaintext transaction amount by using a set hash function to obtain a second additional field, and packaging the first additional field, the second additional field and the plaintext transaction address to obtain a hidden transaction amount.
In this embodiment, the manner of the first additional field, the second additional field and the plaintext transaction address is equivalent to flexibly setting the additional field in the hidden transaction amount, thereby effectively increasing the privacy of the transaction amount.
The hidden transaction amount is packaged with reference to equation 3 below.
Figure GDA0002905549020000101
In the above equation 3, addr i Representing the plaintext transaction address, SHA i The hash function is represented by a hash function,
Figure GDA0002905549020000102
representing said first additional field,/>
Figure GDA0002905549020000103
Representing the second additional field, U' i Indicating the hidden transaction amount.
In this embodiment, the hash function is sha256, for example.
S403, generating a hidden transaction address of the transaction association party according to the UTXO public key and the random one-time secret key of the transaction association party;
s404, generating a transaction request corresponding to the transaction association party according to the hidden transaction amount and the hidden transaction address, and broadcasting the transaction request in the blockchain system, wherein the transaction request comprises transaction information.
In this embodiment, steps S401, S403, S404 are shown in fig. 1.
Fig. 5 is a flow chart of a hidden transaction method based on UTXO model in a fourth embodiment of the present application; as shown in fig. 5, the hidden transaction method based on the UTXO model includes:
S501, determining a plaintext transaction amount and a plaintext transaction address of a transaction associated party in a blockchain system, wherein the transaction associated party comprises at least one of a sender, a receiver and a transaction verification party;
s502, packaging the plaintext transaction amount, the plaintext transaction address and an additional field to obtain a hidden transaction amount corresponding to the transaction-related party;
in this embodiment, in step S502, the plain text transaction amount, the plain text transaction address, and the additional field are packaged to obtain the hidden transaction amount corresponding to the transaction-related party, which includes: acquiring a randomly generated disposable random number; encrypting the plaintext transaction amount by using a set public key encryption function to obtain a first additional field, and hashing the plaintext transaction amount by using a set hash function to obtain a second additional field; and packaging the random number, the first additional field, the second additional field and the plaintext transaction address to obtain a hidden transaction amount.
Thus, the introduction of random numbers further enhances the high degree of privacy of the hidden transaction amount as compared to FIG. 4 described above. The random number may be generated by a random function.
The hidden transaction amount is packaged with reference to equation 4 below.
Figure GDA0002905549020000104
In the above equation 4, addr i Representing the plaintext transaction address, SHA i The hash function is represented by a hash function,
Figure GDA0002905549020000105
representing said first additional field,/>
Figure GDA0002905549020000106
Representing the second additional field, U' i Indicating the hidden transaction amount, r i Representing a random number.
S403, generating a hidden transaction address of the transaction association party according to the UTXO public key and the random one-time secret key of the transaction association party;
s504, generating a transaction request corresponding to the transaction association party according to the hidden transaction amount and the hidden transaction address, and broadcasting the transaction request in the blockchain system, wherein the transaction request comprises transaction information.
In this embodiment, steps S501, S503, S504 are shown in fig. 1.
Alternatively, in another embodiment, the hidden transaction amount may also be packaged according to equation 5 below.
Figure GDA0002905549020000111
In the above equation 5, addr i Representing the plaintext transaction address, SHA i The hash function is represented by a hash function,
Figure GDA0002905549020000112
representing the first additional field, commit i Representing the second additional field, U' i Indicating the hidden transaction amount, r i Representing a random number.
As can be seen from the above formula 5, in this embodiment, in step S502, the plain text transaction amount, the plain text transaction address and the additional field are packaged to obtain the hidden transaction amount corresponding to the transaction association party, which includes: acquiring a randomly generated disposable random number; encrypting the plaintext transaction amount by using a set public key encryption function to obtain a first additional field, and hashing the plaintext transaction amount, the plaintext transaction address and the random number by using a set hash function to obtain a second additional field; and packaging the random number, the first additional field, the second additional field and the plaintext transaction address to obtain a hidden transaction amount, so that the privacy of the hidden transaction amount is further enhanced, and the hidden transaction amount is not easy to crack.
Fig. 6 is a schematic structural diagram of a hidden transaction device based on a UTXO model in a sixth embodiment of the present application; as shown in fig. 6, the hidden transaction device based on the UTXO model includes:
a data obtaining unit 601, configured to determine a plaintext transaction amount and a plaintext transaction address of a transaction-related party in a blockchain system, where the transaction-related party includes at least one of a sender, a receiver, and a transaction verifier;
the packaging unit 602 is configured to package the plaintext transaction amount, the plaintext transaction address and an additional field to obtain a hidden transaction amount corresponding to the transaction-related party;
an address generating unit 603, configured to generate a hidden transaction address of the transaction partner according to the UTXO public key and the random one-time key of the transaction partner;
the request generating unit 604 is configured to generate, according to the hidden transaction amount and the hidden transaction address, a transaction request corresponding to the transaction association party, and broadcast in the blockchain system, where the transaction request includes transaction information.
In this embodiment, the block chain node may be implemented by a block chain node in the block chain system, which may act as a sender, a receiver, a verifier, etc. in the transaction.
In this embodiment, the unit of the plain text transaction amount is not particularly limited.
In this embodiment, the plain text transaction address indicates an identity of a party associated with the transaction.
In this embodiment, the packaging is performed based on a UTXO packaging mode, which is also called Unspent Transaction Outputs, i.e. the output of an unexpired transaction, and in a blockchain system, all legal blockchain transactions can be traced back to the output of one or more transactions in the forward direction, the sources of the chains are mining rewards, and the end is the output of the transaction which is not currently spent. Each transaction has a number of transaction inputs, i.e., sources of funds, and a number of transaction outputs, i.e., funds destinations. Typically, each transaction takes a single input (spot) to produce an output, and the output produced is the "unexpired transaction output", i.e., UTXO. Only the last transaction needs to be seen in the UTXO.
In this embodiment, the plaintext transaction amount, the plaintext transaction address and the additional field are encapsulated to obtain the hidden transaction amount corresponding to the transaction-related party, so that the hidden transaction amount includes address information in addition to the hidden amount information, and the transaction amount and the plaintext address have certain randomness and uniqueness, so that the high privacy of data is ensured, and the security of the transaction is further ensured. In addition, the mode of hiding the transaction amount accurately caters to the fact that the verification node is only sensitive to the amount paid by the sender and the amount received by the receiver, and therefore resource waste caused by transmission of redundant data in the blockchain system is avoided. Furthermore, the hidden transaction amount only comprises the plaintext transaction amount and the plaintext transaction address, so that the verification node is convenient to verify, and the verification speed is high.
In the case of a subsequent specific transaction, the hidden transaction amount is unsealed, for example, by using the private key in an opposite unsealing manner, so as to obtain the plain transaction amount therefrom.
In this embodiment, the transaction request may be obtained by encapsulating according to the UTXO structure, and during encapsulating, some additional fields may be added to the transaction request to ensure security and tamper resistance of the transaction request.
Fig. 7 is a schematic structural diagram of a hidden transaction device based on a UTXO model in a seventh embodiment of the present application; as shown in fig. 7, the hidden transaction device based on the UTXO model includes:
a data obtaining unit 701, configured to determine a plaintext transaction amount and a plaintext transaction address of a transaction-related party in a blockchain system, where the transaction-related party includes at least one of a sender, a receiver, and a transaction verifier;
the packaging unit 702 is configured to package the plain text transaction amount, the plain text transaction address, and an additional field to obtain a hidden transaction amount corresponding to the transaction-related party;
an address generating unit 703, configured to generate a hidden transaction address of the transaction partner according to the UTXO public key and the random one-time key of the transaction partner;
And the request generating unit 704 is configured to generate a transaction request corresponding to the transaction association party according to the hidden transaction amount and the hidden transaction address, and broadcast the transaction request in the blockchain system, where the transaction request includes transaction information.
In this embodiment, the implementation may be performed by a blockchain node in the blockchain system that participates in a transaction, for example, playing a transaction initiating role, a transaction receiving role, a transaction verifying role, etc. in the transaction.
In this embodiment, the packaging unit is further configured to encrypt the plaintext transaction amount by using a set public key encryption function to obtain an additional field, and package the additional field and the plaintext transaction address to obtain a hidden transaction amount.
In this embodiment, the public key encryption function is, for example, a public key encryption function used by a sender, a receiver, and an verifier, for example, if the public key encryption function is used to generate a hidden transaction amount of the sender, the public key encryption function used by the receiver is used to generate a hidden transaction amount of the receiver, and if the public key encryption function is used to generate a hidden transaction amount of the verifier, the public key encryption function used by the verifier is used. That is, the hidden transaction amount of the sender, the hidden transaction amount of the receiver, and the hidden transaction amount of the verifier can be generated for the sender, the receiver, and the verifier, respectively.
In this embodiment, the same public key encryption function is used to encrypt the plaintext transaction amount to obtain the additional field, so that the difficulty of algorithm processing and the architecture of algorithm implementation are reduced, and the efficiency of algorithm processing is improved.
Fig. 8 is a schematic structural diagram of a hidden transaction device based on UTXO model in an eighth embodiment of the present application; as shown in fig. 8, the hidden transaction device based on the UTXO model includes:
a data obtaining unit 801, configured to determine a plaintext transaction amount and a plaintext transaction address of a transaction-related party in a blockchain system, where the transaction-related party includes at least one of a sender, a receiver, and a transaction verifier;
a packaging unit 802, configured to package the plain text transaction amount, the plain text transaction address, and an additional field to obtain a hidden transaction amount corresponding to the transaction-related party;
an address generating unit 803, configured to generate a hidden transaction address of the transaction association party according to the UTXO public key and the random one-time key of the transaction association party;
the request generating unit 804 is configured to generate, according to the hidden transaction amount and the hidden transaction address, a transaction request corresponding to the transaction association party, and broadcast in the blockchain system, where the transaction request includes transaction information.
In this embodiment, the packaging unit is further configured to perform hash processing on the plaintext transaction amount by using a set hash function to obtain an additional field, and package the additional field and the plaintext transaction address to obtain a hidden transaction amount.
In this embodiment, the additional field with uniqueness is obtained by hashing the plaintext transaction amount by a hashing function, thereby ensuring a high degree of privacy in hiding the transaction amount.
In this embodiment, the hash function is sha256, for example.
Fig. 9 is a schematic structural diagram of a hidden transaction device based on UTXO model according to a ninth embodiment of the present application; as shown in fig. 9, the hidden transaction device based on the UTXO model includes:
the data acquisition unit 901 is configured to determine a plaintext transaction amount and a plaintext transaction address of a transaction-related party in a blockchain system, where the transaction-related party includes at least one of a sender, a receiver, and a transaction verifier;
the packaging unit 902 is configured to package the plain text transaction amount, the plain text transaction address, and an additional field to obtain a hidden transaction amount corresponding to the transaction-related party;
an address generating unit 903, configured to generate a hidden transaction address of the transaction partner according to the UTXO public key and the random one-time key of the transaction partner;
The request generating unit 904 is configured to generate, according to the hidden transaction amount and the hidden transaction address, a transaction request corresponding to the transaction association party, and broadcast the transaction request in the blockchain system, where the transaction request includes transaction information.
In this embodiment, the packaging unit is further configured to encrypt the plaintext transaction amount using a set public key encryption function to obtain a first additional field, hash the plaintext transaction amount using a set hash function to obtain a second additional field, and package the first additional field, the second additional field, and the plaintext transaction address to obtain a hidden transaction amount.
In this embodiment, the manner of the first additional field, the second additional field and the plaintext transaction address is equivalent to flexibly setting the additional field in the hidden transaction amount, thereby effectively increasing the privacy of the transaction amount.
Fig. 10 is a schematic structural diagram of a hidden transaction device based on a UTXO model according to a tenth embodiment of the present application; as shown in fig. 10, the UTXO model-based hidden transaction apparatus includes:
a data obtaining unit 1001, configured to determine a plaintext transaction amount and a plaintext transaction address of a transaction-related party in a blockchain system, where the transaction-related party includes at least one of a sender, a receiver, and a transaction verifier;
The packaging unit 1002 is configured to package the plain text transaction amount, the plain text transaction address, and an additional field to obtain a hidden transaction amount corresponding to the transaction-related party;
an address generating unit 1003, configured to generate a hidden transaction address of the transaction partner according to the UTXO public key and the random one-time key of the transaction partner;
the request generating unit 1004 is configured to generate, according to the hidden transaction amount and the hidden transaction address, a transaction request corresponding to the transaction partner, and broadcast in the blockchain system, where the transaction request includes transaction information.
In this embodiment, the packaging unit is further configured to obtain a randomly generated one-time random number; encrypting the plaintext transaction amount by using a set public key encryption function to obtain a first additional field, and hashing the plaintext transaction amount by using a set hash function to obtain a second additional field; and packaging the random number, the first additional field, the second additional field and the plaintext transaction address to obtain a hidden transaction amount.
Therefore, in this embodiment, a random number is introduced, further enhancing the high degree of privacy of the hidden transaction amount. The random number may be generated by a random function.
Fig. 11 is a schematic structural diagram of an electronic device in an eleventh embodiment of the present application; as shown in fig. 11, the electronic device includes a memory 1101 and a processor 1102, wherein the memory stores an executable program, and the processor executes the following steps when running the executable program:
determining a plaintext transaction amount and a plaintext transaction address of a transaction-related party in a blockchain system, wherein the transaction-related party comprises at least one of a sender, a receiver and a transaction verification party;
packaging the plaintext transaction amount, the plaintext transaction address and an additional field to obtain a hidden transaction amount corresponding to the transaction-related party;
and generating a transaction request corresponding to the transaction related party according to the hidden transaction amount and the hidden transaction address, and broadcasting the transaction request in the blockchain system, wherein the transaction request comprises transaction information.
Optionally, in an embodiment of the electronic device, the step of packaging the plain text transaction amount, the plain text transaction address and an additional field to obtain a hidden transaction amount corresponding to the transaction partner includes: and encrypting the plaintext transaction amount by using a set public key encryption function to obtain an additional field, and packaging the additional field and the plaintext transaction address to obtain a hidden transaction amount.
Alternatively, in an embodiment of the electronic device, the processor performs the step of encapsulating the plain text transaction amount, the plain text transaction address and additional fields to obtain a hidden transaction amount corresponding to the transaction partner, including: and carrying out hash processing on the plaintext transaction amount by using a set hash function to obtain an additional field, and packaging the additional field and the plaintext transaction address to obtain a hidden transaction amount.
Alternatively, in an embodiment of the electronic device, the processor performs the step of encapsulating the plain text transaction amount, the plain text transaction address and additional fields to obtain a hidden transaction amount corresponding to the transaction partner, including: and encrypting the plaintext transaction amount by using a set public key encryption function to obtain a first additional field, hashing the plaintext transaction amount by using a set hash function to obtain a second additional field, and packaging the first additional field, the second additional field and the plaintext transaction address to obtain a hidden transaction amount.
Alternatively, in an embodiment of the electronic device, the processor performs the step of encapsulating the plain text transaction amount, the plain text transaction address and additional fields to obtain a hidden transaction amount corresponding to the transaction partner, including:
Acquiring a randomly generated disposable random number;
encrypting the plaintext transaction amount by using a set public key encryption function to obtain a first additional field, and hashing the plaintext transaction amount by using a set hash function to obtain a second additional field;
and packaging the random number, the first additional field, the second additional field and the plaintext transaction address to obtain a hidden transaction amount.
Alternatively, in an embodiment of the electronic device, the processor, before executing the step of generating the hidden transaction address of the transaction partner according to the UTXO public key and the random one-time key of the transaction partner, further includes: acquiring a public payment key of the payee in the blockchain system;
the processor performs the step of generating a hidden transaction address for the transaction partner from the UTXO public key and the random one-time key of the transaction partner, comprising: and generating the hidden transaction address of the transaction association party according to the UTXO public key, the payment public key and the random one-time secret key of the transaction association party.
FIG. 12 is a schematic structural diagram of a computer storage medium according to a twelfth embodiment of the present application; as shown in fig. 12, the computer storage medium stores a computer program, and the computer program is executed to perform the following steps:
Determining a plaintext transaction amount and a plaintext transaction address of a transaction-related party in a blockchain system, wherein the transaction-related party comprises at least one of a sender, a receiver and a transaction verification party;
packaging the plaintext transaction amount, the plaintext transaction address and an additional field to obtain a hidden transaction amount corresponding to the transaction-related party;
generating a hidden transaction address of the transaction associated party according to the UTXO public key and the random one-time secret key of the transaction associated party;
and generating a transaction request corresponding to the transaction related party according to the hidden transaction amount and the hidden transaction address, and broadcasting the transaction request in the blockchain system, wherein the transaction request comprises a transaction message.
Fig. 13 is a schematic hardware structure of an electronic device in the thirteenth embodiment of the present application; as shown in fig. 13, the hardware structure of the electronic device may include: a processor 1301, a communication interface 1302, a computer-readable medium 1303, and a communication bus 13013;
wherein the processor 1301, the communication interface 1302, and the computer readable medium 1303 perform communication with each other through a communication bus 13013;
alternatively, the communication interface 1302 may be an interface of a communication module, such as an interface of a GSM module;
Wherein the processor 1301 may in particular be configured to run an executable program stored on a memory, thereby performing all or part of the processing steps of any of the method embodiments described above.
Processor 1301 may be a general purpose processor including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but may also be a Digital Signal Processor (DSP), application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The electronic device of the embodiments of the present application exist in a variety of forms including, but not limited to:
(1) Mobile communication devices, which are characterized by mobile communication functionality and are aimed at providing voice, data communication. Such terminals include smart phones (e.g., iPhone), multimedia phones, functional phones, and low-end phones, among others.
(2) Ultra mobile personal computer equipment, which belongs to the category of personal computers, has the functions of calculation and processing and generally has the characteristic of mobile internet surfing. Such terminals include PDA, MID and UMPC devices, etc., such as iPad.
(3) Portable entertainment devices such devices can display and play multimedia content. Such devices include audio, video players (e.g., iPod), palm game consoles, electronic books, and smart toys and portable car navigation devices.
(4) The server, which is a device for providing computing services, is composed of a processor 710, a hard disk, a memory, a system bus, etc., and is similar to a general computer architecture, but is required to provide highly reliable services, and thus has high requirements in terms of processing power, stability, reliability, security, scalability, manageability, etc.
(5) Other electronic devices with data interaction function.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by using "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but not just one of the hdds, but a plurality of kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable logic controllers, and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller may thus be regarded as a kind of hardware component, and means for performing various functions included therein may also be regarded as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in one or more software and/or hardware elements when implemented in the present application.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular transactions or implement particular abstract data types. The application may also be practiced in distributed computing environments where transactions are performed by remote processing devices that are connected through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (18)

1. A hidden transaction method based on a UTXO model, comprising:
determining a plaintext transaction amount and a plaintext transaction address of a transaction-related party in a blockchain system, wherein the transaction-related party comprises at least one of a sender, a receiver and a transaction verification party;
packaging the plaintext transaction amount, the plaintext transaction address and an additional field to obtain a hidden transaction amount corresponding to the transaction-related party, wherein the additional field is obtained by encrypting the plaintext transaction amount;
Generating a hidden transaction address of the transaction associated party according to the UTXO public key and the random one-time secret key of the transaction associated party;
and generating a transaction request corresponding to the transaction related party according to the hidden transaction amount and the hidden transaction address, and broadcasting the transaction request in the blockchain system, wherein the transaction request comprises transaction information.
2. The method for hidden transaction based on UTXO model of claim 1, wherein the encapsulating the plaintext transaction amount, the plaintext transaction address, and additional fields to obtain the hidden transaction amount corresponding to the transaction partner comprises: and encrypting the plaintext transaction amount by using a set public key encryption function to obtain an additional field, and packaging the additional field and the plaintext transaction address to obtain a hidden transaction amount.
3. The method for hidden transaction based on UTXO model of claim 1, wherein the encapsulating the plaintext transaction amount, the plaintext transaction address, and additional fields to obtain the hidden transaction amount corresponding to the transaction partner comprises: and carrying out hash processing on the plaintext transaction amount by using a set hash function to obtain an additional field, and packaging the additional field and the plaintext transaction address to obtain a hidden transaction amount.
4. The method for hidden transaction based on UTXO model of claim 1, wherein the encapsulating the plaintext transaction amount, the plaintext transaction address, and additional fields to obtain the hidden transaction amount corresponding to the transaction partner comprises: and encrypting the plaintext transaction amount by using a set public key encryption function to obtain a first additional field, hashing the plaintext transaction amount by using a set hash function to obtain a second additional field, and packaging the first additional field, the second additional field and the plaintext transaction address to obtain a hidden transaction amount.
5. The method for hidden transaction based on UTXO model of claim 1, wherein the encapsulating the plaintext transaction amount, the plaintext transaction address, and additional fields to obtain the hidden transaction amount corresponding to the transaction partner comprises:
acquiring a randomly generated disposable random number;
encrypting the plaintext transaction amount by using a set public key encryption function to obtain a first additional field, and hashing the plaintext transaction amount by using a set hash function to obtain a second additional field;
And packaging the random number, the first additional field, the second additional field and the plaintext transaction address to obtain a hidden transaction amount.
6. The method for hidden transaction based on UTXO model according to claim 1, wherein the generating the hidden transaction address of the transaction partner according to the UTXO public key and the random one-time key of the transaction partner further comprises: acquiring a public payment key of the payee in the blockchain system;
the generating the hidden transaction address of the transaction associated party according to the UTXO public key and the random one-time secret key of the transaction associated party comprises the following steps: and generating the hidden transaction address of the transaction association party according to the UTXO public key, the payment public key and the random one-time secret key of the transaction association party.
7. A concealed transaction device based on UTXO model comprising:
the system comprises a data acquisition unit, a transaction verification unit and a block chain system, wherein the data acquisition unit is used for determining the plaintext transaction amount and plaintext transaction address of a transaction association party in the block chain system, and the transaction association party comprises at least one of a sender, a receiver and a transaction verification party;
the packaging unit is used for packaging the plaintext transaction amount, the plaintext transaction address and an additional field to obtain a hidden transaction amount corresponding to the transaction-related party, wherein the additional field is obtained by encrypting the plaintext transaction amount;
The address generation unit is used for generating a hidden transaction address of the transaction association party according to the UTXO public key and the random one-time secret key of the transaction association party;
and the request generation unit is used for generating a transaction request corresponding to the transaction association party according to the hidden transaction amount and the hidden transaction address and broadcasting the transaction request in the blockchain system, wherein the transaction request comprises transaction information.
8. The UTXO model-based hidden transaction device of claim 7, wherein the encapsulation unit is further configured to encrypt the plaintext transaction amount using a set public key encryption function to obtain an additional field, and encapsulate the additional field and the plaintext transaction address to obtain a hidden transaction amount.
9. The UTXO model based hidden transaction device of claim 7, wherein the encapsulation unit is further configured to hash the plaintext transaction amount using a set hash function to obtain an additional field, and encapsulate the additional field and the plaintext transaction address to obtain a hidden transaction amount.
10. The UTXO model based hidden transaction device of claim 7, wherein the encapsulation unit is further configured to encrypt the plaintext transaction amount using a set public key encryption function to obtain a first additional field, hash the plaintext transaction amount using a set hash function to obtain a second additional field, and encapsulate the first additional field, the second additional field, and the plaintext transaction address to obtain a hidden transaction amount.
11. The UTXO model based hidden transaction apparatus according to claim 7, wherein the packaging unit is further configured to obtain a randomly generated one-time random number; encrypting the plaintext transaction amount by using a set public key encryption function to obtain a first additional field, and hashing the plaintext transaction amount by using a set hash function to obtain a second additional field; and packaging the random number, the first additional field, the second additional field and the plaintext transaction address to obtain a hidden transaction amount.
12. An electronic device comprising a memory and a processor, the memory having stored thereon an executable program, the processor executing the executable program as follows:
determining a plaintext transaction amount and a plaintext transaction address of a transaction-related party in a blockchain system, wherein the transaction-related party comprises at least one of a sender, a receiver and a transaction verification party;
packaging the plaintext transaction amount, the plaintext transaction address and an additional field to obtain a hidden transaction amount corresponding to the transaction-related party, wherein the additional field is obtained by encrypting the plaintext transaction amount;
Generating a hidden transaction address of the transaction associated party according to the UTXO public key and the random one-time secret key of the transaction associated party;
and generating a transaction request corresponding to the transaction related party according to the hidden transaction amount and the hidden transaction address, and broadcasting the transaction request in the blockchain system, wherein the transaction request comprises transaction information.
13. The electronic device of claim 12, wherein the processor performs the step of encapsulating the plain text transaction amount, the plain text transaction address, and additional fields to obtain a hidden transaction amount corresponding to the transaction partner, comprising: and encrypting the plaintext transaction amount by using a set public key encryption function to obtain an additional field, and packaging the additional field and the plaintext transaction address to obtain a hidden transaction amount.
14. The electronic device of claim 12, wherein the processor performs the step of encapsulating the plain text transaction amount, the plain text transaction address, and additional fields to obtain a hidden transaction amount corresponding to the transaction partner, comprising: and carrying out hash processing on the plaintext transaction amount by using a set hash function to obtain an additional field, and packaging the additional field and the plaintext transaction address to obtain a hidden transaction amount.
15. The electronic device of claim 12, wherein the processor performs the step of encapsulating the plain text transaction amount, the plain text transaction address, and additional fields to obtain a hidden transaction amount corresponding to the transaction partner, comprising: and encrypting the plaintext transaction amount by using a set public key encryption function to obtain a first additional field, hashing the plaintext transaction amount by using a set hash function to obtain a second additional field, and packaging the first additional field, the second additional field and the plaintext transaction address to obtain a hidden transaction amount.
16. The electronic device of claim 12, wherein the processor performs the step of encapsulating the plain text transaction amount, the plain text transaction address, and additional fields to obtain a hidden transaction amount corresponding to the transaction partner, comprising:
acquiring a randomly generated disposable random number;
encrypting the plaintext transaction amount by using a set public key encryption function to obtain a first additional field, and hashing the plaintext transaction amount by using a set hash function to obtain a second additional field;
And packaging the random number, the first additional field, the second additional field and the plaintext transaction address to obtain a hidden transaction amount.
17. The electronic device of claim 12, wherein the processor, prior to performing the step of generating the hidden transaction address for the transaction partner from the UTXO public key and the random one-time key for the transaction partner, further comprises: acquiring a public payment key of the payee in the blockchain system;
the processor performs the step of generating a hidden transaction address for the transaction partner from the UTXO public key and the random one-time key of the transaction partner, comprising: and generating the hidden transaction address of the transaction association party according to the UTXO public key, the payment public key and the random one-time secret key of the transaction association party.
18. A computer storage medium having a computer program stored thereon, the computer program being operative to perform the steps of:
determining a plaintext transaction amount and a plaintext transaction address of a transaction-related party in a blockchain system, wherein the transaction-related party comprises at least one of a sender, a receiver and a transaction verification party;
Packaging the plaintext transaction amount, the plaintext transaction address and an additional field to obtain a hidden transaction amount corresponding to the transaction-related party, wherein the additional field is obtained by encrypting the plaintext transaction amount;
generating a hidden transaction address of the transaction associated party according to the UTXO public key and the random one-time secret key of the transaction associated party;
and generating a transaction request corresponding to the transaction related party according to the hidden transaction amount and the hidden transaction address, and broadcasting the transaction request in the blockchain system, wherein the transaction request comprises transaction information.
CN202011377589.9A 2020-11-30 2020-11-30 Hidden transaction method and device based on UTXO model and related products Active CN112418857B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011377589.9A CN112418857B (en) 2020-11-30 2020-11-30 Hidden transaction method and device based on UTXO model and related products

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011377589.9A CN112418857B (en) 2020-11-30 2020-11-30 Hidden transaction method and device based on UTXO model and related products

Publications (2)

Publication Number Publication Date
CN112418857A CN112418857A (en) 2021-02-26
CN112418857B true CN112418857B (en) 2023-06-30

Family

ID=74828794

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011377589.9A Active CN112418857B (en) 2020-11-30 2020-11-30 Hidden transaction method and device based on UTXO model and related products

Country Status (1)

Country Link
CN (1) CN112418857B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117196626B (en) * 2023-11-06 2024-02-02 北京天润基业科技发展股份有限公司 Transfer data processing method and device and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108764874A (en) * 2018-05-17 2018-11-06 深圳前海微众银行股份有限公司 Anonymous refund method, system and storage medium based on block chain
CN109034801A (en) * 2018-07-31 2018-12-18 杭州复杂美科技有限公司 A kind of privacy method of commerce and system, equipment and can storage medium
CN110011781A (en) * 2019-03-04 2019-07-12 华中科技大学 A kind of homomorphic cryptography method encrypting and support zero-knowledge proof for transaction amount
CN110414981A (en) * 2019-07-04 2019-11-05 华中科技大学 A kind of homomorphic cryptography method that supporting ZKPs and block chain transaction amount encryption method
CN110545279A (en) * 2019-09-05 2019-12-06 国网区块链科技(北京)有限公司 block chain transaction method, device and system with privacy and supervision functions
CN111241586A (en) * 2020-01-20 2020-06-05 布比(北京)网络技术有限公司 Anonymous processing method and system for block link address, terminal and storage medium
CN111989891A (en) * 2018-04-26 2020-11-24 华为国际有限公司 Data processing method, related device and block chain system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190213584A1 (en) * 2018-01-11 2019-07-11 Mastercard International Incorporated Method and system for tokenized replacement of crypto currency addresses

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111989891A (en) * 2018-04-26 2020-11-24 华为国际有限公司 Data processing method, related device and block chain system
CN108764874A (en) * 2018-05-17 2018-11-06 深圳前海微众银行股份有限公司 Anonymous refund method, system and storage medium based on block chain
CN109034801A (en) * 2018-07-31 2018-12-18 杭州复杂美科技有限公司 A kind of privacy method of commerce and system, equipment and can storage medium
CN110011781A (en) * 2019-03-04 2019-07-12 华中科技大学 A kind of homomorphic cryptography method encrypting and support zero-knowledge proof for transaction amount
CN110414981A (en) * 2019-07-04 2019-11-05 华中科技大学 A kind of homomorphic cryptography method that supporting ZKPs and block chain transaction amount encryption method
CN110545279A (en) * 2019-09-05 2019-12-06 国网区块链科技(北京)有限公司 block chain transaction method, device and system with privacy and supervision functions
CN111241586A (en) * 2020-01-20 2020-06-05 布比(北京)网络技术有限公司 Anonymous processing method and system for block link address, terminal and storage medium

Also Published As

Publication number Publication date
CN112418857A (en) 2021-02-26

Similar Documents

Publication Publication Date Title
TWI705350B (en) Method and device for processing transaction request
CN111401902B (en) Service processing method, device and equipment based on block chain
RU2708952C1 (en) Method and device for processing a service request
CN110245942B (en) Receipt storage method and node combining user type and judgment condition
CN111339565B (en) Business service providing method, device, equipment and system based on block chain
WO2023109520A1 (en) Random number generation method and apparatus based on blockchain
CN109560933B (en) Authentication method and system based on digital certificate, storage medium and electronic equipment
CN112866280B (en) Information verification method, device and equipment
CN111737686A (en) Processing method, device and equipment of block chain data
CN114281893A (en) Processing method, device and equipment for block chain transaction
CN112418857B (en) Hidden transaction method and device based on UTXO model and related products
CN112541766A (en) UTXO-based zero-knowledge proof transaction verification method and device and related products
CN112541759A (en) Hidden transaction method and device based on UTXO model in block chain system and related products
CN113761496B (en) Identity verification method and device based on blockchain and electronic equipment
CN113095828B (en) Data storage method and device based on blockchain
CN110995447B (en) Data storage method, device, equipment and medium
CN112418858A (en) Method, device and related product for carrying out hidden transaction based on UTXO
CN112650715A (en) Method, device and related product for storing data in block chain system
CN112330327A (en) Transaction method and device based on hidden address in block chain and related product
CN111641499A (en) Block chain-based private key restoration method, device, equipment and medium
WO2017071541A1 (en) Numerical verification code generation method and device
CN112396417A (en) Transaction method and device based on hidden address in block chain and related product
CN112541760A (en) UTXO-based transaction verification method and device and related product
CN112597533B (en) Risk prevention and control method, device and equipment based on privacy protection
CN112330457A (en) UTXO-based transaction method and device in block chain and related product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant