CN113627910A - Block chain anonymous red packet sending method, equipment and storage medium - Google Patents

Block chain anonymous red packet sending method, equipment and storage medium Download PDF

Info

Publication number
CN113627910A
CN113627910A CN202111034625.6A CN202111034625A CN113627910A CN 113627910 A CN113627910 A CN 113627910A CN 202111034625 A CN202111034625 A CN 202111034625A CN 113627910 A CN113627910 A CN 113627910A
Authority
CN
China
Prior art keywords
red packet
transaction
hash
red
contract
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
CN202111034625.6A
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.)
Hangzhou Fuzamei Technology Co Ltd
Original Assignee
Hangzhou Fuzamei Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Fuzamei Technology Co Ltd filed Critical Hangzhou Fuzamei Technology Co Ltd
Priority to CN202111034625.6A priority Critical patent/CN113627910A/en
Publication of CN113627910A publication Critical patent/CN113627910A/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/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • 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/6245Protecting personal data, e.g. for financial or medical purposes
    • G06F21/6254Protecting personal data, e.g. for financial or medical purposes by anonymising data, e.g. decorrelating personal data from the owner's identification
    • 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/3827Use of message hashing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Abstract

The invention belongs to the technical field of computers, and particularly relates to a method and equipment for sending block chain anonymous red packet and a storage medium. In the method provided by the invention, a red packet sending user sends a red packet to a red packet receiving user through a red packet contract, and in the process, the identity of a sender can be hidden through at least once anonymous transfer of money by the red packet sending user, but because the red packet check is picked up and a red packet picking transaction needs to be constructed, the red packet receiving user constructs the red packet picking transaction and signs and sends the red packet picking transaction, so that the transaction is recorded in a picking record of the red packet check, the red packet receiving user who can trace the red packet and cannot trace the red packet sending user with other users, and the privacy of the red packet sending user is protected.

Description

