A kind of encryption currency extraction method and system
Technical field
The present embodiments relate to encryption currency extractive technique fields, and in particular to a kind of encryption currency extraction method
And system.
Background technique
In recent years, with the encryption currency based on block chain technology it is widely used, the interconnection of more and more B2C modes
Net platform starts to support encryption currency such as bit coin, ether mill etc., and the member on these platforms uses encryption currency payment platform
On service, member can also pay energy earning encryption money income in platform, these platforms usually save in the database
The account balance of platform member, member can reduce remaining sum when platform is consumed, and member, which has earned encryption currency, will increase remaining sum.Cause
This platform needs to provide the extraction system for supporting encryption currency, this system is also the hot money packet of platform, and member can fill
The corresponding encryption currency of remaining sum can also be extracted personal encryption currency wallet to remaining sum by value encryption currency.Encryption currency fills
Value is one, and to enter golden direction fairly simple, and platform provides address to member, and platform encryption currency can guarantee safely, and add
Close currency extraction belongs to the outlet of platform fund, guarantees that encryption money-capital is extremely important safely.
These existing internet platform common practices are using the complete with block chain of some encryption currency official offer
The encryption currency wallet of node extracts encryption currency to complete member, and the extracting mode of this encryption currency has following defects that
(1) this wallet is the encryption full node wallet of currency, and wallet private key and the full node of block chain can not be accomplished to separate, wallet
There is the security risk touched net in private key, once there are security breaches to be broken through by hacker, the service where hacker from encryption currency wallet
Device takes wallet private key, then all encryption currency in wallet may all be stolen by hacker;
(2) in order to realize the automation for encrypting currency and extracting, the prior art is to call wallet to provide by operation system
Interface realize currency extract, the access interface of wallet can be exposed in this way, once call permission maliciously controlled, exist
The danger that the cryptographic assets of wallet may be extracted maliciously.
Summary of the invention
For this purpose, the embodiment of the present invention provides a kind of encryption currency extraction method and system, using a kind of transaction, label
Name, the system structure of block data separation, the full node of block chain and wallet with P2P Network Synchronization are separated, guarantee wallet not
Net-fault prevents external risk of attacks, shields operation system and calls directly wallet interface, can prevent wallet interface from calling permission
It is maliciously controlled and is called, avoided from platform interior risk of attacks, to solve the problems of the prior art.
To achieve the goals above, embodiments of the present invention provide the following technical solutions: a kind of encryption currency mentions automatically
Take system, including Transaction apparatus, signature machine and Node station;
The Node station is the full node of block chain network for encrypting currency, synchronous with the P2P network holding of block chain, for obtaining
Take newest block data information and Transaction Information;
The responsible extraction request that encryption currency is obtained from operation system of the Transaction apparatus, and generate the coin that mentions unsigned and hand over
Easily;
The wallet private key of the signature machine storage encryption is responsible for receiving the trading signature request from Transaction apparatus, will sign
Transaction afterwards sends back Transaction apparatus.
As a preferred solution of the present invention, the Transaction apparatus obtains the encryption currency of operation system by polling mode
Request is extracted, after the validity of solicited message is extracted in verifying, generates the transaction of unsigning of encryption currency.
As a preferred solution of the present invention, the Transaction apparatus, which will unsign, proposes coin transaction and issues signature machine and sign
Certification, while the signature of the also receivable signature machine of the Transaction apparatus proposes coin transaction, and the coin transaction that mentions signed is forwarded to
Node station broadcast.
As a preferred solution of the present invention, the Transaction apparatus does not receive other systems and directly accesses, the Transaction apparatus
Accessible Node station and signature machine, and the signature machine only receives Transaction apparatus access.
As a preferred solution of the present invention, the Node station can efficient lookup block chain status data, the transaction
Machine obtains block data out of Node station, inquires the All Activity information of user.
In addition the present invention also provides a kind of encryption currency extraction method, include the following steps:
Step 100, business end occur to extract encryption currency operations, and operation system generates currency record to be extracted, and to goods
Coin recording mark to be extracted goes out anti-tamper signature;
Step 200, Transaction apparatus pull currency record to be extracted out of operation system, and verify the true and false of anti-tamper signature;
Step 300, Transaction apparatus construct encryption Money transfer to be signed according to the record information to be extracted after anti-tamper signature
Transaction, and Transaction apparatus is sent to signature machine for money transfer transaction is encrypted by coded communication agreement;
The validity of step 400, signature machine verifying transaction identity and encryption money transfer transaction to be signed, in real time from label
Private key is extracted in the encryption key file of name machine local, money transfer transactions to be signed are signed, generates signature money transfer transactions,
And the transfer transaction information signed is retransmitted to Transaction apparatus;
Step 500, Transaction apparatus receive the signature money transfer transactions of signature machine return, the interface for calling Node station to provide, will
Moneytary operations of having signed is broadcast to block chain network, completes the extraction of encryption currency.
As a preferred solution of the present invention, in step 100, the operation system with website members for directly handing over
Mutually, receive website members submission encryption currency extract list, and will encryption currency extract list be assembled into encryption currency it is automatic
The acceptable record format to be extracted of extraction system.
As a preferred solution of the present invention, in step 300, when constructing encryption money transfer transaction to be signed, lead to
Often need what is possessed on query node verification platform ideal money address not spend transaction set.
As a preferred solution of the present invention, in step 500, the Transaction apparatus transaction that will sign is broadcast to block
Chain network, the transaction of having signed are added to a block of Node station.
As a preferred solution of the present invention, in step 500, when Transaction apparatus is broadcasted by the interface that Node station provides
It has signed after transaction to block chain network, Transaction apparatus notice operation system transaction is sent successfully.
Embodiments of the present invention have the advantages that
(1) system structure that encryption currency extraction system of the invention is separated using a kind of transaction, signature, block data,
The full node of block chain and wallet are separated, guaranteeing that wallet is not touched net prevents external risk of attacks;
(2) operation system is shielded in encryption currency extraction system of the invention and call directly wallet interface, can prevent
Wallet interface calls permission maliciously to be controlled and called, and avoids from platform interior risk of attacks.
Detailed description of the invention
It, below will be to embodiment party in order to illustrate more clearly of embodiments of the present invention or technical solution in the prior art
Formula or attached drawing needed to be used in the description of the prior art are briefly described.It should be evident that the accompanying drawings in the following description is only
It is merely exemplary, it for those of ordinary skill in the art, without creative efforts, can also basis
The attached drawing of offer, which is extended, obtains other implementation attached drawings.
Structure depicted in this specification, ratio, size etc., only to cooperate the revealed content of specification, for
Those skilled in the art understands and reads, and is not intended to limit the invention enforceable qualifications, therefore does not have technical
Essential meaning, the modification of any structure, the change of proportionate relationship or the adjustment of size are not influencing the function of the invention that can be generated
Under effect and the purpose that can reach, should all still it fall in the range of disclosed technology contents obtain and can cover.
Fig. 1 is the structural block diagram that the present invention extracts encryption money-system;
Fig. 2 is the structural block diagram that the present invention extracts encryption monetary method;
Fig. 3 is the operation chart that the present invention extracts encryption monetary method.
Specific embodiment
Embodiments of the present invention are illustrated by particular specific embodiment below, those skilled in the art can be by this explanation
Content disclosed by book is understood other advantages and efficacy of the present invention easily, it is clear that described embodiment is the present invention one
Section Example, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not doing
Every other embodiment obtained under the premise of creative work out, shall fall within the protection scope of the present invention.
As shown in Figure 1, the present invention provides a kind of encryption currency automatic extracting system, including Transaction apparatus, signature machine and section
Point machine.Transaction apparatus of the present invention, three block chains of machine and Node station of signing full node be discrete state, and the area of Network Synchronization
The full node of block chain and wallet separation, guarantee that signature machine is not touched net, to prevent wallet private key by external risk of attacks.
Node station is the full node of block chain network for encrypting currency, synchronous with the P2P network holding of block chain, for obtaining most
New block data information and Transaction Information, block data are specifically referred to by the account book data of all nodes sharings, and Node station can
Efficient lookup block chain status data.
Herein it should be noted that P2P (peer-to-peer) network is also known as peer to peer network or point-to-point net
Network, this is a kind of non-stop layer server, the Generation Internet for swapping information by user group completely, P2P network each
User is a client, while also having the function of server.
It is both client and server using every computer that P2P technology is realized, their function is all equity
's.For being mounted with that a common P2P network is added in the computer of P2P software, between the node in network can directly into
The transmission of row data and communication.
Therefore the Node station, Transaction apparatus of present embodiment and signature machine use the same P2P network, between each other can be straight
It connects and carries out data transmission and communicate.
Transaction apparatus is responsible for obtaining the extraction request of encryption currency from operation system, and generates the currency unsigned and propose coin friendship
Easily, Transaction apparatus does not receive other systems and directly accesses, and the accessible Node station of Transaction apparatus and signature machine, and machine of signing only connects
It is accessed by Transaction apparatus.
The wallet private key of signature machine storage encryption is responsible for receiving the trading signature request from Transaction apparatus, after signature
Transaction sends back Transaction apparatus.
Transaction apparatus and signature machine are mainly responsible for the response processing that request is extracted to currency, and Transaction apparatus is obtained by polling mode
The encryption currency of operation system extracts request, after the validity of solicited message is extracted in verifying, generates the friendship of unsigning of encryption currency
Easily, and by the coin transaction that mentions unsigned signature machine progress signature authentication is issued.
After the completion of signature, the signature that Transaction apparatus reversely receives signature machine proposes coin transaction, and proposes coin transaction for what is signed
It is forwarded to Node station broadcast, completes the extraction of encryption currency, Transaction apparatus can obtain block data out of Node station, inquire user
All Activity information.
According to the extraction process of above-mentioned encryption currency it is found that in entire currency extraction process, data transmission only mentions coin
Transaction Information table, therefore whole system is extracted in process of exchange in currency, not by the way of exposure outside wallet interface, but is adopted
With the communication mode of the record to be extracted inversely pulled in operation system, therefore guarantee that signature machine is not touched net, hot money can be protected
Packet system is from external attack.
In order to refine the work step of automatic extracting system, as shown in Figures 2 and 3, the present invention also provides a kind of encryptions
Currency extraction method, includes the following steps:
Step 100, business end occur to extract encryption currency operations, and operation system generates currency record to be extracted, and to goods
The anti-tamper signature of coin recording mark to be extracted.
For operation system for directly interacting with website members, the encryption currency for receiving website members submission extracts list, and
Encryption currency is extracted into list and is assembled into the encryption acceptable record format to be extracted of currency automatic extracting system, generates currency
Transaction form to be extracted.
Step 200, Transaction apparatus pull currency record to be extracted out of operation system, and verify the true and false of anti-tamper signature.
Transaction apparatus verifies the true and false of currency record to be extracted, realizes the first class of protection in entire currency extraction process, if
It is to forge that Transaction apparatus, which verifies anti-tamper signature, then directly refusal currency extracts continuing for transaction, if Transaction apparatus is verified
Anti-tamper signature is the signature authentication operation that really can then carry out next step.
Step 300, Transaction apparatus construct encryption Money transfer to be signed according to the record information to be extracted after anti-tamper signature
Transaction, and Transaction apparatus is sent to signature machine for money transfer transaction is encrypted by coded communication agreement.
When constructing encryption money transfer transaction to be signed, it usually needs on query node verification platform ideal money address
What is possessed does not spend transaction set, if not spending the full amount of transaction set to be less than extracts amount, can carry out prompting operation.
The validity of step 400, signature machine verifying transaction identity and encryption money transfer transaction to be signed, in real time from label
Private key is extracted in the encryption key file of name machine local, is signed to money transfer transactions to be signed, signature money transfer transactions are generated,
And the transfer transaction information signed is retransmitted to Transaction apparatus.
When this step is signed, is extracted using inside signature machine using private key confirmation currency, it is straight to shield operation system
It connects and calls wallet interface, can prevent wallet interface from permission being called maliciously to be controlled and called, avoid attacking from platform interior
Risk.
And since transaction, signature, node block data are isolated system structure, encryption key cannot be by other
Structure arbitrarily call, therefore guarantee that wallet does not touch net and prevents external risk of attacks.
Step 500, Transaction apparatus receive the signature money transfer transactions of signature machine return, and the interface for calling Node station to provide is handed over
The easy machine money transfer transactions that will sign are broadcast to block chain network, complete the extraction of encryption currency.
In step 500, the Transaction apparatus money transfer transactions that will sign are broadcast to block chain network, the money transfer transactions of having signed
A block for being added to Node station forms block data, can retain transaction record, the inquiry in later period is facilitated to proofread.And when friendship
The interface broadcast that easy machine is provided by Node station has been signed after transaction to block chain network, and Transaction apparatus notifies the operation system pen to hand over
Easily send successfully.
Although above having used general explanation and specific embodiment, the present invention is described in detail, at this
On the basis of invention, it can be made some modifications or improvements, this will be apparent to those skilled in the art.Therefore,
These modifications or improvements without departing from theon the basis of the spirit of the present invention are fallen within the scope of the claimed invention.