CN112632602A - Block chain coin mixing method and device, terminal and storage medium - Google Patents

Block chain coin mixing method and device, terminal and storage medium Download PDF

Info

Publication number
CN112632602A
CN112632602A CN202011503073.4A CN202011503073A CN112632602A CN 112632602 A CN112632602 A CN 112632602A CN 202011503073 A CN202011503073 A CN 202011503073A CN 112632602 A CN112632602 A CN 112632602A
Authority
CN
China
Prior art keywords
users
user
response
new
matching
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.)
Pending
Application number
CN202011503073.4A
Other languages
Chinese (zh)
Inventor
王健宗
李泽远
何安珣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202011503073.4A priority Critical patent/CN112632602A/en
Publication of CN112632602A publication Critical patent/CN112632602A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6227Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • Finance (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a method, a device, a terminal and a storage medium for mixing bank notes in a block chain, wherein the method comprises the following steps: acquiring a plurality of response users in the mixed coin users; creating a new bitcoin address belonging to each responding user; inserting new bit currency addresses of response users into a pre-established vector one by one, randomly disordering the arrangement sequence of all elements in the vector when each new bit currency address is inserted, and obtaining a new bit currency address set of the response users after the last response user is inserted; the method comprises the steps of obtaining original bitcoin address sets of all response users, initiating bitcoin transactions by the response users according to the mapping relation between the original bitcoin address sets and the new bitcoin address sets, submitting transaction signatures to advertising users after transaction signatures are generated, and submitting the transaction signatures to miners by the advertising users after all the response users confirm that no errors exist. Through the mode, the privacy information of the block chain transaction can be effectively protected.

Description

Block chain coin mixing method and device, terminal and storage medium
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a method, an apparatus, a terminal, and a storage medium for blockchain coin mixing.
Background
With the advent and development of cryptocurrency such as Bingpene, blockchain technology is slowly known, and more experts and scholars are beginning to research and explore blockchain related technologies and applications. The blockchain technique is generated by combining database techniques and various cryptographic techniques, including elliptic curve encryption, asymmetric key encryption mechanisms, hash algorithms, consensus algorithms, and the like. The blockchain may be regarded as a Distributed Shared Ledger (Distributed Shared Ledger), and the recording and storing of transaction information are jointly performed by all nodes in the blockchain network. That is, any node in the blockchain network can record the transaction information in the transaction block and write the transaction information into the blockchain after the transaction information passes the verification, instead of a completely centralized third-party organization completing the confirmation and recording of the transaction information; any node in the blockchain network may store all transaction information after the self-created block, rather than being centrally stored by a fully centralized third party. The transaction data of the block chain is stored according to the time sequence, and the adjacent transaction blocks are mutually connected through the cryptography technology, so that the formed block chain is credible and cannot be tampered.
The blockchain fundamentally solves the problem of relying on a third party in the transfer payment transaction, and modern cryptography which is proved to be safe by theory and practice is used. The method has higher safety and can protect the privacy of the identity of the user transaction to a certain extent. The distributed account book reduces the pressure of storing asset transaction information in the traditional database, and the stability of a block chain system is ensured through multi-node combined maintenance.
However, for blockchain cryptocurrency (e.g., bitcoins) based on the ledger, all transaction information is recorded at each participating node in the form of a public ledger. In the public ledger, each transaction message includes: the hash value of the last transaction, the signature of the payer, the wallet address of the payee, the hash value of the transaction and the like. The malicious user can identify the receiver and the sender of the transaction to form association through means of background knowledge attack, transaction map analysis attack and the like, once real account information is leaked, the transaction loses the anonymity effect, and the data privacy security is damaged. How to effectively protect the security of the transaction privacy information on the blockchain is a technical problem which needs to be solved urgently.
Disclosure of Invention
The application provides a method, a device, a terminal and a storage medium for mixing coins in a block chain, which aims to solve the problem of how to protect the security of transaction privacy information on the block chain.
In order to solve the technical problem, the application adopts a technical scheme that: a block chain coin mixing method is provided, which comprises the following steps: acquiring a plurality of response users in the mixed coin users, wherein the mixed coin users comprise response users and advertisement users; creating a new bitcoin address belonging to each responding user; inserting new bit currency addresses of response users into a pre-established vector one by one, and randomly disordering the arrangement sequence of all elements in the vector when each new bit currency address is inserted until the last response user is inserted, so as to obtain a new bit currency address set of the response users; the method comprises the steps of obtaining original bitcoin address sets of all response users, initiating bitcoin transactions by the response users according to the mapping relation between the original bitcoin address sets and the new bitcoin address sets, submitting transaction signatures to advertising users after transaction signatures are generated, and submitting the transaction signatures to miners by the advertising users after all the response users confirm that no errors exist.
As a further improvement of the present application, before acquiring a plurality of responding users in the mixed coin user, the method further includes: acquiring a user initiating a mixed coin request to obtain a plurality of mixed coin users; randomly selecting a user from the mixed coin users as a response user or an advertisement user; and matching between the response user and the advertising user is realized, and after the matching is successful, a message of successful matching is disclosed to the whole network.
As a further improvement of the application, the method realizes the matching between the response user and the advertisement user, and after the matching is successful, the message of successful matching is disclosed to the whole network, and comprises the following steps: after an advertisement user pays half of the fee to a miner, the information of mixed coins is broadcasted to the whole network; selecting a target advertisement user from all advertisement users who issue the mixed currency information by a response user, and initiating a matching request; the target advertisement user inquires all response users who initiate matching, and selects one target response user for matching; after the target response user pays the fees to the miners, the matching information is disclosed to the whole network; after the target advertisement user pays the other half of the fee to the miners, the information of successful matching is disclosed to the whole network; the step of matching the advertising user with the responding users is repeatedly performed until the matching of the advertising user with all the responding users who initiated the matching is completed.
As a further improvement of the present application, after the target response user pays for the miners, and discloses the matching information to the whole network, the method further includes: judging whether the target response user has violation behaviors or not; if so, stopping matching the target advertisement user with the target response user, and reselecting a new response user for matching by the target advertisement user; after the target advertisement user pays the other half of the fee to the miners, before the information of successful matching is disclosed to the whole network, the method further comprises the following steps: judging whether the target advertisement user has violation behaviors or not; and if so, stopping matching the target advertisement user with the target response user, and reselecting a new advertisement user for matching by the target response user.
As a further improvement of the present application, after obtaining a plurality of responding users in the mixed coin user, the method further includes: the responding users mutually check the amount of the original bitcoin addresses of other responding users; and canceling the mixed currency qualification of the responding users of which the money amount is smaller than the preset threshold value.
As a further improvement of the present application, new bitcoin addresses of the responding users are inserted into a pre-established vector one by one, and when a new bitcoin address is inserted each time, the arrangement sequence of all elements in the vector is randomly disturbed until the last responding user is inserted, so as to obtain a new bitcoin address set of the responding user, including: numbering response users randomly, and pre-creating an n-dimensional vector C with an initial value of zero; sequentially encrypting the new bitcoin addresses of the response users according to the numbers of the response users, randomly inserting the encrypted information into the vector C, signing the vector C, sending the signed information to the next response user, and repeating the steps until the last response user; and the last response user decrypts the vector C by using the private key of the last response user to obtain a new bitcoin address set of all the response users, and broadcasts the new bitcoin address set to all the response users.
As a further improvement of the present application, after broadcasting the new bitcoin address set to all responding users, the method further includes: and when the new bitcoin address of the current response user is not in the new bitcoin address set, controlling the current response user to quit the coin mixing process.
In order to solve the above technical problem, another technical solution adopted by the present application is: there is provided a blockchain coin mixing device including: the acquisition module is used for acquiring a plurality of response users in the mixed coin users, and the mixed coin users comprise response users and advertisement users; a creation module for creating a new bitcoin address belonging to each responding user; the address mixing module is used for inserting the new bit currency addresses of the response users into the pre-established vectors one by one, and randomly disordering the arrangement sequence of all elements in the vectors when each new bit currency address is inserted until the last response user is inserted, so as to obtain a new bit currency address set of the response users; the mixed currency module is used for acquiring original bitcoin address sets of all response users, initiating bitcoin transactions by the response users according to the mapping relation between the original bitcoin address sets and the new bitcoin address sets, submitting transaction signatures to the advertising users after transaction signatures are generated, and submitting the transaction signatures to miners by the advertising users after all the response users confirm that no errors exist.
In order to solve the above technical problem, the present application adopts another technical solution that: there is provided a terminal comprising a processor, a memory coupled to the processor, the memory having stored therein program instructions that, when executed by the processor, cause the processor to perform the steps of the block chain coin mixing method of any of the above.
In order to solve the above technical problem, the present application adopts another technical solution that: there is provided a storage medium storing a program file capable of implementing the blockchain coin mixing method of any one of the above.
The beneficial effect of this application is: according to the block chain coin mixing method, a plurality of coin mixing users who mix coins with requests are divided into response users and advertisement users, new bit coin addresses belonging to the response users are created, the new bit coin addresses of all the response users are mixed to obtain a new bit coin address set, a mapping relation between the new bit coin address set and an original bit coin address set of the response users is created, and transactions among the response users are completed according to the mapping relation, so that the coin mixing of all the response users is completed. And compared with the traditional coin mixing method, the coin mixing effect can be achieved only by mixing the coins once, the times required by coin mixing and the coin mixing time are reduced, and the efficiency is improved.
Drawings
FIG. 1 is a schematic flow chart of a coin mixing method of a block chain according to a first embodiment of the present application;
FIG. 2 is a schematic flow chart of a coin mixing method of a block chain according to a second embodiment of the present application;
FIG. 3 is a schematic flow chart of a coin mixing method of a block chain according to a third embodiment of the present application;
FIG. 4 is a functional block diagram of a blockchain coin mixing device according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a storage medium according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first", "second" and "third" in this application are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any indication of the number of technical features indicated. Thus, a feature defined as "first," "second," or "third" may explicitly or implicitly include at least one of the feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless explicitly specifically limited otherwise. All directional indications (such as up, down, left, right, front, and rear … …) in the embodiments of the present application are only used to explain the relative positional relationship between the components, the movement, and the like in a specific posture (as shown in the drawings), and if the specific posture is changed, the directional indication is changed accordingly. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
Fig. 1 is a schematic flow chart of a block chain coin mixing method according to a first embodiment of the present application. It should be noted that the method of the present application is not limited to the flow sequence shown in fig. 1 if the results are substantially the same. As shown in fig. 1, the method comprises the steps of:
step S101: a plurality of responding users in the mixed coin users are obtained, and the mixed coin users comprise responding users and advertising users.
Step S102: a new bitcoin address is created that belongs to each responding user.
In step S102, a new pair of signature verification keys (vk ') is selected for each responding user'i,sk′i) Wherein the secret key vk 'is verified'iSignature Key sk 'for the New bitcoin Address of the ith responding user'iFor the ith responding user to sign the transaction, and the responding user needs to guarantee the signing key sk'iIs not leaked, wherein i refers to the response user, and i is more than or equal to 1 and less than or equal to n.
Step S103: and inserting the new bitcoin addresses of the response users into the pre-established vector one by one, and randomly disordering the arrangement sequence of all elements in the vector when each new bitcoin address is inserted until the last response user is inserted, so as to obtain a new bitcoin address set of the response users.
In step S103, the pre-established vector is an n-dimensional vector with an initial value of zero, that is, each element of the n-dimensional vector is zero initially, and then new bitcoin addresses of the responding users are inserted into the pre-established vector one by one, that is, the new bitcoin addresses of the responding users replace the elements with a value of zero in the n-dimensional vector, and each element in the vector is replaced, the arrangement order of all elements in the vector is randomly shuffled once until the last responding user is inserted, that is, each element in the n-dimensional vector is replaced, so as to obtain a new bitcoin address set of the responding user.
Specifically, the step S103 includes:
1. the responding users are numbered randomly, and an n-dimensional vector C with an initial value of zero is created in advance.
Specifically, after the response user is acquired, the number of the response user is 1,2,3 ·, n, and an n-dimensional vector C with an initial value of zero is created, where the vector C includes n elements, and each element corresponds to one response user.
2. And encrypting the new bitcoin addresses of the response users in sequence according to the numbers of the response users, randomly inserting the encrypted information into the vector C, signing the vector C, sending the signed information to the next response user, and repeating the steps until the last response user.
3. And the last response user decrypts the vector C by using the private key of the last response user to obtain a new bitcoin address set of all the response users, and broadcasts the new bitcoin address set to all the response users.
In this embodiment, first, a new pair of encryption and decryption keys (ek) is selected for each responding useri,dki) Wherein, ekiIs the public key of the ith responding user, dkiIs the private key of the ith responding user, and each responding user sends its own signature sigma to other responding usersi=Sig(ski,eki),skiIs the signing key of the ith responding user.
Then, an encryption c is created for the new bitcoin address of the first responding user1=enc((ek2,…,ekn),vk′1) And signed σ'1=Sig(sk1,C1) Then, the signature is σ'1Sending a second responding user, wherein ekiSignature σ sent from each responding useriDecrypted to get, vk'1Is the first new bitcoin address of the responding user, C1Is to mix c1Random insertion into vector C, in which C is1When inserting into vector C, use C1Elements in the vector C with a value of zero are randomly replaced.
The second responding user receives the signature sigma 'sent by the first responding user'1Thereafter, the private key dk of the user is utilized2For vector C1All non-zero elements in the vector C are decrypted, i.e. the vector C is decrypted1C in (1)1Decrypt and then pair vector C1Randomly scrambling the order of all elements in the second response user and then creating an encryption c for the new bitcoin address of the second response user2=enc((ek3,…,ekn),vk′2) Then c is added2Inserted into a disorderly ordered vector C1In, i.e. using c2Replacing vector C1Is zero, generates the signature of the second responding user σ'2=Sig(sk2,C2) Then, sign σ'2And sending to a third responding user.
The above process is executed circularly, namely the ith response user receives the signature sigma 'sent by the ith-1 user'i-1=Sig(ski-1,Ci-1) Then use its private key dkiFor vector Ci-1All non-zero elements in the vector are decrypted, elements in the vector are randomly scrambled, and an encryption c is established for a new bitcoin address of the vectori=enc((eki+1,…,ekn),vk′i) Then c is addediInsert to vector Ci-1In place of vector Ci-1The zero element in (A) generates a new CiAnd signed σ'i=Sig(ski,Ci) And sends it to the (i + 1) th responding user.
When the last responding user receives the signature sigma 'sent by the previous responding user'n-1Thereafter, the private key dk of the user is utilizednDecrypting vector Cn-1All the new bitcoin addresses are inserted into the vector C'n-1In (1), the signature σ 'of the last responding user is generated'n=Sig(skn,Cn) Then, sign σ'nBroadcast to all responding users, with the signature σ 'received by the other responding users'nAnd then decrypting to obtain a new bitcoin address set.
Further, after broadcasting the new set of bitcoin addresses to all responding users, the method further comprises:
and when the new bitcoin address of the current response user is not in the new bitcoin address set, controlling the current response user to quit the coin mixing process.
Specifically, after all response users acquire the new bitcoin address set, the response users inquire the new bitcoin address set and determine whether the new bitcoin address set has a new bitcoin address corresponding to the response users, if not, the response users are removed if the response users possibly have illegal operation, and therefore the problem of service supply rejection is effectively solved.
Step S104: the method comprises the steps of obtaining original bitcoin address sets of all response users, initiating bitcoin transactions by the response users according to the mapping relation between the original bitcoin address sets and the new bitcoin address sets, submitting transaction signatures to advertising users after transaction signatures are generated, and submitting the transaction signatures to miners by the advertising users after all the response users confirm that no errors exist.
In step S104, the original bitcoin address set (vk) of the responding user is acquired1,…,vkn),vkiIs the original bitcoin address of the ith responding user, according to the original bitcoin address set (vk)1,…,vkn) And a new bit currency address set (vk'1,…,vk′n) The response users initiate bitcoin transactions, transaction signatures are generated and then sent to the advertising users, under the condition that all the response users check the transaction to be correct, the advertising users submit the bitcoin transactions to miners, the whole mixed coin process is completed, the transactions need to be submitted to the miners by the advertising users after all the response users confirm the transaction to be correct, the miners only think that the transactions are effective and package the transactions into a block chain, the problem that the transaction time is not synchronous in the whole transaction process does not exist, and time attack is effectively avoided.
In addition, the mapping relation between the new bitcoin address and the original bitcoin address of the response user is not exposed to other users in the mode, so that the risk of being counted by inference is reduced.
According to the block chain coin mixing method, a plurality of coin mixing users who request to mix coins are divided into response users and advertisement users, new bitcoin addresses belonging to the response users are created, the new bitcoin addresses of all the response users are mixed to obtain new bitcoin address sets, the mapping relation between the new bitcoin address sets and the original bitcoin address sets of the response users is created, transaction among the response users is completed according to the mapping relation, and therefore coin mixing of all the response users is completed. And, compare in traditional coin method of mixing, this application only needs once to mix the coin and can reach and mix the coin effect, has reduced and has mixed required number of times of coin and mixed coin time, has improved efficiency to involve the many sides and mix the coin rather than two sides and mix the coin, further increased the complexity of mixing the coin process, make the risk of privacy disclosure lower.
Fig. 2 is a schematic flow chart of a block chain coin mixing method according to a second embodiment of the present application. It should be noted that the method of the present application is not limited to the flow sequence shown in fig. 2 if the results are substantially the same. As shown in fig. 2, the method comprises the steps of:
step S201: and acquiring the user initiating the mixed coin request to obtain a plurality of mixed coin users.
Step S202: and randomly selecting a user from the coin-in-batch users as a response user or an advertisement user.
In step S202, a user is randomly selected from all the mixed money users as a responding user or an advertising user, and the advertising user and the responding user may randomly alternate to prevent an inference attack.
Step S203: and matching between the response user and the advertising user is realized, and after the matching is successful, a message of successful matching is disclosed to the whole network.
Specifically, the step S203 specifically includes:
1. after the advertisement user pays half of the fee to the miners, the mixed currency information is broadcasted to the whole network.
Specifically, after confirming the advertising user and the responding user, the advertising user pays half the fee to the miners, and broadcasts the mixed coin information to all the responding users, thereby informing all the responding users that the mixed coin operation can be performed.
2. And selecting a target advertising user from all advertising users who issue the mixed currency information by the response user, and initiating a matching request.
Specifically, the response user may receive the mixed currency information issued by a plurality of advertisement users at the same time, and the response user may select one advertisement user from the mixed currency information as a target advertisement user and initiate a matching request to the target advertisement user.
3. The target advertising user queries all responding users who initiate matching, and selects one target responding user for matching.
Specifically, the target advertisement user initiates all matched response users to the target advertisement user through real-time query, and selects one target response user from the response users to respond to the matching request initiated by the target advertisement user.
4. And after the target response user pays the fees to the miners, the matching information is disclosed to the whole network.
Specifically, the target responding user pays the miner a fee after the target advertising user responds to the matching request, and discloses the matching information to the whole network after paying the fee.
Further, after the target response user pays the fee for the miners and discloses the matching information to the whole network, the method further includes: judging whether the target response user has violation behaviors or not; and if so, stopping matching the target advertisement user and the target response user, and reselecting a new response user for matching by the target advertisement user.
5. And after the target advertisement user pays the other half of the fee to the miners, the information of successful matching is disclosed to the whole network.
Specifically, after the target advertising user pays the other half of the fee to the miners, the matching success information is also disclosed to the whole network, and through the steps, the matching between the target advertising user and the target response user is achieved.
Further, after the target advertisement user pays the other half of the fee to the miners, before the information of successful matching is disclosed to the whole network, the method further comprises the following steps: judging whether the target advertisement user has violation behaviors or not; and if so, stopping matching the target advertisement user with the target response user, and reselecting a new advertisement user for matching by the target response user. Also, the targeted advertising user does not need to pay the transaction fee again.
The step of matching the advertising user with the responding users is repeatedly performed until the matching of the advertising user with all the responding users who initiated the matching is completed.
Step S204: a plurality of responding users in the mixed coin users are obtained, and the mixed coin users comprise responding users and advertising users.
In this embodiment, step S204 in fig. 2 is similar to step S101 in fig. 1, and for brevity, is not described herein again.
Step S205: a new bitcoin address is created that belongs to each responding user.
In this embodiment, step S205 in fig. 2 is similar to step S102 in fig. 1, and for brevity, is not described herein again.
Step S206: and inserting the new bitcoin addresses of the response users into the pre-established vector one by one, and randomly disordering the arrangement sequence of all elements in the vector when each new bitcoin address is inserted until the last response user is inserted, so as to obtain a new bitcoin address set of the response users.
In this embodiment, step S206 in fig. 2 is similar to step S103 in fig. 1, and for brevity, is not described herein again.
Step S207: the method comprises the steps of obtaining original bitcoin address sets of all response users, initiating bitcoin transactions by the response users according to the mapping relation between the original bitcoin address sets and the new bitcoin address sets, submitting transaction signatures to advertising users after transaction signatures are generated, and submitting the transaction signatures to miners by the advertising users after all the response users confirm that no errors exist.
In this embodiment, step S207 in fig. 2 is similar to step S104 in fig. 1, and for brevity, is not described herein again.
According to the block chain coin mixing method in the second embodiment of the application, on the basis of the first embodiment, a response user and an advertising user are matched in a plurality of coin mixing users initiating coin mixing requests, the coin mixing operation is performed on the response user and the advertising user which are successfully matched, and the advertising user or the response user is removed when the response user or the advertising user has illegal operation, so that the risk of subsequent transaction is reduced.
Fig. 3 is a schematic flow chart of a coin mixing method of a block chain according to a third embodiment of the present application. It should be noted that the method of the present application is not limited to the flow sequence shown in fig. 3 if the results are substantially the same. As shown in fig. 3, the method comprises the steps of:
step S301: a plurality of responding users in the mixed coin users are obtained, and the mixed coin users comprise responding users and advertising users.
In this embodiment, step S301 in fig. 3 is similar to step S101 in fig. 1, and for brevity, is not described herein again.
Step S302: the responding users mutually view the amount of the original bitcoin addresses of the other responding users.
Step S303: and canceling the mixed currency qualification of the responding users of which the money amount is smaller than the preset threshold value.
In step S302-step S303, after confirming the responding user and the advertising user, each responding user inquires the amount of the original bitcoin address of other responding users, and when the amount of the responding user does not reach the preset threshold value, the responding user is indicated not to have enough bitcoins to carry out transaction, and the mixed coin qualification of the responding user is cancelled.
Step S304: a new bitcoin address is created that belongs to each responding user.
In this embodiment, step S304 in fig. 3 is similar to step S102 in fig. 1, and for brevity, is not described herein again.
Step S305: and inserting the new bitcoin addresses of the response users into the pre-established vector one by one, and randomly disordering the arrangement sequence of all elements in the vector when each new bitcoin address is inserted until the last response user is inserted, so as to obtain a new bitcoin address set of the response users.
In this embodiment, step S305 in fig. 3 is similar to step S103 in fig. 1, and for brevity, is not described herein again.
Step S306: the method comprises the steps of obtaining original bitcoin address sets of all response users, initiating bitcoin transactions by the response users according to the mapping relation between the original bitcoin address sets and the new bitcoin address sets, submitting transaction signatures to advertising users after transaction signatures are generated, and submitting the transaction signatures to miners by the advertising users after all the response users confirm that no errors exist.
In this embodiment, step S306 in fig. 3 is similar to step S104 in fig. 1, and for brevity, is not described herein again.
On the basis of the first embodiment, after the response user and the advertisement user are confirmed, whether the original bitcoin address of the other party has enough money is inquired between the response users, and the mixed coin qualification of the response users with the money not reaching the preset threshold value is cancelled, so that the whole mixed coin process is prevented from being influenced.
Fig. 4 is a functional block diagram of a blockchain coin mixing device according to an embodiment of the present disclosure. As shown in fig. 4, the apparatus 40 includes an acquisition module 41, a creation module 42, an address mixing module 43, and a coin mixing module 44.
The obtaining module 41 is configured to obtain a plurality of responding users from the mixed users, where the mixed users include responding users and advertising users.
A creation module 42 for creating a new bitcoin address belonging to each responding user.
And the address mixing module 43 is configured to insert new bitcoin addresses of the responding users into the pre-established vector one by one, and randomly shuffle an arrangement order of all elements in the vector every time a new bitcoin address is inserted, until the last responding user is inserted, to obtain a new bitcoin address set of the responding user.
And the mixed currency module 44 is used for acquiring the original bitcoin address sets of all the response users, initiating bitcoin transactions by the response users according to the mapping relation between the original bitcoin address sets and the new bitcoin address sets, submitting the transaction signatures to the advertising users after generating transaction signatures, and submitting the transaction signatures to miners by the advertising users after all the response users confirm that no errors exist.
Optionally, before the obtaining module 41 performs the operation of obtaining a plurality of responding users in the mixed currency user, the obtaining module is further configured to: acquiring a user initiating a mixed coin request to obtain a plurality of mixed coin users; randomly selecting a user from the mixed coin users as a response user or an advertisement user; and matching between the response user and the advertising user is realized, and after the matching is successful, a message of successful matching is disclosed to the whole network.
Optionally, the operation of the obtaining module 41 implementing matching between the response user and the advertisement user, and after the matching is successful, disclosing the matching successful message to the whole network may further be: after an advertisement user pays half of the fee to a miner, the information of mixed coins is broadcasted to the whole network; selecting a target advertisement user from all advertisement users who issue the mixed currency information by a response user, and initiating a matching request; the target advertisement user inquires all response users who initiate matching, and selects one target response user for matching; after the target response user pays the fees to the miners, the matching information is disclosed to the whole network; after the target advertisement user pays the other half of the fee to the miners, the information of successful matching is disclosed to the whole network; the step of matching the advertising user with the responding users is repeatedly performed until the matching of the advertising user with all the responding users who initiated the matching is completed.
Optionally, after the obtaining module 41 performs an operation of disclosing the matching information to the whole network after the target response user wants the miner to pay the fee, the obtaining module is further configured to: judging whether the target response user has violation behaviors or not; if so, stopping matching the target advertisement user with the target response user, and reselecting a new response user for matching by the target advertisement user; after the target advertisement user pays the other half of the fee to the miners, before the information of successful matching is disclosed to the whole network, the method further comprises the following steps: judging whether the target advertisement user has violation behaviors or not; and if so, stopping matching the target advertisement user with the target response user, and reselecting a new advertisement user for matching by the target response user.
Optionally, after the obtaining module 41 performs the operation of obtaining a plurality of responding users in the mixed currency user, the obtaining module is further configured to: the responding users mutually check the amount of the original bitcoin addresses of other responding users; and canceling the mixed currency qualification of the responding users of which the money amount is smaller than the preset threshold value.
Optionally, the address mixing module 43 inserts the new bitcoin addresses of the responding users into the pre-established vector one by one, and randomly shuffles the arrangement order of all elements in the vector when each new bitcoin address is inserted, until the last responding user finishes inserting, the operation of obtaining the new bitcoin address set of the responding user may further be: numbering response users randomly, and pre-creating an n-dimensional vector C with an initial value of zero; sequentially encrypting the new bitcoin addresses of the response users according to the numbers of the response users, randomly inserting the encrypted information into the vector C, signing the vector C, sending the signed information to the next response user, and repeating the steps until the last response user; and the last response user decrypts the vector C by using the private key of the last response user to obtain a new bitcoin address set of all the response users, and broadcasts the new bitcoin address set to all the response users.
Optionally, after the address mixing module 43 performs the operation of broadcasting the new bitcoin address set to all responding users, it is further configured to: and when the new bitcoin address of the current response user is not in the new bitcoin address set, controlling the current response user to quit the coin mixing process.
For other details of the technical solution for implementing each module in the blockchain coin mixing device in the above embodiment, reference may be made to the description of the blockchain coin mixing method in the above embodiment, and details are not described herein again.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiments, since they are substantially similar to the method embodiments, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiments
Referring to fig. 5, fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the present application. As shown in fig. 5, the terminal 50 includes a processor 51 and a memory 52 coupled to the processor 51.
The memory 52 stores program instructions that, when executed by the processor 51, cause the processor 51 to perform the steps of the blockchain coin mixing method in the above-described embodiment.
The processor 51 may also be referred to as a CPU (Central Processing Unit). The processor 51 may be an integrated circuit chip having signal processing capabilities. The processor 51 may also be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a storage medium according to an embodiment of the present application. The storage medium of the embodiment of the present application stores a program file 61 capable of implementing all the methods described above, where the program file 61 may be stored in the storage medium in the form of a software product, and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a mobile hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, or terminal devices, such as a computer, a server, a mobile phone, and a tablet.
In the several embodiments provided in the present application, it should be understood that the disclosed terminal, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. The above embodiments are merely examples and are not intended to limit the scope of the present disclosure, and all modifications, equivalents, and flow charts using the contents of the specification and drawings of the present disclosure or those directly or indirectly applied to other related technical fields are intended to be included in the scope of the present disclosure.

Claims (10)

1. A method for mixing coins in a block chain is characterized by comprising the following steps:
acquiring a plurality of response users in a mixed coin user, wherein the mixed coin user comprises a response user and an advertisement user;
creating a new bitcoin address belonging to each of said responding users;
inserting the new bitcoin addresses of the response users into a pre-established vector one by one, and randomly disordering the arrangement sequence of all elements in the vector when each new bitcoin address is inserted until the last response user is inserted, so as to obtain a new bitcoin address set of the response user;
and acquiring original bitcoin address sets of all the response users, initiating bitcoin transactions by the response users according to the mapping relation between the original bitcoin address sets and the new bitcoin address sets, submitting the transaction signatures to the advertising users after transaction signatures are generated, and submitting the transaction signatures to miners by the advertising users after all the response users confirm that no errors exist.
2. The blockchain coin mixing method according to claim 1, wherein before acquiring a plurality of responding users among the coin mixing users, further comprising:
acquiring a user initiating a mixed coin request to obtain a plurality of mixed coin users;
randomly selecting a user from the coin mixing users as a response user or an advertisement user;
and matching between the response user and the advertising user is realized, and after the matching is successful, a message of successful matching is disclosed to the whole network.
3. The blockchain coin mixing method according to claim 2, wherein said implementing the matching between the responding user and the advertising user and, after the matching is successful, disclosing a message of the successful matching to the whole network includes:
after the advertisement user pays half of the fee to the miners, the mixed currency information is broadcasted to the whole network;
selecting a target advertisement user from all advertisement users who issue the mixed currency information by the response user, and initiating a matching request;
the target advertisement user inquires all response users initiating matching and selects one target response user for matching;
after the target response user pays the fees to the miners, the matching information is disclosed to the whole network;
after the target advertisement user pays the other half of the fee to the miners, the information of successful matching is disclosed to the whole network;
and repeating the step of matching the advertising user with the response users until the advertising user is matched with all the response users initiating the matching.
4. The blockchain mixed currency method according to claim 3, wherein after the target user pays a fee to the miners in response to the payment of the fee, the method further comprises:
judging whether the target response user has violation behaviors or not;
if so, stopping matching the target advertisement user with the target response user, and reselecting a new response user for matching by the target advertisement user;
after the target advertisement user pays the other half of the fee to the miners, before the information of successful matching is disclosed to the whole network, the method further comprises the following steps:
judging whether the target advertisement user has violation behaviors or not;
and if so, stopping matching the target advertisement user with the target response user, and reselecting a new advertisement user for matching by the target response user.
5. The blockchain coin mixing method according to claim 1, wherein after acquiring a plurality of responding users among the coin mixing users, further comprising:
the responding users mutually check the amount of the original bitcoin addresses of other responding users;
and canceling the mixed currency qualification of the responding users of which the money amount is smaller than a preset threshold value.
6. The method for block chain coin mixing according to claim 1, wherein said inserting new bitcoin addresses of said responding users into a pre-established vector one by one, and randomly disordering the arrangement order of all elements in said vector every time one new bitcoin address is inserted until the last responding user is inserted, so as to obtain a new bitcoin address set of said responding users, comprises:
randomly numbering the response users, and pre-creating an n-dimensional vector C with an initial value of zero;
sequentially encrypting the new bitcoin addresses of the response users according to the numbers of the response users, randomly inserting the encrypted information into the vector C, signing the vector C, and sending the signature information to the next response user, and repeating the steps until the last response user;
and the last response user decrypts the vector C by using a private key of the last response user to obtain a new bitcoin address set of all response users, and broadcasts the new bitcoin address set to all response users.
7. The blockchain coin mixing method of claim 6 further comprising, after broadcasting said new set of bitcoin addresses to all responding users:
and when the new bitcoin address of the current response user is not in the new bitcoin address set, controlling the current response user to exit the coin mixing process.
8. A blockchain coin mixing device is characterized by comprising:
the system comprises an acquisition module, a selection module and a display module, wherein the acquisition module is used for acquiring a plurality of response users in mixed coin users, and the mixed coin users comprise response users and advertisement users;
a creation module for creating a new bitcoin address belonging to each of said responding users;
the address mixing module is used for inserting the new bitcoin addresses of the response users into a pre-established vector one by one, and randomly disordering the arrangement sequence of all elements in the vector when each new bitcoin address is inserted until the last response user is inserted, so as to obtain a new bitcoin address set of the response users;
and the coin mixing module is used for acquiring the original bitcoin address sets of all the response users, initiating bitcoin transactions by the response users according to the mapping relation between the original bitcoin address sets and the new bitcoin address sets, submitting the transaction signatures to the advertising users after transaction signatures are generated, and submitting the transaction signatures to miners by the advertising users after all the response users confirm that no errors exist.
9. A terminal, characterized in that the terminal comprises a processor, a memory coupled to the processor, in which program instructions are stored, which program instructions, when executed by the processor, cause the processor to carry out the steps of the block chain coin mixing method according to any one of claims 1 to 7.
10. A storage medium storing a program file capable of implementing the blockchain coin mixing method according to any one of claims 1 to 7.
CN202011503073.4A 2020-12-18 2020-12-18 Block chain coin mixing method and device, terminal and storage medium Pending CN112632602A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011503073.4A CN112632602A (en) 2020-12-18 2020-12-18 Block chain coin mixing method and device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011503073.4A CN112632602A (en) 2020-12-18 2020-12-18 Block chain coin mixing method and device, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN112632602A true CN112632602A (en) 2021-04-09

Family

ID=75317573

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011503073.4A Pending CN112632602A (en) 2020-12-18 2020-12-18 Block chain coin mixing method and device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN112632602A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116910818A (en) * 2023-09-13 2023-10-20 北京数牍科技有限公司 Data processing method, device, equipment and storage medium based on privacy protection

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116910818A (en) * 2023-09-13 2023-10-20 北京数牍科技有限公司 Data processing method, device, equipment and storage medium based on privacy protection
CN116910818B (en) * 2023-09-13 2023-11-21 北京数牍科技有限公司 Data processing method, device, equipment and storage medium based on privacy protection

Similar Documents

Publication Publication Date Title
US11818269B2 (en) Computer-implemented system and method providing a decentralised protocol for the recovery of cryptographic assets
US11483161B2 (en) Method for information processing and non-transitory computer readable storage medium
CN107392603B (en) Transaction method and apparatus using digital money
EP0995177B1 (en) Symmetrically-secured electronic communication system
US20060153380A1 (en) Personal cryptoprotective complex
KR102322118B1 (en) Private key securing methods of decentralizedly storying keys in owner's device and/or blockchain nodes
CN111523891B (en) Information encryption method, device, equipment and storage medium based on block chain
WO2020060094A1 (en) Node device constituting blockchain network and method for operation of node device
CN106452775A (en) Method and apparatus for accomplishing electronic signing and signing server
CN107908932B (en) Digital currency anti-counterfeiting and verification method, system and equipment based on L algorithm
JP2002520905A (en) Method and device for updating a cryptographic index key having leakage resistance
PL176458B1 (en) Method of and system for encoding with deposition of encoding keys
CN103942896A (en) System for money withdrawing without card on ATM
CN110336779B (en) Block chain construction method and device and electronic equipment
CN109711841B (en) Data transaction method and system, platform and storage medium
US20190005495A1 (en) Method for verifying transactions in chip cards
CN104376465A (en) Safe mobile payment method
WO2020076234A1 (en) Apparatus and method for controlling data access
CN112632602A (en) Block chain coin mixing method and device, terminal and storage medium
CN110839067B (en) Information providing method and device
CN112712354A (en) Interaction method of digital currency wallet and digital currency server
CN113949988B (en) Position protection method and system and storage medium
EP0886248B1 (en) Method and apparatus for registration of information with plural institutions and recording medium with registration program stored thereon
KR102475434B1 (en) Security method and system for crypto currency
CN113159940A (en) Transaction method, system and computer equipment for enhanced bit currency wallet

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