Block chain anonymous red packet sending method, equipment and storage medium
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a block chain anonymous red packet sending method, device and storage medium.
Background
Along with the intelligent development of science and technology, the functions of mobile phone communication software are more and more complete, more and more people send red packages to relatives and friends through the mobile phone communication software to set off the festival atmosphere when holidays come, and more people also send red packages to the public in society for the purposes of propaganda, marketing and the like through the mobile phone communication software, the red package sending and receiving all have records, and the information of a red package receiving user is disclosed. Therefore, an anonymous red packet robbing method is needed to protect the privacy of the red packet sender.
Disclosure of Invention
In order to solve the technical problem, the invention provides a method, equipment and a storage medium for flushing red packets anonymously by using a block chain, which can protect the privacy of a red packet sender.
In order to achieve the purpose, the invention adopts the following technical scheme.
In a first aspect, an anonymous red packet robbing method based on a blockchain is provided, which includes the following steps:
roles in the anonymous red packet robbing method based on the block chain comprise: the system comprises a red packet sending user, a red packet receiving user, a red packet contract and a block chain system, wherein the red packet contract is deployed on the block chain system, and the block chain system is provided with a revocation hash library;
parameters in the block chain-based anonymous red packet scrambling method comprise: the method comprises the steps of carrying out Hash ID and a check, wherein the check is an uneconomical transaction output with a plurality of token money values, and the Hash ID is obtained by carrying out Hash operation on the number of the token money based on the check and a random number corresponding to the check;
a red packet sending user initiates a transfer transaction to a contract account of the red packet contract, the transfer transaction costs a plurality of non-cost transaction outputs, a first check is generated, a first support ticket is stored in the contract account of the red packet contract, the hash ID and a first zero knowledge proof of the first check are sent to the red packet contract, the first zero knowledge proof is used for proving that the hash ID of the first check corresponds to the first support ticket, the red packet contract verifies the first zero knowledge proof, if verification is passed, the red packet sending user constructs a red packet sending transaction which costs the first check and a second zero knowledge proof based on the red packet contract, the red packet sending transaction is signed by the red packet contract, the red packet sending transaction comprises the first check, a set number of red packet checks, transaction fees and the red hash ID corresponding to each red packet check, and the red packet transaction costs the first support ticket to generate the set number of red packet checks and the transaction fees, the number of the tokens contained in each red-pack check is distributed by the red-pack contract according to a preset distribution rule, and a second zero knowledge proof is used for proving that the number of the tokens of the first check is equal to the sum of the total number of the tokens of all the red-pack checks and the transaction fee;
before the red packet sending transaction is established, the red packet sending user presets the number of red packets to be sent; when the red packet sending transaction is established, a red packet sending user selects a corresponding secret random number for each red packet, and generates a red packet hash ID corresponding to each red packet check according to the secret random number of each red packet check and the number of tokens of the secret random number, the red packet sending user sends the generated red packet hash ID to a red packet contract, and the red packet contract stores the red packet hash ID in a first Mercker tree;
the red packet sending user sends the constructed red packet sending transaction and the second zero knowledge certificate to a red packet contract, the red packet contract verifies the second zero knowledge certificate, and if the verification is passed, the red packet sending transaction is submitted to a block chain system, executed and recorded;
the red packet sending user writes all secret random numbers into the red packet private information and publishes the red packet private information through a medium; a red packet receiving user acquires a pickup certificate based on private information published by a red packet sending user, wherein the pickup certificate is one of all secret random numbers contained in the private information, and each secret random number can be acquired only once;
the method comprises the steps that a red packet receiving user generates a red packet getting transaction and a third zero knowledge certificate, the red packet getting transaction, the second zero knowledge certificate and the third zero knowledge certificate are sent to a red packet contract, the red packet contract verifies the second zero knowledge certificate and the third zero knowledge certificate, the verification is passed, a waste hash which is openly input by the third zero knowledge certificate is stored in a block chain waste hash library, and the red packet getting transaction is sent to a block chain system; the red packet pickup transaction is signed by a red packet receiving user, the red packet pickup transaction costs the red packet checks corresponding to the pickup voucher to generate a plurality of second checks, and the second zero knowledge proves that the number of tokens of the red packet checks corresponding to the pickup voucher is equal to the sum of the number of tokens of all the second checks; the public input of the third zero knowledge proof comprises a root hash of the first Mercker tree, the number of tokens contained in a red packet acquired by a red packet receiving user and a revocation hash, wherein the revocation hash is a hash value of a random number acquired by the red packet receiving user; the private input with the zero knowledge proof comprises a red packet hash ID corresponding to a red packet acquired by a red packet receiving user, Mercker tree path data corresponding to the red packet hash ID, and a second random number acquired by the red packet receiving user, wherein the Mercker tree path data are generated by the red packet receiving user according to the position of the red packet hash ID of the red packet receiving user in the first Mercker tree.
Preferably, the red packet sending user publishes the red packet private information through a two-dimensional code.
In a second aspect, a computer device is provided, comprising one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method as described in the first aspect above.
In a third aspect, there is provided a storage medium storing a computer program which, when executed by a processor, implements the method as described in the first aspect above.
The invention has the advantages that the anonymity of the sender is realized, the sender creates the red packet sending transaction based on the red packet contract, the red packet sending transaction is signed by the red packet contract, the anonymous transfer is realized, the red packet receiver cannot know the real red packet receiver, other people cannot know the red packet sent by the red packet receiver, and the anonymity of the red packet sending is realized.
Drawings
Fig. 1 is a schematic structural diagram of a computer device according to embodiment 2 of the present invention.
Detailed Description
The invention is described in further detail below with reference to specific embodiments and the attached drawing figures. Those skilled in the art will be able to implement the invention based on these teachings. Moreover, the embodiments of the present invention described in the following description are generally only some embodiments of the present invention, and not all embodiments. Therefore, all other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without any creative effort shall fall within the protection scope of the present invention. Unless otherwise specified, the methods described in the examples of the present invention are all those known to those skilled in the art.
Example 1
The embodiment provides a method for flushing packets anonymously by a blockchain, which comprises the following steps:
roles in the anonymous red packet robbing method based on the block chain comprise: the system comprises a red packet sending user, a red packet receiving user, a red packet contract and a block chain system, wherein the red packet contract is deployed on the block chain system, and the block chain system is provided with a revocation hash library;
parameters in the block chain-based anonymous red packet scrambling method comprise: the method comprises the steps of carrying out Hash ID and a check, wherein the check is an uneconomical transaction output with a plurality of token money values, and the Hash ID is obtained by carrying out Hash operation on the number of the token money based on the check and a random number corresponding to the check;
a red packet sending user initiates a transfer transaction to a contract account of the red packet contract, the transfer transaction costs a plurality of non-cost transaction outputs, a first check is generated, a first support ticket is stored in the contract account of the red packet contract, the hash ID and a first zero knowledge proof of the first check are sent to the red packet contract, the first zero knowledge proof is used for proving that the hash ID of the first check corresponds to the first support ticket, the red packet contract verifies the first zero knowledge proof, if verification is passed, the red packet sending user constructs a red packet sending transaction which costs the first check and a second zero knowledge proof based on the red packet contract, the red packet sending transaction is signed by the red packet contract, the red packet sending transaction comprises the first check, a set number of red packet checks, transaction fees and the red hash ID corresponding to each red packet check, and the red packet transaction costs the first support ticket to generate the set number of red packet checks and the transaction fees, the number of the tokens contained in each red-pack check is distributed by the red-pack contract according to a preset distribution rule, and a second zero knowledge proof is used for proving that the number of the tokens of the first check is equal to the sum of the total number of the tokens of all the red-pack checks and the transaction fee;
before the red packet sending transaction is established, the red packet sending user presets the number of red packets to be sent; when the red packet sending transaction is established, a red packet sending user selects a corresponding secret random number for each red packet, and generates a red packet hash ID corresponding to each red packet check according to the secret random number of each red packet check and the number of tokens of the secret random number, the red packet sending user sends the generated red packet hash ID to a red packet contract, and the red packet contract stores the red packet hash ID in a first Mercker tree;
the red packet sending user sends the constructed red packet sending transaction and the second zero knowledge certificate to a red packet contract, the red packet contract verifies the second zero knowledge certificate, and if the verification is passed, the red packet sending transaction is submitted to a block chain system, executed and recorded;
the red packet sending user writes all secret random numbers into the red packet private information and publishes the red packet private information through a medium;
a red packet receiving user acquires a pickup certificate based on private information published by a red packet sending user, wherein the pickup certificate is one of all secret random numbers contained in the private information, and each secret random number can be acquired only once;
the method comprises the steps that a red packet receiving user generates a red packet getting transaction and a third zero knowledge certificate, the red packet getting transaction, the second zero knowledge certificate and the third zero knowledge certificate are sent to a red packet contract, the red packet contract verifies the second zero knowledge certificate and the third zero knowledge certificate, the verification is passed, a waste hash which is openly input by the third zero knowledge certificate is stored in a block chain waste hash library, and the red packet getting transaction is sent to a block chain system; the red packet pickup transaction is signed by a red packet receiving user, the red packet pickup transaction costs the red packet checks corresponding to the pickup voucher to generate a plurality of second checks, and the second zero knowledge proves that the number of tokens of the red packet checks corresponding to the pickup voucher is equal to the sum of the number of tokens of all the second checks; the public input of the third zero knowledge proof comprises a root hash of the first Mercker tree, the number of tokens contained in a red packet acquired by a red packet receiving user and a revocation hash, wherein the revocation hash is a hash value of a random number acquired by the red packet receiving user; the private input with the zero knowledge proof comprises a red packet hash ID corresponding to a red packet acquired by a red packet receiving user, Mercker tree path data corresponding to the red packet hash ID, and a second random number acquired by the red packet receiving user, wherein the Mercker tree path data are generated by the red packet receiving user according to the position of the red packet hash ID of the red packet receiving user in the first Mercker tree.
The principle of the above technical solution is that, firstly, the transaction method adopted in this embodiment is similar to a mimblewick, the actual amount of the transaction does not appear in the transaction, each transaction amount is configured with a corresponding random number as a private key, the output of the transaction, that is, the commitment in the mimblewick, conforms to the commitment formula c-v-G + r-H, wherein G and H are both in a public state at a generation point on an elliptic curve, v is the actual amount of money transferred, r is the private key of v, the private key thereof must be known when v is used, the transaction is substantially similar to a check, a specific address is not bound, but an address is set by a user who knows the private key, so that an initiator constructs a transaction without knowing the address of a transfer and cannot trace back the address of a receiver The sender has the right to use the first ticket, and a specific proving mode is actually a cryptology problem, which is not the key point of the application, and the relevant content of the zero knowledge proof in the cryptology can be referred to.
In fact, the random value of the first check is actually selected by a red packet sending user, the random value of the check is selected by a check owning user in the normal case, the owner of the first check is actually the red packet sending user and only stores a red packet contract account, so that the random number of the first check is selected by the red packet sending user, after the red packet contract verifies a first zero knowledge certificate, the red packet sending transaction can spend a first ticket to construct the red packet sending transaction, and generally, the transaction is constructed by who has a signature to send, and then consensus is carried out, the consensus changes tokens in the first ticket into a set number of red packet checks and transaction fees through transaction execution of the red packet sending transaction, and the transaction fees are directly transferred into the red packet contract, so that the signature of the red packet sending user is published, and the generation transaction of the red packet check is correspondingly recorded, thus, all persons know that the owner of the signature sends the red packet, the signature is published to the outside, some organizations or celebrities can almost correspond to the signature of the private key of the organizations or celebrities, and the signature is also exposed to the privacy of the user, so that in the embodiment, the red packet sending transaction is constructed by the red packet sending user but is sent by the signature of the red packet contract, the red packet sending user only needs to send the constructed red packet sending transaction and relevant certificates to the red packet contract, before sending the constructed red packet sending transaction, the red packet sending user determines the number of red packets to be sent in advance and then constructs the red packet sending transaction, the red packet sending transaction comprises a first check, a set number of red packet checks and a red packet hash ID corresponding to each red packet, the red packet sending transaction costs the first check to generate the set number of red packet checks, and the hash ID is a zero knowledge certificate for generating a red packet receiving check, namely a third zero knowledge certificate, the drawing logic is described in detail later, and the number of tokens contained in each red-pack check of the red-pack sending transaction is distributed by the red-pack contract according to a preset distribution rule; as mentioned above, each check has a random number as a private key, and therefore, a red packet sending user needs to select a corresponding secret random number for each red packet, and then the red packet sending user can generate a red packet hash ID corresponding to each red packet check according to the secret random number of each red packet check and the number of tokens thereof, and then send the generated red packet hash ID to a red packet contract, and the red packet contract stores the red packet hash ID in a first tacle tree, which is also used for subsequently constructing and obtaining a zero knowledge proof of the red packet check. The method is characterized in that a transaction is built, a red packet sending user sends the transaction to a red packet contract and provides a second zero knowledge proof to prove that the transaction is legal, so that the red packet contract can sign the transaction, and how to prove that the transaction is legal is simple. After the red packet contract is successfully verified, the red packet sending transaction signed by the red packet contract is sent, the block chain executes the transaction, so that a red packet sending user generates a plurality of red packets through the red packet sending transaction, the number of the red packets is set by the red packet sending user, next, a red packet receiving user is determined, and then the red packet receiving user receives the red packets.
After the construction of the red packet sending transaction is completed by the red packet sending user, the secret random numbers of each selected red packet check are published, the publishing mode can be a mode of integrating in a two-dimensional code and other user code scanning and getting, in short, the red packet sending user publishes the secret numbers, the red packet receiving user gets a getting certificate which comprises one of the secret random numbers published by the red packet sending user, the secret random numbers can not be repeatedly obtained, the red packet receiving user constructs a red packet getting transaction and a third zero knowledge certificate according to the secret random numbers, the third zero knowledge certificate and the red packet getting transaction are used in combination, firstly, the third zero knowledge certificate is verified by the red packet contract, the third zero knowledge certificate proves that the secret random numbers are known by the red packet receiving user under the condition that the secret random numbers are not exposed, and a person who provides the third zero knowledge certificate can get the corresponding red packet after the contract is verified, then the red packet receiving user will construct a red packet receiving transaction and then send the signature to the block chain, then carry on the consensus, the consensus gets through the execution of the red packet receiving transaction and extracts the token in the check from the contract address of the red packet contract to the address set by him, the second check is the check with random number set by the red packet receiving user, the random number of the check after changing into the second check is only known by the red packet receiving user alone, then the check belongs to the red packet receiving user (the original random number except the red packet receiving user, the red packet sending user knows the secret random number of all the red packet checks, therefore can't be considered to belong to the red packet receiving user completely).
Then, the third zero knowledge proof in the foregoing is how to prove that the corresponding red packet check can be taken without exposing the secret number, first, the public input of the third zero knowledge proof includes a root hash of a first mercker tree, the number of tokens included in the red packet check acquired by the red packet receiving user, and a revocation hash, and the private input of the zero knowledge proof includes a hash ID corresponding to the red packet check acquired by the red packet receiving user, mercker tree path data corresponding to the hash ID, and a secret random number acquired by the red packet receiving user, where the revocation hash is a hash value of the random number acquired by the red packet receiving user, and the mercker tree path data is generated by the red packet receiving user according to the position of the self red packet hash ID in the first mercker tree; it should be noted that the private input of the zero knowledge proof is input by the person who constructed the proof, and cannot be viewed and modified by others, the public input is visible to all people, and that verifying the zero knowledge proof requires a zero knowledge proof circuit, which is public, and in fact the zero knowledge proof is also constructed based on the proof circuit. In this embodiment, the secret random number of the private input is subjected to hash operation to obtain the revoked hash of the public input, the proving circuit tells you that a component represents the secret random number (the plaintext cannot be seen), and the second component is subjected to hash operation, so that a component can obtain a result by putting the component into the second component, the result is consistent with the public input and is correct, and certainly, whether the second component is subjected to hash operation can be checked before the verification, for example, the number of tokens included in a red packet check acquired by a user for receiving the red packet is input in a public manner, which can be verified by a red packet contract, whether the number is included in one of the numbers allocated by the red packet contract and records the hash ID corresponding to the number, then the number of tokens of the red packet and the secret random number of the hash ID can be calculated, and then the proving circuit tells you that a component is a method for calculating the hash ID and compares the result with the filled hash ID to finally feed back whether the result is equal, for example, three spaces are provided, wherein one space is filled with a secret random number which is filled with a secret input random number, one space is filled with the number of tokens which can be filled, the other space is filled with a secret input hash ID which is filled with a secret input hash ID, and the final feedback is equal to the number of tokens which is input publicly; then, to explain what the private input and the public input cooperate to prove, first, the root hash of the corresponding first tacher tree can be calculated by matching the red packet hash ID of the private input with the corresponding tacher tree path data, and then whether the root hash is consistent with the root hash of the first tacher tree in the public input is compared, through the two private inputs, the red packet hash ID really exists on the chain, so that the corresponding red packet can be obtained really, and through the two private inputs, the two secret inputs are accurately stated to be correct, so that the establishment of a plurality of equations indicates that the secret inputs are not accidental coincidence but are correct really.
In the process of sending the red packet to the receiving party, the red packet sender constructs a red packet sending transaction to generate a red packet check and the red packet check is signed and submitted by a red packet user, so that the red packet sending user can be traced back, and the red packet receiving transaction constructed by a red packet receiving user is signed by a red packet contract when the red packet check is received, so that any information of the receiving party cannot be known, and the privacy of the red packet receiving user is ensured to the maximum extent.
In the process, the red packet sending transaction is constructed by a red packet sending user but signed by a red packet contract, the privacy of the red packet sending user is protected, the drawing of the red packet checks corresponds to the corresponding random number, specifically, each red packet check is configured with a Hash ID, the Hash ID is generated based on the corresponding random number and the Hash operation of the token money amount, under the condition that the token money amount is public, the red packet can be drawn as long as the random number provided by the red packet drawing user can calculate the corresponding Hash ID, the address of a red packet receiving user is not reflected in the transaction, but the red packet sender constructs the red packet sending transaction and selects various parameters, so the red packet receiver can trace the red packet receiver according to the grasped information, the grasped information of the red packet receiving user is insufficient, and the transaction is signed by the red packet contract, the red packet sender cannot be traced back.
Example 2
A computer device, the device comprising: one or more processors; memory for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to perform the method of embodiment 1.
A storage medium storing a computer program which, when executed by a processor, implements the method as described in embodiment 1 above.
Fig. 1 is a schematic structural diagram of an apparatus provided in this embodiment.
As shown in fig. 1, as another aspect, the present application also provides a computer apparatus 500 including one or more Central Processing Units (CPUs) 501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data necessary for the operation of the apparatus 500 are also stored. The CPU501, ROM502, and RAM503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication via a network such as the internet, and the processing driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to the embodiments disclosed in the present application, the method described in the above embodiment 1 may be implemented as a computer software program. For example, embodiments disclosed herein include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing the method described in any of the embodiments above. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511.
As yet another aspect, the present application also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the apparatus of the above-described embodiment; or it may be a separate computer readable storage medium not incorporated into the device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described herein.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software or hardware. The described units or modules may also be provided in a processor, for example, each of the described units may be a software program provided in a computer or a mobile intelligent device, or may be a separately configured hardware device. Wherein the designation of a unit or module does not in some way constitute a limitation of the unit or module itself.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the present application. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (4)

1. A block chain anonymous red packet sending method is characterized by comprising the following contents:
roles in the anonymous red packet robbing method based on the block chain comprise: the system comprises a red packet sending user, a red packet receiving user, a red packet contract and a block chain system, wherein the red packet contract is deployed on the block chain system, and the block chain system is provided with a revocation hash library;
parameters in the block chain-based anonymous red packet scrambling method comprise: the method comprises the steps of carrying out Hash ID and a check, wherein the check is an uneconomical transaction output with a plurality of token money values, and the Hash ID is obtained by carrying out Hash operation on the number of the token money based on the check and a random number corresponding to the check;
a red packet sending user initiates a transfer transaction to a contract account of the red packet contract, the transfer transaction costs a plurality of non-cost transaction outputs, a first check is generated, a first support ticket is stored in the contract account of the red packet contract, the hash ID and a first zero knowledge proof of the first check are sent to the red packet contract, the first zero knowledge proof is used for proving that the hash ID of the first check corresponds to the first support ticket, the red packet contract verifies the first zero knowledge proof, if verification is passed, the red packet sending user constructs a red packet sending transaction which costs the first check and a second zero knowledge proof based on the red packet contract, the red packet sending transaction is signed by the red packet contract, the red packet sending transaction comprises the first check, a set number of red packet checks, transaction fees and the red hash ID corresponding to each red packet check, and the red packet transaction costs the first support ticket to generate the set number of red packet checks and the transaction fees, the number of the tokens contained in each red-pack check is distributed by the red-pack contract according to a preset distribution rule, and a second zero knowledge proof is used for proving that the number of the tokens of the first check is equal to the sum of the total number of the tokens of all the red-pack checks and the transaction fee;
before the red packet sending transaction is established, the red packet sending user presets the number of red packets to be sent; when the red packet sending transaction is established, a red packet sending user selects a corresponding secret random number for each red packet, and generates a red packet hash ID corresponding to each red packet check according to the secret random number of each red packet check and the number of tokens of the secret random number, the red packet sending user sends the generated red packet hash ID to a red packet contract, and the red packet contract stores the red packet hash ID in a first Mercker tree;
the red packet sending user sends the constructed red packet sending transaction and the second zero knowledge certificate to a red packet contract, the red packet contract verifies the second zero knowledge certificate, and if the verification is passed, the red packet sending transaction is submitted to a block chain system, executed and recorded;
the red packet sending user writes all secret random numbers into the red packet private information and publishes the red packet private information through a medium;
a red packet receiving user acquires a pickup certificate based on private information published by a red packet sending user, wherein the pickup certificate is one of all secret random numbers contained in the private information, and each secret random number can be acquired only once;
the method comprises the steps that a red packet receiving user generates a red packet getting transaction and a third zero knowledge certificate, the red packet getting transaction, the second zero knowledge certificate and the third zero knowledge certificate are sent to a red packet contract, the red packet contract verifies the second zero knowledge certificate and the third zero knowledge certificate, the verification is passed, a waste hash which is openly input by the third zero knowledge certificate is stored in a block chain waste hash library, and the red packet getting transaction is sent to a block chain system; the red packet pickup transaction is signed by a red packet receiving user, the red packet pickup transaction costs the red packet checks corresponding to the pickup voucher to generate a plurality of second checks, and the second zero knowledge proves that the number of tokens of the red packet checks corresponding to the pickup voucher is equal to the sum of the number of tokens of all the second checks; the public input of the third zero knowledge proof comprises a root hash of the first Mercker tree, the number of tokens contained in a red packet acquired by a red packet receiving user and a revocation hash, wherein the revocation hash is a hash value of a random number acquired by the red packet receiving user; the private input with the zero knowledge proof comprises a red packet hash ID corresponding to a red packet acquired by a red packet receiving user, Mercker tree path data corresponding to the red packet hash ID, and a second random number acquired by the red packet receiving user, wherein the Mercker tree path data are generated by the red packet receiving user according to the position of the red packet hash ID of the red packet receiving user in the first Mercker tree.
2. The method as claimed in claim 1, wherein the red packet sending user publishes private information of the red packet by using a two-dimensional code.
3. A computer device, characterized by one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method recited in claim 1 or 2.
4. A storage medium storing a computer program, characterized in that the program, when executed by a processor, implements the method according to claim 1 or 2.
CN202111034625.6A 2021-09-03 2021-09-03 Block chain anonymous red packet sending method, equipment and storage medium Pending CN113627910A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111034625.6A CN113627910A (en) 2021-09-03 2021-09-03 Block chain anonymous red packet sending method, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111034625.6A CN113627910A (en) 2021-09-03 2021-09-03 Block chain anonymous red packet sending method, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113627910A true CN113627910A (en) 2021-11-09

Family

ID=78389184

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111034625.6A Pending CN113627910A (en) 2021-09-03 2021-09-03 Block chain anonymous red packet sending method, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113627910A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101837169B1 (en) * 2016-12-29 2018-03-09 주식회사 코인플러그 Method for providing secret electronic voting service on the basis of blockchain with merkle tree structure by using zero knowledge proof algorithm, and voting coin minter server, voting token distributor server and voting supporting server using the same
US20180183606A1 (en) * 2016-12-23 2018-06-28 Wal-Mart Stores, Inc. Verifying authenticity of computer readable information using the blockchain
CN109727009A (en) * 2019-01-28 2019-05-07 杭州复杂美科技有限公司 Red packet processing method, equipment and storage medium
US20190251553A1 (en) * 2018-11-07 2019-08-15 Alibaba Group Holding Limited Blockchain data protection based on account note model with zero-knowledge proof
CN110321735A (en) * 2019-04-29 2019-10-11 山东工商学院 Business handling method, system and storage medium based on zero-knowledge proof
CN111428268A (en) * 2020-03-24 2020-07-17 山东大学 V2G transaction privacy protection method, device and system based on block chain
CN112766943A (en) * 2021-01-18 2021-05-07 西安电子科技大学 Anonymous computing block chain data processing method, system, medium, device and application
CN112865980A (en) * 2021-02-01 2021-05-28 杭州复杂美科技有限公司 Block chain encryption voting method, computer device and storage medium
CN112968881A (en) * 2021-02-01 2021-06-15 杭州复杂美科技有限公司 Block chain anonymous voting method, computer device and storage medium
CN113095827A (en) * 2021-04-09 2021-07-09 杭州复杂美科技有限公司 Anonymous multiple signature method, computer device, and storage medium
CN113112252A (en) * 2021-04-28 2021-07-13 深圳壹账通智能科技有限公司 Resource transfer method and device based on block chain, electronic equipment and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180183606A1 (en) * 2016-12-23 2018-06-28 Wal-Mart Stores, Inc. Verifying authenticity of computer readable information using the blockchain
KR101837169B1 (en) * 2016-12-29 2018-03-09 주식회사 코인플러그 Method for providing secret electronic voting service on the basis of blockchain with merkle tree structure by using zero knowledge proof algorithm, and voting coin minter server, voting token distributor server and voting supporting server using the same
US20190251553A1 (en) * 2018-11-07 2019-08-15 Alibaba Group Holding Limited Blockchain data protection based on account note model with zero-knowledge proof
CN109727009A (en) * 2019-01-28 2019-05-07 杭州复杂美科技有限公司 Red packet processing method, equipment and storage medium
CN110321735A (en) * 2019-04-29 2019-10-11 山东工商学院 Business handling method, system and storage medium based on zero-knowledge proof
CN111428268A (en) * 2020-03-24 2020-07-17 山东大学 V2G transaction privacy protection method, device and system based on block chain
CN112766943A (en) * 2021-01-18 2021-05-07 西安电子科技大学 Anonymous computing block chain data processing method, system, medium, device and application
CN112865980A (en) * 2021-02-01 2021-05-28 杭州复杂美科技有限公司 Block chain encryption voting method, computer device and storage medium
CN112968881A (en) * 2021-02-01 2021-06-15 杭州复杂美科技有限公司 Block chain anonymous voting method, computer device and storage medium
CN113095827A (en) * 2021-04-09 2021-07-09 杭州复杂美科技有限公司 Anonymous multiple signature method, computer device, and storage medium
CN113112252A (en) * 2021-04-28 2021-07-13 深圳壹账通智能科技有限公司 Resource transfer method and device based on block chain, electronic equipment and storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
XIAOHUI YANG等: "A zero-knowledge-proof-based digital identity management scheme in blockchain", COMPUTERS & SECURITY, vol. 99, pages 1 - 17 *
张奥等: "区块链隐私保护研究与实践综述", 软件学报, vol. 31, no. 05, pages 1406 - 1434 *
杨雅都等: "基于区块链技术的在线学习资源管理模式研究", 软件导刊, vol. 20, no. 07, pages 149 - 155 *
王子钰等: "基于聚合签名与加密交易的全匿名区块链", 计算机研究与发展, vol. 55, no. 10, pages 2185 - 2198 *

Similar Documents

Publication Publication Date Title
CN107994991B (en) Data processing method, data processing server and storage medium
US9979686B2 (en) Methods and systems for using deep-strings in computation and communication
WO2019109003A1 (en) Blockchain system for confidential and anonymous smart contracts
CN111108732A (en) Method, system and computer program product for determining reimbursement capabilities of a digital asset exchange
CN111815322B (en) Distributed payment method with selectable privacy service based on Ethernet
CN113393225B (en) Digital currency encryption payment method and system
CN113783697B (en) Committee-based data broadcast service certification consensus protocol application method
CN110619222A (en) Authorization processing method, device, system and medium based on block chain
CN111049806B (en) Joint authority control method and device, electronic equipment and storage medium
CN110458507B (en) Authorization method and device for public number business hosting
CN112073196A (en) Service data processing method and device, electronic equipment and storage medium
CN114024723B (en) Online signing method and device based on ESOP system, equipment and medium
CN114519206A (en) Method for anonymously signing electronic contract and signature system
CN113627911A (en) Method, device and storage medium for anonymously receiving and sending red packet based on block chain
CN111275417B (en) Transaction endorsement processing method, server and computer readable storage medium
JPWO2020178752A5 (en)
CN113627910A (en) Block chain anonymous red packet sending method, equipment and storage medium
CN113627908A (en) Red packet anonymous getting method, device and storage medium based on block chain
JP2697876B2 (en) Electronic bidding system
CN111539719B (en) Audit coin-mixing service method and system model based on blind signature
CN115967508A (en) Data access control method and device, equipment, storage medium and program product
CN111552950A (en) Software authorization method and device and computer readable storage medium
JP3293461B2 (en) Restricted blind signature method and system
CN113627912A (en) Anonymous red packet robbing method and device based on block chain and storage medium
CN114650136B (en) Electronic signature method and device based on hybrid cloud

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