CN107358424A - A kind of method of commerce and device based on digital cash - Google Patents

A kind of method of commerce and device based on digital cash Download PDF

Info

Publication number
CN107358424A
CN107358424A CN201710494860.9A CN201710494860A CN107358424A CN 107358424 A CN107358424 A CN 107358424A CN 201710494860 A CN201710494860 A CN 201710494860A CN 107358424 A CN107358424 A CN 107358424A
Authority
CN
China
Prior art keywords
currency
money
gathering
ciphertext
transaction
Prior art date
Application number
CN201710494860.9A
Other languages
Chinese (zh)
Other versions
CN107358424B (en
Inventor
姚前
狄刚
钱友才
黄烈明
陈海波
赵新宇
王继伟
张大伟
Original Assignee
中国人民银行数字货币研究所
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中国人民银行数字货币研究所 filed Critical 中国人民银行数字货币研究所
Priority to CN201710494860.9A priority Critical patent/CN107358424B/en
Publication of CN107358424A publication Critical patent/CN107358424A/en
Application granted granted Critical
Publication of CN107358424B publication Critical patent/CN107358424B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06QDATA PROCESSING SYSTEMS OR METHODS, SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL, SUPERVISORY OR FORECASTING PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL, SUPERVISORY OR FORECASTING PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/10Payment architectures specially adapted for electronic funds transfer [EFT] systems; specially adapted for home banking systems
    • G06Q20/102Bill distribution or payments
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06QDATA PROCESSING SYSTEMS OR METHODS, SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL, SUPERVISORY OR FORECASTING PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL, SUPERVISORY OR FORECASTING PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/16Payments settled via telecommunication systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06QDATA PROCESSING SYSTEMS OR METHODS, SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL, SUPERVISORY OR FORECASTING PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL, SUPERVISORY OR FORECASTING PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3823Payment protocols; Details thereof insuring higher security of transaction combining multiple encryption tools for a transaction

Abstract

The invention discloses a kind of method of commerce and device based on digital cash, it is related to field of computer technology.One embodiment of this method includes:During being merchandised based on the bank settlement of distributed account book technology, gathering end and payment end the plaintext amount of money being related in transaction are encrypted to obtain the ciphertext amount of money, and generate corresponding checking message, the ciphertext amount of money is verified or decrypted.The embodiment solves in existing distributed account book technology that fund is difficult to the technical problem to maintain secrecy, has reached and has ensured that cooperation is shared and the technique effect of protection transaction privacy.

Description

A kind of method of commerce and device based on digital cash
Technical field
The present invention relates to field of computer technology, more particularly to a kind of method of commerce and device based on digital cash.
Background technology
Block chain is a kind of new distributed computing technology, is formulated by agreement maker before system operation and announces rule Then, and the client for following the agreement is developed, is connected with each other as node by more focal pointes afterwards and runs the visitor Family end, the data of agreement are not met as caused by malicious node to be abandoned by other honest nodes, be total to using this antagonism The method of knowledge safeguards a total account book jointly, and the right authority or individual for reaching neither one centralization can distort initiation protocol Imagination.
The application scenarios of first block chain are bit coin, realize a kind of distribution of regulation in advance rule and logic of transferring accounts Currency system, the source of note issuance are that accounting nodes go out block reward Coinbase, and Money transfer logic is referred to as not spending Transaction output (Unspent Transaction Output:UTXO) model.Assuming that user A has currency at presentThe source of these currency both is from going out block reward, and user A is intended to user B and transfers accounts 7 Member, then user A collect the currency in oneself hand, find the combination more than or equal to 7, initiate one using A1 and A2 to input (input), with small change currencyWith newborn currencyTo export the transaction of (output), i.e.,This equilibrium relationships needs to be verified first by accounting nodes, by simultaneously After writing block chain, A1 and A2 are just changed into having spent currency, A4 and B1 reformed into it is new do not spend currency, after being used as The input of UTXO structures.
Transfer accounts, whether have because accounting nodes need to verify whether each transaction has negative value currency, excess whether occurs All users are not spent monetary information deposit in plain text by money creation etc., the block catenary system selection using bit coin as representative Storage, and monetary information newly-generated in transaction is also required to state in plain text, and node could be inputted and exported to all UTXO The checking of suitable relation.
However, during the present invention is realized, inventor has found that at least there are the following problems in the prior art:Reality is raw In work, point-to-point dealing money typically has privacy requirements, overall balance of the user in system between user (enterprise or individual) There are privacy requirements.For traditional centralization scheme due to being kept accounts without cooperation, also can conveniently sets up data access authority, can To solve the problems, such as privacy well, but user is also desirable to deposit by the advantage of block chain distributed technological cooperation book keeping operation Other documents and data of multi-party cooperative are stored up, but complete service closed_loop needs fund to participate in real-time settle accounts calculation again, so as to lead The problem of causing cooperation shared can not coexist with transaction privacy.
The content of the invention
In view of this, the embodiment of the present invention provides a kind of method of commerce and device based on digital cash, can based on The encryption of dealing money is realized in the process of exchange of digital cash, to protect the privacy rights and interests of user.
To achieve the above object, a kind of one side according to embodiments of the present invention, there is provided friendship based on digital cash Easy method, including:
Gathering end the plaintext dealing money received is encrypted to obtain ciphertext dealing money, and generates for verifying Gathering request is asked and broadcasted in first checking information of the ciphertext dealing money, then generation gathering;The gathering please Asking includes the ciphertext dealing money and first checking information;
Node confirms that the ciphertext dealing money accords with after the gathering request is received, according to first checking information Normally, block chain then is arrived into the gathering request storage, and according to the gathering request renewal currency table;
Payment end is after the block chain gets the gathering request, according to first checking information to the ciphertext Dealing money is decrypted to obtain the plaintext dealing money, and according to the plaintext dealing money and the currency table The plaintext small change amount of money is calculated, then the plaintext small change amount of money is encrypted to obtain the ciphertext small change amount of money, then generates and is used for Verify the second checking information of the ciphertext small change amount of money, and generation transfer data structure, then generate payment request and Broadcast the payment request;The payment request includes the ciphertext small change amount of money, second checking information and described transferred accounts Data structure;
Node confirms that the ciphertext dealing money accords with after the payment request is received, according to second checking information Normally, and the currency table according to the transfer data structural confirmation meets rule, then deposits the payment request Store up the block chain, and the currency table according to the transfer data topology update.
In some optional embodiments, gathering end the plaintext dealing money received is encrypted to obtain ciphertext transaction The step of amount of money, includes:
Gathering end generates the transaction private key that this gathering uses;
Gathering end storage basic point value, and calculating is encrypted to the basic point value using basic point AES and then obtains Basic point check value;
End collect money according to the formula q=xG+mH calculating ciphertext dealing money;Wherein, q is the ciphertext dealing money, x For the transaction private key, m is the plaintext dealing money received, and G is the basic point value, and H is the basic point check value.
In some optional embodiments,
First checking information, which includes the first transaction, to be proved;
The step of gathering end generates the first checking information for verifying the ciphertext dealing money includes:
The plaintext dealing money m is carried out binary system fractionation by gathering end according to presetting digit capacity n, to obtainWherein mi=2iOr mi=0, i represent index bit, and 0≤i < n;
Gathering end is split the transaction private key x according to presetting digit capacity n at random, to obtainWherein x0To xn-2Random generation,
End collect money for each index bit, according to P (xi,mi)=xiG+miH and P (xi,mi-ki)=xiG+(mi-ki)H Calculate P (xi,mi) and P (xi,mi-ki);Wherein ki=2i
End collect money for index bit each described, uses the xi, P (the xi,mi) and the P (xi,mi-ki) generation The ring signatures S of the index biti
Collect money end by whole the index bit, the P (xi,mi), the P (xi,mi-ki) and the SiSpliced with Obtaining first transaction proves.
In some optional embodiments, node confirms that the ciphertext dealing money meets according to first checking information The step of rule includes:
Node is disassembled first transaction and proved, to obtain whole index bits, the P (xi,mi), the P (xi, mi-ki) and the Si
Node is confirmed for index bit each described, the SiFor the P (xi,mi) and the P (xi,mi-ki) ring Signature, and confirm for index bit each described, meet P (xi,mi)-P(xi,mi-ki)=kiH, then confirm to meetTo confirm that the ciphertext dealing money meets rule;Wherein ki=2i
In some optional embodiments,
First checking information includes the first communication information;
The step of gathering end generates the first checking information for verifying the ciphertext dealing money includes:
Gathering end generation gathering end fixed private, obtains payment end fixed public, and use the basic point AES Calculating is encrypted to obtain shared key to the product of the gathering end fixed private and the payment end fixed public, then The plaintext dealing money and the transaction private key are spliced, the shared key is reused and spliced result is carried out Computations are to generate first communication information.
In some optional embodiments, payment end is carried out according to first checking information to the ciphertext dealing money Decrypt to include the step of obtaining the plaintext dealing money:
Payment end stores the basic point value, and calculating is encrypted to the basic point value using the basic point AES Obtain the basic point check value;
Payment end generation payment end fixed private, obtains gathering end fixed public, and use the basic point AES Calculating is encrypted to obtain shared key to the product of the payment end fixed private and the gathering end fixed public, then Split and first communication information is decrypted using the shared key result of calculating to obtain the plaintext trade gold Volume.
In some optional embodiments, payment end calculates in plain text according to the plaintext dealing money and the currency table The step of small change amount of money, includes:
Payment end selects beneficiary to be more than or equal to institute for the payment end and plaintext total amount from the currency table State the digital cash of literary dealing money clearly and then form the currency subset, then subtract the plaintext with the plaintext total amount Dealing money is to obtain the plaintext small change amount of money.
In some optional embodiments,
The gathering request includes transaction currency, and the ciphertext dealing money and described first are included in the transaction currency Checking information;The payment request includes small change currency, and the ciphertext small change amount of money and described the are included in the small change currency Two checking informations;
The step of payment end generation transfer data structure, includes:
The generation of payment end includes cryptographic Hash, the cryptographic Hash of the small change currency and the currency subset of the transaction currency In each digital cash cryptographic Hash transfer data structure.
In some optional embodiments,
Before node is according to the step of gathering request renewal currency table, in addition to:Node establish for store currency, The currency table of currency cryptographic Hash and the two corresponding relation;The currency table includes not spending currency in currency table, confirmation List and currency table is spent;
Node includes according to the step of gathering request renewal currency table:Node is by the transaction currency and the friendship The cryptographic Hash of easy currency stores the currency table into the confirmation;
Before the step of payment request storage is arrived the block chain by node, in addition to:Node is according to the transaction goods The cryptographic Hash of coin is searched and confirms that the transaction currency is stored in currency table in the confirmation, further according in the currency subset The cryptographic Hash of digital cash is searched and confirms that the digital cash in the currency subset does not spend currency table described in being stored in, with And confirm the ciphertext dealing money and the ciphertext small change amount of money and the ciphertext equal to digital cash in the currency subset Total amount;
Node includes according to the transfer data topology update the step of currency table:Node is according to the transaction goods After the cryptographic Hash of coin finds the transaction currency, by the transaction currency and its cryptographic Hash, currency table moves from the confirmation Currency table is not spent to described, is found further according to the cryptographic Hash of digital cash in the currency subset in the currency subset Currency after, the currency in the currency subset and its cryptographic Hash are not spent currency table to move to described to have spent goods from described Coin list, and the small change currency and its cryptographic Hash storage are not spent into currency table to described.
To achieve the above object, other side according to embodiments of the present invention, there is provided a kind of based on digital cash Transaction system, including:
Dealing money encrypting module, for being encrypted the plaintext dealing money received to obtain ciphertext dealing money;
First checking information generation module, for generating the first checking information for being used for verifying the ciphertext dealing money;
Gathering request sending module, for generating gathering request and broadcasting gathering request;Wrapped in the gathering request Include the ciphertext dealing money and first checking information;
Gathering request receiving module, for receiving the gathering request;
Dealing money deciphering module, for the ciphertext dealing money is decrypted according to first checking information with Obtain the plaintext dealing money;
Small change amount of money computing module, for calculating plaintext small change gold according to the plaintext dealing money and the currency table Volume;
Small change amount of money encrypting module, for the plaintext small change amount of money to be encrypted to obtain the ciphertext small change amount of money;
Second checking information generation module, for generating the second checking information for being used for verifying the ciphertext small change amount of money;
Transfer data structural generation module, for generating transfer data structure;
Payment request sending module, for generating payment request and broadcasting the payment request;Wrapped in the payment request Include the ciphertext small change amount of money, second checking information and the transfer data structure.
In some optional embodiments, the dealing money encrypting module is additionally operable to:Generate the friendship that this gathering uses Easy private key;Basic point value is stored, and calculating is encrypted to the basic point value using basic point AES and is verified with obtaining basic point Value;The ciphertext dealing money is calculated according to formula q=xG+mH;Wherein, q is the ciphertext dealing money, and x is the transaction Private key, m are the plaintext dealing money received, and G is the basic point value, and H is the basic point check value.
In some optional embodiments,
First checking information, which includes the first transaction, to be proved;
The first checking information generation module is additionally operable to:The plaintext dealing money m is carried out two according to presetting digit capacity n System is split, to obtainWherein mi=2iOr mi=0, i represent index bit, and 0≤i < n;By described in Transaction private key x is split at random according to presetting digit capacity n, to obtainWherein x0To xn-2Random generation,For each index bit, according to P (xi,mi)=xiG+miH and P (xi,mi-ki)=xiG+(mi-ki) H calculates P (xi,mi) and P (xi,mi-ki);Wherein ki=2i;For index bit each described, the x is usedi, P (the xi, mi) and the P (xi,mi-ki) generate the ring signatures S of the index biti;By the index bit of whole, the P (xi,mi), it is described P(xi,mi-ki) and the SiSpliced is proved with obtaining first transaction.
In some optional embodiments,
First checking information includes the first communication information;
The first checking information generation module is additionally operable to:Generation gathering end fixed private, obtains payment end fixed public, And the product of the gathering end fixed private and the payment end fixed public is added using the basic point AES Then the plaintext dealing money and the transaction private key are spliced, reused described to obtain shared key by close calculating Shared key spliced result is encrypted calculating to generate first communication information.
In some optional embodiments, the dealing money deciphering module is additionally operable to:The basic point value is stored, and is made The basic point value is encrypted with the basic point AES basic point check value is calculated;Generation payment end is fixed private Key, gathering end fixed public is obtained, and using the basic point AES to the payment end fixed private and the gathering Calculating is encrypted to obtain shared key in the product of end fixed public, then splits using the shared key to described first The result of calculating is decrypted to obtain the plaintext dealing money in communication information.
In some optional embodiments, the small change amount of money computing module is additionally operable to:Selected from the currency table Then beneficiary forms institute for the payment end and plaintext total amount more than or equal to the digital cash of the plaintext dealing money Currency subset is stated, then subtracts the plaintext dealing money with the plaintext total amount to obtain the plaintext small change amount of money.
In some optional embodiments,
The gathering request includes transaction currency, and the ciphertext dealing money and described first are included in the transaction currency Checking information;The payment request includes small change currency, and the ciphertext small change amount of money and described the are included in the small change currency Two checking informations;
The transfer data structural generation module is additionally operable to:Cryptographic Hash of the generation comprising the transaction currency, the small change The transfer data structure of the cryptographic Hash of each digital cash in the cryptographic Hash of currency and the currency subset.
To achieve the above object, another aspect according to embodiments of the present invention, there is provided a kind of based on digital cash Transaction system, including:
Gathering request receiving module, for receiving gathering request;The gathering request includes ciphertext dealing money and first Checking information;
Gathering requests verification module, for confirming that the ciphertext dealing money meets rule according to first checking information Then;
Gathering is asked into chain module, for the gathering request storage to be arrived into block chain;
Gathering update module, for according to the gathering request renewal currency table;
Payment request receiving module, for receiving payment request;The payment request is tested including the ciphertext small change amount of money, second Demonstrate,prove information and transfer data structure;
Payment request authentication module, for confirming that the ciphertext dealing money meets rule according to second checking information Then, and the currency table according to the transfer data structural confirmation meets rule;
Payment request enters chain module, for payment request storage to be arrived into the block chain;
Payment update module, for the currency table according to the transfer data topology update.
In some optional embodiments,
First checking information, which includes the first transaction, to be proved;
The gathering requests verification module is additionally operable to:Disassembling first transaction proves, to obtain whole index bit i, P (xi,mi)、P(xi,mi-ki) and Si;Confirm for index bit each described, the SiFor the P (xi,mi) and the P (xi, mi-ki) ring signatures, and confirm for index bit each described, meet P (xi,mi)-P(xi,mi-ki)=kiH, then really Recognize satisfactionTo confirm that the ciphertext dealing money meets rule;Wherein ki=2i
In some optional embodiments, described device also establishes module including currency table, wherein,
The currency table establish module be used for establish for storing the goods of currency, currency cryptographic Hash and the two corresponding relation Coin list;The currency table includes not spending currency table in currency table, confirmation and has spent currency table;
The gathering request includes transaction currency, and the ciphertext dealing money and described first are included in the transaction currency Checking information;The payment request includes small change currency, and the ciphertext small change amount of money and described the are included in the small change currency Two checking informations;
The gathering update module is additionally operable to:By the storage of the cryptographic Hash of the transaction currency and the transaction currency described in Currency table in confirmation;
Cryptographic Hash, the transfer data structure that the transfer data structure includes the transaction currency also include small change goods The cryptographic Hash of digital cash in the cryptographic Hash of coin and the currency subset;
The payment request authentication module is additionally operable to:Searched according to the cryptographic Hash of the transaction currency and confirm the transaction Currency is stored in currency table in the confirmation, is searched further according to the cryptographic Hash of digital cash in the currency subset and confirms institute State the currency in currency subset be stored in it is described do not spend currency table, and confirm the ciphertext dealing money and the ciphertext The small change amount of money and the ciphertext total amount equal to digital cash in the currency subset;
The payment update module is additionally operable to:After the transaction currency being found according to the cryptographic Hash of the transaction currency, By the transaction currency and its cryptographic Hash from the confirmation currency table move to it is described do not spend currency table, further according to described After the cryptographic Hash of digital cash finds the currency in the currency subset in currency subset, by the currency in the currency subset And its cryptographic Hash from it is described do not spend currency table move to it is described spent currency table, and by the small change currency and its Kazakhstan Uncommon value storage does not spend currency table to described.
To achieve the above object, a kind of another aspect according to embodiments of the present invention, there is provided computer-readable storage Medium, computer instruction is stored with the computer-readable recording medium, it is characterised in that the computer instruction can be by Computer or computer system operation so that the computer or computer system be able to carry out it is described based on digital cash Method of commerce.
One embodiment in foregoing invention has the following advantages that or beneficial effect:Because use and be based on distributed account book skill During the bank settlement transaction of art, the plaintext amount of money being related in transaction is encrypted to obtain ciphertext for gathering end and payment end The amount of money, and corresponding checking message is generated, to the technological means that the ciphertext amount of money is verified or decrypted, so overcoming Fund is difficult to the technical problem to maintain secrecy in existing distributed account book technology, and then ensures that cooperation is shared and protection transaction is hidden Private technique effect.
Further effect adds hereinafter in conjunction with embodiment possessed by above-mentioned non-usual optional mode With explanation.
Brief description of the drawings
Accompanying drawing is used to more fully understand the present invention, does not form inappropriate limitation of the present invention.Wherein:
Fig. 1 is the schematic diagram of the key step of the method for commerce according to embodiments of the present invention based on digital cash;
Fig. 2 is the schematic diagram of the main modular of the transaction system according to embodiments of the present invention based on digital cash;
Fig. 3 is the schematic diagram of the main modular of the transaction system according to another embodiment of the present invention based on digital cash.
Embodiment
The one exemplary embodiment of the present invention is explained below in conjunction with accompanying drawing, including the various of the embodiment of the present invention Details should think them only exemplary to help understanding.Therefore, those of ordinary skill in the art should recognize Arrive, various changes and modifications can be made to the embodiments described herein, without departing from scope and spirit of the present invention.Together Sample, for clarity and conciseness, the description to known function and structure is eliminated in following description.
Fig. 1 is the schematic diagram of the key step of the method for commerce according to embodiments of the present invention based on digital cash.
As shown in figure 1, a kind of method of commerce based on digital cash provided according to embodiments of the present invention, including:
S10, gathering end the plaintext dealing money received is encrypted to obtain ciphertext dealing money, and generates and be used for The first checking information of the ciphertext dealing money is verified, gathering request is asked and broadcasted in then generation gathering;The receipts Money request includes the ciphertext dealing money and first checking information.
S11, node confirm the ciphertext trade gold after the gathering request is received according to first checking information Volume meets rule, and the gathering request storage then is arrived into block chain, and according to the gathering request renewal currency table.
S12, payment end is after the block chain gets the gathering request, according to first checking information to described Ciphertext dealing money is decrypted to obtain the plaintext dealing money, and according to the plaintext dealing money and the currency List calculates the plaintext small change amount of money, then the plaintext small change amount of money is encrypted to obtain the ciphertext small change amount of money, then generates For verifying the second checking information of the ciphertext small change amount of money, and generation transfer data structure, payment request is then generated And broadcast the payment request;The payment request includes the ciphertext small change amount of money, second checking information and described Transfer data structure.
S13, node confirm the ciphertext trade gold after the payment request is received, according to second checking information Volume meets rule, and the currency table according to the transfer data structural confirmation meets rule, then please by the payment The block chain, and the currency table according to the transfer data topology update are arrived in storage of seeking survival.
In some optional embodiments, also include payment collection time stamp in the gathering request, for the ease of sending and connecing Receive and record, the gathering also include beneficiary address and paying party address in asking.For the ease of identification, the gathering please Ask before broadcast, it is signed using gathering end fixed private by the gathering end.Also include paying in the payment request Money timestamp.For the ease of sending and receiving and recording, in the payment request with also including beneficiary address and paying party Location.For the ease of identification, the payment request is signed using payment end fixed private to it before broadcast, by the payment end Name.
From the above it can be seen that the embodiment of the present invention is because using the bank settlement transaction based on distributed account book technology During, the plaintext amount of money being related in transaction is encrypted to obtain the ciphertext amount of money for gathering end and payment end, and generates phase The checking message answered, to the technological means that the ciphertext amount of money is verified or decrypted, so overcoming existing distribution Fund is difficult to the technical problem to maintain secrecy in account book technology, and then the technology effect for ensureing that cooperation is shared and protecting transaction privacy Fruit.
In some optional embodiments, gathering end the plaintext dealing money received is encrypted to obtain ciphertext transaction The step of amount of money, includes:
Gathering end generates the transaction private key that this gathering uses;Gathering end storage basic point value, and calculated using basic point encryption Method the basic point value is encrypted calculating to obtain basic point check value;End collect money according to the formula q=xG+mH calculating ciphertext Dealing money;Wherein, q is the ciphertext dealing money, and x is the transaction private key, and m is the plaintext dealing money received, G For the basic point value, H is the basic point check value.Wherein, transaction private key is only used for this bank settlement, carries out new transaction every time Shi Douhui generates a new transaction private key.
The basic point AES can be such as being encoded SHA256 algorithms, RIPEMD-160 algorithms or Base58.Base The purpose of point AES is one to be calculated Nobody Knows the open public key of private key, i.e. basic point by default basic point value G Check value H;And the basic point check value H drawn using this kind of hash algorithms of such as SHA256 relatively has public credibility, naturally it is also possible to The algorithm of same or similar effect can be reached using other.Do not have between H and G that basic point AES needs to ensure to be calculated Have it is similar with this simply corresponding relations of H=kG so that q=xG+mH is when q, G, H are known, x and m value There is unique solution.
In some optional embodiments, first checking information, which includes the first transaction, to be proved;
The step of gathering end generates the first checking information for verifying the ciphertext dealing money includes:
The plaintext dealing money m is carried out binary system fractionation by gathering end according to presetting digit capacity n, to obtainWherein mi=2iOr mi=0, i represent index bit, and 0≤i < n;
Gathering end is split the transaction private key x according to presetting digit capacity n at random, to obtainWherein x0To xn-2Random generation,When splitting, presetting digit capacity n is more big, and then level of encryption is higher, but Calculating cost can be improved, and unnecessary digit does not have actual applicability, so n value is generally proper 64, 32 or 128 can also according to circumstances be selected;
End collect money for each index bit, according to P (xi,mi)=xiG+miH and P (xi,mi-ki)=xiG+(mi-ki)H Calculate P (xi,mi) and P (xi,mi-ki);Wherein ki=2i
End collect money for index bit each described, uses the xi, P (the xi,mi) and the P (xi,mi-ki) generation The ring signatures S of the index biti
Collect money end by whole the index bit, the P (xi,mi), the P (xi,mi-ki) and the SiSpliced with Obtaining first transaction proves.
In some optional embodiments, node confirms that the ciphertext dealing money meets according to first checking information The step of rule includes:
Node is disassembled first transaction and proved, to obtain whole index bits, the P (xi,mi), the P (xi, mi-ki) and the Si
Node is confirmed for index bit each described, the SiFor the P (xi,mi) and the P (xi,mi-ki) ring Signature, and confirm for index bit each described, meet P (xi,mi)-P(xi,mi-ki)=kiH, then confirm to meetWhereby it was confirmed that plaintext dealing money is in 0-2 corresponding to ciphertext dealing money qnIn the range of, with true Recognize the ciphertext dealing money and meet rule;Wherein ki=2i
In some optional embodiments, first checking information includes the first communication information;
The step of gathering end generates the first checking information for verifying the ciphertext dealing money includes:
Gathering end generation gathering end fixed private, obtains payment end fixed public, and use the basic point AES Calculating is encrypted to obtain shared key to the product of the gathering end fixed private and the payment end fixed public, then The plaintext dealing money and the transaction private key are spliced, the shared key is reused and spliced result is carried out Computations are to generate first communication information.
In some optional embodiments, payment end is carried out according to first checking information to the ciphertext dealing money Decrypt to include the step of obtaining the plaintext dealing money:
Payment end stores the basic point value, and calculating is encrypted to the basic point value using the basic point AES Obtain the basic point check value;
Payment end generation payment end fixed private, obtains gathering end fixed public, and use the basic point AES Calculating is encrypted to obtain shared key to the product of the payment end fixed private and the gathering end fixed public, then Split and first communication information is decrypted using the shared key result of calculating to obtain the plaintext trade gold Volume.
It should be noted that due to the first communication information employ payment end and collect money end wherein one end fixed private with And the fixed public of the other end is encrypted, so only payment end and gathering end can solve to the first logical informational message It is close, so as to which ciphertext dealing money be decrypted.Similarly, arbitrary user terminal can only be decrypted and got relevant with itself The plaintext amount of money in (itself being paying party or beneficiary) digital cash, and the digital cash unrelated with itself can not be obtained In plaintext dealing money, so ensure that process of exchange and merchandise account book privacy.
In some optional embodiments, payment end calculates in plain text according to the plaintext dealing money and the currency table The step of small change amount of money, includes:
Payment end selects beneficiary to be more than or equal to institute for the payment end and plaintext total amount from the currency table State the digital cash of literary dealing money clearly and then form the currency subset, then subtract the plaintext with the plaintext total amount Dealing money is to obtain the plaintext small change amount of money.If it should be noted that the plaintext of digital cash is always golden in the currency subset Volume is equal to the plaintext dealing money, then the plaintext small change amount of money being calculated is zero;In such a case, it is possible to still Subsequent treatment is not carried out for 0 method according to the plaintext small change amount of money, single Rule of judgment can also be set, do not reprocessed follow-up There is the plaintext small change amount of money and relative content.If not carrying out subsequent treatment for 0 method according to the plaintext small change amount of money, Plaintext that then can be with subsequent step interior joint to digital cash in ciphertext dealing money, the ciphertext small change amount of money and currency subset The checking of total amount is consistent, it is possible to increase the globality and security of method.
In some optional embodiments, described in the mode of generation, decryption and the checking of the ciphertext small change amount of money refers to Ciphertext dealing money;The generation and use of second checking information refer to first checking information.It should be noted that generating During the second checking information, this payment transaction private key for using of payment is generated by end of paying the bill, in other embodiment, in order to Meet verification condition, the payment transaction private key will also meet certain condition, be illustrated in subsequent embodiment;If desired The second communication information is generated, then end of paying the bill is according to payment end fixed private and payment end fixed public, with reference to the described first checking The generating mode of message is generated.
In some optional embodiments,
Before node is according to the step of gathering request renewal currency table, in addition to:Node establish for store currency, The currency table of currency cryptographic Hash and the two corresponding relation;The currency table includes not spending currency in currency table, confirmation List and currency table is spent;
Node includes according to the step of gathering request renewal currency table:Node is by the transaction currency and the friendship The cryptographic Hash of easy currency stores the currency table into the confirmation;
Before the step of payment request storage is arrived the block chain by node, in addition to:Node is according to the transaction goods The cryptographic Hash of coin is searched and confirms that the transaction currency is stored in currency table in the confirmation, further according in the currency subset The cryptographic Hash of digital cash is searched and confirms that the digital cash in the currency subset does not spend currency table described in being stored in, with And confirm the ciphertext dealing money and the ciphertext small change amount of money and the ciphertext equal to digital cash in the currency subset Total amount;
Node includes according to the transfer data topology update the step of currency table:Node is according to the transaction goods After the cryptographic Hash of coin finds the transaction currency, by the transaction currency and its cryptographic Hash, currency table moves from the confirmation Currency table is not spent to described, is found further according to the cryptographic Hash of digital cash in the currency subset in the currency subset Currency after, the currency in the currency subset and its cryptographic Hash are not spent currency table to move to described to have spent goods from described Coin list, and the small change currency and its cryptographic Hash storage are not spent into currency table to described.
In the present embodiment because to confirm the ciphertext dealing money and the ciphertext small change amount of money and equal to the goods The ciphertext total amount of digital cash in coin subset, so described in being equal to when the plaintext total amount of digital cash in the currency subset Plaintext dealing money, i.e., when the value of the described plaintext small change amount of money is 0, still with reference to the side that plaintext dealing money is encrypted The plaintext small change amount of money is encrypted method;In addition, when the plaintext small change amount of money is encrypted, by end generation payment transaction of paying the bill Private key, the generating mode of payment transaction private key here is different from the mode of gathering end generation transaction private key, and nonrandom generation, But the obtained result of transaction private key at the payment end is subtracted with the transaction private key sum of digital cash in the currency subset As the payment transaction private key at the payment end, so ciphertext trade gold can be still met when the plaintext small change amount of money is 0 Volume and the ciphertext small change amount of money and the ciphertext total amount equal to digital cash in currency subset, so as to complete verification process.
It should be noted that any user terminal inquires about the account balance of itself if desired, then currency table can be collected Do not spend in currency table, beneficiary address be Self address currency, counted one by one according to the public key at these monetary payment ends The shared key of each currency is calculated, and decrypts the ciphertext amount of money in these currency respectively using the shared key, it is every to obtain The plaintext amount of money of individual currency, these plaintext amount of money are added and can obtain the account balance of itself.
In some optional embodiments, payment end is after the block chain gets the gathering request, it is also possible to refuses Paid the bill absolutely;Now, methods described also includes:
Payment end obtains the transaction currency included in the gathering request, and calculates the cryptographic Hash of the transaction currency, Then generation, which is refused payment, asks and broadcasts the request of refusing payment;The request of refusing payment includes the transaction currency Cryptographic Hash;
Node side arranges after the request of refusing payment is received according to the cryptographic Hash of the transaction currency in the currency The transaction currency is searched in table, and it is determined that the transaction currency is present in currency table and the transaction in the confirmation Behind address of the paying party address of currency for the payment end, the transaction currency is deleted from the currency table.
In some optional embodiments, gathering end can not also initiate payment request or refuse payment to ask at payment end Before asking, gathering request is recalled in initiation;Now, methods described also includes:
Gathering end calculates the cryptographic Hash of the transaction currency, and then generation, which recalls gathering request and broadcasts this, recalls gathering Request;The cryptographic Hash recalled gathering and ask to include the transaction currency;
Node side arranges after gathering request is recalled described in receiving according to the cryptographic Hash of the transaction currency in the currency The transaction currency is searched in table, and it is determined that the transaction currency is present in currency table and the transaction in the confirmation Behind address of the beneficiary address of currency for the gathering end, the transaction currency is deleted from the currency table.
In some optional embodiments, the data structure such as institute of table 1 of the transaction currency, small change currency and digital cash Show:
The monetary data structure table of table 1
Field Abbreviation Type Explain
AddressFrom Dx Address Paying party address
AddressTo Dx Address Beneficiary address
Money q Public key The ciphertext amount of money
Proof f Bytes Transaction proves
Message c Bytes Communication information
Timestamp s Time Millisecond timestamp
In some optional embodiments, the data structure that the transaction proves is as shown in table 2:
The transaction of table 2 proves data structure table
In some optional embodiments, the optional data structure of the transfer data structure is as shown in table 3:
The transfer data structure table of table 3
Field Type Explain
Inputs Hash lists Input currency Hash list
Outputs Hash lists Export currency Hash list
Wherein, the input currency Hash list includes the cryptographic Hash of digital cash in currency subset;The output goods Coin Hash list includes the cryptographic Hash of the transaction currency, and when small change be present, includes the Kazakhstan of the small change currency Uncommon value.
Fig. 2 is the schematic diagram of the main modular of the transaction system according to embodiments of the present invention based on digital cash.
As shown in Fig. 2 the embodiment of the present invention provides a kind of transaction system 200 based on digital cash, tool is mainly used in Standby gathering and the user terminal of payment function, including:
Dealing money encrypting module 201, for being encrypted the plaintext dealing money received to obtain ciphertext trade gold Volume;
First checking information generation module 202, it is used for the first checking letter for verifying the ciphertext dealing money for generating Breath;
Gathering request sending module 203, for generating gathering request and broadcasting gathering request;In the gathering request Including the ciphertext dealing money and first checking information;
Gathering request receiving module 204, for receiving the gathering request;
Dealing money deciphering module 205, for being solved according to first checking information to the ciphertext dealing money It is close to obtain the plaintext dealing money;
Small change amount of money computing module 206, looked in plain text for being calculated according to the plaintext dealing money and the currency table Fractionl amount;
Small change amount of money encrypting module 207, for the plaintext small change amount of money to be encrypted to obtain the ciphertext small change amount of money;
Second checking information generation module 208, it is used for the second checking letter for verifying the ciphertext small change amount of money for generating Breath;
Transfer data structural generation module 209, for generating transfer data structure;
Payment request sending module 210, for generating payment request and broadcasting the payment request;In the payment request Including the ciphertext small change amount of money, second checking information and the transfer data structure.
In some optional embodiments, the dealing money encrypting module 201 is additionally operable to:Generate what this gathering used Transaction private key;Basic point value is stored, and the basic point value is encrypted calculating using basic point AES to obtain basic point school Test value;The ciphertext dealing money is calculated according to formula q=xG+mH;Wherein, q is the ciphertext dealing money, and x is the friendship Easy private key, m are the plaintext dealing money received, and G is the basic point value, and H is the basic point check value.
First checking information, which includes the first transaction, to be proved;
The first checking information generation module 202 is additionally operable to:The plaintext dealing money m is entered according to presetting digit capacity n Row binary system is split, to obtainWherein mi=2iOr mi=0, i represent index bit, and 0≤i < n;By institute State transaction private key x to be split at random according to presetting digit capacity n, to obtainWherein x0To xn-2Random generation,For each index bit, according to P (xi,mi)=xiG+miH and P (xi,mi-ki)=xiG+(mi-ki) H calculates P (xi,mi) and P (xi,mi-ki);Wherein ki=2i;For index bit each described, the x is usedi, P (the xi, mi) and the P (xi,mi-ki) generate the ring signatures S of the index biti;By the index bit of whole, the P (xi,mi), it is described P(xi,mi-ki) and the SiSpliced is proved with obtaining first transaction.
First checking information includes the first communication information;
The first checking information generation module 202 is additionally operable to:Generation gathering end fixed private, it is public to obtain the fixation of payment end Key, and the product of the gathering end fixed private and the payment end fixed public is carried out using the basic point AES Then the plaintext dealing money and the transaction private key are spliced to obtain shared key, reuse institute by computations State shared key and spliced result is encrypted calculating to generate first communication information.
In some optional embodiments, the dealing money deciphering module 205 is additionally operable to:The basic point value is stored, with And the basic point value is encrypted using the basic point AES basic point check value is calculated;Generation payment end is consolidated Determine private key, obtain gathering end fixed public, and using the basic point AES to the payment end fixed private with it is described Calculating is encrypted to obtain shared key in the product of gathering end fixed public, then splits using the shared key to described The result of calculating is decrypted to obtain the plaintext dealing money in first communication information.
In some optional embodiments, the small change amount of money computing module 206 is additionally operable to:Selected from the currency table Select digital cash and then composition that beneficiary is more than or equal to the plaintext dealing money for the payment end and plaintext total amount The currency subset, the plaintext dealing money then is subtracted with the plaintext total amount to obtain the plaintext small change amount of money.
In some optional embodiments,
The gathering request includes transaction currency, and the ciphertext dealing money and described first are included in the transaction currency Checking information;The payment request includes small change currency, and the ciphertext small change amount of money and described the are included in the small change currency Two checking informations;
The transfer data structural generation module 209 is additionally operable to:Cryptographic Hash of the generation comprising the transaction currency, described look for The transfer data structure of the cryptographic Hash of each digital cash in the cryptographic Hash of zero currency and the currency subset.
Fig. 3 is the schematic diagram of the main modular of the transaction system according to another embodiment of the present invention based on digital cash.
As shown in figure 3, another embodiment of the present invention provides a kind of transaction system 300 based on digital cash, main application In the node for possessing authentication function, including:
Gathering request receiving module 301, for receiving gathering request;The gathering request includes ciphertext dealing money and the One checking information;
Requests verification of collecting money module 302, for confirming that the ciphertext dealing money meets according to first checking information Rule;
Gathering is asked into chain module 303, for the gathering request storage to be arrived into block chain;
Gathering update module 304, for according to the gathering request renewal currency table;
Payment request receiving module 305, for receiving payment request;The payment request includes the ciphertext small change amount of money, the Two checking informations and transfer data structure;
Payment request authentication module 306, for confirming that the ciphertext dealing money meets according to second checking information Rule, and the currency table according to the transfer data structural confirmation meet rule;
Payment request enters chain module 307, for payment request storage to be arrived into the block chain;
Payment update module 308, for the currency table according to the transfer data topology update.
In some optional embodiments, first checking information, which includes the first transaction, to be proved;
The gathering requests verification module 302 is additionally operable to:Disassembling first transaction proves, to obtain whole index bits i、P(xi,mi)、P(xi,mi-ki) and Si;Confirm for index bit each described, the SiFor the P (xi,mi) and the P (xi,mi-ki) ring signatures, and confirm for index bit each described, meet P (xi,mi)-P(xi,mi-ki)=kiH, so Confirm to meet afterwardsTo confirm that the ciphertext dealing money meets rule;Wherein ki=2i
In some optional embodiments, described device also establishes module 309 including currency table,
The currency table establish module 309 be used for establish for storing currency, currency cryptographic Hash and the two corresponding relation Currency table;The currency table includes not spending currency table in currency table, confirmation and has spent currency table;
The gathering request includes transaction currency, and the ciphertext dealing money and described first are included in the transaction currency Checking information;The payment request includes small change currency, and the ciphertext small change amount of money and described the are included in the small change currency Two checking informations;
The gathering update module 304:The storage of the cryptographic Hash of the transaction currency and the transaction currency is arrived described true Recognize middle currency table;
Cryptographic Hash, the transfer data structure that the transfer data structure includes the transaction currency also include small change goods The cryptographic Hash of digital cash in the cryptographic Hash of coin and the currency subset;
The payment request authentication module 306 is additionally operable to:Searched according to the cryptographic Hash of the transaction currency and described in confirming Transaction currency is stored in currency table in the confirmation, is searched further according to the cryptographic Hash of digital cash in the currency subset and true The currency recognized in the currency subset be stored in it is described do not spend currency table, and confirm the ciphertext dealing money with it is described The ciphertext small change amount of money and the ciphertext total amount equal to digital cash in the currency subset;
The payment update module 308 is additionally operable to:The transaction currency is found according to the cryptographic Hash of the transaction currency Afterwards, by the transaction currency and its cryptographic Hash from the confirmation currency table move to it is described do not spend currency table, further according to After the cryptographic Hash of digital cash finds the currency in the currency subset in the currency subset, by the currency subset Currency and its cryptographic Hash from it is described do not spend currency table move to it is described spent currency table, and by the small change currency and The storage of its cryptographic Hash does not spend currency table to described.
Above-mentioned embodiment, does not form limiting the scope of the invention.Those skilled in the art should be bright It is white, depending on design requirement and other factors, various modifications, combination, sub-portfolio and replacement can occur.It is any Modifications, equivalent substitutions and improvements made within the spirit and principles in the present invention etc., should be included in the scope of the present invention Within.

Claims (20)

  1. A kind of 1. method of commerce based on digital cash, it is characterised in that including:
    Gathering end the plaintext dealing money received is encrypted to obtain ciphertext dealing money, and generates described for verifying Gathering request is asked and broadcasted in first checking information of ciphertext dealing money, then generation gathering;In the gathering request Including the ciphertext dealing money and first checking information;
    Node confirms that the ciphertext dealing money meets rule after the gathering request is received, according to first checking information Then, block chain then is arrived into the gathering request storage, and according to the gathering request renewal currency table;
    The ciphertext is merchandised according to first checking information after the block chain gets the gathering request at payment end The amount of money is decrypted to obtain the plaintext dealing money, and calculated according to the plaintext dealing money and the currency table The plaintext small change amount of money, then the plaintext small change amount of money is encrypted to obtain the ciphertext small change amount of money, then generate for verifying Second checking information of the ciphertext small change amount of money, and generation transfer data structure, then generate payment request and broadcast The payment request;The payment request includes the ciphertext small change amount of money, second checking information and the transfer data Structure;
    Node confirms that the ciphertext dealing money meets rule after the payment request is received, according to second checking information Then, and the currency table according to the transfer data structural confirmation meets rule, then arrives the payment request storage The block chain, and the currency table according to the transfer data topology update.
  2. 2. according to the method for claim 1, it is characterised in that gathering end the plaintext dealing money received is encrypted with The step of obtaining ciphertext dealing money includes:
    Gathering end generates the transaction private key that this gathering uses;
    Gathering end storage basic point value, and the basic point value is encrypted using basic point AES and calculates and then obtain basic point Check value;
    End collect money according to the formula q=xG+mH calculating ciphertext dealing money;Wherein, q is the ciphertext dealing money, and x is institute Transaction private key is stated, m is the plaintext dealing money received, and G is the basic point value, and H is the basic point check value.
  3. 3. according to the method for claim 2, it is characterised in that
    First checking information, which includes the first transaction, to be proved;
    The step of gathering end generates the first checking information for verifying the ciphertext dealing money includes:
    The plaintext dealing money m is carried out binary system fractionation by gathering end according to presetting digit capacity n, to obtain Wherein mi=2iOr mi=0, i represent index bit, and 0≤i < n;
    Gathering end is split the transaction private key x according to presetting digit capacity n at random, to obtainWherein x0Extremely xn-2Random generation,
    End collect money for each index bit, according to P (xi,mi)=xiG+miH and P (xi,mi-ki)=xiG+(mi-ki) H calculating P (xi,mi) and P (xi,mi-ki);Wherein ki=2i
    End collect money for index bit each described, uses the xi, P (the xi,mi) and the P (xi,mi-ki) generate the rope Draw the ring signatures S of positioni
    Collect money end by whole the index bit, the P (xi,mi), the P (xi,mi-ki) and the SiSpliced to obtain First transaction proves.
  4. 4. according to the method for claim 3, it is characterised in that node confirms the ciphertext according to first checking information The legal step of dealing money includes:
    Node is disassembled first transaction and proved, to obtain whole index bits, the P (xi,mi), the P (xi,mi- ki) and the Si
    Node is confirmed for index bit each described, the SiFor the P (xi,mi) and the P (xi,mi-ki) ring signatures, And confirm for index bit each described, meet P (xi,mi)-P(xi,mi-ki)=kiH, then confirm to meetTo confirm that the ciphertext dealing money meets rule;Wherein ki=2i
  5. 5. according to the method for claim 2, it is characterised in that
    First checking information includes the first communication information;
    The step of gathering end generates the first checking information for verifying the ciphertext dealing money includes:
    Gathering end generation gathering end fixed private, obtains payment end fixed public, and use the basic point AES to institute Calculating is encrypted to obtain shared key in the product for stating gathering end fixed private and the payment end fixed public, then by institute State literary dealing money clearly with the transaction private key to be spliced, reuse the shared key and spliced result is encrypted Calculate to generate first communication information.
  6. 6. according to the method for claim 5, it is characterised in that payment end is according to first checking information to the ciphertext Dealing money is decrypted to include the step of obtaining the plaintext dealing money:
    Payment end stores the basic point value, and the basic point value is encrypted using the basic point AES and is calculated The basic point check value;
    Payment end generation payment end fixed private, obtains gathering end fixed public, and use the basic point AES to institute Calculating is encrypted to obtain shared key in the product for stating payment end fixed private and the gathering end fixed public, then splits First communication information is decrypted using the shared key result of calculating to obtain the plaintext dealing money.
  7. 7. according to the method for claim 1, it is characterised in that payment end is according to the plaintext dealing money and the currency The step of list calculating plaintext small change amount of money, includes:
    Payment end select beneficiary for end and the plaintext total amount of paying the bill more than or equal to stating clearly from the currency table Then the digital cash of literary dealing money forms the currency subset, then subtracting the plaintext with the plaintext total amount merchandises The amount of money is to obtain the plaintext small change amount of money.
  8. 8. according to the method for claim 7, it is characterised in that
    The gathering request includes transaction currency, and the ciphertext dealing money and first checking are included in the transaction currency Information;The payment request includes small change currency, is tested in the small change currency comprising the ciphertext small change amount of money and described second Demonstrate,prove information;
    The step of payment end generation transfer data structure, includes:
    It is each in cryptographic Hash of the end generation comprising the transaction currency, the cryptographic Hash of the small change currency and the currency subset of paying the bill The transfer data structure of the cryptographic Hash of digital cash.
  9. 9. according to the method for claim 8, it is characterised in that
    Before node is according to the step of gathering request renewal currency table, in addition to:Node is established for storing currency, currency The currency table of cryptographic Hash and the two corresponding relation;The currency table includes not spending currency table in currency table, confirmation Currency table is spent;
    Node includes according to the step of gathering request renewal currency table:Node is by the transaction currency and the transaction goods The cryptographic Hash of coin stores the currency table into the confirmation;
    Before the step of payment request storage is arrived the block chain by node, in addition to:Node is according to the transaction currency Cryptographic Hash is searched and confirms that the transaction currency is stored in currency table in the confirmation, further according to digital in the currency subset The cryptographic Hash of currency is searched and confirms that the digital cash in the currency subset does not spend currency table described in being stored in, and really Recognize the ciphertext dealing money with it is the ciphertext small change amount of money and always golden equal to the ciphertext of digital cash in the currency subset Volume;
    Node includes according to the transfer data topology update the step of currency table:Node is according to the transaction currency After cryptographic Hash finds the transaction currency, by the transaction currency and its cryptographic Hash, currency table moves to institute from the confirmation State and do not spend currency table, goods in the currency subset is found further according to the cryptographic Hash of digital cash in the currency subset After coin, the currency in the currency subset and its cryptographic Hash are not spent currency table to move to described to have spent currency to arrange from described Table, and the small change currency and its cryptographic Hash storage are not spent into currency table to described.
  10. A kind of 10. transaction system based on digital cash, it is characterised in that including:
    Dealing money encrypting module, for being encrypted the plaintext dealing money received to obtain ciphertext dealing money;
    First checking information generation module, for generating the first checking information for being used for verifying the ciphertext dealing money;
    Gathering request sending module, for generating gathering request and broadcasting gathering request;The gathering request includes institute State ciphertext dealing money and first checking information;
    Gathering request receiving module, for receiving the gathering request;
    Dealing money deciphering module, for being decrypted the ciphertext dealing money to obtain according to first checking information The plaintext dealing money;
    Small change amount of money computing module, for calculating the plaintext small change amount of money according to the plaintext dealing money and the currency table;
    Small change amount of money encrypting module, for the plaintext small change amount of money to be encrypted to obtain the ciphertext small change amount of money;
    Second checking information generation module, for generating the second checking information for being used for verifying the ciphertext small change amount of money;
    Transfer data structural generation module, for generating transfer data structure;
    Payment request sending module, for generating payment request and broadcasting the payment request;The payment request includes institute State the ciphertext small change amount of money, second checking information and the transfer data structure.
  11. 11. device according to claim 10, it is characterised in that the dealing money encrypting module is additionally operable to:Generation is originally The secondary transaction private key used of collecting money;Basic point value is stored, and calculating is encrypted to the basic point value using basic point AES To obtain basic point check value;The ciphertext dealing money is calculated according to formula q=xG+mH;Wherein, q is the ciphertext trade gold Volume, x are the transaction private key, and m is the plaintext dealing money received, and G is the basic point value, and H is the basic point check value.
  12. 12. device according to claim 11, it is characterised in that
    First checking information, which includes the first transaction, to be proved;
    The first checking information generation module is additionally operable to:The plaintext dealing money m is subjected to binary system according to presetting digit capacity n Split, to obtainWherein mi=2iOr mi=0, i represent index bit, and 0≤i < n;The transaction is private Key x is split at random according to presetting digit capacity n, to obtainWherein x0To xn-2Random generation,For each index bit, according to P (xi,mi)=xiG+miH and P (xi,mi-ki)=xiG+(mi-ki)H Calculate P (xi,mi) and P (xi,mi-ki);Wherein ki=2i;For index bit each described, the x is usedi, P (the xi, mi) and the P (xi,mi-ki) generate the ring signatures S of the index biti;By the index bit of whole, the P (xi,mi), it is described P(xi,mi-ki) and the SiSpliced is proved with obtaining first transaction.
  13. 13. device according to claim 11, it is characterised in that
    First checking information includes the first communication information;
    The first checking information generation module is additionally operable to:Generation gathering end fixed private, payment end fixed public is obtained, and Meter is encrypted to the product of the gathering end fixed private and the payment end fixed public using the basic point AES Calculate to obtain shared key, then spliced the plaintext dealing money and the transaction private key, reuse described shared Key spliced result is encrypted calculating to generate first communication information.
  14. 14. device according to claim 13, it is characterised in that the dealing money deciphering module is additionally operable to:Storage institute Basic point value is stated, and the basic point value is encrypted using the basic point AES basic point check value is calculated; Generation payment end fixed private, gathering end fixed public is obtained, and the payment end is consolidated using the basic point AES Determine private key and calculating is encrypted to obtain shared key in the product of the gathering end fixed public, then split using described common Enjoy key and first communication information is decrypted the result of calculating to obtain the plaintext dealing money.
  15. 15. device according to claim 10, it is characterised in that the small change amount of money computing module is additionally operable to:From described Beneficiary is selected to be more than or equal to the numeral of the plaintext dealing money for the payment end and plaintext total amount in currency table Then currency forms the currency subset, then subtract the plaintext dealing money with the plaintext total amount to obtain looking in plain text Fractionl amount.
  16. 16. device according to claim 15, it is characterised in that
    The gathering request includes transaction currency, and the ciphertext dealing money and first checking are included in the transaction currency Information;The payment request includes small change currency, is tested in the small change currency comprising the ciphertext small change amount of money and described second Demonstrate,prove information;
    The transfer data structural generation module is additionally operable to:Cryptographic Hash of the generation comprising the transaction currency, the small change currency Cryptographic Hash and the currency subset in each digital cash cryptographic Hash transfer data structure.
  17. A kind of 17. transaction system based on digital cash, it is characterised in that including:
    Gathering request receiving module, for receiving gathering request;The gathering request includes ciphertext dealing money and the first checking Information;
    Gathering requests verification module, for confirming that the ciphertext dealing money meets rule according to first checking information;
    Gathering is asked into chain module, for the gathering request storage to be arrived into block chain;
    Gathering update module, for according to the gathering request renewal currency table;
    Payment request receiving module, for receiving payment request;The payment request includes the ciphertext small change amount of money, the second checking letter Breath and transfer data structure;
    Payment request authentication module, for confirming that the ciphertext dealing money meets rule according to second checking information, with And the currency table according to the transfer data structural confirmation meets rule;
    Payment request enters chain module, for payment request storage to be arrived into the block chain;
    Payment update module, for the currency table according to the transfer data topology update.
  18. 18. device according to claim 17, it is characterised in that
    First checking information, which includes the first transaction, to be proved;
    The gathering requests verification module is additionally operable to:Disassembling first transaction proves, to obtain whole index bit i, P (xi, mi)、P(xi,mi-ki) and Si;Confirm for index bit each described, the SiFor the P (xi,mi) and the P (xi,mi- ki) ring signatures, and confirm for index bit each described, meet P (xi,mi)-P(xi,mi-ki)=kiH, then confirm MeetTo confirm that the ciphertext dealing money meets rule;Wherein q is the ciphertext dealing money, ki=2i
  19. 19. device according to claim 17, it is characterised in that described device also establishes module including currency table, its In,
    The currency table establish module be used for establish be used for store currency, currency cryptographic Hash and the two corresponding relation currency arrange Table;The currency table includes not spending currency table in currency table, confirmation and has spent currency table;
    The gathering request includes transaction currency, and the ciphertext dealing money and first checking are included in the transaction currency Information;The payment request includes small change currency, is tested in the small change currency comprising the ciphertext small change amount of money and described second Demonstrate,prove information;
    The gathering update module is additionally operable to:The confirmation is arrived into the storage of the cryptographic Hash of the transaction currency and the transaction currency Middle currency table;
    The transfer data structure, which includes the cryptographic Hash of the transaction currency, the transfer data structure, also includes small change currency The cryptographic Hash of digital cash in cryptographic Hash and the currency subset;
    The payment request authentication module is additionally operable to:Searched according to the cryptographic Hash of the transaction currency and confirm the transaction currency Currency table in the confirmation is stored in, is searched further according to the cryptographic Hash of digital cash in the currency subset and confirms the goods Currency in coin subset does not spend currency table described in being stored in, and confirms the ciphertext dealing money and the ciphertext small change The amount of money and the ciphertext total amount equal to digital cash in the currency subset;
    The payment update module is additionally operable to:After finding the transaction currency according to the cryptographic Hash of the transaction currency, by institute State transaction currency and its cryptographic Hash currency table from the confirmation move to it is described do not spend currency table, further according to the currency After the cryptographic Hash of digital cash finds the currency in the currency subset in subset, by the currency in the currency subset and its Cryptographic Hash from it is described do not spend currency table move to it is described spent currency table, and by the small change currency and its cryptographic Hash Store and described do not spend currency table.
  20. 20. a kind of computer-readable recording medium, computer instruction is stored with the computer-readable recording medium, its feature It is, the computer instruction can be run by computer or computer system, so that the computer or computer system energy Enough perform claims require the method any one of 1-9.
CN201710494860.9A 2017-06-26 2017-06-26 Transaction method and device based on digital currency Active CN107358424B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710494860.9A CN107358424B (en) 2017-06-26 2017-06-26 Transaction method and device based on digital currency

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710494860.9A CN107358424B (en) 2017-06-26 2017-06-26 Transaction method and device based on digital currency

Publications (2)

Publication Number Publication Date
CN107358424A true CN107358424A (en) 2017-11-17
CN107358424B CN107358424B (en) 2020-09-29

Family

ID=60273637

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710494860.9A Active CN107358424B (en) 2017-06-26 2017-06-26 Transaction method and device based on digital currency

Country Status (1)

Country Link
CN (1) CN107358424B (en)

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108009441A (en) * 2017-11-23 2018-05-08 阿里巴巴集团控股有限公司 Resource transfers and the method and apparatus of fund transfer
CN108241979A (en) * 2017-12-20 2018-07-03 深圳壹账通智能科技有限公司 More account book transfer account methods, electronic device and readable storage medium storing program for executing based on block chain
CN108335106A (en) * 2018-01-24 2018-07-27 深圳壹账通智能科技有限公司 The more account books of Zero Knowledge based on block chain exchange transfer account method, device and storage medium
CN108418689A (en) * 2017-11-30 2018-08-17 矩阵元技术(深圳)有限公司 A kind of the zero-knowledge proof method and medium of suitable block chain secret protection
CN108805574A (en) * 2018-05-19 2018-11-13 深圳市图灵奇点智能科技有限公司 Method of commerce based on secret protection and system
CN108854077A (en) * 2018-07-17 2018-11-23 广州瞪羚信息科技有限公司 Across game item circulation method based on block chain technology
CN108985760A (en) * 2018-06-15 2018-12-11 杭州复杂美科技有限公司 Method of payment and system, equipment and storage medium
CN108985752A (en) * 2018-06-29 2018-12-11 杭州复杂美科技有限公司 A kind of method of payment and system, equipment and storage medium
CN109285073A (en) * 2018-09-29 2019-01-29 数字钱包(北京)科技有限公司 Digital cash method of commerce and device
CN109472602A (en) * 2018-11-23 2019-03-15 全链通有限公司 A kind of method, a kind of node and a kind of block catenary system of verifying transaction
CN109658216A (en) * 2018-12-14 2019-04-19 深圳美图创新科技有限公司 Block chain moneytary operations method and device
WO2019118123A1 (en) * 2017-12-13 2019-06-20 Mastercard International Incorporated Method and system for consumer-initiated transactions using encrypted tokens
CN110335042A (en) * 2019-06-26 2019-10-15 阿里巴巴集团控股有限公司 Anonymous deal method and device based on ring signatures
WO2020034151A1 (en) * 2018-08-16 2020-02-20 区链通网络有限公司 Block chain inter-node communication method and apparatus, and storage medium and block chain system
CN111222860A (en) * 2020-04-15 2020-06-02 傲林科技有限公司 Data asset processing method and device
WO2020177496A1 (en) * 2019-03-01 2020-09-10 中国银联股份有限公司 Transaction management method and apparatus based on associated transaction rule
US10790990B2 (en) 2019-06-26 2020-09-29 Alibaba Group Holding Limited Ring signature-based anonymous transaction
CN111738712A (en) * 2020-07-17 2020-10-02 百度在线网络技术(北京)有限公司 Payment processing method, device, equipment and medium for block chain
WO2020253108A1 (en) * 2019-06-21 2020-12-24 深圳壹账通智能科技有限公司 Information hiding method, apparatus, device, and storage medium
WO2020258851A1 (en) * 2019-06-26 2020-12-30 创新先进技术有限公司 Method and apparatus for implementing confidential blockchain transaction by using ring signature

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104392354A (en) * 2014-11-05 2015-03-04 中国科学院合肥物质科学研究院 Association and retrieval method and system used for public key addresses and user accounts of crypto-currency
CN106503994A (en) * 2016-11-02 2017-03-15 西安电子科技大学 Block chain private data access control method based on encryption attribute
CN106549749A (en) * 2016-12-06 2017-03-29 杭州趣链科技有限公司 A kind of block chain method for secret protection encrypted based on additive homomorphism
CN106548330A (en) * 2016-10-27 2017-03-29 上海亿账通区块链科技有限公司 Transaction verification method and system based on block chain
CN106651331A (en) * 2016-12-22 2017-05-10 飞天诚信科技股份有限公司 Digital currency-based electronic transaction method and system
CN106779707A (en) * 2016-12-23 2017-05-31 中钞信用卡产业发展有限公司北京智能卡技术研究院 Monitoring and managing method, the apparatus and system of the digital cash Transaction Information based on block chain

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104392354A (en) * 2014-11-05 2015-03-04 中国科学院合肥物质科学研究院 Association and retrieval method and system used for public key addresses and user accounts of crypto-currency
CN106548330A (en) * 2016-10-27 2017-03-29 上海亿账通区块链科技有限公司 Transaction verification method and system based on block chain
CN106503994A (en) * 2016-11-02 2017-03-15 西安电子科技大学 Block chain private data access control method based on encryption attribute
CN106549749A (en) * 2016-12-06 2017-03-29 杭州趣链科技有限公司 A kind of block chain method for secret protection encrypted based on additive homomorphism
CN106651331A (en) * 2016-12-22 2017-05-10 飞天诚信科技股份有限公司 Digital currency-based electronic transaction method and system
CN106779707A (en) * 2016-12-23 2017-05-31 中钞信用卡产业发展有限公司北京智能卡技术研究院 Monitoring and managing method, the apparatus and system of the digital cash Transaction Information based on block chain

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019100865A1 (en) * 2017-11-23 2019-05-31 阿里巴巴集团控股有限公司 Resource transfer and capital transfer method and apparatus
CN108009441A (en) * 2017-11-23 2018-05-08 阿里巴巴集团控股有限公司 Resource transfers and the method and apparatus of fund transfer
CN108418689A (en) * 2017-11-30 2018-08-17 矩阵元技术(深圳)有限公司 A kind of the zero-knowledge proof method and medium of suitable block chain secret protection
WO2019118123A1 (en) * 2017-12-13 2019-06-20 Mastercard International Incorporated Method and system for consumer-initiated transactions using encrypted tokens
CN108241979A (en) * 2017-12-20 2018-07-03 深圳壹账通智能科技有限公司 More account book transfer account methods, electronic device and readable storage medium storing program for executing based on block chain
CN108241979B (en) * 2017-12-20 2021-03-16 深圳壹账通智能科技有限公司 Multi-account book transfer method based on block chain, electronic device and readable storage medium
CN108335106A (en) * 2018-01-24 2018-07-27 深圳壹账通智能科技有限公司 The more account books of Zero Knowledge based on block chain exchange transfer account method, device and storage medium
CN108805574A (en) * 2018-05-19 2018-11-13 深圳市图灵奇点智能科技有限公司 Method of commerce based on secret protection and system
CN108985760A (en) * 2018-06-15 2018-12-11 杭州复杂美科技有限公司 Method of payment and system, equipment and storage medium
CN108985752A (en) * 2018-06-29 2018-12-11 杭州复杂美科技有限公司 A kind of method of payment and system, equipment and storage medium
CN108854077A (en) * 2018-07-17 2018-11-23 广州瞪羚信息科技有限公司 Across game item circulation method based on block chain technology
WO2020034151A1 (en) * 2018-08-16 2020-02-20 区链通网络有限公司 Block chain inter-node communication method and apparatus, and storage medium and block chain system
CN109285073A (en) * 2018-09-29 2019-01-29 数字钱包(北京)科技有限公司 Digital cash method of commerce and device
CN109472602A (en) * 2018-11-23 2019-03-15 全链通有限公司 A kind of method, a kind of node and a kind of block catenary system of verifying transaction
CN109658216A (en) * 2018-12-14 2019-04-19 深圳美图创新科技有限公司 Block chain moneytary operations method and device
WO2020177496A1 (en) * 2019-03-01 2020-09-10 中国银联股份有限公司 Transaction management method and apparatus based on associated transaction rule
WO2020253108A1 (en) * 2019-06-21 2020-12-24 深圳壹账通智能科技有限公司 Information hiding method, apparatus, device, and storage medium
WO2020258851A1 (en) * 2019-06-26 2020-12-30 创新先进技术有限公司 Method and apparatus for implementing confidential blockchain transaction by using ring signature
US10790990B2 (en) 2019-06-26 2020-09-29 Alibaba Group Holding Limited Ring signature-based anonymous transaction
CN110335042B (en) * 2019-06-26 2020-10-20 创新先进技术有限公司 Anonymous transaction method and device based on ring signature
CN110335042A (en) * 2019-06-26 2019-10-15 阿里巴巴集团控股有限公司 Anonymous deal method and device based on ring signatures
CN111222860A (en) * 2020-04-15 2020-06-02 傲林科技有限公司 Data asset processing method and device
CN111738712A (en) * 2020-07-17 2020-10-02 百度在线网络技术(北京)有限公司 Payment processing method, device, equipment and medium for block chain

Also Published As

Publication number Publication date
CN107358424B (en) 2020-09-29

Similar Documents

Publication Publication Date Title
US10880095B2 (en) Electronic apparatus, method for electronic apparatus and information processing system
US10693658B2 (en) Methods and systems for using digital signatures to create trusted digital asset transfers
US10129020B2 (en) Efficient methods for protecting identity in authenticated transmissions
JP2020145733A (en) Method for managing a trusted identity
US20200274700A1 (en) Determining a common secret for the secure exchange of information and hierarchical, deterministic cryptographic keys
US10204339B2 (en) Method and system for blockchain-based combined identity, ownership, integrity and custody management
CN106664206B (en) Efficient method for authenticated communication
JP6794527B2 (en) Computer system using secure ledger distribution method and secure distributed ledger technology
EP3576033A1 (en) Secure transaction method based on block chain, electronic device, system, and storage medium
Watanabe et al. Blockchain contract: A complete consensus using blockchain
CN106549749B (en) Block chain privacy protection method based on addition homomorphic encryption
JP6483827B2 (en) Agreement agreement method, agreement verification method, agreement agreement system, agreement validation device, agreement agreement device, agreement agreement program and agreement validation program
US10489757B2 (en) System and method for rendering virtual currency related services
WO2019080933A1 (en) Block chain transaction privacy protection method and system
KR101628005B1 (en) Copyright detection system that is based on the block chain
KR101673073B1 (en) Dealing method of Crypto-currency base on Blockchain System
KR101964254B1 (en) Person to person trading method and apparatus by using blockchain and distributed hash table
EP3420669B1 (en) Cryptographic method and system for secure extraction of data from a blockchain
US20170046680A1 (en) Peer-to-Peer Internet Shopping Marketplaces
US20180268386A1 (en) Identity Management Distributed Ledger and Blockchain
JP2019511147A (en) Method implemented by a block chain for control and distribution of digital content
US10410209B2 (en) Electronic transaction system and method with participant authentication via separate authority from real-time payment validation
US20180204192A1 (en) Secure Digital Data Operations
KR20180014534A (en) Verification system and method for transaction based block chain
JP2019511150A (en) System and method for controlling asset related activities via blockchain

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