WO2023082690A1 - 一种基于矩阵联盟链的可隐藏实名的资助方法 - Google Patents

一种基于矩阵联盟链的可隐藏实名的资助方法 Download PDF

Info

Publication number
WO2023082690A1
WO2023082690A1 PCT/CN2022/106613 CN2022106613W WO2023082690A1 WO 2023082690 A1 WO2023082690 A1 WO 2023082690A1 CN 2022106613 W CN2022106613 W CN 2022106613W WO 2023082690 A1 WO2023082690 A1 WO 2023082690A1
Authority
WO
WIPO (PCT)
Prior art keywords
transaction
node
block
consensus
chain
Prior art date
Application number
PCT/CN2022/106613
Other languages
English (en)
French (fr)
Inventor
黄海平
陈龙
薛凌妍
肖甫
杨健
吴忧
李逸轩
汪俊峰
Original Assignee
南京邮电大学
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 南京邮电大学 filed Critical 南京邮电大学
Publication of WO2023082690A1 publication Critical patent/WO2023082690A1/zh

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
    • G06Q30/00Commerce
    • G06Q30/018Certifying business or products
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication
    • 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/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • 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/03Credit; Loans; Processing thereof

Definitions

  • the invention relates to the technical field of consortium chains, in particular to a funding method based on a matrix consortium chain that can hide real names.
  • Blockchain technology is a distributed ledger technology that is jointly maintained by multiple parties. It uses cryptography to ensure transmission and access security. It can achieve consistent data storage, difficult to tamper with, and prevent denial of accounting technology. It is decentralized and open. Transparency, information traceability, and anti-tampering properties can effectively ensure the openness and transparency of public welfare projects, and donors can query each transaction, trace the distribution information and usage of materials or funds, etc. As an emerging digital technology, blockchain has great application potential. At present, blockchain has gradually begun to be applied in the field of social welfare. However, the existing public welfare blockchain system is better and more openly announced to the public.
  • the complete sponsor and grantee information will be recorded in the blockchain, and due to the immutable nature of the blockchain, the user's information will remain in the blockchain forever.
  • sponsors or grantees should be able to request to delete or hide their own private data records, that is, users should be able to choose their real names or hide their real names to participate in the blockchain records without affecting the openness and transparency of funding data , To prevent tampering, to protect the user's right to privacy and anonymity.
  • the access mechanism of the alliance chain is more suitable for public welfare scenarios. Public welfare platforms, government supervision departments and credit departments with good reputation and qualifications will be allowed to enter and participate in the consensus.
  • the block only continuously records funding transaction information, and cannot accurately associate all funding information for a certain funded person, cannot locate a specific funding transaction to achieve on-chain modification, and cannot protect the funded person and sponsor’s real-name information.
  • the present invention provides a funding method based on the matrix alliance chain that can hide real names.
  • sponsors can provide financial or service funding to fundees.
  • the real-name information stored on the blockchain is allowed to be hidden without affecting the overall structure of the chain, while ensuring that funding information is traceable and accountable, effectively protecting personal privacy information; optimizing the consensus mechanism, introducing funding type matching and authority
  • the credit score of the credit department promotes the honest behavior of sponsors, and the untrustworthy behavior will be fed back to the integrity file of the credit unit to promote honest funding.
  • a funding method based on a matrix alliance chain that can hide real names the steps of the method are:
  • the backer ID d wants to hide its funding information
  • the backer sends a transaction modification request.
  • the supervision node ID g quickly locates the block coordinates (height, depth) of the exchange, and verifies the backer
  • a fake identity PID d is generated for the sponsor and a new funding certificate new_fCert is issued.
  • the transaction information on the chain is modified to hide the real name.
  • the sponsor can still report to the supervisor The node applies to restore the real name information;
  • the subsidized person ID p wants to hide its subsidized information
  • the subsidized person ID p initiates a request to delete the subsidized release after receiving the subsidy.
  • the supervisory node ID g queries the subsidized person's information on the chain.
  • Transaction data after verifying the fundee information, the supervisory node ID g initiates a deletion transaction, and the consensus node verifies the dream block according to the consensus mechanism.
  • Each participating user generates a string ID ⁇ ⁇ 0, 1 ⁇ * associated with his identity, and the strings associated with identity information generated by the grantee, sponsor, regulatory agency, and key generation center are respectively Expressed as:
  • the key generation center randomly selects random numbers
  • P pub represents the public key
  • ⁇ 0, 1 ⁇ * represents a 0, 1 bit string of indefinite length
  • ⁇ 0, 1 ⁇ n represents n
  • steps of S2 are:
  • T 1 is the current timestamp, send the message to the blockchain network;
  • the supervisory node ID g After the supervisory node ID g receives the message ⁇ of the grantee ID p , it first selects the current timestamp T 2 , and defines ⁇ T as the effective difference between the timestamp of the message and the timestamp when the message is received, if
  • Regulatory node ID g packs the information submitted by sponsor ID p according to the transaction format of the dream block, and generates a copy of the transaction, as follows:
  • TX 1 contains the real personal information ID p of the funded person and TX 2 is a copy of the transaction, which does not contain these two strings, It is the signature of the supervisory node on the transaction, TS 1 is the transaction generation time, and tag is the label of the dream blockchain, which is used to locate the block coordinates and transaction location when editing the blockchain in the future;
  • the supervisory node ID g broadcasts the transaction and the copy of the transaction. According to the consensus mechanism, the consensus node verifies the transaction and its copy. After the verification is passed, it is written into the dream block according to the tag, and an index list is established. It is saved to the local database as off-chain data, where height is the height of the block, which is used to quickly locate the process of generating the funding chain.
  • the structure of the blockchain can still be guaranteed not to be destroyed when the content of the chain is maintained, namely:
  • B i represents the current block
  • Hash( ) represents the two hash values of the previous block
  • Noce i represents the random number of the current block
  • Timestamp i represents the generation timestamp of the block.
  • Sponsor ID d completes the fund transfer or service to the blockchain address of grantee ID p , and generates funding information Send a request to generate sponsorship certificates to the supervisory node ID g
  • fund means funding content, Indicates the encryption algorithm, and the supervisory node executes the decryption algorithm after receiving the request Obtain H 5 (info), if it is equal to the value H′ 5 (info) directly calculated from H 5 of the sponsorship message info, then confirm the acceptance of the request and issue a sponsorship certificate
  • T 3 is the certificate generation time and endorsement;
  • the supervisory node ID g generates the transaction TX 3 and the transaction copy TX 4 according to the transaction format of the subsidized block, and broadcasts them to the whole network. According to the consensus mechanism, the consensus node conducts verification. In addition, the supervisory node ID g also needs to provide Relevant information of funded object ID p for block positioning;
  • the transaction copy TX 4 does not include the sponsor's personal information ID d , Indicates the signature of the supervisory node on the transaction, Indicates that the corresponding certificate is encrypted with the public key of the sponsor, and is used for decryption by the sponsor to obtain the sponsorship certificate with its own private key after receiving it, and TS 2 indicates the time when the transaction was generated;
  • the main consensus node will store the transaction TX 3 and the copy TX 4 into the transaction pool, and then package the funding transactions for the same funded person ID p within ⁇ t into a block block, and broadcast to the blockchain network, verify the block from the consensus node, and calculate the index after voting exceeds the threshold p Locate the height of the block where ID p is located, link the block to the corresponding funding chain, and its height is defined as depth, then the block coordinates (height, depth) of a certain transaction in the matrix alliance chain; similarly, funding There are two merkleroot values in the block data structure of the chain, namely MR 3 and MR 4 , and the two hash values of the previous block, and the blocks are linked by a clear chain and a dark chain.
  • the supervisory node ID g receives the modify_request, first selects the current time stamp T 5 , if
  • new_info ⁇ PID d
  • TS 3 represents the transaction generation time
  • tag indicates the chain tag
  • the supervisory node ID g also needs to provide the consensus node with the block coordinates (height d , depth d ) of the transaction to be modified and the identity information ID d of the initiator of the modification request ;
  • the consensus node After the consensus node passes the verification of the transaction TX′ 3 , it quickly queries the transaction to be modified according to (height d , depth d ) and ID d , and then replaces the transaction TX 3 to be modified with TX′ 3 , and restarts Calculate the value of merkleroot MR′ 3 , at this time, the open chain between this block and the next block is disconnected due to the change of merkleroot value, while the value of MR 4 remains unchanged, so the dark chain maintains the support chain Integrity; if MR 4 also changes, it means that the block has been tampered with without authorization;
  • the sponsor ID d wants to use the real name again, it sends a modification request, and the supervision node ID g can obtain the relevant endorsement content by searching the local database. After verifying the identity, proceed to steps S4-1 to S4-3 to complete the real name modification. When receiving false information or public interest disputes, the information can still be verified to ensure traceability and accountability.
  • the supervisory node ID g After the supervisory node ID g receives the deletion request from the beneficiary ID p , it first selects the current time T 8 , if
  • the consensus mechanism refers to the implementation of a practical Byzantine fault-tolerant mechanism based on multi-factor voting.
  • the consensus nodes are sponsors and beneficiaries; publishing transactions or modifying transactions on the chain requires the consensus of consensus nodes, and consensus nodes pass Comprehensive calculation of matching degree SD, subsidy amount SA, sponsor credit score CS three factors to vote for the top Bit consensus nodes participate in the consensus, re-elect every ⁇ hours, and reorganize election voting.
  • the steps for the consensus node to verify are:
  • the supervisory node ID g When the matrix alliance chain is cold-started, the supervisory node ID g will write the subsidized transaction information into the genesis block at this time; the key generation center KGC assigns an independent blockchain address Addr ID and private key to each node. Key sk ID and public key pk ID , the public key of the sponsor is only disclosed to the supervisory node and consensus node, the account address that has been written into the block is publicly visible, and the account address that has not been written will not be displayed on the network;
  • the ID c of the third-party credit agency in the regulatory agency grants a credit score CS d to the newly added sponsorship node ID d ;
  • the supervisory node ID g reads the sponsorship certificate of the sponsorship node ID d Record the funding value SA d of the node, and calculate the funding matching score SD d according to the funding type type;
  • Bit nodes serve as consensus nodes;
  • the consensus nodes After the first batch of consensus nodes are generated, within ⁇ t time, the consensus nodes will act as master nodes according to their rankings; the master node SP packs the verified funding transaction TX i information into a block, and generates Send to the rest of the slave nodes; the next node after the master node is the sub-master node, which is packaged with the master node at the same time, and the block generated by itself will be sent when the master node makes an error;
  • the other slave nodes W i After receiving the pre-preparation message sent by the master node, the other slave nodes W i verify the signature. If the verification is passed and the block is approved to be uploaded to the chain, a confirmation message is sent Forward to other consensus nodes, and send if timeout or disapproval
  • N is the number of system nodes, if the maximum malicious If the number of nodes is f, N ⁇ 3f+1 is required;
  • the beneficial effects of the present invention are as follows: 1. Different from the traditional public welfare mode of funding, the funding type is introduced into the block funding transaction of the method described in the present invention, and "service funding” is added to provide more people who are enthusiastic about public welfare. More ways to fund, give full play to the enthusiasm of sponsors, and help recipients in a more targeted manner;
  • consensus nodes are selected based on funding matching degree, credit value and other factors, which is beneficial for each node to have the opportunity to participate in the consensus, strengthen the influence of credit value on the consensus, and weaken the nodes due to multiple participation in the consensus
  • the advantage of easier access to bookkeeping rights is more conducive to the fairness and justice of the consensus
  • grantees and sponsors can choose to hide their personal real-name information on the alliance chain, so as to avoid being permanently recorded by the network and forever by the public. Concern; but it can still ensure that the funding and funded information is fair, open, transparent and traceable, and avoid public interest disputes caused by false information such as forged information or deception; on the premise of ensuring accountability, return the right to choose whether to disclose the real name;
  • Fig. 1 is a model diagram of the system of the present invention
  • Figure 2 is a block structure diagram
  • Figure 3 is a matrix alliance chain structure diagram
  • Fig. 4 is a flowchart of the present invention.
  • consortium chain is a peer-to-peer network environment, through transparent and credible rules, to build an unforgeable, difficult to tamper and traceable block chain data structure, to realize and manage the generation and access of trusted data and the pattern used.
  • a consortium chain usually refers to a chain formed by multiple parties after reaching a certain agreement or establishing a business alliance. Members joining the consortium chain need to be verified.
  • the generation of each block is jointly decided by all pre-selected nodes (pre-selected nodes participate in the consensus process), other access nodes can participate in the transaction, but do not ask about the accounting process, and anyone else can limit it through the open API of the blockchain Inquire.
  • Matrix alliance chain build a horizontal chain (dream chain) and a vertical chain (funding chain) in the alliance chain.
  • the horizontal chain takes the height of the dream block as the horizontal coordinate
  • the vertical chain takes the depth of the funding block as the vertical coordinate. Locate the unique position of the block in the alliance chain. The actual meaning of this coordinate is a certain funding behavior for a certain dreamer's dream. Because the concrete form of this alliance chain and block is similar to a matrix, it is called "matrix alliance chain”.
  • Hash function Map a binary value string of any length to a fixed-length binary value string.
  • the rule of this mapping is the hash algorithm.
  • the binary value string obtained after the original data mapping is the hash value.
  • Merkle tree is a hash binary tree, which is a data structure used for fast induction and verification of large-scale data integrity. This binary tree contains cryptographic hash values.
  • the term "tree” is often used in computer science to describe a branching data structure.
  • Consensus mechanism The consensus mechanism is to complete the verification and confirmation of the transaction in a short period of time through the voting of special nodes; for a transaction, if several nodes with irrelevant interests can reach a consensus, it can be considered that the entire network A consensus can also be reached.
  • PBFT Practical Byzantine Fault Tolerance Algorithm
  • PBFT is a practical consensus mechanism that implements Byzantine fault tolerance.
  • one node will be regarded as the master node, while the other nodes are all sub-nodes. All nodes in the system will communicate with each other, and the ultimate goal is to reach a consensus on data based on the principle of a minority obeying the majority;
  • PBFT requires that under the premise that the total number of nodes is n, it can accommodate at most (n-1)/3 Byzantine nodes.
  • the application scenario of the present invention can realize the dream of rural children and help the revitalization of the countryside.
  • the solution described in the present invention includes the following four entities, as shown in FIG. 1 .
  • Dreamers refers to the recipients, in the rural public welfare scene, refers to rural children with dreams, can complete real-name registration with the help of parents, teachers or other guardians, and release dreams after endorsement and certification by regulatory agencies, dreams and all funding information will be consensus After the dream is recorded on the alliance chain; after the dream is completed or the dream no longer needs funding, the dreamer can choose to hide his real name information.
  • Dream sponsor refers to the sponsor, which can be individual or collective; in the rural public welfare scene, it refers to the dream sponsor. After registering with the real name and passing the certification of the regulatory agency, you can view the colorful dreams on the alliance chain and choose financial support or services Funding, to help dreamers realize their dreams, the funding information will be recorded on the alliance chain, and then the dream sponsor can choose whether to hide personal real name information on the alliance chain.
  • Regulatory agencies are composed of government regulatory departments, public welfare organizations and third-party credit institutions. Government regulatory departments, public welfare organizations and dream sponsors form the alliance chain. When the third-party credit agency authenticates the sponsor, it will grant a credit score based on the sponsor's integrity file, but does not participate in the consensus. When the sponsor has dishonest behavior in the alliance chain , and will be recorded in the integrity file of the credit department at the same time.
  • Key Generation Center Initialize public parameters, generate and distribute keys and register certificates for each member in the scheme.
  • Each participant generates a string ID ⁇ ⁇ 0, 1 ⁇ * associated with its own identity, which is generated by Zhang Ming, Ai classroom Company, the civil affairs department, the supervisor and the credit reference center in cooperation with "Love Chip”
  • the strings associated with identity information are represented as:
  • r represents a random number
  • P pub represents the public key
  • ⁇ 0, 1 ⁇ * represents a 0, 1 bit string of indefinite length
  • ⁇ 0, 1 ⁇ n represents n
  • the bit length 0, 1 bit string ;
  • T 1 is the current timestamp, send the message to the blockchain network;
  • Regulatory node ID g packs the information TX 1 submitted by Zhang Ming ID p according to the transaction format of the dream block, and generates a transaction copy TX 2 , as follows:
  • TX 1 contains Zhang Ming's personal real information ID p and TX 2 is a copy of the transaction, which does not contain these two strings, It is the signature of the supervisory node on the transaction, TS 1 is the transaction generation time, and tag is the label of the dream blockchain, which is used to locate the block coordinates and transaction location when editing the blockchain in the future;
  • the supervisory node ID g broadcasts the transaction TX 1 and the transaction copy TX 2.
  • the consensus node verifies the transaction and its copy. After the verification is passed, it writes the dream block according to the tag and establishes an index list It is saved to the local database as off-chain data, where height is the height of the block, which is used to quickly locate the process of generating the funding chain.
  • the structure of the blockchain can still be guaranteed not to be destroyed when the content of the chain is maintained, namely:
  • B i represents the current block
  • Hash( ) represents the two hash values of the previous block
  • Noce i represents the random number of the current block
  • Timestamp i represents the generation timestamp of the block.
  • the consensus node verifies the correctness of the block and votes. If the number of votes exceeds the threshold p, it can be uploaded to the chain.
  • the funding block will be recorded on the funding chain linked to Zhang Ming’s dream block.
  • the structure of the funding block is shown in Figure 2, and the structure of the funding chain is shown in Figure 3.
  • Ai course company ID d completes the account password for free use of English course resources for the blockchain address of Zhang Ming ID p , and generates funding information
  • fund means funding content, Indicates the encryption algorithm, and the supervisory node executes the decryption algorithm after receiving the request Obtain H 5 (info), if it is equal to the value H′ 5 (info) directly calculated from H 5 of the sponsorship message info, then confirm the acceptance of the request and issue a sponsorship certificate
  • T 3 is the time when the certificate was generated and endorsed;
  • Regulatory node ID g generates transaction TX 3 and transaction copy TX 4 according to the transaction format of the subsidized block, and broadcasts to the entire network. According to the consensus mechanism, the consensus node will verify it. In addition, the supervisory node ID g also needs to provide Zhang Ming ID p related information for block positioning;
  • Transaction copy TX 4 does not include the enterprise-related information ID d of the love course, Indicates the signature of the supervisory node on the transaction, Indicates that the corresponding certificate is encrypted with the public key of the love course, and is used to decrypt it with its own private key after receiving the love course to obtain the funding certificate.
  • TS 2 indicates the transaction generation time;
  • the main consensus node After the verification of the transaction TX 3 and the transaction copy TX 4 is passed, according to the consensus mechanism, the main consensus node will store the transaction TX 3 and the transaction copy TX 4 into the transaction pool, and then pack the funding transaction for Zhang Ming ID p within ⁇ t time Form a block and broadcast it to the blockchain network, verify the block from the consensus node, and calculate the index after voting exceeds the threshold p Locate the height of the block where ID p is located, link the block to the corresponding funding chain, and its height is defined as depth, then the block coordinates (height, depth) of a certain transaction in the matrix alliance chain; similarly, funding There are two merkleroot values in the block data structure of the chain, namely MR 3 and MR 4 , and the two hash values of the previous block, and the blocks are linked by a clear chain and a dark chain.
  • Aicourse ID d wants to remain anonymous and does not disclose its funding information to the public
  • Aicourse sends a transaction modification request.
  • the content of the request includes its company-related information and the coordinates of the block where it is located.
  • the supervisory node ID g After receiving the request, the supervisory node ID g , Quickly locate the block coordinates (height, depth) of the exchange, and after verifying the identity of the love course, generate a pseudo-identity PID d for the love course and issue a new funding certificate new_fCert; according to the consensus mechanism, the supervisory node ID g broadcasts new transactions (including funding Pseudo-identity of the person and information such as new certificates), and provide the block coordinates (height d , depth d ) of the transaction to be modified, and the consensus node will modify the transaction.
  • the value of MR 3 of the block occurs Change, while MR 4 remains unchanged, so the dark chain of the funding chain still exists, thereby ensuring the integrity of the matrix alliance chain structure; similarly, if the anonymous love course wants to re-realize its name, it only needs to provide its real identity information And the old sponsorship certificate, through similar steps, the open chain repair of the sponsorship chain can be completed, and the mechanism of traceability and accountability after the real name is hidden can be realized.
  • new_info ⁇ PID d
  • TS 3 represents the transaction generation time
  • tag indicates the chain tag
  • the supervisory node ID g also needs to provide the consensus node with the block coordinates (height d , depth d ) of the transaction to be modified and the identity information ID d of the initiator of the modification request ;
  • the consensus node After the consensus node passes the verification of the transaction TX′ 3 , it quickly queries the transaction to be modified according to (height d , depth d ) and ID d , and then replaces the transaction TX 3 to be modified with TX′ 3 , and restarts Calculate the value of merkleroot MR′ 3 , at this time, the open chain between this block and the next block is disconnected due to the change of merkleroot value, while the value of MR 4 remains unchanged, so the dark chain maintains the support chain Integrity; if MR 4 also changes, it means that the block has been tampered with without authorization;
  • the supervision node ID g can obtain the relevant endorsement content by searching the local database, and after verifying the identity, proceed to steps S4-1 ⁇ S4-3 to complete the real name modification; When receiving false information or public interest disputes, the information can still be verified to ensure traceability and accountability.
  • Zhang Ming ID p completes the dream, or no longer needs funding, and wants to cancel the release record of the dream, it first initiates a deletion request.
  • the content of the request includes personal information and the height of the dream chain.
  • the supervisory node ID g receives the request, Query Zhang Ming’s transaction data on the chain, and after verifying personal information, initiate a deletion transaction.
  • the consensus mechanism After verification by the consensus node, the dream block will be modified.
  • the consensus mechanism described in the present invention refers to the implementation of a practical Byzantine fault-tolerant mechanism based on multi-factor voting. According to the comprehensive calculation of the matching degree SD, the subsidy amount SA, and the credit score CS of the sponsor, the top ranked candidates will be selected by voting. Bit consensus nodes participate in the consensus, re-elect every ⁇ hours, and reorganize election voting.
  • the steps for the consensus node to verify are:
  • the monitoring node ID g calculates the comprehensive score of the election node without losing the generality
  • the consensus nodes After the first batch of consensus nodes are generated, within ⁇ t time, the consensus nodes will act as master nodes according to their rankings; the master node SP packs the verified funding transaction TX i information into a block, and generates Send to the rest of the slave nodes; the next node after the master node is the sub-master node, which is packaged with the master node at the same time, and the block generated by itself will be sent when the master node makes an error;
  • the other slave nodes W i After receiving the pre-preparation message sent by the master node, the other slave nodes W i verify the signature. If the verification is passed and the block is approved to be uploaded to the chain, a confirmation message is sent Forward to other consensus nodes, and send if timeout or disapproval
  • N is the number of system nodes, if the maximum malicious If the number of nodes is f, N ⁇ 3f+1 is required;

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Engineering & Computer Science (AREA)
  • Marketing (AREA)
  • Software Systems (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Computer Hardware Design (AREA)
  • Databases & Information Systems (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Technology Law (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Storage Device Security (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明提出了一种基于矩阵联盟链的可隐藏实名的资助方法,通过联盟链系统将公益机构、企业、个人、政府和监管机构等多个行为体聚集在一起,设计矩阵联盟链,优化结构,组建联盟,资助人和受助人可隐藏实名信息,但不影响资助信息的透明度和真实性,确保可追溯、追责;优化共识机制,促进资助人行为诚信。本发明充分发挥区块链在公益场景中的优势,有效保护用户隐私。

Description

一种基于矩阵联盟链的可隐藏实名的资助方法 技术领域
本发明涉及联盟链技术领域,具体是涉及一种基于矩阵联盟链的可隐藏实名的资助方法。
背景技术
传统公益慈善组织的信息公开透明度低,监管机制缺位,公信力不足。公益组织的“资金去向与使用状况”以及“善款来源”往往是公众关注的焦点,而传统公益机构经常信息披露不足,社会监督力量薄弱,影响了公众对公益组织的信心与支持度。传统的公益慈善组织大多没有进行数字化技术改造,传统捐赠流程繁琐,技术手段落后,效率低下;同时,中国经济的快速发展带来了群众持续增长的公益需求。近年来社会公益总价值与社会组织数量不断上涨,个人捐款额度保持较好的增速,未来个人捐款资产规模尤其是网络募捐广泛被看好。随着互联网的飞速发展和信息技术的广泛运用,网络公益众筹平台如轻松筹、水滴筹、爱心筹等快速发展,但是互联网的开放性特征,使得众筹平台难以对发起者与受益者的信息进行有效筛查,个别求助者虚构病情、部分平台线上业务流程不合规、用户数据被滥用、个别平台涉嫌非法筹集资金等问题频现。这不仅对捐助者的基本权益造成了侵害,同时也削弱了群众对于网络公益众筹活动的信任,制约了公益事业的可持续发展。此外,在现有的公益场景,包括区块链+公益的产品中,主要集中在钱、物的财物资助,而忽视人可以给予的“志愿时间”、“在线课程”、“经验知识”等服务资源的帮助。在巩固拓展脱贫攻坚成果、推进乡村振兴的进程中,围绕实现乡村儿童梦想的公益场景,财物资助和服务资助都应考虑在内。
区块链技术,是一种分布式账本技术,是由多方共同维护,使用密码学保证传输和访问安全,能够实现数据一致存储、难以篡改、防止抵赖的记账技术,具有去中心化、公开透明、信息可追溯、防篡改性质,可有效地保证公益项目的公开性和透明性,并且捐赠人可以对每一笔交易进行查询,追溯物资或款项的发放信息、使用情况等。区块链作为一种新兴的数字技术,有着巨大的应用潜力,目前区块链已经逐步开始应用在社会公益领域,然而,现有的公益区块链系统为更好更公开地向社会公众公示,在区块链中会记录完整的资助人和受资助人信息,由于区块链不可篡改的特性,用户的信息会永远保留在区块链中。从隐私保护来说,资助人或受资助人应当可以要求删除或隐藏有关自己的隐私数据记录,即用户应当可以选择实名或隐藏实名参与到区块链的记录中而又不影响资助数据公开透明、防止篡改,以保护用户的隐私权和匿名权。相比于公有链,联盟链的准 入机制更适合于公益场景,具有良好信誉且符合资质的公益平台、政府监管部门以及信用部门将被允许进入,参与共识。但基于现有的联盟链系统,区块中只是不断记录资助交易信息,无法准确关联对于某受资助人所有的资助信息,无法定位某一特定的资助交易实现链上修改,无法保护受助人和资助人的实名信息。
发明内容
为解决上述技术问题,本发明提供了一种基于矩阵联盟链的可隐藏实名的资助方法,经过实名注册和认证后,资助人可对受资助人进行财物或服务资助,通过优化区块结构和链结构,区块链上存储的实名信息允许被隐藏却不影响链的整体结构,同时保证资助信息可追溯、追责,有效地保护个人隐私信息;优化共识机制,引入资助类型匹配度和权威信用部门的信用评分,促进资助人实施诚信行为,失信行为将反馈至信用单位的诚信档案中,促进诚信资助。
本发明所述的一种基于矩阵联盟链的可隐藏实名的资助方法,所述方法的步骤为,
S1、初始化联盟链系统,生成公共参数,联盟链的参与者包括受资助人、资助人、监管机构、密钥生成中心;
S2、构建梦想区块,形成矩阵联盟链中的横向链;受资助人ID p向联盟链系统提交申请资助信息,监管节点ID g审核申请资助信息并验证通过后,打包受资助人发布梦想的交易信息TX 1,并生成交易副本TX 2,监管节点广播交易信息TX 1和交易副本TX 2,共识节点根据共识机制对交易信息TX 1和交易副本TX 2进行验证,并将验证后的交易信息TX 1和交易副本TX 2写入梦想区块;
S3、构建资助区块,形成矩阵联盟链中的纵向链;资助人ID d完成对受资助人ID p的资助后,获取由监管节点签发并背书的资助证明fCert,监管节点广播资助交易TX 3及其交易副本TX 4,共识节点根据共识机制对资助交易TX 3及其交易副本TX 4进行验证,并将验证后的资助交易TX 3及其交易副本TX 4存入交易池;主共识节点根据受资助人ID及资助类型打包成区块,广播至区块链网络,从共识节点验证区块的正确性并投票,票数超过阈值p即可上链;
S4、当资助人ID d想要隐藏其资助信息时,由资助人发出交易修改请求,监管节点ID g收到请求后,快速定位该交易所在区块坐标(height,depth),核验资助人身份后,为该资助人生成伪身份PID d及签发新资助证书new_fCert,经过全网广播,根据共识机制,共识节点验证通过后修改链上交易信息隐藏实名,隐藏实名后资助人仍可以向监管节点申请恢复实名信息;
S5、当受资助人ID p想要隐藏其受资助信息时,受资助人ID p接收完成资助后,发起删除资助发布请求,监管节点ID g收到请求后,上链查询该受资助人的交易数据,核验受资助人信息后,监管节点ID g发起删除交易,共识节点根据共识机制验证后,对该梦想区块进行修改。
进一步的,S1的具体步骤为:
S1-1、各参与用户生成与自己身份相关联的字符串ID∈{0,1} *,受资助人、资助人、监管机构、密钥生成中心生成的与身份信息相关联的字符串分别表示为:
{ID p,ID d,ID g,ID c}
S1-2、输入安全参数λ,选取加法循环群G 1与乘法循环群G 2,且|G 1|=|G 2|=q,q为λ位的大素数,P为群G 1的生成元,并定义这样一个双线性映射e:G 1×G 1→G 2
S1-3、密钥生成中心随机选取随机数
Figure PCTCN2022106613-appb-000001
作为系统主密钥,并计算其公钥为P pub=rP,定义6个安全哈希函数,分别为:
Figure PCTCN2022106613-appb-000002
Figure PCTCN2022106613-appb-000003
Figure PCTCN2022106613-appb-000004
Figure PCTCN2022106613-appb-000005
Figure PCTCN2022106613-appb-000006
Figure PCTCN2022106613-appb-000007
以及加解密算法对Enc(·),Dec(·),公开系统参数{G 1,G 2,P,P pub,Enc(·),Dec(·),H 1,H 2,H 3,H 4,H 5,H 6},并记录到区块链上,
Figure PCTCN2022106613-appb-000008
表示模q的剩余类环的乘法群,P pub表示公钥,{0,1} *表示不定长的0,1比特串,{0,1} n表示n;比特长的0,1比特串;
S1-4、密钥生成中心根据各参与用户提供的身份字符串ID∈{0,1} *计算 Q ID=H 1(ID||rand),sk ID=rQ ID,pk ID=sk IDP,Addr ID=Hash(pk ID),以及Cert ID=Sig r(H 2(ID||pk ID),exp),其中,(sk ID,pk ID)为用户的公私钥对,Addr ID为用户区块链公钥地址,Cert ID为用户的注册证书,由密钥生成中心的私钥签名生成,exp为注册号,Hash(·)为通用哈希函数,然后通过安全通道将<sk ID,pk ID,Addr ID,Cert ID>发送给用户。
进一步的,S2的步骤为:
S2-1、受资助人ID p打包个人注册信息,梦想内容及类型生成消息
Figure PCTCN2022106613-appb-000009
并计算其数字签名
Figure PCTCN2022106613-appb-000010
其中,T 1为当前时间戳,发送消息
Figure PCTCN2022106613-appb-000011
至区块链网络;
S2-2、监管节点ID g接收到受资助人ID p消息β后,首先选取当前时间戳T 2,定义ΔT为消息的时间戳和收到消息时的时间戳之间的有效差值,若|T 2-T 1|≤ΔT,则说明消息有效,否则中止对话,然后计算下列公式来验证消息的正确性:
Figure PCTCN2022106613-appb-000012
若上式成立,则接收该消息,核验该受资助人的梦想内容及类型无误后,返回确认信息;
S2-3、监管节点ID g根据梦想区块的交易格式打包受资助人ID p提交的信息,并生成交易副本,如下:
Figure PCTCN2022106613-appb-000013
Figure PCTCN2022106613-appb-000014
其中,TX 1包含受资助人的个人真实信息ID p
Figure PCTCN2022106613-appb-000015
TX 2为交易副本,不包含这两项字符串,
Figure PCTCN2022106613-appb-000016
是监管节点对交易的签名,TS 1为交易生成时间,tag为梦想区块链的标签,用于后续编辑区块链时定位区块坐标及交易位置;
S2-4、监管节点ID g广播交易及交易副本,根据共识机制,由共识节点对交易及其副本进行验证,验证通过后根据tag标签写入梦想区块,并建立索引列表
Figure PCTCN2022106613-appb-000017
作为链下数据保存至本地数据库,其中height为该区块的高度,用于生成资助链过程的快速定位,该区块的数据结构中存有两个 merkleroot,分别为MR 1=Hash(TX 1)、MR 2=Hash(TX 2),相对应地,区块头将存有前一区块的两个哈希值,区块与区块间由明链和暗链链接,用于修改区块链内容时仍能保证区块链结构不被破坏,即:
Hash(B i-2,Noce i-1,Timestamp i-1,MR 1,i-1),
B i=<Hash(B i-2,Noce i-1,Timestamp i-1,MR 2,i-1),>
Noce i,Timestamp i,MR 1i,MR 2i
其中,B i表示当前区块,Hash(·)表示前一区块的两个哈希值,Noce i表示当前区块的随机数,Timestamp i表示区块的生成时间戳。
进一步的,S3的步骤为:
S3-1、资助人ID d完成对受资助人ID p的区块链地址的资金转账或服务,生成资助信息
Figure PCTCN2022106613-appb-000018
向监管节点ID g发送生成资助证书请求
Figure PCTCN2022106613-appb-000019
其中,fund表示资助内容,
Figure PCTCN2022106613-appb-000020
表示加密算法,监管节点收到请求后,执行解密算法
Figure PCTCN2022106613-appb-000021
获得H 5(info),若与资助消息info直接由H 5计算得到的值H′ 5(info)相等,则确认接收该请求,并签发资助证书
Figure PCTCN2022106613-appb-000022
其中T 3为证书生成时间,并进行背书;
S3-2、监管节点ID g根据资助区块的交易格式生成交易TX 3及交易副本TX 4,并广播至全网,根据共识机制,由共识节点进行验证,此外,监管节点ID g还需提供资助对象ID p的相关信息
Figure PCTCN2022106613-appb-000023
用于区块定位;
Figure PCTCN2022106613-appb-000024
Figure PCTCN2022106613-appb-000025
其中,
Figure PCTCN2022106613-appb-000026
交易副本TX 4中不包括资助人的个人相关信息ID d
Figure PCTCN2022106613-appb-000027
表示监管节点对该交易的签名,
Figure PCTCN2022106613-appb-000028
表示以资助人公钥对相应证书加密,用于资助人接收后以自己的私钥进行解密而获得资助证书,TS 2表示交易生成时间;
S3-3、交易及其副本验证通过后,根据共识机制,主共识节点将交易TX 3及副本TX 4存入交易池,然后将Δt时间内对同一受资助人ID p的资助交易打包成区块,并广播至区块链网络,从共识节点对该区块进行验证,投票超过阈值p后, 计算索引
Figure PCTCN2022106613-appb-000029
定位ID p所在区块高度height,将该区块链接到对应的资助链,其所在高度定义为depth,则某一交易在矩阵联盟链中的区块坐标(height,depth);同样地,资助链的区块数据结构中存有两个merkleroot值,分别为MR 3和MR 4,以及前一区块的两个哈希值,且区块间由明链和暗链相链接。
进一步的,S4的具体内容为:
S4-1、资助人ID d发起匿名修改请求
Figure PCTCN2022106613-appb-000030
其中(height,depth)为待修改交易所在区块坐标,
Figure PCTCN2022106613-appb-000031
为加密算法,
Figure PCTCN2022106613-appb-000032
表示资助证书,T 4为当前时间戳;
S4-2、监管节点ID g接收到modify_request,首先选择当前时间戳T 5,若|T 5-T 4|≤ΔT,则消息有效,根据ID d查询本地数据库获得
Figure PCTCN2022106613-appb-000033
执行解密算法
Figure PCTCN2022106613-appb-000034
Figure PCTCN2022106613-appb-000035
成立,则说明该资助人ID d为合法用户,消息正确;
S4-3、消息验证通过后,监管节点ID g为资助人ID d生成伪身份PID d=H 1(ID d||rand),并签发新资助证书
Figure PCTCN2022106613-appb-000036
并背书,然后,监管节点ID g生成新的交易数据
Figure PCTCN2022106613-appb-000037
其中new_info=<PID d||null||fund||type>,其中TS 3表示交易生成时间,
Figure PCTCN2022106613-appb-000038
表示对该交易的数字签名,tag表示链标签;此外,监管节点ID g还需向共识节点提供待修改交易所在区块坐标(height d,depth d)以及修改请求发起者的身份信息ID d
S4-4、根据共识机制,共识节点对交易TX′ 3验证通过后,根据(height d,depth d)及ID d快速查询待修改交易,然后将待修改交易TX 3替换为TX′ 3,重新计算merkleroot的值MR′ 3,此时,该区块与后一区块之间的明链由于merkleroot的值改变而断开,而MR 4的值保持不变,因此暗链维护了资助链的完整性;若MR 4也发生了改变,则说明该区块发生了未经授权的篡改;
S4-5、当资助人ID d想要再次实名时,发送修改请求,监管节点ID g通过搜索本地数据库可以获得相关背书内容,核验身份后进行步骤S4-1~S4-3完成实名修改。当受到虚假信息或公益纠纷时,仍可以核查信息,确保可追溯、追责。
进一步的,S5的具体步骤为:
S5-1、受资助人ID p发起删除请求
Figure PCTCN2022106613-appb-000039
其中height p为该梦想区块高度,T 7为当前请求的时间戳;
S5-2、监管节点ID g收到受资助人ID p发来的删除请求后,首先选取当前时间T 8,若|T 7-T 8|≤ΔT,则请求有效,然后上链查询获得交易数据
Figure PCTCN2022106613-appb-000040
计算
Figure PCTCN2022106613-appb-000041
若γ=MR 2,则说明该受资助人身份可信;否则说明该受资助人身份不合法或MR 2值受到未经授权的篡改,则中止会话;
S5-3、当受资助人ID p身份核验通过时,监管节点ID g生成新的交易数据
Figure PCTCN2022106613-appb-000042
并广播,此外,还需提供待修改区块的高度height p
S5-4、根据共识机制,经过共识节点验证后,对待修改区块进行删除操作,具体地,将原有的TX 1替换为TX′ 1,并重新计算MR′ 1,由于该值的改变,对于梦想链而言,后一区块B i+1中存储的当前区块B i的第一个哈希值发生改变,而第二个哈希值保持不变,故梦想链的结构保持完整性;同理,对于资助链而言,其第一个资助区块中保存的第二哈希值不变,资助区块结构完整;由于资助链上交易内容不包含受资助人ID p的相关信息,相应资助证书被加密,只有拥有相应的私钥的资助节点可以看到,其他节点均不可查询到受资助人ID p的相关信息。
进一步的,所述共识机制是指实施基于多因素投票的实用拜占庭容错机制,所述共识节点为资助人和受助人;在链上发布交易或者修改交易需要得到共识节点的共识,共识节点通过综合计算匹配度SD、资助额度SA、资助人信用评分CS三因素投票选出排名前
Figure PCTCN2022106613-appb-000043
位的共识节点参与共识,每过τ小时换届,重新组织竞选投票。
进一步的,根据所述共识机制,共识节点进行验证的步骤为:
S6-1、在矩阵联盟链冷启动时,由监管节点ID g将此时资助交易信息写入创 世区块;密钥生成中心KGC为每个节点分配独立的区块链地址Addr ID、私钥sk ID和公钥pk ID,资助人的公钥只对监管节点及共识节点公开,已写入区块的账户地址公开可见,未写入的账户地址则不会在网络中显示;
S6-2、监管机构中的第三方信用机构ID c对新加入的资助节点ID d授予信用评分CS d;监管节点ID g读取资助节点ID d的资助证书
Figure PCTCN2022106613-appb-000044
记录节点的资助值SA d,根据资助类型type计算资助匹配度评分SD d
S6-3、当进入竞选投票时间时,监管节点ID g计算竞选节点的综合评分
Figure PCTCN2022106613-appb-000045
其中,λ+μ+v=1,
Figure PCTCN2022106613-appb-000046
是对CS d、SA d、SD d进行归一化处理的结果,选出评分排序前
Figure PCTCN2022106613-appb-000047
位的节点担任共识节点;
S6-4、第一批共识节点产生后,在Δt时间内,共识节点按照排名依次担任主节点;主节点SP将验证通过的资助交易TX i信息打包到一个区块中,生成
Figure PCTCN2022106613-appb-000048
发送给其余从节点;在主节点后的下一个节点是副主节点,与主节点同时打包,当主节点出错时才会发出自己产生的区块;
S6-5、其余从节点W i接收到主节点发送的预准备消息后,验证签名,若验证通过,赞同区块上链,则发送确认消息
Figure PCTCN2022106613-appb-000049
转发给其他共识节点,若超时或不赞同则发送
Figure PCTCN2022106613-appb-000050
S6-6、各共识节点接收到准备消息后,当接收到的有效准备消息数量N m_true≥2f+1(最大恶意节点数量f),计算赞同Count(Ture)和不赞同Count(False)的票数,决定确认消息中的Vote值,节点广播确认信息Confirm,当收到的确认信息Confirm≥2f+1,则执行请求;
Figure PCTCN2022106613-appb-000051
S6-7、若客户端收到k≥f+1个相同回复,则说明客户端发起的请求已经达成全网共识,否则需要重新发送请求;N是系统节点数,若系统所允许的最大 恶意节点数量f,则要求N≥3f+1;
S6-8、若发现恶意节点,则更新其信用评分CS′ d=σ*CS d,其中,0<σ<1,并将评分发送给第三方信用机构ID c;若完成n轮共识,则更新该节点的信用评分为CS′ d=CS d+ln n。
本发明所述的有益效果为:1、区别于传统资助的公益模式,在本发明所述的方法区块资助交易中引入资助类型,增设“服务资助”,为更多热心公益的群众提供了更多可以资助的方式,充分发挥资助人的积极性,更有针对性地帮助受资助人;
2、立足本场景分类资助的模式,根据资助匹配度、信用值等因素选出共识节点,有利于每个节点都有机会参与共识,加强信用值对共识的影响,减弱节点因多次参与共识而更易获取记账权的优势,更有利于共识的公平公正;
3、立足受资助人和资助人的隐私保护,通过优化的区块链结构,受资助人和资助人可以选择在联盟链上隐去其个人实名信息,以避免被网络永远记录、被公众永远关注;但仍能够保证资助和被资助信息公正公开、透明可溯源,避免因伪造信息或欺骗等虚假行为造成公益纠纷;在保证可追责的前提下,将选择是否实名公开的权利交还本人;
4、建立矩阵联盟链,通过链上区块的坐标信息和链下索引列表,使得监管节点和共识节点能够快速定位待修改交易的区块位置,有助于提高区块修改效率;
5、引入权威信用部门,如中国人民银行、公安局或支付宝等,参与监管,对梦想家、梦想资助人背书认证,授予资助人信用评分,当资助人在联盟链中有失信或恶意行为时,将同时记录在现实世界的诚信档案里,有利于资助人诚信作为,形成有效的信用反馈监督机制;
6、通过密码学方法,任何攻击者无法通过梦想家或梦想资助人的数据操作获取到真实资助信息或判断出真实身份,保护了梦想家和梦想资助人的数据隐私。
附图说明
为了使本发明的内容更容易被清楚地理解,下面根据具体实施例并结合附 图,对本发明作进一步详细的说明。
图1是本发明所述系统的模型图;
图2是区块结构图;
图3是矩阵联盟链结构图;
图4是本发明的流程图。
具体实施方式
本发明的重要术语及约束如下:
联盟链:区块链是一种在对等网络环境下,通过透明和可信规则,构建不可伪造、难以篡改和可追溯的块链式数据结构,实现和管理可信数据的产生、存取和使用的模式。联盟链通常是指多个主体达成一定的协议,或建立了一个业务联盟后,多方共同组建的链,加入联盟链的成员需要经过验证。每个区块的生成由所有的预选节点共同决定(预选节点参与共识过程),其他接入节点可以参与交易,但不过问记账过程,其他任何人可以通过该区块链开放的API进行限定查询。
矩阵联盟链:在联盟链中构建横向链(梦想链)和纵向链(资助链),横向链以梦想区块高度为横向坐标,纵向链以资助区块深度为纵向坐标,通过区块坐标可定位该区块在联盟链中的唯一位置,这个坐标的实际意义是对某一梦想家梦想的某一个资助行为。因这种联盟链和区块的具象形式类似于矩阵,所以称之为“矩阵联盟链”。
哈希函数:将任意长度的二进制值串映射为固定长度的二进制值串,这个映射的规则,就是哈希算法。而通过原始数据映射之后得到的二进制值串就是哈希值。
Merkle树:Merkle树是一种哈希二叉树,它是一种用作快速归纳和校验大规模数据完整性的数据结构。这种二叉树包含加密哈希值。术语“树”在计算机学科中常被用来描述一种具有分支的数据结构。
共识机制:共识机制是通过特殊节点的投票,在很短的时间内完成对交易的验证和确认;对一笔交易,如果利益不相干的若干个节点能够达成共识,就可以认为全网对此也能够达成共识。
实用拜占庭容错算法:PBFT,Practical Byzantine Fault Tolerance。PBFT是 一个实现拜占庭容错的实用型的共识机制,在系统中有一个节点会被当做主节点,而其他节点都是子节点。系统内的所有节点都会相互通信,最终目标是以少数服从多数的原则达成数据的共识;PBFT要求在总节点数为n的前提下,最多可以容纳(n-1)/3的拜占庭节点,在联盟链中有较广泛的应用。
本发明应用场景可为实现乡村儿童梦想,助力乡村振兴。本发明所描述的方案包括一下四个实体,如图1所示。
梦想家:指受资助人,在乡村公益场景中指有梦想的乡村儿童,可通过家长老师或其他监护人的帮助,完成实名注册,在监管机构背书认证后,发布梦想,梦想及所有资助信息将共识后记录在联盟链上;梦想完成后或梦想不再需要资助时,梦想家可选择隐藏其实名信息。
梦想资助人:指资助人,可以是个体或集体;在乡村公益场景中指梦想资助人,在实名注册并通过监管机构认证后,可以在联盟链上查看到五彩斑斓的梦想,选择财物资助或服务资助,帮助梦想家实现梦想,资助信息将记录在联盟链上,而后梦想资助人可选择是否在联盟链上隐藏个人实名信息。
监管机构:监管机构由政府监管部门、公益机构和第三方信用机构。政府监管部门、公益机构和梦想资助人组成联盟链,第三方信用机构在认证资助人时,将根据资助人诚信档案授予信用评分,但不参与共识,当资助人在联盟链中有失信行为时,将同时记录在信用部门诚信档案中。
密钥生成中心:初始化公共参数,为方案中各成员生成并分发密钥、注册证书。
本发明所述的一种基于矩阵联盟链的可隐藏实名的资助方法,方案模型图如图1所示,具体流程如图4所示,其步骤为:
S1、初始化系统,生成安全参数、系统公钥、加解密算法、安全哈希函数等公共参数,参与者主要是梦想家(某贫困乡村儿童张明)、梦想资助人(某专注在线课程的企业“爱课堂”有限公司)、监管机构(包括某公益机构“爱心筹”、当地民政部门、第三方信用机构(中国人民银行征信中心)及密钥生成中心(KGC));
S1-1、各参与方生成与自己身份相关联的字符串ID∈{0,1} *,张明、爱课堂公司、民政部门与“爱心筹”合作的监管者、征信中心分别生成的与身份信息相关联的字符串分别表示为:
{ID p,ID d,ID g,ID c};
S1-2、输入安全参数λ,选取加法循环群G 1与乘法循环群G 2,且|G 1|=|G 2|=q,q为λ位的大素数,P为群G 1的生成元,并定义这样一个双线性映射e:G 1×G 1→G 2
S1-3、KGC随机选取随机数
Figure PCTCN2022106613-appb-000052
作为系统主密钥,并计算其公钥为P pub=rP;定义6个安全哈希函数,分别为:
Figure PCTCN2022106613-appb-000053
Figure PCTCN2022106613-appb-000054
Figure PCTCN2022106613-appb-000055
Figure PCTCN2022106613-appb-000056
Figure PCTCN2022106613-appb-000057
Figure PCTCN2022106613-appb-000058
以及加解密算法对Enc(·),Dec(·),公开系统参数{G 1,G 2,P,P pub,Enc(·),Dec(·),H 1,H 2,H 3,H 4,H 5,H 6},并记录到区块链上;其中,r表示随机数,
Figure PCTCN2022106613-appb-000059
表示模q的剩余类环的乘法群,P pub表示公钥,{0,1} *表示不定长的0,1比特串,{0,1} n表示n;比特长的0,1比特串;;
S1-4、密钥生成中心根据各参与用户提供的身份字符串ID∈{0,1} *计算Q ID=H 1(ID||rand),sk ID=rQ ID,pk ID=sk IDP,Addr ID=Hash(pk ID),以及Cert ID=Sig r(H 2(ID||pk ID),exp),其中,(sk ID,pk ID)为用户的公私钥对,Addr ID为用户区块链公钥地址,Cert ID为用户的注册证书,由密钥生成中心的私钥签名生成,exp为注册号,Hash(·)为通用哈希函数,然后通过安全通道将<sk ID,pk ID,Addr ID,Cert ID>发送给用户。
S2构建梦想区块,形成矩阵联盟链中的横向链(梦想链);张明ID p向联盟链系统提交个人注册信息,以及成为外交官的梦想和需要服务资助等信息M,民政局、爱心筹作为监管节点,审核张明小朋友的个人信息及梦想的真实性,验证通过后,打包张明的ID、区块链地址Addr、成为外交官的梦想内容msg、需要服务资助类型type等信息作为梦想的交易信息TX 1,并生成交易副本TX 2(不含张明ID及区块链地址Addr),广播TX 1及副本TX 2,根据共识机制,由共识节点 进行验证并写入梦想区块,区块结构如图2所示。梦想区块间有明暗双链相连,形成一条梦想链如图3所示。
S2的具体实现步骤如下:
S2-1、张明ID p打包个人注册信息,外交官的梦想内容及类型生成消息
Figure PCTCN2022106613-appb-000060
并计算其数字签名
Figure PCTCN2022106613-appb-000061
其中,T 1为当前时间戳,发送消息
Figure PCTCN2022106613-appb-000062
至区块链网络;
S2-2、民政局、爱心筹组成的监管节点ID g接收到张明ID p消息β后,首先选取当前时间戳T 2,定义ΔT为消息的时间戳和收到消息时的时间戳之间的有效差值,若|T 2-T 1|≤ΔT,则说明消息有效,否则中止对话,然后计算下列公式来验证消息的正确性:
Figure PCTCN2022106613-appb-000063
若上式成立,则接收该消息,核验该受资助人的梦想内容及类型无误后,返回确认信息;
S2-3、监管节点ID g根据梦想区块的交易格式打包张明ID p提交的信息TX 1,并生成交易副本TX 2,如下:
Figure PCTCN2022106613-appb-000064
Figure PCTCN2022106613-appb-000065
其中,TX 1包含张明的个人真实信息ID p
Figure PCTCN2022106613-appb-000066
TX 2为交易副本,不包含这两项字符串,
Figure PCTCN2022106613-appb-000067
是监管节点对交易的签名,TS 1为交易生成时间,tag为梦想区块链的标签,用于后续编辑区块链时定位区块坐标及交易位置;
S2-4、监管节点ID g广播交易TX 1及交易副本TX 2,根据共识机制,共识节点对交易及其副本进行验证,验证通过后根据tag标签写入梦想区块,并建立索引列表
Figure PCTCN2022106613-appb-000068
作为链下数据保存至本地数据库,其中height为该区块的高度,用于生成资助链过程的快速定位,该区块的数据结构中存有两个merkleroot,分别为MR 1=Hash(TX 1)、MR 2=Hash(TX 2),相对应地,区块头将存有前一区块的两个哈希值,区块与区块间由明链和暗链链接,用于修改区块链内容时仍能保证区块链结构不被破坏,即:
Hash(B i-2,Noce i-1,Timestamp i-1,MR 1,i-1),
B i=<Hash(B i-2,Noce i-1,Timestamp i-1,MR 2,i-1),>
Noce i,Timestamp i,MR 1i,MR 2i
其中,B i表示当前区块,Hash(·)表示前一区块的两个哈希值,Noce i表示当前区块的随机数,Timestamp i表示区块的生成时间戳。
S3、构建资助区块,形成矩阵联盟链中的纵向链(资助链);爱课程公司ID d给予张明ID p免费上在线英语课程的资助后,获取资助证明fCert,该证明由民政局和爱心筹共同签发并背书,然后,监管节点广播交易TX 3及其交易副本TX 4,交易内容包括爱课程及张明的相关信息,资助证书,资助类型等,副本则不包含爱课程的企业信息,根据共识机制,共识节点对资助交易进行验证,验证通过后,资助交易及交易副本将被存入交易池,一段时间后,主共识节点根据张明的ID及资助类型打包成区块,广播至区块链网络,从共识节点验证区块的正确性并投票,票数超过阈值p即可上链。对于张明的所有资助,资助区块都会记录到该张明的梦想区块所链接的资助链上,资助区块结构如图2所示,资助链结构如图3所示。
S3的具体实现步骤如下:
S3-1、爱课程公司ID d完成对张明ID p的区块链地址的免费使用英语课程资源的账号密码,生成资助信息
Figure PCTCN2022106613-appb-000069
向监管节点ID g发送生成资助证书请求
Figure PCTCN2022106613-appb-000070
其中,fund表示资助内容,
Figure PCTCN2022106613-appb-000071
表示加密算法,监管节点收到请求后,执行解密算法
Figure PCTCN2022106613-appb-000072
获得H 5(info),若与资助消息info直接由H 5计算得到的值H′ 5(info)相等,则确认接收该请求,并签发资助证书
Figure PCTCN2022106613-appb-000073
其中T 3为证书生成时间,并进行背书;;
S3-2监管节点ID g根据资助区块的交易格式生成交易TX 3及交易副本TX 4,并广播至全网,根据共识机制,由共识节点进行验证,此外,监管节点ID g还需提供张明ID p的相关信息
Figure PCTCN2022106613-appb-000074
用于区块定位;
Figure PCTCN2022106613-appb-000075
Figure PCTCN2022106613-appb-000076
其中,
Figure PCTCN2022106613-appb-000077
交易副本TX 4中不包括爱课程的企业相关信息ID d
Figure PCTCN2022106613-appb-000078
表示监管节点对该交易的签名,
Figure PCTCN2022106613-appb-000079
表示以爱课程的公钥对相应证书加密,用于爱课程接收后以自己的私钥进行解密而获得资助证书,TS 2表示交易生成时间;
S3-3交易TX 3及交易副本TX 4验证通过后,根据共识机制,主共识节点将交易TX 3及交易副本TX 4存入交易池,然后将Δt时间内对张明ID p的资助交易打包成区块,并广播至区块链网络,从共识节点对该区块进行验证,投票超过阈值p后,计算索引
Figure PCTCN2022106613-appb-000080
定位ID p所在区块高度height,将该区块链接到对应的资助链,其所在高度定义为depth,则某一交易在矩阵联盟链中的区块坐标(height,depth);同样地,资助链的区块数据结构中存有两个merkleroot值,分别为MR 3和MR 4,以及前一区块的两个哈希值,且区块间由明链和暗链相链接。
S4、当爱课程ID d想要匿名时,不对外公开自己的资助信息时,爱课程发出交易修改请求,请求内容包括其企业相关信息及所在区块坐标,监管节点ID g收到请求后,快速定位该交易所在区块坐标(height,depth),核验爱课程身份后,为爱课程生成伪身份PID d及签发新资助证书new_fCert;根据共识机制,监管节点ID g广播新交易(包括资助人的伪身份及新证书等信息),并提供待修改交易所在区块坐标(height d,depth d),由共识节点对该交易进行修改,此时,该区块的MR 3的值发生改变,而MR 4保持不变,因此资助链的暗链仍存在,从而保证矩阵联盟链结构的完整性;同样地,若匿名后的爱课程想要再次实名时,只需要提供其真实身份信息及旧的资助证书,通过类似的步骤即可完成资助链的明链修补,实现实名隐藏后可追溯、追责的机制。
S4的具体实现步骤如下:
S4-1、爱课程ID d发起匿名修改请求
Figure PCTCN2022106613-appb-000081
其中(height,depth)为待修改交易所在区块坐标,
Figure PCTCN2022106613-appb-000082
为加密算法,
Figure PCTCN2022106613-appb-000083
表示 资助证书,T 4为当前时间戳;
S4-2、监管节点ID g接收到modify_request,首先选择当前时间戳T 5,若|T 5-T 4|≤ΔT,则消息有效,根据ID d查询本地数据库获得
Figure PCTCN2022106613-appb-000084
执行解密算法
Figure PCTCN2022106613-appb-000085
Figure PCTCN2022106613-appb-000086
成立,则说明爱课程ID d为合法用户,消息正确;
S4-3、消息验证通过后,监管节点ID g为爱课程ID d生成伪身份PID d=H 1(ID d||rand),并签发新资助证书
Figure PCTCN2022106613-appb-000087
并背书,然后,监管节点ID g生成新的交易数据
Figure PCTCN2022106613-appb-000088
其中new_info=<PID d||null||fund||type>,其中TS 3表示交易生成时间,
Figure PCTCN2022106613-appb-000089
表示对该交易的数字签名,tag表示链标签;此外,监管节点ID g还需向共识节点提供待修改交易所在区块坐标(height d,depth d)以及修改请求发起者的身份信息ID d
S4-4、根据共识机制,共识节点对交易TX′ 3验证通过后,根据(height d,depth d)及ID d快速查询待修改交易,然后将待修改交易TX 3替换为TX′ 3,重新计算merkleroot的值MR′ 3,此时,该区块与后一区块之间的明链由于merkleroot的值改变而断开,而MR 4的值保持不变,因此暗链维护了资助链的完整性;若MR 4也发生了改变,则说明该区块发生了未经授权的篡改;
S4-5同样地,若爱课程ID d想要再次实名,发送修改请求,监管节点ID g通过搜索本地数据库可以获得相关背书内容,核验身份后进行步骤S4-1~S4-3完成实名修改;当受到虚假信息或公益纠纷时,仍可以核查信息,确保可追溯、追责。
S5、当张明ID p完成梦想,或不再需要资助,想注销梦想发布记录时,其首先发起删除请求,请求内容包括个人信息及其所在梦想链高度,监管节点ID g收到请求后,上链查询张明的交易数据,核验个人信息后,发起删除交易,根据共识机制,经过共识节点验证后,对该梦想区块进行修改。
S5的具体实现步骤如下:
S5-1、张明ID p发起删除请求
Figure PCTCN2022106613-appb-000090
其中height p为该梦想区块高度,T 7为当前请求的时间戳;
S5-2、监管节点ID g收到张明ID p发来的删除请求后,首先选取当前时间T 8,若|T 7-T 8|≤ΔT,则请求有效,然后上链查询获得交易数据
Figure PCTCN2022106613-appb-000091
计算
Figure PCTCN2022106613-appb-000092
若γ=MR 2,则说明该受资助人身份可信;否则说明该受资助人身份不合法或MR 2值受到未经授权的篡改,则中止会话;
S5-3、当张明ID p身份核验通过时,监管节点ID g生成新的交易数据
Figure PCTCN2022106613-appb-000093
并广播,此外,还需提供待修改区块的高度height p
S5-4、根据共识机制,经过共识节点验证后,对待修改区块进行删除操作,具体地,将原有的TX 1替换为TX′ 1,并重新计算MR′ 1,由于该值的改变,对于梦想链而言,后一区块B i+1中存储的当前区块B i的第一个哈希值发生改变,而第二个哈希值保持不变,故梦想链的结构保持完整性;同理,对于资助链而言,其第一个资助区块中保存的第二哈希值不变,资助区块结构完整;由于资助链上交易内容不包含张明ID p的相关信息,相应资助证书被加密,只有拥有相应的私钥的资助节点可以看到,其他节点均不可查询到张明ID p的相关信息。
S6、实施基于多因素投票的实用拜占庭容错机制(MV-PBFT,Practical Byzantine Fault Tolerance based on multifactor voting)。共识节点通过综合计算资助匹配度SD、资助额度SA、梦想资助人信用评分CS三因素投票选出排名前
Figure PCTCN2022106613-appb-000094
位的共识节点参与共识,每过τ小时换届,重新组织竞选投票。不失一般性取
Figure PCTCN2022106613-appb-000095
τ=24。
本发明中所述的共识机制是指实施基于多因素投票的实用拜占庭容错机制,所述共识节点为资助人和受助人;在链上发布交易或者修改交易需要得到共识节点的共识,共识节点通过综合计算匹配度SD、资助额度SA、资助人信用评分CS三因素投票选出排名前
Figure PCTCN2022106613-appb-000096
位的共识节点参与共识,每过τ小时换届,重新组织 竞选投票。
根据所述共识机制,共识节点进行验证的步骤为
S6的具体实现步骤如下:
S6-1、在矩阵联盟链冷启动时,由监管节点ID g将此时资助交易信息写入创世区块;密钥生成中心KGC为每个节点分配独立的区块链地址Addr ID、私钥sk ID和公钥pk ID,梦想资助人的公钥只对监管节点及共识节点公开,已写入区块的账户地址公开可见,未写入的账户地址则不会在网络中显示;
S6-2、第三方信用机构ID c对新加入的爱课程公司ID d授予信用评分CS d(百分制),读取爱课程公司ID d的资助证书
Figure PCTCN2022106613-appb-000097
记录其提供的在线课程资源按市场价计算的资助值SA d(以千元为单位),计算资助匹配度评分SD d,若资助节点的资助类型与梦想家需要的类型一致,则SD d=1,反之,SD d=0,此时爱课程的资助匹配度为1;
S6-3、当进入竞选投票时间时,监管节点ID g计算竞选节点的综合评分,不失一般性取
Figure PCTCN2022106613-appb-000098
其中,
Figure PCTCN2022106613-appb-000099
选出评分排序前
Figure PCTCN2022106613-appb-000100
位的节点担任共识节点;
S6-4、第一批共识节点产生后,在Δt时间内,共识节点按照排名依次担任主节点;主节点SP将验证通过的资助交易TX i信息打包到一个区块中,生成
Figure PCTCN2022106613-appb-000101
发送给其余从节点;在主节点后的下一个节点是副主节点,与主节点同时打包,当主节点出错时才会发出自己产生的区块;
S6-5、其余从节点W i接收到主节点发送的预准备消息后,验证签名,若验证通过,赞同区块上链,则发送确认消息
Figure PCTCN2022106613-appb-000102
转发给其他共识节点,若超时或不赞同则发送
Figure PCTCN2022106613-appb-000103
S6-6、各共识节点接收到准备消息后,当接收到的有效准备消息数量 N m_true≥2f+1(最大恶意节点数量f),计算赞同Count(Ture)和不赞同Count(False)的票数,决定确认消息中的Vote值,节点广播确认信息Confirm,当收到的确认信息Confirm≥2f+1,则执行请求;
Figure PCTCN2022106613-appb-000104
S6-7、若客户端收到k≥f+1个相同回复,则说明客户端发起的请求已经达成全网共识,否则需要重新发送请求;N是系统节点数,若系统所允许的最大恶意节点数量f,则要求N≥3f+1;
S6-8、若发现恶意节点,则更新其信用评分CS′ d=σ*CS d,其中,0<σ<1,并将评分发送给第三方信用机构ID c;若完n轮共识,则更新该节点的信用评分为CS′ d=CS d+ln n。
以上所述仅为本发明的优选方案,并非作为对本发明的进一步限定,凡是利用本发明说明书及附图内容所作的各种等效变化均在本发明的保护范围之内。

Claims (8)

  1. 一种基于矩阵联盟链的可隐藏实名的资助方法,其特征在于,所述方法的步骤为,
    S1、初始化联盟链系统,生成公共参数,联盟链的参与者包括受资助人、资助人、监管机构、密钥生成中心;
    S2、构建梦想区块,形成矩阵联盟链中的横向链;受资助人ID p向联盟链系统提交申请资助信息,监管节点ID g审核申请资助信息并验证通过后,打包受资助人发布梦想的交易信息TX 1,并生成交易副本TX 2,监管节点广播交易信息TX 1和交易副本TX 2,共识节点根据共识机制对交易信息TX 1和交易副本TX 2进行验证,并将验证后的交易信息TX 1和交易副本TX 2写入梦想区块;
    S3、构建资助区块,形成矩阵联盟链中的纵向链;资助人ID d完成对受资助人ID p的资助后,获取由监管节点签发并背书的资助证明fCert,监管节点广播资助交易TX 3及其交易副本TX 4,共识节点根据共识机制对资助交易TX 3及其交易副本TX 4进行验证,并将验证后的资助交易TX 3及其交易副本TX 4存入交易池;主共识节点将受资助人ID及资助类型打包成区块,广播至区块链网络,从共识节点验证区块的正确性并投票,票数超过阈值p即可上链;
    S4、当资助人ID d想要隐藏其资助信息时,由资助人发出交易修改请求,监管节点ID g收到请求后,快速定位该交易所在区块坐标(height,depth),核验资助人身份后,为该资助人生成伪身份PID d及签发新资助证书new_fCert,经过全网广播,根据共识机制,共识节点验证通过后修改链上交易信息隐藏实名;隐藏实名后资助人仍可以向监管节点申请恢复实名信息用于追责查证;
    S5、当受资助人ID p想要隐藏其受资助信息时,受资助人ID p接收完成资助后,发起删除资助发布请求,监管节点ID g收到请求后,上链查询该受资助人的交易数据,核验受资助人信息后,监管节点ID g发起删除交易,共识节点根据共识机制验证后,对该梦想区块进行修改。
  2. 根据权利要求1所述的一种基于矩阵联盟链的可隐藏实名的资助方法,其特征在于,S1的具体步骤为:
    S1-1、各参与用户生成与自己身份相关联的字符串ID∈{0,1} *,受资助人、资助人、监管机构、密钥生成中心生成的与身份信息相关联的字符串分别表示为:
    {ID p,ID d,ID g,ID c}
    S1-2、输入安全参数λ,选取加法循环群G 1与乘法循环群G 2,且|G 1|=|G 2|=q,q为λ位的大素数,P为群G 1的生成元,并定义这样一个双线性映射e:G 1×G 1→G 2
    S1-3、密钥生成中心随机选取随机数
    Figure PCTCN2022106613-appb-100001
    作为系统主密钥,并计算其公钥为P pub=rP,定义6个安全哈希函数,分别为:
    Figure PCTCN2022106613-appb-100002
    Figure PCTCN2022106613-appb-100003
    Figure PCTCN2022106613-appb-100004
    Figure PCTCN2022106613-appb-100005
    Figure PCTCN2022106613-appb-100006
    Figure PCTCN2022106613-appb-100007
    以及加解密算法对Enc(·),Dec(·),公开系统参数{G 1,G 2,P,P pub,Enc(·),Dec(·),H 1,H 2,H 3,H 4,H 5,H 6},并记录到区块链上,
    Figure PCTCN2022106613-appb-100008
    表示模q的剩余类环的乘法群,P pub表示公钥,{0,1} *表示不定长的0,1比特串,{0,1} n表示n;比特长的0,1比特串;
    S1-4、密钥生成中心根据各参与用户提供的身份字符串ID∈{0,1} *计算Q ID=H 1(ID||rand),sk ID=rQ ID,pk ID=sk IDP,Addr ID=Hash(pk ID),以及Cert ID=Sig r(H 2(ID||pk ID),exp),其中,(sk ID,pk ID)为用户的公私钥对,Addr ID为用户区块链公钥地址,Cert ID为用户的注册证书,由密钥生成中心的私钥签名生成,exp为注册号,Hash(·)为通用哈希函数,然后通过安全通道将<sk ID,pk ID,Addr ID,Cert ID>发送给用户。
  3. 根据权利要求1所述的一种基于矩阵联盟链的可隐藏实名的资助方法,其特征在于,S2的具体内容为:
    S2-1、受资助人ID p打包个人注册信息,梦想内容及类型生成消息
    Figure PCTCN2022106613-appb-100009
    并计算其数字签名
    Figure PCTCN2022106613-appb-100010
    其中,T 1为当前时间戳,发送消息
    Figure PCTCN2022106613-appb-100011
    至区块链网络;
    S2-2、监管节点ID g接收到受资助人ID p消息β后,首先选取当前时间戳T 2,定义ΔT为消息的时间戳和收到消息时的时间戳之间的有效差值,若|T 2-T 1|≤ΔT,则说明消息有效,否则中止对话,然后计算下列公式来验证消息的正确性:
    Figure PCTCN2022106613-appb-100012
    若上式成立,则接收该消息,核验该受资助人的梦想内容及类型无误后,返回确认信息;
    S2-3、监管节点ID g根据梦想区块的交易格式打包受资助人ID p提交的信息,并生成交易副本,如下:
    Figure PCTCN2022106613-appb-100013
    Figure PCTCN2022106613-appb-100014
    其中,TX 1包含受资助人的个人真实信息ID p
    Figure PCTCN2022106613-appb-100015
    TX 2为交易副本,不包含这两项字符串,
    Figure PCTCN2022106613-appb-100016
    是监管节点对交易的签名,TS 1为交易生成时间,tag为梦想区块链的标签,用于后续编辑区块链时定位区块坐标及交易位置;
    S2-4、监管节点ID g广播交易及交易副本,根据共识机制,由共识节点对交易及其副本进行验证,验证通过后根据tag标签写入梦想区块,并建立索引列表
    Figure PCTCN2022106613-appb-100017
    作为链下数据保存至本地数据库,其中height为该区块的高度,用于生成资助链过程的快速定位,该区块的数据结构中存有两个merkleroot,分别为MR 1=Hash(TX 1)、MR 2=Hash(TX 2),相对应地,区块头将存有前一区块的两个哈希值,区块与区块间由明链和暗链链接,用于修改区块链内容时仍能保证区块链结构不被破坏,即:
    Figure PCTCN2022106613-appb-100018
    其中,B i表示当前区块,Hash(·)表示前一区块的两个哈希值,Noce i表示当前区块的随机数,Timestamp i表示区块的生成时间戳。
  4. 根据权利要求1所述的一种基于矩阵联盟链的可隐藏实名的资助方法,其特征在于,S3的具体步骤为:
    S3-1、资助人ID d完成对受资助人ID p的区块链地址的资金转账或服务,生成资助信息
    Figure PCTCN2022106613-appb-100019
    向监管节点ID g发送生成资助证书请求
    Figure PCTCN2022106613-appb-100020
    其中,fund表示资助内容,
    Figure PCTCN2022106613-appb-100021
    表示加密算法,监管节点收到请求后,执行解密算法
    Figure PCTCN2022106613-appb-100022
    获得H 5(info),若与资助消息info直接由H 5计算得到的值H′ 5(info)相等,则确认接收该请求,并签发资助证书
    Figure PCTCN2022106613-appb-100023
    其中T 3为证书生成时间,并进行背书;
    S3-2、监管节点ID g根据资助区块的交易格式生成交易TX 3及交易副本TX 4,并广播至全网,根据共识机制,由共识节点进行验证,此外,监管节点ID g还需提供资助对象ID p的相关信息
    Figure PCTCN2022106613-appb-100024
    用于区块定位;
    Figure PCTCN2022106613-appb-100025
    Figure PCTCN2022106613-appb-100026
    其中,
    Figure PCTCN2022106613-appb-100027
    交易副本TX 4中不包括资助人的个人相关信息ID d
    Figure PCTCN2022106613-appb-100028
    表示监管节点对该交易的签名,
    Figure PCTCN2022106613-appb-100029
    表示以资助人公钥对相应证书加密,用于资助人接收后以自己的私钥进行解密而获得资助证书,TS 2表示交易生成时间;
    S3-3、交易及其副本验证通过后,根据共识机制,主共识节点将交易TX 3及副本TX 4存入交易池,然后将Δt时间内对同一受资助人ID p的资助交易打包成区块,并广播至区块链网络,从共识节点对该区块进行验证,投票超过阈值p后,计算索引
    Figure PCTCN2022106613-appb-100030
    定位ID p所在区块高度height,将该区块链接到对应的资助链,其所在高度定义为depth,则某一交易在矩阵联盟链中的区块坐标(height,depth);同样地,资助链的区块数据结构中存有两个merkleroot值,分别为MR 3和MR 4,以及前一区块的两个哈希值,且区块间由明链和暗链相链接。
  5. 根据权利要求1所述的一种基于矩阵联盟链的可隐藏实名的资助方法,其特征在于,S4的具体步骤为:
    S4-1、资助人ID d发起匿名修改请求
    Figure PCTCN2022106613-appb-100031
    其中(height,depth)为待修改交易所在区块坐标,
    Figure PCTCN2022106613-appb-100032
    为加密算法,
    Figure PCTCN2022106613-appb-100033
    表示资助证书,T 4为当前时间戳;
    S4-2、监管节点ID g接收到modify_request,首先选择当前时间戳T 5,若|T 5-T 4|≤ΔT,则消息有效,根据ID d查询本地数据库获得
    Figure PCTCN2022106613-appb-100034
    执行解密算法
    Figure PCTCN2022106613-appb-100035
    Figure PCTCN2022106613-appb-100036
    成立,则说明该资助人ID d为合法用户,消息正确;
    S4-3、消息验证通过后,监管节点ID g为资助人ID d生成伪身份PID d=H 1(ID d||rand),并签发新资助证书
    Figure PCTCN2022106613-appb-100037
    并背书,然后,监管节点ID g生成新的交易数据
    Figure PCTCN2022106613-appb-100038
    其中new_info=<PID d||null||fund||type>,其中TS 3表示交易生成时间,
    Figure PCTCN2022106613-appb-100039
    表示对该交易的数字签名,tag表示链标签;此外,监管节点ID g还需向共识节点提供待修改交易所在区块坐标(height d,depth d)以及修改请求发起者的身份信息ID d
    S4-4、根据共识机制,共识节点对交易TX′ 3验证通过后,根据(height d,depth d)及ID d快速查询待修改交易,然后将待修改交易TX 3替换为TX′ 3,重新计算merkleroot的值MR′ 3,此时,该区块与后一区块之间的明链由于merkleroot的值改变而断开,而MR 4的值保持不变,因此暗链维护了资助链的完整性;若MR 4也发生了改变,则说明该区块发生了未经授权的篡改;
    S4-5、当资助人ID d想要再次实名时,发送修改请求,监管节点ID g通过搜索本地数据库可以获得相关背书内容,核验身份后进行步骤S4-1~S4-3完成实名修改。
  6. 根据权利要求1所述的一种基于矩阵联盟链的可隐藏实名的资助方法,其特征在于,S5的具体步骤为:
    S5-1、受资助人ID p发起删除请求
    Figure PCTCN2022106613-appb-100040
    其中height p为该梦想区块高度,T 7为当前请求的时间戳;
    S5-2、监管节点ID g收到受资助人ID p发来的删除请求后,首先选取当前时间T 8,若|T 7-T 8|≤ΔT,则请求有效,然后上链查询获得交易数据
    Figure PCTCN2022106613-appb-100041
    计算
    Figure PCTCN2022106613-appb-100042
    若γ=MR 2,则说明该受资助人身份可信;否则说明该受资助人身份不合法或MR 2值受到未经授权的篡改,则中止会话;
    S5-3、当受资助人ID p身份核验通过时,监管节点ID g生成新的交易数据
    Figure PCTCN2022106613-appb-100043
    并广播,此外,还需提供待修改区块的高度height p
    S5-4、根据共识机制,经过共识节点验证后,对待修改区块进行删除操作,具体地,将原有的TX 1替换为TX′ 1,并重新计算MR′ 1
  7. 根据权利要求1-6任一项所述的一种基于矩阵联盟链的可隐藏实名的资助方法,其特征在于,所述共识机制是指实施基于多因素投票的实用拜占庭容错机制,所述共识节点为资助人和受助人;在链上发布交易或者修改交易需要得到共识节点的共识,共识节点通过综合计算匹配度SD、资助额度SA、资助人信用评分CS三因素投票选出排名前
    Figure PCTCN2022106613-appb-100044
    位的共识节点参与共识,每过τ小时换届,重新组织竞选投票。
  8. 根据权利要求7所述的一种基于矩阵联盟链的可隐藏实名的资助方法,其特征在于,根据所述共识机制,共识节点进行验证的步骤为:
    S6-1、在矩阵联盟链冷启动时,由监管节点ID g将此时资助交易信息写入创世区块;密钥生成中心KGC为每个节点分配独立的区块链地址Addr ID、私钥sk ID和公钥pk ID,资助人的公钥只对监管节点及共识节点公开,已写入区块的账户地址公开可见,未写入的账户地址则不会在网络中显示;
    S6-2、监管机构中的第三方信用机构ID c对新加入的资助节点ID d授予信用评分CS d;监管节点ID g读取资助节点ID d的资助证书
    Figure PCTCN2022106613-appb-100045
    记录节点的资助值SA d,根据资助类型type计算资助匹配度评分SD d
    S6-3、当进入竞选投票时间时,监管节点ID g计算竞选节点的综合评分
    Figure PCTCN2022106613-appb-100046
    其中,λ+μ+v=1,
    Figure PCTCN2022106613-appb-100047
    是对CS d、SA d、SD d进行归一化处理的结果,选出评分排序前
    Figure PCTCN2022106613-appb-100048
    位的节点担任共识节点;
    S6-4、第一批共识节点产生后,在Δt时间内,共识节点按照排名依次担任主节点;主节点SP将验证通过的资助交易TX i信息打包到一个区块中,生成
    Figure PCTCN2022106613-appb-100049
    发送给其余从节点;在主节点后的下一个节点是副主节点,与主节点同时打包,当主节点出错时才会发出自己产生的区块;
    S6-5、其余从节点W i接收到主节点发送的预准备消息后,验证签名,若验证通过,赞同区块上链,则发送确认消息
    Figure PCTCN2022106613-appb-100050
    转发给其他共识节点,若超时或不赞同则发送
    Figure PCTCN2022106613-appb-100051
    S6-6、各共识节点接收到准备消息后,当接收到的有效准备消息数量N m_true≥2f+1,其中f为最大恶意节点数量,计算赞同Count(Ture)和不赞同Count(False)的票数,决定确认消息中的Vote值,节点广播确认信息Confirm,当收到的确认信息Confirm≥2f+1,则执行请求;
    Figure PCTCN2022106613-appb-100052
    S6-7、若客户端收到k≥f+1个相同回复,则说明客户端发起的请求已经达成全网共识,否则需要重新发送请求;N是系统节点数,若系统所允许的最大恶意节点数量f,则要求N≥3f+1;
    S6-8、若发现恶意节点,则更新其信用评分CS′ d=σ*CS d,其中,0<σ<1,并将评分发送给第三方信用机构ID c;若完n轮共识,则更新该节点的信用评分为CS′ d=CS d+ln n。
PCT/CN2022/106613 2021-11-10 2022-07-20 一种基于矩阵联盟链的可隐藏实名的资助方法 WO2023082690A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111323417.8A CN113781073B (zh) 2021-11-10 2021-11-10 一种基于矩阵联盟链的可隐藏实名的资助方法
CN202111323417.8 2021-11-10

Publications (1)

Publication Number Publication Date
WO2023082690A1 true WO2023082690A1 (zh) 2023-05-19

Family

ID=78873677

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/106613 WO2023082690A1 (zh) 2021-11-10 2022-07-20 一种基于矩阵联盟链的可隐藏实名的资助方法

Country Status (2)

Country Link
CN (1) CN113781073B (zh)
WO (1) WO2023082690A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113988849A (zh) * 2021-11-02 2022-01-28 山东大学 一种修改过程可追溯的可修改区块链系统及方法
CN116436979A (zh) * 2023-06-15 2023-07-14 湖南湘江树图信息科技创新中心有限公司 联盟区块链调用外部服务的方法及系统
CN116701549A (zh) * 2023-06-21 2023-09-05 黑龙江禹桥科技开发有限公司 一种基于区块链的大数据多尺度融合监管系统及方法

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113781073B (zh) * 2021-11-10 2022-03-04 南京邮电大学 一种基于矩阵联盟链的可隐藏实名的资助方法
CN116846916B (zh) * 2023-09-01 2023-12-08 武汉趣链数字科技有限公司 数据同步方法、装置、电子设备及计算机可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111988290A (zh) * 2020-08-05 2020-11-24 上海交通大学 用户余额隐私保护和授权监管下的交易删除方法及系统
CN112100667A (zh) * 2020-09-24 2020-12-18 南京邮电大学 一种基于新型区块链结构的慈善机构监督管理方法
WO2021040134A1 (ko) * 2019-08-30 2021-03-04 김태복 블록체인을 이용한 기부 물품거래 시스템
CN113781073A (zh) * 2021-11-10 2021-12-10 南京邮电大学 一种基于矩阵联盟链的可隐藏实名的资助方法

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109389541A (zh) * 2018-08-21 2019-02-26 广东工业大学 基于联盟链的公益资金管理方法
CN109615339A (zh) * 2018-12-24 2019-04-12 浙江大学 基于联盟链的志愿者捐献服务一体化公益众筹系统及方法
CN111654363B (zh) * 2020-06-18 2023-12-29 福建师范大学 一种基于群签名和同态加密的联盟链隐私保护方法
CN111831747A (zh) * 2020-06-24 2020-10-27 西安纸贵互联网科技有限公司 慈善捐赠服务系统及慈善捐赠服务平台

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021040134A1 (ko) * 2019-08-30 2021-03-04 김태복 블록체인을 이용한 기부 물품거래 시스템
CN111988290A (zh) * 2020-08-05 2020-11-24 上海交通大学 用户余额隐私保护和授权监管下的交易删除方法及系统
CN112100667A (zh) * 2020-09-24 2020-12-18 南京邮电大学 一种基于新型区块链结构的慈善机构监督管理方法
CN113781073A (zh) * 2021-11-10 2021-12-10 南京邮电大学 一种基于矩阵联盟链的可隐藏实名的资助方法

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113988849A (zh) * 2021-11-02 2022-01-28 山东大学 一种修改过程可追溯的可修改区块链系统及方法
CN113988849B (zh) * 2021-11-02 2024-05-17 山东大学 一种修改过程可追溯的可修改区块链系统及方法
CN116436979A (zh) * 2023-06-15 2023-07-14 湖南湘江树图信息科技创新中心有限公司 联盟区块链调用外部服务的方法及系统
CN116436979B (zh) * 2023-06-15 2023-08-11 湖南湘江树图信息科技创新中心有限公司 联盟区块链调用外部服务的方法及系统
CN116701549A (zh) * 2023-06-21 2023-09-05 黑龙江禹桥科技开发有限公司 一种基于区块链的大数据多尺度融合监管系统及方法

Also Published As

Publication number Publication date
CN113781073A (zh) 2021-12-10
CN113781073B (zh) 2022-03-04

Similar Documents

Publication Publication Date Title
WO2023082690A1 (zh) 一种基于矩阵联盟链的可隐藏实名的资助方法
Zhang et al. Security and privacy on blockchain
Mohsin et al. Blockchain authentication of network applications: Taxonomy, classification, capabilities, open challenges, motivations, recommendations and future directions
CN109785494B (zh) 基于区块链的可追踪的匿名电子投票方法
CN108804928A (zh) 一种溯源系统中数据的安全可信任区块链及管理方法
Ma et al. Blockchain-based mechanism for fine-grained authorization in data crowdsourcing
CN107196762A (zh) 一种面向大数据的确权方法
CN112688786B (zh) 一种基于区块链的证据构建及实名身份认证方法
KR20200106000A (ko) 블록체인-기반 디지털 인증서를 구현하기 위한 시스템 및 방법
KR20200105999A (ko) 디지털 마크를 생성하기 위한 시스템 및 방법
CN113065961A (zh) 一种电力区块链数据管理系统
WO2022063172A1 (zh) 一种锥体区块链管理方法及系统
WO2018088475A1 (ja) 電子認証方法及びプログラム
Li et al. Privacy‐aware PKI model with strong forward security
Li et al. A decentralized and secure blockchain platform for open fair data trading
CN112039927B (zh) 基于区块链技术的网络安全漏洞响应平台的管理方法
CN115049398A (zh) 一种完备的数据资产可信管理和价值流转系统和方法
CN112801778A (zh) 联盟式不良资产区块链
CN115688191A (zh) 一种基于区块链的电子签章系统及方法
Liu et al. A novel logistics data privacy protection method based on blockchain
CN110945833B (zh) 一种用于多模标识网络隐私保护与身份管理的方法及系统
CN101714222A (zh) 基于公证机构公证戳的安全电子签章方法
Li et al. A new revocable reputation evaluation system based on blockchain
Liu et al. A blockchain-based cross-domain authentication management system for IoT devices
CN112231751A (zh) 一种基于区块链的数据传输系统及方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22891499

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2024501268

Country of ref document: JP

Kind code of ref document: A