A donation system and method based on privacy contract technology
By a donation system based on privacy contract technology, multiple modules and smart contracts are used to solve the problems of privacy protection and auditing processes in the traditional donation management platform, and realize the automatic distribution and logistics tracking of donations in the trusted environment. Protect the privacy and donation of materials for donors.
Patent Information
- Application Number
- CN202210527977.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-16
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2042-05-16
AI Technical Summary
The traditional donation management platform based on cloud computing has problems such as opaque fund data, unclear subject definition, and lax audit process. Blockchain-based solutions ignore privacy protection, resulting in the infringement of the privacy rights of donated users.
Adopting a donation system based on privacy contract technology, through multiple modules (recipient module, donor module, intermediary module, courier module, audit module and alliance blockchain module) and smart contracts, automatic distribution of donated materials is realized and reliable logistics tracking to protect donors’ privacy and donated material information.
Realize automatic distribution and reliable logistics tracking of donated materials in a trusted environment, protect donors' privacy and donated material information, and resist collusion and theft attacks by malicious middlemen and transporters.
Smart Images

Figure CN114897611B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a donation system and method based on privacy contract technology, belonging to the field of privacy protection, donation services and trusted hardware. Background Art
[0002] The traditional centralized donation management platform based on cloud computing has problems such as opaque payment data, unclear subject definition, lax audit process, and the risk of single point failure. In order to solve the problems of the above-mentioned traditional donation system, some blockchain-based solutions have emerged, such as: physical delivery proof solution based on Ethereum, physical asset delivery solution with multiple transporters based on blockchain, etc. However, these solutions ignore the basic privacy protection issues. First, in order to ensure credibility and verifiability, the blockchain discloses all transactions and data on it, which will lead to the leakage of personal sensitive information with identification such as the name, gender, donation amount, home address, financial status, etc. of the donor, resulting in the infringement of the privacy rights of the donor. Second, the existing audit scheme cannot involve donation privacy protection; in order to assist middlemen (such as charities) to complete the distribution and delivery of materials, the identity information and donation intention of the donor need to be disclosed to them. If this information and data are used by malicious middlemen, it will also have serious consequences of privacy leakage. In addition, malicious middlemen and transporters will launch conspiracy attacks and theft attacks, resulting in the ineffective protection of the property safety of the donor. Summary of the invention
[0003] The present invention aims to address the deficiencies of the above-mentioned prior art and proposes a donation system and method based on privacy contract technology, so as to resist collusion attacks and theft attacks generated by malicious middlemen and transporters during the donation service process, realize automatic allocation of donated materials and reliable logistics tracking in a trusted environment, thereby ensuring that the donation amount and donation intention of the donor are not tampered with, and protecting the identity privacy of the donating user and the information privacy of the donated materials.
[0004] The present invention adopts the following technical solutions to achieve the above-mentioned purpose:
[0005] The donation system based on privacy contract technology of the present invention is characterized by: multiple recipient modules, multiple donor modules, multiple middleman modules, multiple courier modules, an audit module and a consortium blockchain module;
[0006] The audit module includes: a donation quantity verification unit and a donation behavior verification unit;
[0007] Any i-th intermediary module publishes an official donation website;
[0008] Any k-th recipient module generates a donation request and uploads it to the donation official website published by the i-th intermediary module;
[0009] Any j-th donor module generates a confidential donation response according to the donation request and sends it to the i-th intermediary module, and initiates a donation transaction to the alliance blockchain module;
[0010] Any m-th courier module transports the donated materials of the j-th donor to the i-th intermediary module, and initiates a transport transaction to the alliance blockchain module;
[0011] The i-th intermediary module receives the donated materials and initiates a storage transaction to the alliance blockchain module;
[0012] The i-th intermediary module decrypts and distributes the secret donation response in the internal trusted area, and initiates a distribution transaction to the alliance blockchain module;
[0013] The i-th intermediary module delivers the donated materials to any n-th courier module and initiates a shipping transaction to the alliance blockchain module;
[0014] The nth courier module delivers the donated materials from the ith middleman module to the community where the kth recipient module is located, and initiates a transportation transaction including a deposit to the alliance blockchain module;
[0015] The kth recipient module goes to the community to collect supplies, generates confidential feedback information and sends it to the i-th intermediary module, and simultaneously initiates a receiving transaction to the alliance blockchain module;
[0016] The i-th intermediary module decrypts and processes the confidential feedback information in the internal trusted area, and initiates a deposit refund transaction to the alliance blockchain module;
[0017] The donation amount verification unit collects the donation transactions and the allocation transactions on the alliance blockchain for all participants to verify the donation amount, that is, to verify the donation amount of each donor received by the i-th intermediary module to check whether the donation amount of each donor has been tampered with;
[0018] The donation behavior verification unit collects the allocation transactions on the alliance blockchain for the j-th donor module to verify the donation behavior, that is, to verify the donation behavior of the i-th intermediary module to review whether its own donation intention has been interfered with;
[0019] The alliance blockchain module uses smart contracts to receive and store the donation transaction, the transportation transaction, the storage transaction, the distribution transaction, the shipment transaction, the receipt transaction and the deposit refund transaction.
[0020] The donation method based on the privacy contract technology of the present invention is characterized in that it is applied in a network environment consisting of multiple recipient modules, multiple donor modules, multiple middleman modules, multiple courier modules, an audit module and a consortium blockchain module, and is performed in the following steps:
[0021] Step 1: System initialization:
[0022] Step 1.1 All middlemen C jointly establish two generators g and h to generate a cyclic group G, select a provably secure public key encryption system ∑ = (Setup, Enc, Dec) and a secure hash function H; and divide the donation area into a set of |DA| sub-areas DA = {R1, R2, …, R i ,…,R |DA|}, where Setup indicates system initialization, Enc indicates encryption algorithm, Dec indicates decryption algorithm, R i represents the i-th sub-region;
[0023] Step 1.2 Any i-th intermediary C i Publish an official website for donations and set up your own public and private key pair in, represents the i-th middleman C i The public key of represents the i-th middleman C i The private key of
[0024] Step 1.3: The i-th intermediary C i Generate a privacy distribution contract DiSC and the corresponding public-private key pair in the internal trusted area Add with contract address Di ;in, represents the i-th middleman C i The public key of the privacy distribution contract DiSC, represents the i-th middleman C i The private key of the privacy distribution contract DiSC;
[0025] The alliance blockchain CB in step 1.4 generates a donation contract DoSC;
[0026] Step 1.5 In a donation cycle, any kth recipient DE k In the i-th intermediary C iPost a donation request on the official website Among them, CM k represents the kth recipient DE k community, represents the kth recipient DE k The public key of the community, dn i Denotes the kth recipient DE k The amount of donation required;
[0027] Step 2: Anonymous donation:
[0028] Step 2.1 Any j-th donor DR j In the i-th intermediary C i Please visit the official website to view the donation request k After that, the donated materials and the kth recipient DE k Community CM k The public key and cl j The hash value H(cl j ) Pack and hand it over to any m-th courier TP m , where cl j Denotes the jth donor DR j A list of materials with a random code for returning the deposit; set the i-th intermediary C i Be the recipient and get the logistics order number id j1 ;
[0029] Step 2.2: The jth donor DR j Generate a donation response Where LC represents the mth courier TP m The logistics company where I work, dn j Denotes the jth donor DR j The amount of donation, is a random number generated by the jth donor for verifying the donation behavior, and time represents a timestamp; then the jth donor uses the i-th intermediary C i The public key of the privacy donation contract DiSC Response to donations j Encrypt to obtain a secret response message And sent to the privacy donation contract DiSC; where Enc represents the encryption algorithm;
[0030] Step 2.3: The jth donor DR j Calculating commitment Calculation Tokens Among them, rj is a random number generated by the jth donor; and initiates a donation transaction to the donation contract DoSC of the consortium blockchain CB Among them, "Donate" means that the logistics status of the donated materials is the donation initiation stage, H(res j ) indicates donation response res j The hash value of is used as the digital proof of the donated materials, and σ represents the digital signature;
[0031] Step 2.4: The mth courier TP m Deliver the donated materials to the i-th middleman C i , and initiate a transport transaction to the donation contract DoSC of the consortium blockchain CB Among them, "Deliver m " indicates that the logistics status of the donated materials is the mth courier transportation stage, and dp indicates the deposit;
[0032] Step 3: Allocate donations:
[0033] Step 3.1 The i-th intermediary C i Receive the donated materials and initiate a storage transaction to the donation contract DoSC of the alliance blockchain CB Among them, "Store" means that the logistics status of the donated materials is the intermediary storage stage;
[0034] Step 3.2: The i-th intermediary C i The privacy distribution contract DiSC receives the j-th donor DR j Secret donation response rm j , and use the private key After decryption, the donation response res is obtained j Then it is stored in the response queue Res{} of the privacy contract DiSC;
[0035] Step 3.3 After a donation cycle ends, the i-th intermediary C i The privacy allocation contract DiSC collects the response queue Res{}, for each donation response res j , the privacy allocation contract DiSC uses the kth recipient DE k Community public key Res j List of materials in cl j Encrypt to generate a confidential material list clm j , and then clm j Store it in the material list collection List{};
[0036] Step 3.4 After a donation cycle ends, the i-th intermediary C i The privacy allocation contract DiSC allocates each donation response in the response queue Res{}: for the jth donor DR j Donation Response j , the privacy distribution contract DiSC calculates the new commitment New said token And dn j Add to the total donation sum, thus generating a distribution transaction And stored in the distribution transaction set Dis{}, where "Distribute" indicates that the logistics status of the donated materials is the middleman distribution stage;
[0037] When the privacy allocation contract DiSC has processed all donation responses in Res{}, the sigma protocol is used to calculate the ciphertext of the total donation amount Agg=g sum and a zero-knowledge proof π, and finally generate a distribution transaction ("Distribute", Agg, π, time, σ) and store it in the distribution transaction set Dis{};
[0038] Step 3.5: The i-th intermediary C i The privacy distribution contract DiSC sends the material list set List{} of a donation cycle to the community CM k , sending the allocation transaction set Dis{} of a donation cycle to the consortium blockchain CB, and clearing List{} and Dis{} to prepare for processing the next batch of donation responses;
[0039] Step 3.6: The i-th intermediary C i Deliver the supplies to any nth courier TP n , set the kth recipient DE k Community CM k As the receiver, get the order number id j2 After that, a delivery transaction is initiated to the donation contract DoSC of the alliance blockchain CB Among them, "Ship" means that the logistics status of the donated materials is the stage of delivery by the middleman;
[0040] Step 3.7: The nth courier TP n Initiate a transport transaction to the donation contract DoSC of the consortium blockchain CB Among them, "Deliver n " indicates that the logistics status of the donated materials is the nth courier transportation stage;
[0041] Step 4: Receive donations:
[0042] Step 4.1 The kth recipient DE i Community CM k After receiving the material list set List{} and the donated materials, use your own private key to decrypt the secret material list clm j To obtain the material list cl j , and then distribute the donated materials to the kth recipient DE i and other recipients in the community, the kth recipient DE i Count the donated materials it receives and generate donation feedback FB i =(TP n ,LC,id i ,dn j ,cl j ,CM k , time), and use the i-th middleman C i The public key of the privacy distribution contract DiSC Feedback on donations fb i Encrypt to obtain confidential feedback information fm i =Enc(pk C,Di ,fb i ), then fm i Send to the privacy distribution contract DiSC;
[0043] Step 4.2: The kth recipient DE i Initiate a receiving transaction to the donation contract DoSC of the consortium blockchain CB Among them, "Recieve" means that the logistics status of the donated materials is the recipient's receiving stage;
[0044] Step 4.3 The i-th intermediary C i The privacy distribution contract DiSC receives the kth recipient DE i The secret feedback information fm i , and use the private key After decryption, you will get the donation feedback fb i , and calculate H(cl j ) and then initiate a deposit refund transaction to the donation contract DoSC of the alliance blockchain CB Among them, "Refund" means that the logistics status of the donated materials is the deposit refund stage;
[0045] Step 5: Security Audit:
[0046] Step 5.1: the audit module records the allocation transaction set Dis{} on the alliance blockchain CB in each donation cycle, and collects all donation transactions on the alliance blockchain CB to form a donation transaction set Don{};
[0047] Step 5.2 The donation amount verification unit of the audit module calculates the token aggregation of Dis{} Token aggregation with Don{} Compute the committed aggregation of Dis{} Promise aggregation with Don{} Calculate the commitment token ratio of Dis{} to ACom in '=ACom in / ATok in and Don{}'s commitment token is better than ACom out '=ACom out / ΔATok out ; When the logarithm of the commitment token ratio and the token aggregation is equal When established, the donation amount is verified;
[0048] Step 5.3 The donation quantity verification unit of the audit module records the allocation transaction set Dis{} on the alliance blockchain CB in each donation cycle, and Sent to the jth donor DR j , the jth donor DR j Using previously used random numbers Calculate new commitments and distribute transactions with The promise cm' is compared, when cm j " = cm', the donation behavior is verified.
[0049] Compared with the prior art, the present invention has the following beneficial effects:
[0050] 1. The present invention combines blockchain technology, trusted hardware technology, smart contract technology and zero-knowledge proof technology to realize a secure donation and audit system and method, which takes into account the confidentiality and verifiability of donation services, can protect the identity privacy of donors and the information security of donated materials, and can effectively resist collusion attacks and theft attacks.
[0051] 2. The present invention combines trusted hardware with smart contracts to generate privacy contracts, where trusted hardware provides a secure execution environment for privacy contracts, and the private key of the trusted environment and any information in it cannot be obtained from outside the trusted environment. During the donation process, sensitive data is transmitted to the trusted environment in ciphertext, the trusted hardware decrypts it, the privacy contract distributes the decryption result, and then encrypts the distribution result to be transmitted outside the trusted execution environment, thereby achieving the effectiveness of privacy protection in the donation distribution process;
[0052] 3. The present invention uses the Ethereum alliance chain technology to add a donation smart contract and model each donation process as a finite state machine with six states. The state transition and update of the donation smart contract are triggered by transactions uploaded to the alliance chain at different stages to achieve traceability of the donation logistics status;
[0053] 4. The present invention uses zero-knowledge proof technology to implement a secure and reliable auditing solution, and designs a donation amount verification and donation behavior verification mechanism to ensure that the donation amount of the donor is not tampered with and the donation intention is not interfered with, and can effectively resist collusion attacks and theft attacks;
[0054] 5. The present invention realizes the rapid deployment technology of privacy contracts, effectively takes into account the system security, privacy protection effectiveness and deployment convenience, and simplifies the relevant steps of trusted hardware programming. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 It is a flow chart of the donation method of the present invention. DETAILED DESCRIPTION
[0056] In this embodiment, a donation system based on privacy contract technology includes: multiple recipient modules, multiple donor modules, multiple middleman modules, multiple courier modules, an audit module, and a consortium blockchain module;
[0057] Taking a donation service as an example, the recipient module sends a donation request to the middleman module, and the donor module sends a confidential donation response to the middleman module. The middleman module is responsible for collecting and distributing donations and uploading relevant information to the alliance blockchain module. The courier module is responsible for delivering the donated materials from the donor module to the middleman module, or from the middleman module to the community where the recipient module is located. The audit module is responsible for verifying the total donation amount and distribution results. The alliance blockchain module is composed of blockchain nodes of multiple middleman modules and is responsible for recording relevant information and tracking the logistics status of donations.
[0058] The donor module, recipient module, and courier module are implemented on the Android mobile terminal, and the middleman module is implemented on the hardware platform of the Ubuntu system. The processor must support Intel SGX technology to run privacy contracts in the trusted memory area. The audit module is implemented on the Ubuntu system. The alliance blockchain module uses the Geth Ethereum client running on the middleman module to build a chain and run the POA consensus protocol.
[0059] Any i-th intermediary module publishes an official donation website. The intermediary module can be the Red Cross, the National Center for Disease Control, hospitals and government agencies, responsible for collecting and distributing donated materials;
[0060] Any k-th recipient module generates a donation request and uploads it to the donation website published by the i-th intermediary module;
[0061] Any j-th donor module generates a confidential donation response based on the donation request and sends it to the i-th intermediary module, and initiates a donation transaction to the alliance blockchain module;
[0062] Any m-th courier module transports the donated materials of the j-th donor to the i-th intermediary module and initiates a transport transaction to the alliance blockchain module;
[0063] The i-th intermediary module receives the donated materials and initiates a storage transaction to the alliance blockchain module;
[0064] The i-th intermediary module decrypts and distributes the secret donation response in the internal trusted area, and initiates the distribution transaction to the alliance blockchain module;
[0065] The i-th middleman module delivers the donated materials to any n-th courier module and initiates a shipping transaction to the alliance blockchain module;
[0066] The nth courier module delivers the donated materials from the ith middleman module to the community where the kth recipient module is located, and initiates a transportation transaction including a deposit to the alliance blockchain module;
[0067] The kth recipient module goes to the community to collect supplies, generates confidential feedback information and sends it to the i-th intermediary module, and simultaneously initiates a receiving transaction to the alliance blockchain module;
[0068] The i-th intermediary module decrypts and processes the confidential feedback information in the internal trusted area, and initiates a deposit refund transaction to the alliance blockchain module;
[0069] The donation amount verification unit collects donation transactions and allocation transactions on the alliance blockchain for all participants to verify the donation amount, that is, to verify the donation amount of each donor received by the i-th intermediary module to check whether the donation amount of each donor has been tampered with; participants include donors, recipients, couriers and all intermediary nodes on the alliance blockchain;
[0070] The donation behavior verification unit collects the allocation transactions on the alliance blockchain for the jth donor module to verify the donation behavior, that is, to verify the donation behavior of the i-th intermediary module to review whether its own donation intention has been interfered with;
[0071] The alliance blockchain module uses smart contracts to receive and store donation transactions, transportation transactions, storage transactions, allocation transactions, shipment transactions, receipt transactions and deposit refund transactions.
[0072] In this embodiment, a donation method based on privacy contract technology is applied in a network environment consisting of multiple recipient modules, multiple donor modules, multiple middleman modules, multiple courier modules, an audit module and a consortium blockchain module, and has the following three design goals:
[0073] (1) Protect the privacy of donation amount, total donation amount, and the identity of the donor;
[0074] (2) Resist collusion attacks and theft attacks;
[0075] (3) Audit and verify the donation amount and donation behavior.
[0076] like Figure 1 As shown, the donation method is carried out in the following steps:
[0077] Step 1: System initialization:
[0078] Step 1.1 All middlemen C jointly establish two generators g and h to generate a cyclic group G, select a provably secure public key encryption system ∑ = (Setup, Enc, Dec) and a secure hash function H; and divide the donation area into a set of |DA| sub-areas DA = {R1, R2, …, R i ,…,R |DA|}, where Setup indicates system initialization, Enc indicates encryption algorithm, Dec indicates decryption algorithm, R i Represents the i-th sub-region; the privacy allocation contract DiSC is implemented through Solidity language programming, which makes it easy to write and deploy;
[0079] Step 1.2 Any i-th intermediary C iPublish an official website for donations and set up your own public and private key pair in, represents the i-th middleman C i The public key of represents the i-th middleman C i The private key of
[0080] Step 1.3 The i-th intermediary C i Generate a privacy distribution contract DiSC and the corresponding public-private key pair in the internal trusted area Add with contract address Di ;in, represents the i-th middleman C i The public key of the privacy distribution contract DiSC, represents the i-th middleman C i The private key of the privacy distribution contract DiSC;
[0081] Step 1.4 The alliance blockchain CB generates a donation contract DoSC;
[0082] Step 1.5 In a donation cycle, any kth recipient DE k At the i-th intermediary C i Post a donation request on the official website Among them, CM k Denotes the kth recipient DE k community, Denotes the kth recipient DE k The public key of the community, dn i Denotes the kth recipient DE k The amount of donation required;
[0083] Step 2: Anonymous donation:
[0084] Step 2.1 Any j-th donor DR j At the i-th intermediary C i Check the donation request on the official website k After that, the donated materials and the kth recipient DE k Community CM k The public key and cl j The hash value H(cl j ) Pack and hand it over to any m-th courier TP m , where cl j Denotes the jth donor DR j A list of materials with a random code for returning the deposit; set the i-th intermediary C iBe the recipient and get the logistics order number id j1 ;
[0085] Step 2.2 The jth donor DR j Generate a donation response Among them, LC represents the mth courier TP m The logistics company where I work, dn j Denotes the jth donor DR j The amount of donation, is a random number generated by the jth donor for donation verification, and time represents a timestamp; then the jth donor uses the i-th intermediary C i The public key of the privacy donation contract DiSC Response to donations j Encrypt to get a secret response message And sent to the privacy donation contract DiSC; where Enc represents the encryption algorithm;
[0086] Step 2.3 j-th donor DR j Calculating commitment Calculation Tokens Among them, r j is a random number generated by the jth donor; and initiates a donation transaction to the donation contract DoSC of the alliance blockchain CB Among them, "Donate" means that the logistics status of the donated materials is the donation initiation stage, H(res j ) indicates donation response res j The hash value of is used as the digital proof of the donated materials, and σ represents the digital signature;
[0087] Step 2.4 The mth courier TP m Deliver the donated materials to the i-th intermediary C i , and initiate a transport transaction to the donation contract DoSC of the alliance blockchain CB Among them, "Deliver m " indicates that the logistics status of the donated materials is the mth courier transportation stage, and dp indicates the deposit;
[0088] Step 3: Allocate donations:
[0089] Step 3.1 The i-th intermediary C i Receive donated materials and initiate storage transactions to the donation contract DoSC of the alliance blockchain CB Among them, "Store" means that the logistics status of the donated materials is in the intermediary storage stage;
[0090] Step 3.2 The i-th intermediary C i The privacy distribution contract DiSC receives the jth donor DR j Secret donation response rm j , and use the private key After decryption, get the donation response res j Then it is stored in the response queue Res{} of the privacy contract DiSC;
[0091] Step 3.3 After a donation cycle ends, the i-th intermediary C i The privacy allocation contract DiSC collects the response queue Res{}, for each donation response res j , the privacy distribution contract DiSC uses the kth recipient DE k Community public key Res j List of materials in cl j Encrypt to generate a confidential material list clm j , and then clm j Stored in the material list set List{}; using trusted hardware as the execution environment of the privacy distribution contract DiSC to achieve the effectiveness of privacy protection in the distribution process;
[0092] Step 3.4 After a donation cycle ends, the i-th intermediary C i The privacy allocation contract DiSC allocates each donation response in the response queue Res{}: for the jth donor DR j Donation Response j , the privacy distribution contract DiSC calculates the new commitment New Token And dn j Add to the total donation sum, thus generating a distribution transaction And stored in the distribution transaction set Dis{}, where "Distribute" means that the logistics status of the donated materials is the middleman distribution stage;
[0093] When the privacy allocation contract DiSC has processed all donation responses in Res{}, the sigma protocol is used to calculate the ciphertext of the total donation amount Agg=g sum and a zero-knowledge proof π, and finally generates a distribution transaction ("Distribute", Agg, π, time, σ) and stores it in the distribution transaction set Dis{};
[0094] Step 3.5 The i-th intermediary C i The privacy distribution contract DiSC sends a collection of material lists List{} for a donation cycle to the community CM k, send the allocation transaction set Dis{} of a donation cycle to the consortium blockchain CB, and clear List{} and Dis{} to prepare for processing the next batch of donation responses;
[0095] Step 3.6 The i-th intermediary C i Deliver the supplies to any nth courier TP n , set the kth recipient DE k Community CM k As the receiver, get the order number id j2 After that, a delivery transaction is initiated to the donation contract DoSC of the alliance blockchain CB Among them, "Ship" means that the logistics status of the donated materials is at the stage of delivery by the middleman;
[0096] Step 3.7 The nth courier TP n Initiate a transport transaction to the donation contract DoSC of the alliance blockchain CB Among them, "Deliver n " indicates that the logistics status of the donated materials is the nth courier transportation stage;
[0097] Step 4: Receive donations:
[0098] Step 4.1 kth recipient DE i Community CM k After receiving the material list set List{} and the donated materials, use your own private key to decrypt the secret material list clm j To obtain the material list cl j , and then distribute the donated materials to the kth recipient DE i and other recipients in the community, the kth recipient DE i Count the donated materials it receives and generate donation feedback FB i =TP n ,LC,id i ,dn j ,cl j ,CM k , time), and use the i-th middleman C i The public key of the privacy distribution contract DiSC Feedback on donations fb i Encrypt to obtain confidential feedback information fm i =Enc(pk C,Di ,fb i ), then fm i Send to the privacy distribution contract DiSC;
[0099] Step 4.2 kth recipient DEi Initiate a receiving transaction to the donation contract DoSC of the alliance blockchain CB Among them, "Recieve" means that the logistics status of the donated materials is at the stage of being received by the recipient;
[0100] Step 4.3 The i-th intermediary C i The privacy distribution contract DiSC receives the kth recipient DE i The secret feedback information fm i , and use the private key After decryption, get donation feedback fb i , and calculate H(cl j ) and then initiate a deposit refund transaction to the donation contract DoSC of the alliance blockchain CB Among them, "Refund" means that the logistics status of the donated materials is the deposit refund stage; if the verification fails, the deposit management function of the donation contract DoSC is used to deduct the deposit of the corresponding thief and transfer it to the damaged donor;
[0101] Step 5: Security Audit:
[0102] Step 5.1 The audit module records the allocation transaction set Dis{} on the alliance blockchain CB in each donation cycle, and collects all donation transactions on the alliance blockchain CB to form a donation transaction set Don{};
[0103] Step 5.2 The donation amount verification unit of the audit module calculates the token aggregation of Dis{} Token aggregation with Don{} Compute the committed aggregation of Dis{} Promise aggregation with Don{} Calculate the commitment token ratio of Dis{} to ACom in '=ACom in / ATok in and Don{}'s commitment token is better than ACom out '=ACom out / ATok out ; When the logarithm of the commitment token ratio and the token aggregation is equal When established, the donation amount is verified;
[0104] Step 5.3 The donation quantity verification unit of the audit module records the allocation transaction set Dis{} on the alliance blockchain CB in each donation cycle, and Sent to the jth donor DR j , the jth donor DR j Using previously used random numbers Calculate new commitments and distribute transactions with The promise cm' is compared, when cm j When "=cm', the donation behavior verification is passed; the use of zero-knowledge proof technology ensures the effectiveness of privacy protection in the audit verification process.
[0105] In summary, the present invention utilizes privacy contract technology, zero-knowledge proof technology and alliance blockchain technology based on trusted hardware to realize a privacy-protected donation method and system, which takes into account both confidentiality and verifiability, and can effectively resist collusion attacks and theft attacks by malicious middlemen and transporters in the system, thereby protecting the identity privacy of the donating users and the information security of the donated materials.
Claims
1. A donation system based on privacy contract technology, whose features include: Multiple recipient modules, multiple donor modules, multiple middleman modules, multiple courier modules, an audit module, and a consortium blockchain module; The audit module includes: a donation quantity verification unit and a donation behavior verification unit; Any A middleman module publishes an official donation website; Any The recipient module generates a donation request and uploads it to the The donation website published by the middleman module; Any The donor module generates a secret donation response according to the donation request and sends it to the A middleman module is created, and a donation transaction is initiated to the alliance blockchain module; Any The courier module will The donated materials of the donors are transported to the A middleman module is created, and a transport transaction is initiated to the alliance blockchain module; The said A middleman module receives the donated materials and initiates a storage transaction to the alliance blockchain module; The said A middleman module decrypts and distributes the secret donation response in an internal trusted area, and initiates a distribution transaction to the alliance blockchain module; The said The middleman module delivers the donated materials to any A courier module is created and a shipping transaction is initiated to the alliance blockchain module; The said A courier module delivers the donated materials from the The middleman module is delivered to the The community where the recipient module is located, and initiates a transport transaction including a deposit to the consortium blockchain module; The said The recipient module goes to the community to collect the supplies and generates a confidential feedback message and sends it to the A middleman module simultaneously initiates and receives transactions to the alliance blockchain module; The said A middleman module decrypts and processes the confidential feedback information in the internal trusted area, and initiates a deposit refund transaction to the alliance blockchain module; The donation amount verification unit collects the donation transactions and the allocation transactions on the alliance blockchain for all participants to verify the donation amount, that is, The donation amount received by each donor is verified by the intermediary module to check whether the donation amount of each donor has been tampered with; The donation behavior verification unit collects the allocation transactions on the alliance blockchain for the first The donation behavior verification is performed on the donor module, that is, the Verify the donation behavior of each intermediary module to check whether their donation intentions have been interfered with; The alliance blockchain module uses smart contracts to receive and store the donation transaction, the transportation transaction, the storage transaction, the distribution transaction, the shipment transaction, the receipt transaction and the deposit refund transaction.
2. A donation method based on privacy contract technology, which is based on the donation system described in claim 1, characterized in that: It is applied in a network environment consisting of multiple recipient modules, multiple donor modules, multiple middleman modules, multiple courier modules, an audit module and a consortium blockchain module, and proceeds as follows: Step 1: System initialization: Step 1.1 All middlemen Together we establish two generators and To generate a cyclic group , choose a public key encryption system that can be proven to be secure and a secure hash function ; The donation area is divided into The set of sub-regions ,in, Indicates system initialization. Indicates the encryption algorithm. Represents the decryption algorithm, Indicates sub-regions; Step 1.2 Any middlemen Publish an official website for donations and set up your own public and private key pair ,in, Indicates middlemen The public key of Indicates middlemen The private key of ; Step 1.3 middlemen Generate a privacy allocation contract in the internal trusted area and the corresponding public and private key pairs With the contract address ; in, Indicates middlemen Privacy distribution contract The public key of Indicates middlemen Privacy distribution contract The private key of Step 1.4 The consortium blockchain Generate donation contract ; Step 1.5 In a donation cycle, any recipients In the said middlemen Post a donation request on the official website ,in, Indicates recipients community, Indicates recipients The public key of the community, Indicates recipients The amount of donation required; Step 2: Donate anonymously: Step 2.1 Any Donors In the said middlemen The donation request can be found on the official website After that, the donated materials and the recipients Community The public key and Hash value Pack and send to any Courier ,in, Indicates the Donors A list of materials with a random code for returning the deposit; set middlemen Be the recipient and get the logistics order number ; Step 2.2 Donors Generate a donation response ,in, Indicates the Courier The logistics company you work for, Indicates Donors The amount of donation, It is A random number generated by a donor for verification of the donation behavior, Indicates a timestamp; the following The donor used the middlemen Privacy donation contract The public key Response to donations Encrypt to obtain a secret response message , and sent to the privacy donation contract Among them, Indicates the encryption algorithm; Step 2.3 Donors Calculating commitment , count tokens ,in, It is A random number generated by a donor; and Donation Agreement Initiate a donation transaction ,in, Indicates that the logistics status of the donated materials is at the donation initiation stage. Express donation response The hash value of the donation serves as digital proof of the donation. Represents a digital signature; Step 2.4 Courier Deliver the donated materials to the middlemen , and submit it to the consortium blockchain Donation Agreement Initiate a transport transaction ,in, Indicates that the logistics status of the donated materials is the mth courier transportation stage, Deposit; Step 3: Allocate donations: Step 3.1 middlemen Receive the donated materials and send them to the alliance blockchain Donation Agreement Initiate a storage transaction ;in, Indicates that the logistics status of the donated materials is the intermediary storage stage; Step 3.2 middlemen Privacy distribution contract Receiving the Donors Secret donation response , and use the private key After decryption, the donation response is obtained Then stored in the privacy contract Response queue middle; Step 3.3 After a donation cycle ends, middlemen Privacy distribution contract Collect the response queue , for each donation response , Privacy Distribution Contract Using the recipients Community public key right List of materials in Encrypt to generate a confidential inventory list , and then Store in the inventory collection middle; Step 3.4 After a donation cycle, middlemen Privacy distribution contract To the response queue Each donation response in is assigned: Donors Donation response , the privacy allocation contract Calculate the new said commitment , the new said token , and Add donation total In the process, the distribution transaction is generated And stored in the allocation transaction set Among them, Indicates that the logistics status of the donated materials is the middleman distribution stage; When privacy is distributed in contracts Finished When all donation responses are received, the ciphertext of the total number of donations is calculated using the Sigma protocol and a zero-knowledge proof π, and finally generate a distribution transaction And stored in the allocation transaction set middle; Step 3.5 middlemen Privacy distribution contract Collect the materials list for a donation cycle Send to the community , the allocation transaction set of a donation cycle Send to the consortium blockchain , and clear and Prepare to handle the next wave of donation responses; Step 3.6 middlemen Deliver supplies to any Courier , set the recipients Community Be the recipient and get the order number Then, to the alliance blockchain Donation Agreement Initiate a shipment transaction in, Indicates that the logistics status of the donated materials is at the stage of delivery by the middleman; Step 3.7 Courier To the consortium blockchain Donation Agreement Initiate a transport transaction ;in, Indicates that the logistics status of the donated materials is the nth courier transportation stage; Step 4: Receive donations: Step 4.1 recipients Community Receive the material list collection After donating the materials, use your own private key to decrypt the secret material list To get the material list , and then distribute the donated materials to recipients and other recipients in the community, recipients Count the donated materials it receives and generate donation feedback , and using the middlemen Privacy distribution contract The public key Feedback on donations Encryption to obtain confidential feedback information , and later Sent to the privacy distribution contract middle; Step 4.2 recipients To the consortium blockchain Donation Agreement Initiate a receive transaction ;in, Indicates that the logistics status of the donated materials is at the stage of being received by the recipient; Step 4.3 middlemen Privacy distribution contract Receiving the recipients Confidential feedback information , and use the private key After decryption, you will get the donation feedback , and calculate Backward Consortium Blockchain Donation Agreement Initiate a deposit refund transaction ;in, Indicates that the logistics status of the donated materials is at the deposit refund stage; Step 5: Security Audit: Step 5.1 The audit module records the alliance blockchain in each donation cycle The set of allocated transactions on , and collect alliance blockchain All donation transactions on form a donation transaction set ; Step 5.2 Donation Quantity Verification Unit Calculation of the Audit Module Token aggregation and Token aggregation ;calculate Commitment Aggregation and Commitment Aggregation ;calculate Commitment Token Ratio and Commitment Token Ratio ; When the logarithm of the commitment token ratio and the token aggregation is equal When established, the donation amount is verified; Step 5.3 The donation amount verification unit of the audit module records the alliance blockchain in each donation cycle The set of allocated transactions on , and the corresponding allocation transaction Send to the Donors , No. Donors Using previously used random numbers Calculate new commitments , and distribute transactions with Commitment in To compare, , the donation behavior is verified.
Citation Information
Patent Citations
Public benefit donation method and device based on block chain and electronic equipment
CN109949194A
Donation data processing method and apparatus based on blockchain and readable medium
CN111738704A