CN109509099A - Data trade method and device calculates equipment, storage medium - Google Patents
Data trade method and device calculates equipment, storage medium Download PDFInfo
- Publication number
- CN109509099A CN109509099A CN201811611360.XA CN201811611360A CN109509099A CN 109509099 A CN109509099 A CN 109509099A CN 201811611360 A CN201811611360 A CN 201811611360A CN 109509099 A CN109509099 A CN 109509099A
- Authority
- CN
- China
- Prior art keywords
- data
- trade
- intelligent contract
- sender
- encryption
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/382—Payment protocols; Details thereof insuring higher security of transaction
- G06Q20/3829—Payment protocols; Details thereof insuring higher security of transaction involving key management
Landscapes
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Engineering & Computer Science (AREA)
- Finance (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Development Economics (AREA)
- Technology Law (AREA)
- Marketing (AREA)
- Economics (AREA)
- Computer Security & Cryptography (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
A kind of data trade method and device calculates equipment, storage medium, and the data trade method includes: that trade gold is locked in the intelligent contract when detecting the delivery operation for calling intelligent contract;When detecting the confirmation operation for calling the intelligent contract, obtains re-encrypted private key and the re-encrypted private key is verified;After described be verified, the trade gold is gone into the wallet address of data sender and notification data recipient obtains re-encryption data.It can be improved the safety of data trade using above-mentioned data trade method.
Description
Technical field
The present embodiments relate to field of computer technology more particularly to a kind of data trade method and device, calculating to set
Standby, storage medium.
Background technique
With the development of internet, online transaction is prevailing, and internet business becomes more and more people's preferred manner.Interconnection
Net transaction provides huge convenience, especially data trade for people's lives.
Currently, since both parties can not establish trusting relationship, needing the service of centralization flat in entire process of exchange
Platform transfer transactions data, and usually after completion of transactions, it is transferred accounts by the service platform of centralization.
However, the service platform using centralization carries out data trade, it is difficult to guarantee the safety of data trade.
Summary of the invention
The embodiment of the present invention solves the problems, such as it is how to improve the safety of data trade.
In order to solve the above technical problems, the embodiment of the present invention provides a kind of data trade method, comprising: called when detecting
When the delivery operation of intelligent contract, trade gold is locked in the intelligent contract;The intelligent contract is called when detecting
When confirmation operation, obtains re-encrypted private key and the re-encrypted private key is verified;After described be verified, by the friendship
Yi Jin goes to the wallet address of data sender and notification data recipient obtains re-encryption data;Wherein the intelligent contract is logical
The intelligent contract template generation of filling is crossed, the intelligence contract template includes: Transaction Information parameter and re-encryption parameter;And it is described
Re-encryption data are to carry out re-encryption using ciphertext data of the re-encrypted private key to the data sender to obtain, described close
Literary data are encrypted to obtain by the data sender to transaction data, and the re-encrypted private key is by the data sender benefit
It is generated with the private key of the data sender and the public key of the Data receiver.
Optionally, the Transaction Information parameter includes: the public affairs of the public key of the Data receiver, the data sender
It is handed over needed for key, the wallet address of the data sender, the ciphertext address data memory of the data sender and the transaction
The amount of Yi Jin.
Optionally, it includes: that the Data receiver is notified to obtain institute that the notification data recipient, which obtains re-encryption data,
State the data sender in intelligent contract ciphertext address data memory and the re-encrypted private key so that the data connect
Receipts person downloads the ciphertext data using the ciphertext address data memory, and using the re-encrypted private key obtained to described
Ciphertext data carry out re-encryption, obtain the re-encryption data.
Optionally, the ciphertext data of the data sender are stored in data trade platform.
Optionally, the Transaction Information parameter includes: the public affairs of the public key of the Data receiver, the data sender
The volume of trade gold needed for key, the ciphertext data of the data sender, the wallet address of the data sender and the transaction
Degree.
Optionally, the notification data recipient obtain re-encryption data include: the intelligent contract using described heavy plus
The ciphertext data of data sender described in close key pair carry out re-encryption, obtain the re-encryption data, and by the re-encryption
Data are saved into the intelligent contract;The Data receiver is notified to obtain the re-encryption number in the intelligent contract
According to.
Optionally, the intelligent contract is to believe the transaction for including in the purchase request of data of the Data receiver
The value of parameter is ceased, is generated after filling to the intelligent contract template.
Optionally, in the delivery operation for detecting the intelligent contract of calling, further includes: the intelligence conjunction is called in verification
Caller about is the Data receiver.
Optionally, in the delivery operation for detecting the intelligent contract of calling, further includes: verify the volume of the trade gold
Degree is the amount of trade gold needed for the transaction.
Optionally, in the confirmation operation for detecting the calling intelligent contract, further includes: the intelligence is called in verification
The caller of energy contract is the data sender.
Optionally, described that the re-encrypted private key is verified, comprising: to obtain public key, the institute of the data sender
State the public key of Data receiver and the fixed length random number of the re-encrypted private key;Splice the public key, described of the data sender
The fixed length random number of the public key of Data receiver and the re-encrypted private key, obtains splicing value;Hash is carried out to the splicing value
It calculates, obtains the cryptographic Hash of the splicing value;The cryptographic Hash for verifying the splicing value is the cryptographic Hash of the re-encrypted private key.
Optionally, close in the public key for the public key, the Data receiver for obtaining the data sender and the re-encryption
Before the fixed length random number of key, further includes: the total length for verifying the re-encrypted private key is preset length value.
Optionally, the intelligent contract is based on the intelligent contract template generation by data trade platform, and is deployed to area
On block chain.
The embodiment of the invention also provides a kind of data trade devices, comprising: the first storage unit is configured as storage and hands over
Easy information parameter;Second storage unit is configured as storage re-encryption parameter;Delivery operation unit, comprising: delivery operation is single
Member is configured as when detecting the delivery operation for calling intelligent contract, and trade gold is locked in the intelligent contract;Confirmation
Operating unit, comprising: confirmation operation handles subelement, is configured as when the confirmation operation for detecting the calling intelligent contract
When, it obtains re-encrypted private key and the re-encrypted private key is verified;Trade gold shifts subelement, is configured as described true
When recognizing operation processing subelement and being verified, the trade gold is gone to the wallet address of data sender;Notify subelement, quilt
It is configured to when the confirmation operation handles subelement and is verified, notification data recipient obtains re-encryption data;Wherein institute
Stating intelligent contract is by filling intelligent contract template generation, and the intelligence contract template includes the Transaction Information parameter and institute
State re-encryption parameter;And the re-encryption data are the ciphertext data using the re-encrypted private key to the data sender
It carries out re-encryption to obtain, the ciphertext data are encrypted to obtain by the data sender to transaction data, the re-encryption
Key is generated by the data sender using the private key of itself and the public key of the Data receiver.
Optionally, the Transaction Information parameter includes: the public affairs of the public key of the Data receiver, the data sender
It is handed over needed for key, the wallet address of the data sender, the ciphertext address data memory of the data sender and the transaction
The amount of Yi Jin.
Optionally, the notice subelement includes: the first notification module, is configured as that the Data receiver is notified to obtain
The ciphertext address data memory of the data sender in the intelligence contract and the re-encrypted private key, so that the data
Recipient downloads the ciphertext data using the ciphertext address data memory, and using the re-encrypted private key obtained to institute
It states ciphertext data and carries out re-encryption, obtain the re-encryption data.
Optionally, the ciphertext data of the data sender are stored in data trade platform.
Optionally, the Transaction Information parameter includes: the public affairs of the public key of the Data receiver, the data sender
The volume of trade gold needed for key, the ciphertext data of the data sender, the wallet address of the data sender and the transaction
Degree.
Optionally, the notice subelement includes: re-encryption module, be configured as the intelligent contract using described heavy plus
The ciphertext data of data sender described in close key pair carry out re-encryption, obtain the re-encryption data, and by the re-encryption
Data are saved into the intelligent contract;Second notification module is configured as that the Data receiver is notified to obtain the intelligence
The re-encryption data in contract.
Optionally, the intelligent contract is to believe the transaction for including in the purchase request of data of the Data receiver
The value of parameter is ceased, is generated after filling to intelligent contract template.
Optionally, the delivery operation unit, further includes: the first verification subelement is configured as verification and calls the intelligence
The caller of energy contract is the Data receiver.
Optionally, the delivery operation unit, further includes: the second verification subelement is configured as verifying the trade gold
Amount be the transaction needed for trade gold amount.
Optionally, the confirmation operation unit, further includes: third verifies subelement, is configured as verification and calls the intelligence
The caller of energy contract is the data sender.
Optionally, the confirmation operation handles subelement, comprising: obtains module, is configured as obtaining the data sending
The fixed length random number of the public key of person, the public key of the Data receiver and the re-encrypted private key;Splicing module is configured as spelling
The fixed length random number for connecing the public key of the data sender, the public key of the Data receiver and the re-encrypted private key, obtains
Splicing value;Hash calculation module is configured as carrying out Hash calculation to the splicing value, obtains the cryptographic Hash of the splicing value;
Correction verification module, the cryptographic Hash for being configured as verifying the splicing value is the cryptographic Hash of the re-encrypted private key.
Optionally, the confirmation operation handles subelement, further includes: total length authentication module is configured as obtaining described
The fixed length that modulus block obtains the public key of the data sender, the public key of the Data receiver and the re-encrypted private key is random
Before number, the total length for verifying the re-encrypted private key is preset length value.
The embodiment of the invention also provides a kind of calculating equipment, including memory and processor, stored on the memory
There is the computer instruction that can be run on the processor, the processor executes above-mentioned when running the computer instruction
The step of one data trade method.
The embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer instruction, described
The step of data trade method described in any of the above-described is executed when computer instruction is run.
Compared with prior art, the technical solution of the embodiment of the present invention has the advantages that
It, will when detecting the delivery operation for calling intelligent contract using the data trade method in the embodiment of the present invention
Trade gold is locked in intelligent contract, and when detecting the confirmation operation for calling the intelligent contract, obtains re-encrypted private key
And the re-encrypted private key is verified, and in described be verified, the trade gold is gone to the money of data sender
Packet address and notification data recipient obtain re-encryption data, delivery operation and the equal base of confirmation operation in above-mentioned entire process of exchange
It is carried out automatically in intelligent contract, therefore entire process of exchange does not have any third-party intervention, therefore data trade can be improved
Safety.
Further, the Transaction Information parameter includes: the public affairs of the public key of the Data receiver, the data sender
It is handed over needed for key, the wallet address of the data sender, the ciphertext address data memory of the data sender and the transaction
The amount of Yi Jin, by notifying the Data receiver to obtain the ciphertext data of the data sender in the intelligent contract
Storage address and the re-encrypted private key, so that the Data receiver is described close using ciphertext address data memory downloading
Literary data, and re-encryption is carried out to the ciphertext data using the re-encrypted private key obtained, the re-encryption data are obtained,
The transmission of any type of transaction data is thus not related in process of exchange, the Data receiver is handed over by above-mentioned data
The ciphertext address data memory of the available data sender of easy process, thus the safety of data trade can be improved,
Further, it is also possible to save the transfer resource of data transacting system.
Further, the Transaction Information parameter includes: the public affairs of the public key of the Data receiver, the data sender
The amount of trade gold needed for key, the data sender ciphertext data, the wallet address of the data sender and the transaction,
In this way, when the corresponding re-encrypted private key of re-encryption parameter for getting input and when calling the confirmation operation of the intelligent contract,
It obtains re-encrypted private key and the re-encrypted private key is verified, in described be verified, utilize the re-encrypted private key
Re-encryption is carried out to the ciphertext data of data sender, re-encryption data is obtained, the re-encryption data is saved to the intelligence
Can be in contract, and the trade gold is gone to the wallet address of the data sender, and described in notification data recipient obtains
Re-encryption data.Delivery operation and confirmation operation are based on intelligent contract and carry out automatically in above-mentioned process of exchange, therefore entire friendship
Easy process does not have any third-party intervention, therefore the safety of data trade can be improved.In addition, being stored by the intelligent contract
Ciphertext data and re-encryption is carried out to the ciphertext data, and obtained re-encryption data is saved, thus for small
The data of data volume need to only can be realized as re-encryption and the process of exchange of data, in turn by the automatic execution of intelligent contract
The efficiency of data trade can be improved.
Further, the intelligent contract is the Transaction Information that will include in the purchase data requirements of data receiver
The value of parameter automatically generates after filling to the intelligent contract template, convenient and efficient, and generating process is not necessarily to interact with the external world,
Therefore the safety of data trade can also be improved.
Further, when detecting the delivery operation for calling the intelligent contract, the intelligence is called to close by verification
Caller about is the Data receiver, can call the intelligent contract to avoid the Data receiver of personation, thus can be with
Guarantee that data trade both sides are the Data receiver and the data sender in the intelligent contract, therefore number can be improved
It, can also be to avoid user misoperation according to the safety of transaction.
Further, when detecting the delivery operation for calling the intelligent contract, by the volume for verifying the trade gold
Degree is the amount of trade gold needed for the transaction, can be to avoid the trade gold amount and the transaction that the Data receiver pays
The inconsistent situation of the amount of required trade gold thereby may be ensured that the Data receiver obtains the trade gold of correct amount,
Therefore it can guarantee the property safety of data trade.
Further, when detecting the confirmation operation for calling the intelligent contract, the intelligence is called by verification confirmation
The caller that can be checked is the data sender, the intelligent contract can be called to avoid the data sender of personation, in turn
It can guarantee that data trade both sides are the Data receiver and the data sender in the intelligent contract, therefore can mention
The safety of high data trade, can also be to avoid user misoperation.
Further, it by verifying the consistency of the cryptographic Hash of splicing value and the cryptographic Hash of re-encrypted private key, can determine
Whether re-encrypted private key passes through verifying, so as to avoid the re-encrypted private key using personation from carrying out re-encryption, and then can keep away
Exempt to trade in the case of re-encrypted private key is maliciously tampered, thus Transaction Disputes can be reduced to avoid transaction swindling, further
Improve the safety of data trade.
Further, since data trade platform has higher security level, thus by by the data sender
Ciphertext data be stored in the data trade platform, it is possible to reduce the case where ciphertext leaking data, occurs, therefore can be into
The safety of one step raising data trade.
Detailed description of the invention
Fig. 1 is a kind of flow chart of data trade method in the embodiment of the present invention;
Fig. 2 is a kind of flow chart of data trade method in the embodiment of the present invention;
Fig. 3 is a kind of flow chart of re-encrypted private key verifying in the embodiment of the present invention;
Fig. 4 is the flow chart of a kind of data trade method in the embodiment of the present invention in application scenarios;
Fig. 5 is the flow chart of another data trade method in the embodiment of the present invention;
Fig. 6 is the flow chart of the data trade method in the embodiment of the present invention in another application scenarios;
Fig. 7 is a kind of structural schematic diagram of data trade device in the embodiment of the present invention.
Specific embodiment
As stated in the background art, existing data trade method is difficult to avoid that transaction swindling, and data trade method needs excellent
Change.
In embodiments of the present invention, delivery operation and confirmation operation are carried out by intelligent contract automatically, can to trade
Process does not have any third-party involvement, and by avoiding transaction from taking advantage of the verification operation of re-encrypted private key in intelligent contract
Swindleness, improves the safety of data trade.
It is understandable to enable the above-mentioned purpose, feature and beneficial effect of the embodiment of the present invention to become apparent, below with reference to attached
Figure is described in detail specific embodiments of the present invention.
Fig. 1 is a kind of flow chart of data trade method in the embodiment of the present invention, is carried out below by way of specific steps detailed
Explanation.
Trade gold is locked in the intelligent contract by S11 when detecting the delivery operation for calling intelligent contract.
In specific implementation, the intelligent contract can be by filling intelligent contract template generation.The intelligence contract mould
Plate includes: the Transaction Information parameter and the re-encryption parameter.
S12 obtains re-encrypted private key and to the re-encryption when detecting the confirmation operation for calling the intelligent contract
Key is verified.
The trade gold is gone to the wallet address of data sender and notification data connects by S13 after described be verified
Receipts person obtains re-encryption data.
In specific implementation, the re-encryption data can use the re-encrypted private key to the close of the data sender
Literary data carry out re-encryption and obtain, and the ciphertext data can be encrypted to obtain by the data sender to transaction data,
The re-encrypted private key can private key by the data sender using the data sender and the Data receiver
Public key generates.
It, will when detecting the delivery operation for calling intelligent contract using data trade method described in above-described embodiment
Trade gold is locked in intelligent contract, and when detecting the confirmation operation for calling the intelligent contract, obtains re-encrypted private key
And the re-encrypted private key is verified, and in described be verified, the trade gold is gone to the money of data sender
Packet address and notification data recipient acquisition re-encryption data.Delivery operation and the equal base of confirmation operation in above-mentioned entire process of exchange
It is carried out automatically in intelligent contract, therefore entire process of exchange does not have any third-party intervention, therefore data trade can be improved
Safety.
It is understood that above-mentioned execution process Network Environment, user demand or data characteristics etc. can have not
Same implementation.Wherein it is possible to carry out data trade and circulation to general data using following embodiment.It is understood that
It is that the general data can be the data of big data quantity, is also possible to the data of small data quantity, in specific implementation, logarithm
It is not particularly limited according to the size of amount.
To more fully understand those skilled in the art and realizing the embodiment of the present invention, referring to the drawings, by specific
Embodiment is described in detail.
Fig. 2 is a kind of flow chart of data trade method in the embodiment of the present invention, is carried out below by way of specific steps detailed
Illustrate:
Trade gold is locked in the intelligent contract by S21 when detecting the delivery operation for calling intelligent contract.
In specific implementation, intelligent contract can be by filling intelligent contract template generation, and the intelligence contract template can
To include: the Transaction Information parameter and the re-encryption parameter.In an embodiment of the present invention, the Transaction Information parameter can
To include: public key, the public key of data sender, the wallet address of the data sender, the data hair of Data receiver
The amount of trade gold needed for ciphertext address data memory out and the transaction.
In specific implementation, the re-encryption parameter may include: re-encrypted private key.
In specific implementation, intelligent contract can also include that carry out delivery operation method (function) and the side that is confirmed
Method (function), by calling corresponding method (function), entire process of exchange can be executed automatically based on intelligent contract.
In specific implementation, filling the intelligent contract template can be data sender, Data receiver, be also possible to
The third-party platforms such as data trade platform are in specific implementation not particularly limited the main body for filling intelligent contract template.
In an embodiment of the present invention, the intelligent contract template can be created by data trade platform, and will be filled out
The intelligent contract obtained after filling is deployed on block chain.Wherein, block chain has decentralization, the characteristics such as can not distort, thus
Once the publication of intelligent contract can not just be distorted, and can not intervene the automatic execution of intelligent contract, and data in block chain
Both parties can be with the executive condition of real time inspection intelligence contract, thus can guarantee the safety of data trade.Specific real
Shi Zhong, block chain can be ether mill (ETH), commercial Distributed Design block chain operating system (EOS) or other publicly-owned chains, connection
Alliance's chain or privately owned chain.
In specific implementation, when the delivery operation of intelligent contract is called in detection, it can also verify and the intelligence is called to close
Whether caller about is the Data receiver, and then the intelligent contract can be called to avoid the Data receiver of personation,
It thereby may be ensured that data trade both sides are the Data receiver and the data sender in the intelligent contract, therefore can
To improve the safety of data trade.
In specific implementation, when detecting the delivery operation for calling the intelligent contract, the transaction can also be verified
The amount of gold whether be trade gold needed for the transaction amount, so as to avoid the trade gold of Data receiver payment
Amount occurs with the inconsistent situation of required trade gold amount, and then can guarantee that the Data receiver obtains consistent amount
Trade gold, therefore can guarantee the property safety of data trade.
S22 obtains re-encrypted private key and to the re-encryption when detecting the confirmation operation for calling the intelligent contract
Key is verified.
The trade gold is gone to the wallet address of data sender and notification data connects by S23 after described be verified
Receipts person obtains the re-encrypted private key.
Through above-mentioned steps, the Data receiver can download the ciphertext data of the data sender, and described in utilization
Re-encrypted private key carries out re-encryption to the ciphertext data, obtains re-encryption data.Later, obtained re-encryption data are carried out
Decryption, can be obtained transaction data.
The ciphertext data of the data sender can carry out the transaction data by the public key of the data sender
Encryption obtains.In specific implementation, data sender can using preset one or more Encryption Algorithm to transaction data into
To obtain ciphertext data, Encryption Algorithm can be any preset for elliptic curve encryption algorithm, Digital Signature Algorithm etc. for row encryption
Asymmetrical Encryption Algorithm.
In specific implementation, data sender can will obtain ciphertext data and be uploaded to data trade platform, data trade
The ciphertext data can be stored in cloud storage by platform, since the data trade platform has higher security level,
The case where ciphertext leaking data thus can be reduced generation, therefore the safety of data trade can be improved.
In specific implementation, Data receiver can download ciphertext data from data trade platform, and can be from intelligence
Re-encrypted private key is obtained in contract, and the ciphertext data are encrypted to obtain re-encryption data using the re-encrypted private key,
Later, the re-encryption data are decrypted in the private key that Data receiver can use itself, and transaction data can be obtained.
In specific implementation, re-encrypted private key can be utilized the private key and data of the data sender by data sender
The public key of recipient generates.In the specific application process, can using with encryption chip hardware keys Core Generator from
Key is generated under linear state, the software key Core Generator with crypto engine generates key under off-line state, or passes through
The key generation facility of software and hardware combining generates key under off-line state.
In specific implementation, it when detecting the confirmation operation for calling the intelligent contract, can also verify described in calling
Whether the caller of intelligent contract is the data sender, so as to avoid the data sender of personation from calling the intelligence
Contract, and then can guarantee that data trade both sides are the Data receiver and the data sending in the intelligent contract
Person, therefore the safety of data trade can be improved.
Using above-described embodiment, delivery operation and confirmation operation in process of exchange are based on intelligent contract and carry out automatically,
And re-encrypted private key is verified by intelligent contract, thus can have any third-party intervention to avoid process of exchange, it can also
To avoid using the re-encrypted private key of personation to trade, therefore the safety of data trade can be improved.
In specific implementation, re-encrypted private key can be verified using various ways.For example, Zero Knowledge can be used
The mode of proof verifies re-encrypted private key.It is verified referring to re-encrypted private key a kind of in the embodiment of the present invention shown in Fig. 3
Flow chart, be described in detail below by way of specific steps:
S31 obtains the public key, the public key of the Data receiver and determining for the re-encrypted private key of the data sender
Long random number.
In specific implementation, the fixed length random number of re-encrypted private key can be generated using preset random number generator.
In specific implementation, fixed length random number can be character string, number or both combination.
S32, the fixed length for splicing the public key of the data sender, the public key of Data receiver and re-encrypted private key are random
Number, obtains splicing value.
In specific implementation, can according to preset sequence to the public key of data sender, the public key of Data receiver and
The fixed length random number of re-encrypted private key is spliced.
S33 carries out Hash calculation to the splicing value, obtains the cryptographic Hash of the splicing value.
In specific implementation, Hash calculation can be carried out to the splicing value using preset hash algorithm, obtained described
The cryptographic Hash of splicing value.
S34, the cryptographic Hash for verifying the splicing value is the cryptographic Hash of re-encrypted private key.
In an embodiment of the present invention, by the public key of data sender of acquisition, the public key of Data receiver and again
The fixed length random number of encryption key is spliced, then obtains the cryptographic Hash of splicing value by Hash calculation, verifies re-encrypted private key
Cryptographic Hash whether be splicing value cryptographic Hash, the verification result of the available re-encrypted private key.For example, described in the determination
When the cryptographic Hash of re-encrypted private key is consistent with the cryptographic Hash of the splicing value, determine that the re-encrypted private key passes through verifying;True
When the cryptographic Hash of the fixed re-encrypted private key and the inconsistent cryptographic Hash of the splicing value, determine that the re-encrypted private key does not pass through
Verifying.
It, can be to avoid the data sender of personation by being verified to the re-encrypted private key using above-described embodiment
The intelligent contract is called, thus can guarantee that data trade both sides are the Data receiver and the institute in the intelligence contract
Data sender is stated, therefore the safety of data trade can be improved.
It in specific implementation, can also include: verifying re-encryption before step S31 to further increase verification efficiency
Whether the total length of key is preset length value.For example, in the total length and the preset length that determine the re-encrypted private key
When being worth consistent, step S31 can be executed;It is inconsistent in the total length for determining the re-encrypted private key and the preset length value
When, then it may not need and execute step S31;In specific implementation, the preset length value of re-encrypted private key is fixed.
In specific implementation, re-encrypted private key can also be verified using other modes.For example, can be added with counterweight
The timestamp of key is verified, and whether the particular point in time verified when generating re-encrypted private key is preset time point.For another example,
Re-encrypted private key can be verified with the mode of digital signature, whether verifying abstract is default abstract.
To more fully understand those skilled in the art and realizing the embodiment of the present invention, below by way of specific application scenarios
It is described in detail.
With the use of various sensors, mass data is generated, carrying out mining analysis to generated mass data can be with
Unexpected value is createed, thus presently, there are the demands to trading in various data.For example, the driving to vehicle
The various vehicle-related informations such as traffic information, tire pressure, the maintenance record of recorder record are analyzed, and can be developed and more be filled it up with
The vehicle of sufficient user demand.However, vehicle user may exist with car data buyer direct dealing invades asking for privacy of user
Topic, for this purpose, data trade can be carried out using the data trade method in the embodiment of the present invention.
Referring to Fig. 4, the method that intelligent contract carries out data trade is passed through to the embodiment of the present invention by specific steps
It is described in detail.Wherein, intelligent contract can be by data platform using intelligent contract template generation, and is deployed in block chain
In.
S401, data sender D send ciphertext data EncryptD to data trade platform B.
In specific implementation, the public key PkD that data sender D can use itself adds transaction data PlainD
It is close, obtain ciphertext data EncryptD.
In specific implementation, ciphertext data EncryptD can be stored in cloud storage by data trade platform B.
S402, Data receiver A propose purchase request of data to data trade platform B.
S403, data trade platform B fill the Transaction Information parameter that transaction is related to intelligent contract template, generate intelligence
Contract.
In specific implementation, Transaction Information parameter may include: the public affairs of the public key of Data receiver A, data sender D
Needed for key, the wallet address of the data sender A, the ciphertext address data memory of the data sender D and the transaction
The amount of trade gold.
S404, data trade platform B are disposed on intelligent contract to block chain C.
In specific implementation, block chain C can be ether mill (ETH), commercial Distributed Design block chain operating system
(EOS) or other publicly-owned chains, alliance's chain or privately owned chain.
S401~S404 through the above steps, i.e., in the purchase request of data for receiving Data receiver A, data trade
Platform B based on the intelligent contract template generation intelligence contract being pre-created and can be deployed in block chain C.
S405, Data receiver A call delivery operation.
In specific implementation, Data receiver A can call the delivery operation in intelligent contract, by intelligent contract to number
According to sender D payment transaction gold.
In specific implementation, intelligent contract, which can verify, calls whether the caller of the intelligent contract is intelligent contract mould
The Data receiver A in plate can stop delivery operation if the two is inconsistent, can also be to the calling intelligence
The caller of contract issues corresponding prompt information, thereby may be ensured that data trade both sides are described in the intelligent contract
Data receiver and the data sender, therefore the safety of data trade can be improved, it can also be to avoid user misoperation.
In specific implementation, in order to improve data trade safety and avoid maloperation, intelligent contract can also verify institute
State trade gold amount whether be trade gold needed for the transaction in intelligent contract template amount, if the two is inconsistent,
It can stop delivery operation, and then the caller that may call upon the intelligent contract issues corresponding prompt information, with prompt
It re-enters trade gold.
The trade gold of Data receiver A is locked in intelligent contract by the intelligent contract run on S406, block chain C.
In order to guarantee that the trade gold of Data receiver A can be locked in intelligent contract by transaction security, intelligent contract.
S405~S406 through the above steps, Data receiver A only need to input corresponding trade gold, intelligent contract
It is automatic to execute, complete transaction payment operation.
The intelligent contract that S407, data sender D are run on block chain C, which executes, to be called confirmation operation and sends re-encryption
Key RekeyAD.
In specific implementation, data sender D can use the public key PkA life of the private key SkD and Data receiver A of itself
At re-encrypted private key RekeyAD.
In specific implementation, data sender D can obtain the public key PkA of Data receiver A from intelligent contract.
In specific implementation, intelligent contract, which can verify, calls whether the caller of the intelligent contract is intelligent contract mould
The data sender D in plate can stop delivery operation if the two is inconsistent, further, it is also possible to described in calling
The caller of intelligent contract issues corresponding prompt information, thereby may be ensured that data trade both sides are in the intelligent contract
The Data receiver and the data sender, therefore the safety of data trade can be improved, it can also accidentally be grasped to avoid user
Make.
The intelligent contract verifying re-encrypted private key RekeyAD run on S408, block chain C.
In specific implementation, intelligent contract can use zero-knowledge proof mode and test re-encrypted private key RekeyAD
Card can be reduced to trade and be entangled so as to trade in the case of avoiding re-encrypted private key from being maliciously tampered to avoid transaction swindling
Confusingly, the safety of data trade is further increased.
In specific implementation, be improve verification efficiency, can first verify re-encrypted private key RekeyAD total length whether be
Preset length value.If it is, subsequent authentication process can be executed;If it is not, then verification result is returned to data sender
D, and data sender D is made to retransmit re-encrypted private key.
In specific implementation, re-encrypted private key RekeyAD may include: the core re-encrypted private key RekeyAD, fixed length
Random number nonce and cryptographic Hash HashAD.In an embodiment of the present invention, HashAD=Hash (nonce+PkA+PkD),
In, fixed length random number nonce can use default random number generator and parse to obtain.The intelligent available data sender of contract
The fixed length random number nonce of the public key PkD of D, the public key PkA of Data receiver A and re-encrypted private key RekeyAD, to three into
Row splicing obtains splicing value, then carries out Hash calculation to splicing value, obtains the cryptographic Hash HashAD ' of splicing value, verifies splicing value
Cryptographic Hash HashAD ' it is whether consistent with cryptographic Hash HashAD.If the two is inconsistent, illustrate that re-encrypted private key RekeyAD is wrong
Accidentally, verification result is that verifying does not pass through, can execute step S409;If the two is consistent, illustrating re-encrypted private key RekeyAD just
Really, verification result passes through for authentication, can execute step S410.
The intelligent contract run on S409, block chain C sends verification result to data sender D, so that data sender D
Retransmit re-encrypted private key.
The intelligent contract transfer transactions gold run on S410, block chain C is to the wallet address of Data receiver A.
S407~S410 through the above steps, data sender D only need to send re-encrypted private key, and intelligent contract can be certainly
It is dynamic to execute, complete trade confirmation operation.
S411, Data receiver A obtain ciphertext address data memory from the intelligent contract run on block chain C.
S412, Data receiver A utilize ciphertext address data memory, download ciphertext data from data trade platform B
EncryptD。
S413, Data receiver A obtain re-encrypted private key RekeyAD from intelligent contract.
S414, Data receiver A carry out re-encryption.
In specific implementation, Data receiver A can use re-encrypted private key RekeyAD to ciphertext data EncryptD into
Row re-encryption obtains re-encryption data EncryptAD.
S415, Data receiver A are decrypted.
In specific implementation, Data receiver A can use itself private key SkA counterweight encryption data EncryptAD into
Row decryption, obtains transaction data PlainD.
Using above-described embodiment, in entire process of exchange delivery operation and confirmation operation be based on intelligent contract automatically into
Row, and re-encrypted private key is verified by intelligent contract, thus can have any third-party intervention to avoid process of exchange,
Therefore the safety of data trade can be improved to avoid using the re-encrypted private key of mistake to trade.
In the data trade method that above embodiments are introduced, transaction data is formed by ciphertext data after being encrypted can
To be stored in arbitrary network node, such as can also be distributed in data trade platform or cloud storage corresponding to it
Formula is stored in multiple network nodes.
It in specific implementation,, can also be using such as the transaction data of small data quantity in order to improve data trade efficiency
Under data trade method.
As described in Figure 5, specifically data trade can be realized using following steps:
Trade gold is locked in the intelligent contract by S51 when detecting the delivery operation for calling intelligent contract.
In specific implementation, intelligent contract can be by filling intelligent contract template generation.
In specific implementation, the Transaction Information parameter may include: the public affairs of the public key of Data receiver, data sender
Key, the wallet address of the data sender, the data sender ciphertext data storage and the transaction needed for trade gold
Amount.
In specific implementation, the re-encryption parameter may include: re-encrypted private key.
In specific implementation, intelligent contract can also include that carry out delivery operation method (function) and the side that is confirmed
Method (function), by calling corresponding method (function), entire process of exchange can be executed automatically based on intelligent contract.
In specific implementation, the main body for filling the intelligent contract template can be data sender, Data receiver, or
Person is the third-party platforms such as data trade platform, in specific implementation, does not do specific limit to the main body for filling intelligent contract template
System.
In specific implementation, the ciphertext data of the data sender are by the public key of the data sender to the transaction
Data are encrypted to obtain.In specific implementation, data sender can be using preset one or more Encryption Algorithm to friendship
Easy data are encrypted to obtain ciphertext data, and Encryption Algorithm can appoint for elliptic curve encryption algorithm, Digital Signature Algorithm etc.
It anticipates preset asymmetrical Encryption Algorithm.
In an embodiment of the present invention, the intelligent contract template can be created by data trade platform, and will be filled out
The intelligent contract obtained after filling is deployed in block chain.Wherein, block chain has decentralization, the characteristics such as can not distort, thus
Once the publication of intelligent contract can not just be distorted, and can not intervene the automatic execution of intelligent contract, and data in block chain
Both parties can be with the executive condition of real time inspection intelligence contract, thus can guarantee the safety of data trade.Specific real
Shi Zhong, block chain can be ether mill (ETH), commercial Distributed Design block chain operating system (EOS) or other publicly-owned chains, connection
Alliance's chain or privately owned chain.
In specific implementation, when the delivery operation of intelligent contract is called in detection, confirmation can also be verified and call the intelligence
Whether the caller of energy contract is the Data receiver, and then the intelligence can be called to close to avoid the Data receiver of mistake
About, thus it can guarantee that data trade both sides are the Data receiver and the data sender in the intelligent contract,
Therefore the safety of data trade can be improved.
In specific implementation, it when detecting the delivery operation for calling the intelligent contract, can also verify described in confirmation
The amount of trade gold whether be the transaction required trade gold amount, and then can to avoid the Data receiver pay friendship
Easy amount of money degree and required trade gold amount are inconsistent, thereby may be ensured that the Data receiver obtains the transaction of correct amount
Gold, therefore can guarantee the property safety of data trade.
S52 obtains re-encrypted private key and to the re-encryption when detecting the confirmation operation for calling the intelligent contract
Key is verified.
S53, after described be verified, the intelligence contract is using the re-encrypted private key to the ciphertext of data sender
Data carry out re-encryption, obtain re-encryption data, and the re-encryption data are saved into the intelligent contract, and by the friendship
Yi Jin goes to the wallet address of the data sender, and notification data recipient obtains the re-encryption data.
Later, the Data receiver can obtain the re-encryption data from the intelligent contract, and to described heavy
Encryption data is decrypted, and obtains transaction data.
In specific implementation, re-encrypted private key can utilize the private key of itself and the public affairs of Data receiver by data sender
Key generates.It in the specific application process, can be raw under off-line state using the hardware keys Core Generator with encryption chip
Key is generated under off-line state, or passes through software and hardware combining at key, the software key Core Generator with crypto engine
Key generation facility generate key under off-line state.
In specific implementation, it when detecting the confirmation operation for calling the intelligent contract, can also verify described in calling
Whether the caller intelligently checked is the data sender, so as to avoid the data sender of personation from calling the intelligence
Contract, and then can guarantee that data trade both sides are the Data receiver and the data sending in the intelligent contract
Person, therefore the safety of data trade can be improved.
In specific implementation, re-encrypted private key can be verified by the way of zero-knowledge proof, specific embodiment party
Formula and principle can refer to being discussed in detail for above-described embodiment, and details are not described herein.
It is entire since delivery operation and confirmation operation are based on intelligent contract and carry out automatically using above-described embodiment
Process of exchange does not have any third-party intervention, therefore the safety of data trade can be improved.In addition, being deposited by the intelligent contract
It stores up ciphertext data and re-encryption is carried out to the ciphertext data, and obtained re-encryption data are saved, thus for small
The data of data volume need to only can be realized as re-encryption and the process of exchange of data, in turn by the automatic execution of intelligent contract
The efficiency of data trade can be improved.
To more fully understand those skilled in the art and realizing the embodiment of the present invention, below by way of specific application scenarios
It is described in detail.
Referring to Fig. 6, the method that intelligent contract carries out data trade is passed through to the embodiment of the present invention by specific steps
It is described in detail.Wherein, intelligent contract can be by data platform using intelligent contract template generation, and is deployed in block chain
In.
S601, Data receiver A propose purchase request to data trade platform B.
S602, data sender D are sent in the intelligent contract template of ciphertext data EncryptD to data trade platform B.
S603, data trade platform B fill intelligent contract template generation intelligence contract.In specific implementation, the intelligence
Contract template may include: Transaction Information parameter and re-encryption parameter.
In specific implementation, the Transaction Information parameter may include: the public key of Data receiver A, data sender D
Public key, the wallet address of the data sender A, the data sender D ciphertext data and the transaction needed for trade gold
Amount.
In specific implementation, the re-encryption parameter may include re-encrypted private key and re-encryption data.
In specific implementation, the intelligent contract template can also include carrying out the method (function) of delivery operation and carrying out
The method (function) of confirmation, by calling corresponding method (function), entire process of exchange can be automatic based on intelligent contract
It executes.
S604, data trade platform B are disposed on intelligent contract to block chain C.
In specific implementation, block chain C can be ETH, EOS or other publicly-owned chains, alliance's chain or privately owned chain.
S601~S604 through the above steps, i.e., in the purchase request of data for receiving Data receiver A, data trade
Platform B based on the intelligent contract template generation intelligence contract being pre-created and can be deployed in block chain C.
S605, Data receiver A call delivery operation.
In specific implementation, Data receiver A can call the delivery operation in intelligent contract, and the payment of Xiang Zhineng contract is handed over
Yi Jin.
In specific implementation, intelligent contract, which can verify, calls whether the caller of the intelligent contract is intelligent contract mould
The Data receiver A in plate can additionally be closed if it is not, then can stop delivery operation to the calling intelligence
Caller about issues corresponding prompt information, thereby may be ensured that data trade both sides are the number in the intelligent contract
According to recipient and the data sender, therefore the safety of data trade can be improved, it can also be to avoid user misoperation.
In specific implementation, whether the amount that intelligent contract can also verify the trade gold is in intelligent contract template
The amount of trade gold needed for the transaction can stop delivery operation if the two is inconsistent, furthermore may call upon the intelligence
The caller of energy contract issues corresponding prompt information, to prompt it to re-enter trade gold, so as to improve data trade
Safety and avoid maloperation.
The trade gold of Data receiver A is locked in the intelligent contract run on block chain C by S606, intelligent contract.
In order to guarantee that the trade gold of Data receiver A can be locked in intelligent contract by transaction security, intelligent contract.
S605~S606 through the above steps, Data receiver A only need to input corresponding trade gold, intelligent contract
It is automatic to execute, complete transaction payment operation.
S607, data sender D send re-encrypted private key RekeyAD, and call confirmation operation.
In specific implementation, data sender D can use the public key PkA life of the private key SkD and Data receiver A of itself
At re-encrypted private key RekeyAD.
In specific implementation, data sender D can obtain the public key PkA of Data receiver A from intelligent contract.
The intelligent contract verifying re-encrypted private key RekeyAD run on S608, block chain C.
In specific implementation, re-encrypted private key can be verified by the way of zero-knowledge proof, specific embodiment party
Formula and principle can refer to being discussed in detail for above-described embodiment, and details are not described herein.
In this hair inventive embodiments, if intelligent contract verifying re-encrypted private key RekeyAD passes through, then follow the steps
S610。
The intelligent contract run on S610, block chain C carries out re-encryption.
In specific implementation, intelligent contract can use re-encrypted private key RekeyAD and carry out to ciphertext data EncryptD
Re-encryption obtains re-encryption data EncryptAD, and is stored in the intelligent contract.
The intelligent contract transfer transactions gold run on S611, block chain C is to the wallet address of Data receiver A.
S607~S611 through the above steps, data sender D only need to send re-encrypted private key, and intelligent contract can be certainly
It is dynamic to execute, complete confirmation operation.
S612, Data receiver A obtain re-encryption data EncryptAD from the intelligent contract run on block chain C.
S613, Data receiver A are decrypted.
In specific implementation, Data receiver A can use itself private key SkA counterweight encryption data EncryptAD into
Row decryption, obtains transaction data PlainD.
Using above-described embodiment, delivery operation and confirmation operation are based on intelligent contract and carry out automatically in process of exchange, because
This entire process of exchange does not have any third-party intervention, therefore the safety of data trade can be improved.In addition, by the intelligence
Contract stores ciphertext data and carries out re-encryption to the ciphertext data, and obtained re-encryption data are saved, because
And for the data of small data quantity, it only need to can be realized as the re-encryption of data by the automatic execution of intelligent contract and trade
Journey, and then the efficiency of data trade can be improved.
To more fully understand those skilled in the art and realizing the embodiment of the present invention, referring to Fig. 7 to of the invention real
The data trade device for applying example use is accordingly introduced.
Referring to Fig. 7, it may include: the first storage unit that the embodiment of the invention provides a kind of devices 70 of data trade
71, the second storage unit 72, delivery operation unit 73, confirmation operation unit 74, in which:
First storage unit 71, can be configured as store transaction information parameter;
Second storage unit 72 can be configured as storage re-encryption parameter;
Delivery operation unit 73 may include: delivery operation subelement 731, and can be configured as ought detect calling intelligence
When the delivery operation of energy contract, trade gold is locked in the intelligent contract;
Confirmation operation unit 74 may include: confirmation operation processing subelement 741, and can be configured as ought detect tune
When with the confirmation operation of the intelligent contract, obtains the re-encrypted private key and the re-encrypted private key is verified;Transaction
Gold transfer subelement 742 can be configured as and determine the re-encrypted private key verifying in confirmation operation processing subelement 741
By when, the trade gold is gone to the wallet address of data sender;It notifies subelement 743, can be configured as described
When confirmation operation processing subelement is verified, notification data recipient obtains re-encryption data.
Wherein, the intelligent contract can be by filling intelligent contract template generation, and the intelligence contract template includes institute
State Transaction Information parameter and the re-encryption parameter;The re-encryption data can use the re-encrypted private key to the data
The ciphertext data of sender carry out re-encryption and obtain, and the ciphertext data can carry out transaction data by the data sender
Encryption obtains, and the re-encrypted private key can be generated by data sender using the private key of itself and the public key of Data receiver.
After carrying out transactional operation using the data trade device, the Data receiver can obtain the re-encryption number
According to being decrypted to the re-encryption data, transaction data can be obtained.
Delivery operation and confirmation operation due to above-mentioned data trade device are based on intelligent contract and carry out automatically, and intelligence
Verifying of the contract to re-encrypted private key, and then can have any third-party intervention to avoid process of exchange, can also be to avoid using
The re-encrypted private key of mistake is traded, therefore the safety of data trade can be improved.
In specific implementation, the Transaction Information parameter includes: the public key of the Data receiver, the data sender
Public key, the wallet address of the data sender, the ciphertext address data memory of the data sender and the exchange
Need the amount of trade gold.
In an embodiment of the present invention, the notice subelement 743 may include the first notification module (not shown), can be with
It is configured as the ciphertext data storage ground for notifying the Data receiver to obtain the data sender in the intelligent contract
Location and the re-encrypted private key, so that the Data receiver downloads the ciphertext number using the ciphertext address data memory
According to, and re-encryption is carried out to the ciphertext data using the re-encrypted private key obtained, obtain the re-encryption data.
In specific implementation, the ciphertext data of the data sender can store in data trade platform.
In specific implementation, the Transaction Information parameter includes: the public key of the Data receiver, the data sender
Public key, the ciphertext data of the data sender, trade gold needed for the wallet address of the data sender and the transaction
Amount.
In an embodiment of the present invention, the notice subelement 743 may include: re-encryption module (not shown) and second
Notification module (not shown), in which:
The re-encryption module can be configured as the intelligent contract and be sent out using the re-encrypted private key the data
Ciphertext data out carry out re-encryption, obtain the re-encryption data, and the re-encryption data are saved to the intelligence
In contract;
The notification module, can be configured as that notify that the Data receiver obtains described heavy in the intelligent contract
Encryption data.
In specific implementation, the Transaction Information parameter that will include in the purchase request of data of the Data receiver
After filling to intelligent contract template, the intelligent contract is can be generated in value.
In specific implementation, delivery operation unit 73 can also include: the first verification subelement 732 and the second syndrome
Unit 733, in which: the first verification subelement 732, the caller that can be configured as the verification confirmation calling intelligent contract are
The Data receiver;Second verification subelement 733, can be configured as and verify the amount of the trade gold is the exchange
Need the amount of trade gold.
It is understood that the delivery operation unit 73 can also be only comprising described the in other implementations of the present invention
One verification subelement 732 only verifies subelement 733 comprising second.
In specific implementation, confirmation operation unit 74 can also include that third verifies subelement 744, can be configured as
It is the data sender that the caller of the intelligent contract is called in verification.
In specific implementation, the confirmation operation handles subelement 741, may include: to obtain module (not shown), can be with
Be configured as obtaining the fixed length of the public key of the data sender, the public key of the Data receiver and the re-encrypted private key with
Machine number;Splicing module (not shown) can be configured as the public affairs of the public key, the Data receiver that splice the data sender
The fixed length random number of key and the re-encrypted private key, obtains splicing value;Hash calculation module (not shown), can be configured as pair
The splicing value carries out Hash calculation, obtains the cryptographic Hash of the splicing value;Correction verification module (not shown), can be configured as school
The cryptographic Hash for testing the splicing value is the cryptographic Hash of the re-encrypted private key.
In specific implementation, confirmation operation handles subelement 741, can also include: total length authentication module (not shown),
Be configured as it is described acquisition module obtain the public key of the data sender, the Data receiver public key and it is described it is heavy plus
Before the fixed length random number of key, the total length for verifying the re-encrypted private key is preset length value.
The embodiment of the present invention also provides a kind of calculating equipment, including memory and processor, can deposit on the memory
The computer instruction that can be run on the processor is contained, the processor executes above-mentioned when running the computer instruction
It described in any embodiment the step of data trade method, specifically can refer to the various embodiments described above, repeat no more.
The embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer instruction, described
The step of computer instruction executes data trade method described in any of the above-described kind of embodiment when running specifically can refer to above-mentioned each
Embodiment repeats no more.The computer storage medium may include: ROM, RAM, disk or CD etc..
Although present disclosure is as above, present invention is not limited to this.Anyone skilled in the art are not departing from this
It in the spirit and scope of invention, can make various changes or modifications, therefore protection scope of the present invention should be with claim institute
Subject to the range of restriction.
Claims (27)
1. a kind of data trade method characterized by comprising
When detecting the delivery operation for calling intelligent contract, trade gold is locked in the intelligent contract;
When detecting the confirmation operation for calling the intelligent contract, obtains re-encrypted private key and the re-encrypted private key is carried out
Verifying;
After described be verified, the trade gold is gone into the wallet address of data sender and notification data recipient obtains
Re-encryption data;
Wherein the intelligent contract includes: Transaction Information ginseng by filling intelligent contract template generation, the intelligence contract template
Several and re-encryption parameter;And
The re-encryption data are to carry out re-encryption using ciphertext data of the re-encrypted private key to the data sender to obtain
It arrives, the ciphertext data are encrypted to obtain by the data sender to transaction data, and the re-encrypted private key is by the number
It is generated according to sender using the private key of the data sender and the public key of the Data receiver.
2. data trade method according to claim 1, which is characterized in that the Transaction Information parameter includes: the number
According to the public key of recipient, the public key of the data sender, the wallet address of the data sender, the data sender
The amount of trade gold needed for ciphertext address data memory and the transaction.
3. data trade method according to claim 2, which is characterized in that the notification data recipient obtains re-encryption
Data include:
Notify the Data receiver obtain the data sender in the intelligent contract ciphertext address data memory and
The re-encrypted private key, so that the Data receiver downloads the ciphertext data using the ciphertext address data memory, and
Re-encryption is carried out to the ciphertext data using the re-encrypted private key of acquisition, obtains the re-encryption data.
4. data trade method according to claim 3, which is characterized in that the ciphertext data of the data sender store
In data trade platform.
5. data trade method according to claim 1, which is characterized in that the Transaction Information parameter includes: the number
According to the public key of recipient, the public key of the data sender, the ciphertext data of the data sender, the data sender
The amount of trade gold needed for wallet address and the transaction.
6. data trade method according to claim 5, which is characterized in that the notification data recipient obtains re-encryption
Data include:
The intelligence contract carries out re-encryption using ciphertext data of the re-encrypted private key to the data sender, obtains institute
Re-encryption data are stated, and the re-encryption data are saved into the intelligent contract;
The Data receiver is notified to obtain the re-encryption data in the intelligent contract.
7. data trade method according to claim 1, which is characterized in that the intelligence contract is by the data receiver
The value for the Transaction Information parameter for including in the purchase request of data of person generates after filling to the intelligent contract template.
8. data trade method according to claim 1, which is characterized in that in the branch for detecting the intelligent contract of calling
When paying operation, further includes: it is the Data receiver that the caller of the intelligent contract is called in verification.
9. data trade method according to claim 1, which is characterized in that in the branch for detecting the intelligent contract of calling
When paying operation, further includes: the amount for verifying the trade gold is the amount of trade gold needed for the transaction.
10. data trade method according to claim 1, which is characterized in that call the intelligence to close in described detect
When confirmation operation about, further includes: it is the data sender that the caller of the intelligent contract is called in verification.
11. data trade method according to claim 1, which is characterized in that described to test the re-encrypted private key
Card, comprising:
The fixed length for obtaining the public key of the data sender, the public key of the Data receiver and the re-encrypted private key is random
Number;
The fixed length for splicing the public key of the data sender, the public key of the Data receiver and the re-encrypted private key is random
Number, obtains splicing value;
Hash calculation is carried out to the splicing value, obtains the cryptographic Hash of the splicing value;
The cryptographic Hash for verifying the splicing value is the cryptographic Hash of the re-encrypted private key.
12. data trade method according to claim 11, which is characterized in that in the public affairs for obtaining the data sender
Before the fixed length random number of key, the public key of the Data receiver and the re-encrypted private key, further includes: verify the re-encryption
The total length of key is preset length value.
13. data trade method according to claim 1, which is characterized in that the intelligence contract is by data trade platform
Based on the intelligent contract template generation, and it is deployed on block chain.
14. a kind of data trade device characterized by comprising
First storage unit is configured as store transaction information parameter;
Second storage unit is configured as storage re-encryption parameter;
Delivery operation unit, comprising:
Delivery operation subelement is configured as that trade gold is locked in institute when detecting the delivery operation for calling intelligent contract
It states in intelligent contract;
Confirmation operation unit, comprising:
Confirmation operation handles subelement, is configured as obtaining and adding again when detecting the confirmation operation for calling the intelligent contract
Key simultaneously verifies the re-encrypted private key;
Trade gold shifts subelement, is configured as when the confirmation operation handles subelement and is verified, by the trade gold
Go to the wallet address of data sender;
It notifies subelement, is configured as when the confirmation operation handles subelement and is verified, notification data recipient obtains
Re-encryption data;
Wherein the intelligent contract is by filling intelligent contract template generation, and the intelligence contract template includes the transaction letter
Cease parameter and the re-encryption parameter;And the re-encryption data are using the re-encrypted private key to the data sender
Ciphertext data carry out re-encryption obtain, the ciphertext data are encrypted to obtain by the data sender to transaction data,
The re-encrypted private key is generated by the data sender using the private key of itself and the public key of the Data receiver.
15. data trade device according to claim 14, which is characterized in that the Transaction Information parameter includes: described
The public key of Data receiver, the public key of the data sender, the wallet address of the data sender, the data sender
Ciphertext address data memory and the transaction needed for trade gold amount.
16. data trade device according to claim 15, which is characterized in that the notice subelement includes:
First notification module is configured as the data sender for notifying the Data receiver to obtain in the intelligent contract
Ciphertext address data memory and the re-encrypted private key so that the Data receiver utilize the ciphertext address data memory
The ciphertext data are downloaded, and re-encryption is carried out to the ciphertext data using the re-encrypted private key obtained, are obtained described
Re-encryption data.
17. data trade device according to claim 16, which is characterized in that the ciphertext data of the data sender are deposited
Storage is in data trade platform.
18. data trade device according to claim 14, which is characterized in that the Transaction Information parameter includes: described
The public key of Data receiver, the public key of the data sender, the ciphertext data of the data sender, the data sender
Wallet address and the transaction needed for trade gold amount.
19. data trade device according to claim 18, which is characterized in that the notice subelement includes:
Re-encryption module is configured as ciphertext number of the intelligent contract using the re-encrypted private key to the data sender
According to re-encryption is carried out, the re-encryption data are obtained, and the re-encryption data are saved into the intelligent contract;
Second notification module is configured as the re-encryption number for notifying the Data receiver to obtain in the intelligent contract
According to.
20. data trade device according to claim 14, which is characterized in that the intelligence contract is to connect the data
The value for the Transaction Information parameter for including in the purchase request of data of receipts person generates after filling to intelligent contract template.
21. data trade device according to claim 14, which is characterized in that the delivery operation unit, further includes:
First verification subelement is configured as verification and calls the caller of the intelligent contract to be the Data receiver.
22. data trade device according to claim 14, which is characterized in that the delivery operation unit, further includes:
Second verification subelement, is configured as verifying the amount of the trade gold as the amount of trade gold needed for the transaction.
23. data trade device according to claim 14, which is characterized in that the confirmation operation unit, further includes:
Third verifies subelement, is configured as verification and calls the caller of the intelligent contract to be the data sender.
24. data trade device according to claim 14, which is characterized in that the confirmation operation handles subelement, packet
It includes:
Obtain module, be configured as obtaining the public key of the data sender, the public key of the Data receiver and it is described heavy plus
The fixed length random number of key;
Splicing module, be configured as splicing the public key of the data sender, the public key of the Data receiver and it is described heavy plus
The fixed length random number of key, obtains splicing value;
Hash calculation module is configured as carrying out Hash calculation to the splicing value, obtains the cryptographic Hash of the splicing value;
Correction verification module, the cryptographic Hash for being configured as verifying the splicing value is the cryptographic Hash of the re-encrypted private key.
25. data trade device according to claim 24, which is characterized in that the confirmation operation handles subelement, also
Include:
Total length authentication module, is configured as that module obtains the public key of the data sender, the data connect in the acquisition
Before the fixed length random number of the public key of receipts person and the re-encrypted private key, the total length for verifying the re-encrypted private key is default length
Angle value.
26. a kind of calculating equipment, including memory and processor, it is stored with and can transports on the processor on the memory
Capable computer instruction, which is characterized in that perform claim requirement 1 to 13 is any when the processor runs the computer instruction
The step of item data trade method.
27. a kind of computer readable storage medium, is stored thereon with computer instruction, which is characterized in that the computer instruction
Perform claim requires the step of any one of 1 to 13 data trade method when operation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811611360.XA CN109509099B (en) | 2018-12-27 | 2018-12-27 | Data transaction method and device, computing equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811611360.XA CN109509099B (en) | 2018-12-27 | 2018-12-27 | Data transaction method and device, computing equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109509099A true CN109509099A (en) | 2019-03-22 |
CN109509099B CN109509099B (en) | 2021-02-02 |
Family
ID=65755311
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811611360.XA Active CN109509099B (en) | 2018-12-27 | 2018-12-27 | Data transaction method and device, computing equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109509099B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110245948A (en) * | 2019-05-27 | 2019-09-17 | 清华大学 | Data trade method and system based on block chain and asymmetric encryption |
CN110430186A (en) * | 2019-07-31 | 2019-11-08 | 国网电子商务有限公司 | Block chain data transacting system and method based on proxy re-encryption and intelligent contract |
CN110990855A (en) * | 2019-12-02 | 2020-04-10 | 中国银行股份有限公司 | Block chain information recording and inquiring method, device and system |
CN111127021A (en) * | 2019-12-31 | 2020-05-08 | 支付宝(杭州)信息技术有限公司 | Service request method and device based on block chain |
CN112581127A (en) * | 2020-12-10 | 2021-03-30 | 深圳技术大学 | Commodity transaction method and device, computer equipment, storage medium and system |
CN116561739A (en) * | 2023-04-06 | 2023-08-08 | 北京熠智科技有限公司 | Data transaction method and device, electronic equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107169764A (en) * | 2017-05-10 | 2017-09-15 | 山东大学 | Fair data trade method based on block chain |
CN108063752A (en) * | 2017-11-02 | 2018-05-22 | 暨南大学 | A kind of credible genetic test and data sharing method based on block chain and proxy re-encryption technology |
CN108764911A (en) * | 2018-06-05 | 2018-11-06 | 北京阿尔山金融科技有限公司 | Interconnect network accumulated method of commerce and system |
US20180331821A1 (en) * | 2017-05-11 | 2018-11-15 | Microsoft Technology Licensing, Llc | Cryptlet identity |
CN109087080A (en) * | 2018-07-13 | 2018-12-25 | 杭州复杂美科技有限公司 | Across chain method of commerce, equipment and storage medium |
-
2018
- 2018-12-27 CN CN201811611360.XA patent/CN109509099B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107169764A (en) * | 2017-05-10 | 2017-09-15 | 山东大学 | Fair data trade method based on block chain |
US20180331821A1 (en) * | 2017-05-11 | 2018-11-15 | Microsoft Technology Licensing, Llc | Cryptlet identity |
CN108063752A (en) * | 2017-11-02 | 2018-05-22 | 暨南大学 | A kind of credible genetic test and data sharing method based on block chain and proxy re-encryption technology |
CN108764911A (en) * | 2018-06-05 | 2018-11-06 | 北京阿尔山金融科技有限公司 | Interconnect network accumulated method of commerce and system |
CN109087080A (en) * | 2018-07-13 | 2018-12-25 | 杭州复杂美科技有限公司 | Across chain method of commerce, equipment and storage medium |
Non-Patent Citations (1)
Title |
---|
王纪樟: "基于区块链+IPFS的数据共享平台实现", 《浙江工商大学硕士论文库》 * |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110245948A (en) * | 2019-05-27 | 2019-09-17 | 清华大学 | Data trade method and system based on block chain and asymmetric encryption |
CN110430186A (en) * | 2019-07-31 | 2019-11-08 | 国网电子商务有限公司 | Block chain data transacting system and method based on proxy re-encryption and intelligent contract |
CN110990855A (en) * | 2019-12-02 | 2020-04-10 | 中国银行股份有限公司 | Block chain information recording and inquiring method, device and system |
CN111127021A (en) * | 2019-12-31 | 2020-05-08 | 支付宝(杭州)信息技术有限公司 | Service request method and device based on block chain |
CN111127021B (en) * | 2019-12-31 | 2020-10-30 | 蚂蚁区块链科技(上海)有限公司 | Service request method and device based on block chain |
CN112581127A (en) * | 2020-12-10 | 2021-03-30 | 深圳技术大学 | Commodity transaction method and device, computer equipment, storage medium and system |
WO2022120886A1 (en) * | 2020-12-10 | 2022-06-16 | 深圳技术大学 | Commodity transaction method and apparatus, computer device, storage medium, and system |
CN116561739A (en) * | 2023-04-06 | 2023-08-08 | 北京熠智科技有限公司 | Data transaction method and device, electronic equipment and storage medium |
CN116561739B (en) * | 2023-04-06 | 2024-04-16 | 北京熠智科技有限公司 | Data transaction method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109509099B (en) | 2021-02-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109509099A (en) | Data trade method and device calculates equipment, storage medium | |
CN108764874B (en) | Anonymous transfer method, system and storage medium based on block chain | |
CN112199714B (en) | Privacy protection method and device based on block chain and electronic equipment | |
US12014337B2 (en) | Information transaction infrastructure | |
CN109102269B (en) | Transfer method and device based on block chain, block chain node and storage medium | |
US20140279403A1 (en) | Methods and systems for executing mobile currency transactions | |
CN109460966A (en) | Contract signing method, apparatus and terminal device based on requesting party's classification | |
CN104462949B (en) | The call method and device of a kind of plug-in unit | |
CN110535648A (en) | Electronic certificate is generated and verified and key controlling method, device, system and medium | |
CN105991287A (en) | Signature data generation and fingerprint authentication request method and device | |
CN110070357B (en) | Data processing method, device and system | |
CN108876593A (en) | A kind of online transaction method and apparatus | |
KR20170056536A (en) | Providing customer information obtained from a carrier system to a client device | |
WO2017162164A1 (en) | Electronic signature device transaction method | |
CN113052599B (en) | Method, device, equipment and system for generating, verifying and storing transaction certificates | |
CN111967967A (en) | Block chain-based cross-bank payment service processing method and device | |
CN111178840A (en) | Service processing method, device, system, electronic equipment and storage medium | |
CN111325585A (en) | Asset transfer method, device and computer readable storage medium | |
US20220318805A1 (en) | Detailing secure service provider transactions | |
EP3788535B1 (en) | Techniques for performing secure operations | |
TW201317911A (en) | Cloud credit card transaction system and transaction method thereof | |
KR101120059B1 (en) | Billing verifying apparatus, billing apparatus and method for cloud computing environment | |
CN111881166A (en) | Operation data processing method, device and system based on block chain | |
US20220353058A1 (en) | Conditional offline interaction system and method | |
CN113127930B (en) | Charging data processing method, device and computer readable storage medium |
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 |