Transaction processing method, electronic device, and readable storage medium
By receiving transaction requests and structure data in a consortium blockchain, verifying signed messages using the public keys of organizational nodes and regulatory bodies, and combining Peterson commitments and zero-knowledge proofs, the problem of user identity privacy leakage is solved, achieving highly secure anonymous transactions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-12
- Publication Date
- 2026-03-27
AI Technical Summary
In consortium blockchains, user identity privacy is easily leaked, resulting in low security. Existing group ring signatures cannot effectively solve the problem of account address binding, nor can they obtain voting results with different weights based on user role information.
By receiving transaction requests and transaction structure data from the user, including the first signature message and the user's first attribute value, but excluding the account address, for verification, the signature message is verified using the public keys of the organization node and the regulatory agency node. Combined with Peterson commitment and zero-knowledge proof technology, the anonymity of the user's identity is ensured.
It achieves complete anonymity of user identity, improves security during the transaction process, prevents abnormal personnel from tracking the same user through multiple transactions, ensures that user privacy is difficult to leak, and has extremely high security.
Smart Images

Figure CN116091063B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of blockchains, and particularly relates to a transaction processing method, an electronic device and a readable storage medium. BACKGROUND
[0002] In most consortium blockchains, each user account in the transaction system is bound to an account address, and each transaction process is associated with the account address. Therefore, an abnormal person can easily determine all transaction records sent by the same user account and obtain the user identity privacy information through on-chain transaction query.
[0003] Therefore, the identity privacy of the user is easily leaked in the blockchain transaction process, and the security is relatively low. SUMMARY
[0004] The application provides a transaction processing method, an electronic device and a readable storage medium, which can solve the problem that the identity privacy of the user is easily leaked in the transaction process of the blockchain system and the security is relatively low.
[0005] In a first aspect, a transaction processing method is provided, applied to a first transaction node, and the method comprises the following steps.
[0006] Receiving a transaction request and transaction structure data sent by a user end, wherein the transaction structure data comprises a first signature message and a first attribute value of the user end, and the first attribute value does not comprise an account address of the user end.
[0007] Verifying the first signature message. When the verification of the first signature message is passed, determining an execution result of the transaction request according to the first attribute value.
[0008] In the application embodiment, the user end can verify through a signature message in the transaction process. When proving the identity, only one attribute value of the user end needs to be disclosed, and the account address of the user end does not need to be disclosed, so that the identity privacy of the user end in the consortium chain can be completely anonymous. An abnormal person cannot track the same user through multiple transactions, so the identity privacy of the user is difficult to be leaked, and the security is extremely high.
[0009] With reference to the first aspect, in some implementations of the first aspect, the first signature message is obtained by signing a first to-be-signed message by the user end, and the first to-be-signed message is generated according to the content of a first contract provided by an organization node.
[0010] With reference to the first aspect, in some implementations of the first aspect, verifying the first signature message comprises: obtaining a public key of the organization node, and calculating a second signature message according to the public key of the organization node and the first attribute value. Comparing the first signature message with the second signature message to verify the first signature message.
[0011] With reference to the first aspect, in some implementations of the first aspect, before verifying the first signed message, the method further includes: receiving the first organization account sent by the user terminal.
[0012] Verifying the first signed message further includes: obtaining a public key of the organization node, and calculating a second organization account according to the public key of the organization node. Comparing the account address of the first organization account and the second organization account to verify the first signed message.
[0013] With reference to the first aspect, in some implementations of the first aspect, before verifying the first signed message, the method further includes: obtaining a first non-revocation certificate of the user terminal. Obtaining a public key of the regulatory agency node, and calculating a second non-revocation certificate according to the public key of the regulatory agency node. Comparing the first non-revocation certificate and the second non-revocation certificate to verify the first signed message.
[0014] With reference to the first aspect, in some implementations of the first aspect, determining the execution result of the transaction request according to the first attribute value includes: determining the execution result corresponding to the first attribute value according to the content in the first contract, and taking the execution result as the execution result of the transaction request.
[0015] With reference to the first aspect, in some implementations of the first aspect, the transaction request is a voting request, and the first attribute value includes role information of the user terminal.
[0016] Determining the execution result corresponding to the first attribute value according to the content in the first contract, and taking the execution result as the execution result of the transaction request includes: determining the voting result corresponding to the role information according to the content in the first contract, and taking the voting result as the execution result of the voting request.
[0017] The second aspect provides a transaction processing method applied to a user terminal, and the method includes:
[0018] Signing the first to-be-signed message to obtain a first signed message. The first to-be-signed message is generated by the user terminal according to the content of the first contract provided by the organization node. Sending a transaction request and transaction structure data to the first transaction node, the transaction structure data including the first signed message and a first attribute value of the user terminal, the first attribute value not including an account address of the user terminal. The first attribute value is used by the first transaction node to determine the execution result of the transaction request according to the first attribute value when the first signed message is verified.
[0019] With reference to the second aspect, in some implementations of the second aspect, before signing the first to-be-signed message to obtain a first signed message, the method further includes:
[0020] The first proof is sent to the organization node, and the first credential returned by the organization node for the first proof is received, the first credential being generated by the organization node after the first proof is verified. The public key of the organization node is obtained, and the first credential is verified based on the public key of the organization node. When the first credential is verified, the operation of signing the first to-be-signed message to obtain the first signed message is performed.
[0021] With reference to the second aspect, in some implementations of the second aspect, obtaining the public key of the organization node and verifying the first credential based on the public key of the organization node comprises:
[0022] The private key and the attribute value of the user end are obtained, and a second verification value is generated according to the private key of the user end, the attribute value of the user end, and the public key of the organization node. The first zero-knowledge proof contained in the first credential is compared with the second verification value. When the second verification value is the same as the first zero-knowledge proof contained in the first credential, it is determined that the first credential is verified.
[0023] The third aspect provides a transaction processing system, comprising an organization node, a first transaction node as described in any of the implementations of the first aspect, and a user end as described in any of the implementations of the second aspect.
[0024] The fourth aspect provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program capable of being executed on the processor, and the processor executes the computer program to implement the method as described in any of the implementations of the first aspect or the method as described in any of the implementations of the second aspect.
[0025] The fifth aspect provides a computer readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the method as described in any of the implementations of the first aspect or the method as described in any of the implementations of the second aspect.
[0026] It can be understood that the beneficial effects of the second aspect to the fifth aspect can be referred to the related description of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0027] Figure 1 A block chain system schematic diagram to which a transaction processing method provided by an embodiment of the present application is applicable;
[0028] Figure 2 A general flowchart of a transaction processing method provided by an embodiment of the present application;
[0029] Figure 3 A schematic flowchart of a transaction processing method provided by an embodiment of the present application in an initialization phase;
[0030] Figure 4 A schematic flowchart of a transaction processing method provided by an embodiment of the present application in a verification stage;
[0031] Figure 5 A schematic flowchart of a transaction processing method provided by an embodiment of the present application in a transaction stage;
[0032] Figure 6 A schematic flowchart of an anonymous weight voting method provided by an embodiment of the present application;
[0033] Figure 7 A schematic flowchart of a transaction processing method provided by an embodiment of the present application;
[0034] Figure 8A A schematic structural diagram of a transaction processing apparatus provided by an embodiment of the present application;
[0035] Figure 8B A schematic structural diagram of another transaction processing apparatus provided by an embodiment of the present application;
[0036] Figure 9 A schematic structural diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0037] It should be noted that the terms used in the implementation part of the embodiments of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " represents the meaning of or, for example, A / B can represent A or B; "and / or" in this paper is only a description of the association relationship between the associated obstacles, which means that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist together, and B exists alone. In addition, in the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more than two, "at least one" and "one or more" means one, two or more than two.
[0038] Hereinafter, the terms "first", "second" are only used for description purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the "first", "second" features can explicitly or implicitly include one or more features.
[0039] Reference within this specification to "one embodiment" or "an embodiment" or "some embodiments" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the application. The appearances of the phrase "in one embodiment" or "in some embodiments" within this specification do not necessarily refer to the same embodiment, although it can. The terms "including," "comprising," "having" and variations thereof herein are meant to be open-ended terms that can cover the presence of one or more of the stated features, structures, or characteristics, but do not exclude the presence of others. The terms "a," "an," and "the" and variations thereof herein are meant to be singular only unless otherwise specifically made clear by the context.
[0040] In order to more clearly understand various implementations in the embodiments of the present application, the following first defines or explains the technical terms involved in the embodiments of the present application.
[0041] 1, Alliance chain: The alliance chain is a blockchain jointly managed by multiple organizations or institutions, each of which manages one or more nodes, and the data thereof is only allowed to be read and written and sent by different organizations or institutions in the system. Each node of the alliance chain usually has a corresponding entity organization or institution, and can only join and quit the network after authorization, and the organizations or institutions form a related alliance to jointly maintain the healthy operation of the blockchain.
[0042] It should be noted that the alliance chain in the embodiments of the present application is between a public chain and a private chain, and is a blockchain composed of multiple private chains and managed by multiple organizations or institutions, each of which manages one or more nodes, and the data in the alliance chain allows different organizations or institutions in the alliance chain system to read, write and send.
[0043] 2, Account model: In the blockchain, there are two account models, one is a normal account model, and the other is an unspent transaction output (UTXO) model. The normal account model maintains a piece of data in the database, and the increase or decrease of the account balance is based on this data. The normal account model is mostly used on the blockchain of the smart contract type. All data in the UTXO model is recorded in the transaction. If you want to know how much balance is in an account, you need to calculate it through the transaction.
[0044] 3、Software Development Kit (SDK): SDK is a set of related documents, examples and tools for assisting the development of a certain type of software, which is a collection of development tools for a specific software package, software framework, hardware platform, operating system, etc. It can be understood as a tool kit provided by a third-party service provider to realize a certain function of a software product, which generally appears in the form of a collection of KPIs and documents, examples, tools, that is, a collection of many types of files. Usually SDK is a collection of professional services provided by a professional company, such as providing Android development tools or hardware-based development services. There are also SDKs for certain software functions, such as push technology, image recognition technology, mobile payment technology, etc. In this application, SDK is used to create a transaction for the user end and upload the transaction to the transaction node.
[0045] 4、Pedersen commitment: Pedersen commitment can be applied to scenarios such as audit verification, and can achieve the purpose of anonymous secret transaction, which can ensure that the transaction is valid without the amount and address being known to others, and no one can find the amount and address information on the blockchain browser. The Pedersen commitment scheme is a two-stage interactive protocol, which is divided into two stages: in the first stage, the commitment party randomly selects a blind factor r to generate a commitment value c containing the original information v according to the formula, and sends the commitment value c to the verifier; in the second stage, the commitment is revealed, and the commitment party sends the original information v and the blind factor r to the verifier, and then the verifier verifies whether the commitment value c sent by the commitment party to the verifier in the first stage is equal to the value calculated by the verifier himself.
[0046] 5、First zero-knowledge proof: In cryptography, zero-knowledge proof or zero-knowledge protocol is a method by which one party can prove to another that they know a value x without conveying any information. The essence of the idea of zero-knowledge proof is that it is trivial to prove that someone has certain information by simply revealing the information. The challenge is to prove possession of such property without revealing the information itself or any other information.
[0047] 6、Hash algorithm: Hash algorithm, also known as digest algorithm, its role is: for any set of input data, calculate a fixed length output digest. The most important feature of hash algorithm is: the same input must get the same output; different inputs get different outputs with high probability. The purpose of hash algorithm is to verify whether the original data has been tampered with, so hash algorithm can check whether the information is the same, which can save the time of repeating file transfer. In addition, hash algorithm can also verify whether the owner of the information is real.
[0048] In the blockchain, the method of cryptography is often used to protect the privacy of users in transactions. For example, group ring signature is often used to protect the identity of users. In a group ring signature scheme, a signature cannot be known by others which member of the group the signature belongs to, and only the legality of the signature can be verified. However, the group ring signature currently does not have a good case to solve the relationship with the account address binding. In the account model of the consortium chain, when the user sends a transaction, the account address and the signature are sent to the node together. When the transaction is on the chain, an abnormal person can easily determine all the transaction records sent by the same user account through the on-chain transaction query. Therefore, the identity privacy of the user in the blockchain is easy to be leaked, and the security is low. In some application scenarios of the consortium chain, the problem of user privacy leakage is easy to occur.
[0049] In addition, assuming that the group ring signature mentioned above can solve the problem of account address binding, that is, the user can complete anonymous identity signature, but it can only solve the problem of account address. The identity definition of the group ring signature is single, mainly for the public key, and the identity of the user is diverse. Only relying on the group ring signature cannot realize the protection and application of different attributes of a user. For example, in the voting scenario, the group ring signature cannot obtain the voting result with different weights according to the user role information.
[0050] In view of the above problems, the present application provides a transaction processing method. When a user needs to perform a transaction, the user can send a transaction structure data (also referred to as a transaction structure) containing a signature message and a first attribute value to a first transaction node together with a transaction request. After receiving the data, the first transaction node can first verify the signature message. After verification, the corresponding transaction execution result is determined according to the first attribute value.
[0051] In the embodiment of the present application, the user can verify through the signature message during the transaction process. When proving his identity, only one attribute value of the user needs to be disclosed, and the account address of the user does not need to be disclosed, so that the identity privacy of the user in the consortium chain can be completely anonymous. An abnormal person cannot track the same user through multiple transactions, so the identity privacy of the user is difficult to be leaked, and the security is very high.
[0052] As shown in Figure 1 Fig. 1 is a schematic diagram of a blockchain system to which the transaction processing method provided by the embodiment of the present application is applicable.
[0053] Referring to Figure 1The blockchain system 100 is a blockchain system applicable to a transaction processing method of the present application, and includes a plurality of blockchain nodes, including a plurality of user terminals (User) 10, an organization node (Issuer) 20, a regulatory authority node (Revocation Authority, RA) 30, a first transaction node (Verifier) 40, a first execution module 50, and a first ledger module 60. The number of user terminals 10 in the blockchain system 100 is not limited in the present application. The organization node 20 can also be referred to as an issuer or an organization, and the transaction node can also be referred to as a verification authority.
[0054] In the blockchain system 100, the plurality of user terminals 10 are configured to initiate transactions with the first transaction node 40 and apply for first credentials from the organization node 20. It should be noted that the plurality of user terminals 10 in the blockchain system 100 correspond to one organization node 20. When one of the plurality of user terminals 10 needs to initiate a transaction, the user terminal 10 applies for a first credential from the organization node 20. When the request of the user terminal 10 to apply for the first credential is approved, the user terminal 10 obtains the first credential, and each user terminal 10 has a first credential corresponding to the user terminal 10 itself. The user terminal 10 can be a desktop terminal or a mobile terminal, and the mobile terminal can be any one of a mobile phone, a tablet computer, a notebook computer, etc.
[0055] In the blockchain system 100, the organization node 20 verifies the identity authenticity and identity legality of the user terminal 10. When the user terminal 10 passes the verification, the organization node 20 issues a first credential to the user terminal 10, and the organization node 20 deploys a first contract on the blockchain of the blockchain system 100. The first contract specifies the first execution result corresponding to the attribute value of the user terminal 10.
[0056] In the blockchain system 100, the regulatory authority node 30 is configured to generate a non-revocation certificate for the user terminal 10, which is used to prove that the first credential of the user terminal 10 has not been revoked. The regulatory authority node 30 also provides its public key and private key to the first transaction node 40, which are used by the first transaction node 40 to verify the first signed message sent by the user terminal 10.
[0057] In the blockchain system 100, the first transaction node 40 is configured to receive and verify the first signed message sent by the user terminal 10. When the first signed message passes the verification, the first transaction node 40 executes the first contract to obtain the first execution result.
[0058] In the blockchain system 100, the first execution module 50 is configured to receive the first organization account generated by the organization node 20, the content of the first contract deployed by the organization node 20, and the first contract address, and store the first organization account, the content of the first contract, and the first contract address in the first ledger module 60. The first organization account is generated by the organization node 20, and is an entry for the user terminal 10 to conduct transactions with the first transaction node 40.
[0059] The transaction processing method provided in the embodiments of the present application will be described in detail below.
[0060] As shown in the figure, the transaction processing method provided in the embodiments of the present application is a general flowchart. Figure 2
[0061] For ease of understanding, the transaction processing method provided in the embodiments of the present application can be divided into three stages, for example, including an initialization stage 01, a verification stage 02, and a transaction stage 03. For ease of understanding, the following will be described in conjunction with the accompanying Figure 3 Figure 5 The interaction process between the devices in the blockchain system in different stages will be introduced.
[0062] As shown in the figure, the transaction processing method provided in the embodiments of the present application is a general flowchart. Figure 3
[0063] S301, the organization node and the regulatory authority node generate a pair of key pairs respectively.
[0064] In some embodiments, the organization node and the regulatory authority node can generate public keys in the key pairs respectively, which are public to a plurality of user terminals and a first transaction node in the blockchain system where the organization node and the regulatory authority node are located. Specifically, the plurality of user terminals and the first transaction node in the blockchain system can know the public keys in the key pairs generated by the organization node and the regulatory authority node respectively. It should be noted that the private keys generated by the organization node and the regulatory authority node are not public to the plurality of user terminals and the first transaction node in the blockchain system where the organization node and the regulatory authority node are located.
[0065] In some embodiments, the key pair generated by the regulatory authority node is used to generate a non-revocation certificate for a user terminal, and the non-revocation certificate is used to prove that the first credential of the user terminal has not been revoked in the transaction process.
[0066] S302, the organization node generates a first organization account.
[0067] The first organization account is an account defined by the organization node and used as an entry for the plurality of user terminals to participate in the same transaction scenario in a subsequent transaction stage.
[0068] In some embodiments, after generating the first organization account, the organization node sends the first organization account to a first execution module of the blockchain system, and the first execution module stores the first organization account in a first ledger module of the blockchain system. It should be noted that in the same blockchain system, a plurality of user terminals correspond to a first organization account generated by an organization node. Specifically, in the same blockchain system, each user terminal specifies the first organization account as the account address when initiating a transaction.
[0069] In some embodiments, the first organization account can be a randomly generated string, and the string length of the first organization account is not limited in the present application.
[0070] S303, the organization node discloses the first organization account to the user terminal, the regulatory authority node, and the first transaction node.
[0071] In some embodiments, after the organization node generates the first organization account, the organization node discloses the first organization account stored in the first ledger module. The organization node can determine the way to disclose the first organization account, and after the organization node discloses the first organization account, the user terminal, the regulatory authority node, and the first transaction node can all know the information of the first organization account.
[0072] In some embodiments, the organization node can disclose the first organization account by publishing an announcement on the blockchain system, i.e., the first organization account is disclosed in the form of an announcement, so that the user terminal, the regulatory authority node, and the first transaction node can all know the information of the first organization account from the announcement.
[0073] In some embodiments, the organization node can also send the first organization account to the user terminal, the regulatory authority node, and the first transaction node through wireless communication. For example, the organization node can send the first organization account to the user terminal, the regulatory authority node, and the first transaction node through an email.
[0074] S304, the organization node deploys a first contract.
[0075] In some embodiments, the organization node deploys the content of the first contract on the blockchain system. Specifically, the organization node can specify the content of the first contract, and the content of the first contract can include the execution result corresponding to each attribute value of the user terminal.
[0076] In some embodiments, when the organization node finishes deploying the content of the first contract, a first contract address is generated. Then, the organization node can send the content of the first contract and the first contract address to the first execution module of the blockchain system. The first execution module stores the content of the first contract and the first contract address in the first ledger module of the blockchain system.
[0077] In some embodiments, the first contract address can be a randomly generated string. The embodiments of the present application do not limit the length of the string of the first contract address or the way the organization node generates the first contract address.
[0078] S305, the organization node discloses the content of the first contract and the first contract address to the user end, the regulatory authority node and the first transaction node.
[0079] In some embodiments, after the organization node stores the content of the first contract and the first contract address in the first ledger module, the organization node discloses the content of the first contract and the first contract address. Specifically, the organization node can determine the means of disclosing the content of the first contract and the first contract address. After the organization node discloses the information of the first contract and the first contract address, the user end, the regulatory authority node and the first transaction node can all know the information of the first contract and the first contract address.
[0080] In some embodiments, the means of the organization node disclosing the content of the first contract and the first contract address can be publishing an announcement on the blockchain system. The organization node discloses the content of the first contract and the first contract address in the form of an announcement. Therefore, the user end, the regulatory authority node and the first transaction node can all know the information of the content of the first contract and the first contract address from the announcement.
[0081] In some embodiments, the organization node can also send the content of the first contract and the first contract address to the user end, the regulatory authority node and the first transaction node through wireless communication. For example, the organization node can send the content of the first contract and the first contract address to the user end, the regulatory authority node and the first transaction node through email.
[0082] In some embodiments, the user end discloses different attribute values, and the execution result obtained after executing the first contract is different.
[0083] According to the transaction processing method provided in the embodiments of the present application, the first contract content and the address thereof are generated by the organization node, and the information is disclosed to the user terminal, the regulatory authority node and the first transaction node, so that the subsequent user terminal and transaction node can utilize the acquired information to accurately acquire the blockchain scenario participated by the user terminal, such as a voting scenario, and the subsequent transaction node can acquire the corresponding reporting result of the user terminal according to the corresponding contract, thereby improving the accuracy of interaction.
[0084] As shown in the example, Figure 4 As shown in the example,
[0085] S401, the user terminal applies for a first credential to the organization node.
[0086] In some embodiments, when applying for the first credential to the organization node, the user terminal can first provide the attribute value of the user terminal itself, the first random number and the first proof to the organization node.
[0087] In some embodiments, the attribute value of the user terminal can be determined by the blockchain system in which the user terminal is located. Specifically, the blockchain system can determine the type of attribute value set by the user terminal and determine which attribute value is used to identify the unique identity of the user terminal (hereinafter referred to as the target attribute value). The target attribute value is unique. The user terminal can define the target attribute value according to different blockchain systems. For example, the attribute value of the user terminal can be set to include an account address, role information, a public key, or a home organization, etc. In the embodiments of the present application, the account address can be set as the target attribute value, and the account address of the user terminal can be a string randomly generated by the user terminal, and the present application does not limit the string length of the account address or the way in which the user terminal generates the string.
[0088] It should be noted that the home organization of the user terminal is the blockchain system to which the user terminal and the organization node belong. Since the organization node and the user terminal are in the same blockchain system, the organization node is a completely trusted party for the user terminal. Therefore, when the user terminal sends information to the organization node, the user terminal can directly send the plaintext information to the organization node in the form of unencrypted plaintext information.
[0089] In some embodiments, the first random number generated by the user terminal can be a randomly generated string, and the present application does not limit the string length of the first random number or the way in which the user terminal generates the first random number.
[0090] In some embodiments, the user terminal generates a pair of key pairs and a second random number when applying for a credential. The user terminal generates the first proof by calculation according to the public key of the organization node, the private key of the user terminal itself, and the second random number. For example, the user terminal calculates the method by completing the Peterson commitment in cryptography.
[0091] S402, the organization node verifies the qualification of the user terminal for obtaining a credential.
[0092] In some embodiments, the organization node can receive the attribute value of the user terminal itself, the first random number and the first proof sent by the user terminal.
[0093] In some embodiments, the process of the organization node verifying the qualification of the user terminal for obtaining a credential can include: the organization node can calculate a first verification value according to the first proof and the public key of the organization node by Peterson commitment in cryptography, and the organization node compares the first verification value with the value of the first proof; if the first verification value is equal to the value of the first proof, it means that the verification is passed, and the organization node generates the first credential for the user terminal; if the first verification value is not equal to the first proof, it means that the verification is not passed, and the organization node does not generate the first credential for the user terminal.
[0094] S403, the organization node issues the first credential to the user terminal.
[0095] In some embodiments, after the verification of the qualification of the user terminal for obtaining a credential by the organization node is passed, the organization node can generate the first credential for the user terminal using the private key of the organization node itself. The first credential includes the first zero-knowledge proof generated by the organization node for all attribute values of the user terminal, that is, all attribute values of the user terminal correspond to the same first credential. The first zero-knowledge proof is generated by the organization node according to the idea of zero-knowledge proof.
[0096] It should be understood that, compared with the way that the organization node calculates and generates a corresponding zero-knowledge proof for each attribute value of the user terminal, the method provided in the embodiments of the present application can greatly reduce the calculation amount of the organization node for calculating the zero-knowledge proof corresponding to each attribute value.
[0097] In some embodiments, while the organization node generates the first credential, the organization node sends a first application to the supervision agency node, and the first application is used for the organization node to request the supervision agency node to generate a non-revocation proof for the user terminal using the private key of the supervision agency node.
[0098] Exemplarily, the process of generating the non-revocation proof by the regulatory authority node comprises: the regulatory authority node calculates the private key of the regulatory authority node by a Pedersen commitment in cryptography to obtain the first non-revocation proof, which is used to prove that the first credential of the user end has not been revoked in a transaction process.
[0099] In S404, the user end changes its own identity into a signer.
[0100] In some embodiments, the user end needs to change its identity into a signer before sending a transaction to the first transaction node. After changing its identity into a signer, the user end has the qualification of signing the message to be sent in the transaction, and the transaction structure to be sent by the user end in the transaction can be sent to the first transaction node after being signed by the signer. It should be understood that the changed signer still belongs to the user end.
[0101] In some embodiments, the user end stores the public key of the organization node, the public key of the regulatory authority node, the first credential, the private key of the user end, and the attribute value of the user end in a first directory in the user end, and reads the files in the first directory by a software development kit (SDK). It should be noted that the SDK is software used by the user end to interact with the blockchain, and the SDK is installed on the electronic device of the user end, for example, the SDK can be installed on the server of the computer used by the user end.
[0102] In some embodiments, after the SDK reads the files in the first directory, the SDK verifies the first zero-knowledge proof by the files in the first directory. The files in the first directory include the private key of the user end, the attribute value of the user end, and the public key of the organization node. Exemplarily, the verification process comprises: the organization node calculates the private key of the user end, the attribute value of the user end, and the public key of the organization node by a Pedersen commitment in cryptography to obtain a second verification value.
[0103] In some embodiments, the organization node can compare the second verification value with the first zero-knowledge proof. If the second verification value is equal to the first zero-knowledge proof, the first zero-knowledge proof passes the verification, and at this time, it is indicated that the identity of the user end is legal, and the identity of the user end itself can be changed into a signer. If the second verification value is not equal to the first zero-knowledge proof, the first zero-knowledge proof fails to pass the verification, and it is indicated that the identity of the user end is illegal, and the change of the identity of the user end fails.
[0104] In some embodiments, the SDK instantiates the user end when the first zero-knowledge proof passes the verification.
[0105] It should be noted that the meaning of instantiation in the embodiments of the present application is that the SDK successfully completes the verification of the first zero-knowledge proof. After instantiation, the SDK can use the signer to sign transactions.
[0106] It should also be noted that the signer is composed of the private key of the corresponding user terminal, the attribute value of the user terminal, the public key of the organization node, the public key of the regulatory agency node, and the first credential.
[0107] For example, as shown in Figure 5 The flowchart shown in FIG. 1 is a schematic flowchart of a transaction processing method provided by an embodiment of the present application in a transaction phase. The flowchart can include the following steps:
[0108] S501, the signer signs the first to-be-signed message to obtain a first signed message.
[0109] In some embodiments, the content of the first to-be-signed message is generated by the signer according to the content of the first contract deployed by the organization node in the initialization phase. When the signer signs the first to-be-signed message, the private key of the user terminal, a first attribute value disclosed by the user terminal, and the first credential of the user terminal are required. Among them, the signer selectively discloses a first attribute value according to the content of the first contract deployed by the organization node in the initialization phase, and the content of the first contract includes a first execution result corresponding to the first attribute value. When the signer initiates a transaction, a transaction structure body needs to be specified, and the transaction structure body contains the first signed message.
[0110] Therefore, in the present application, when the signer signs the first to-be-signed message, the signer only needs to selectively disclose a first attribute value. The first transaction node only needs a certain specific attribute value to obtain the first execution result when executing the first contract, so the signer can only disclose the specific attribute value, and when the disclosed attribute value is not an account address, an abnormal person cannot track the same user through two or more transactions, so disclosing the attribute value will not affect the privacy of the user terminal. In the present application, the content in the first contract determines what attribute value the first transaction node needs to disclose when executing the first contract.
[0111] In some embodiments, the attribute value of the user terminal includes the account address of the user terminal, the public key of the user terminal, the role information of the user terminal, and the home organization of the user terminal. Then, when the signer signs the first to-be-signed message, the signer can only disclose the role information without disclosing other information. Among them, the role information is a first attribute value disclosed by the user terminal.
[0112] For example, the signer does not have to disclose the account address for identifying the unique identity of the user terminal. If the account address is disclosed, the identity privacy of the user terminal is exposed. When the signer sends a transaction to the first transaction node, the first transaction node can track the user terminal through the account address. The account address of the user is an attribute value for identifying the unique identity of the user terminal, and the account address of the user terminal can be a random string generated by the user terminal. The string length of the account address and the way the user terminal generates the string are not limited in the present application.
[0113] In some embodiments, the first signed message is a signature generated in combination with C-L signature and zero-knowledge proof idea. The C-L signature is Camenisch-Lysyanskaya signature, which is also used in the signature scheme of zero-knowledge proof. The C-L signature can sign a set of data, improve the anonymity of the signature, and reduce the computational complexity of the signature. It should be noted that in zero-knowledge proof, there are two parties, the prover and the verifier. The prover has a secret, and the prover wants the verifier to believe that the prover has the secret, but does not want to disclose the secret to the verifier. Therefore, the prover and the verifier follow a protocol and interact through a series of interactions, and finally the verifier will draw a definite conclusion that the prover has the secret without knowing the content of the secret.
[0114] S502, the signer sends a transaction request to the first transaction node to initiate a transaction.
[0115] In some embodiments, the signer generates the first signed message after signing the first to-be-signed message.
[0116] In some embodiments, the signer needs to specify a transaction structure through the SDK when initiating a transaction. The transaction structure includes the first signed message. In addition to the transaction structure, the signer also needs to specify the first organization account and the first contract address through the SDK. The first organization account and the first contract address are generated and disclosed by the organization node in the initialization stage, so the signer can specify the first organization account and the first contract address in the transaction stage. The first organization account is essentially an account address.
[0117] In some embodiments, the SDK initiates a transaction to the first contract address called by the first organization account. The first contract address is generated by the organization node after deploying the content of the first contract in the initialization stage.
[0118] The transaction structure further includes, in addition to the content defined by the blockchain system, a public key of the organization node, a public key of the regulatory agency node, a non-revocation certificate, and the first attribute value disclosed by the signer.
[0119] The content defined by the blockchain system can include any data in a timestamp, a Gas value, a third random number, a first signature message, and the like. The third random number is an arbitrary or non-repetitive random number value that is used only once, and the method of generating the third random number is not limited in the present application. The Gas value is the actual number of operation steps of the Ethereum virtual machine in a transaction.
[0120] S503, the first transaction node verifies the first signature message.
[0121] In some embodiments, after the first transaction node receives the transaction structure, the first transaction node verifies the first signature message in the transaction structure, and the specific operation of verification includes:
[0122] a) The first transaction node first calculates a second organization account through the public key of the organization node. The calculation process is calculated through a hash algorithm in cryptography. The first transaction node compares the account addresses of the second organization account and the first organization account of the signer initiating the transaction. If the account addresses of the second organization account and the first organization account of the signer initiating the transaction are different, the transaction fails; if the account addresses of the second organization account and the first organization account of the signer initiating the transaction are the same, step b) is performed.
[0123] b) The first transaction node verifies the first non-revocation certificate through the public key of the regulatory agency node. The verification process is as follows: the first transaction node calculates the second non-revocation certificate through the public key of the regulatory agency node. The calculation process can be completed by the node through a Peterson commitment in cryptography. The first transaction node compares the first non-revocation certificate with the second non-revocation certificate. If the first non-revocation certificate is equal to the second non-revocation certificate, step c) is performed. If the first non-revocation certificate is not equal to the second non-revocation certificate, the transaction fails.
[0124] c) The first transaction node calculates a second signature message according to the public key of the organization node and the first attribute value disclosed by the signer, and compares the second signature message with the first signature message. If the second signature message is the same as the first signature message, step S504 is performed. If the value of the second signature message is not the same as the value of the first signature message, the transaction fails.
[0125] It should be understood that the order of steps a), b), and c) above is merely an example of the specific order of signature verification operations. In actual applications, there may be no necessary order between steps a), b), and c). For example, in practical applications, steps a), b), and c) can be performed simultaneously, and if any step fails, the transaction is deemed to have failed; if all three steps succeed, the signature verification is deemed successful. Alternatively, steps c), b), and a) can be executed sequentially, and if any step fails, the transaction is deemed to have failed and the next step is not executed; if all three steps succeed, the signature verification is deemed successful.
[0126] S504, the first transaction node executes the first contract.
[0127] When all signature verification operations in step S503 are successfully verified, the first transaction node executes the first contract. The first transaction node executes the first contract according to the logic in the content of the first contract and the first attribute value disclosed by the signer. After the first transaction node completes the execution of the first contract, it obtains the first execution result.
[0128] S505, the first transaction node returns the first execution result to the user.
[0129] According to the transaction processing method provided in this application, the first transaction node only needs to find the first execution result corresponding to the first attribute value in the first contract, without performing complex logical judgments, which greatly reduces the operational difficulty for developers managing the first transaction node. Therefore, this application combines signature verification and the execution of the first contract during the transaction execution process, enabling the user to implement complex logical judgments in the simplest way.
[0130] To better understand the transaction processing method provided in the embodiments of this application, the implementation process of the method will be described in detail below with reference to a specific anonymous weighted voting scenario.
[0131] For example, such as Figure 6 The diagram shown is a schematic flowchart illustrating an anonymous weighted voting method according to an embodiment of this application. This method involves the user client disclosing only a specific attribute value in its signature. This allows the first transaction node to execute a first voting contract during a transaction, obtaining the voting result corresponding to that attribute value. This approach keeps the voter's identity confidential while ensuring that the voter enjoys the rights associated with that identity. The anonymous weighted voting method is as follows:
[0132] S601, the organization node and the regulatory agency node each generate a key pair.
[0133] S602, the organization node deploys the first voting contract on the blockchain system.
[0134] In some embodiments, the first voting contract stipulates that the first transaction node determines the actual weight of each vote according to the role information of the user terminal, and the role information is one of the attribute values of the user terminal.
[0135] In this embodiment, the role information of the user terminal includes ordinary members, diamond members and gold members, wherein the weight of the ordinary members is 1, the weight of the diamond members is 2, the weight of the gold members is 3, the voter can only vote once each time, the voter can abstain, and the voter can only vote within 24 hours after the voting starts, and the role information is one of the attribute values of the voter.
[0136] S603, the user terminal sends the role information of the user terminal to the organization node and applies for voting qualification.
[0137] The organization node verifies the role information sent by the user terminal to the organization node, and if the verification is passed, it means that the voter has voting qualification, and the organization node issues a one-time voucher to the user terminal. At the same time, the supervisory agency node issues a first non-revocation certificate to the user terminal, which is used to prove that the one-time voucher of the user terminal has not been revoked.
[0138] S604, the user terminal sends a voting request to the first transaction node.
[0139] The user terminal uses the one-time voucher to sign the voting content to obtain a first voting signature message, and selects the role information as the disclosed attribute value at the same time of signing. It should be noted that the voter has multiple attribute values, such as account address, role information, public key and home organization, and only the role information is selectively disclosed in this embodiment. It should be noted that the first voting contract stipulates that after the user terminal uses the one-time voucher to vote for the first time, the one-time voucher cannot be used by the user terminal to complete the second voting. The life cycle of the one-time voucher can be set according to the needs, that is, the number of times the one-time voucher can be used for voting can be stipulated.
[0140] S605, the first transaction node verifies the legality of the first voting signature message.
[0141] When the first transaction node verifies the legality of the first voting signature message, the first transaction node executes the first voting contract according to the role information of the user terminal. Specifically, the node verifies the role information of the user terminal according to the first voting contract, and executes the first contract according to the content of the first voting contract. The content of the first voting contract includes voting rules, and the first transaction node records the selected option of the voter. For example, the role information of the voter is diamond member, and the node can know that the voting weight of the voter is 2 according to the role information of the voter.
[0142] S606, the supervisory agency node updates the non-revocation certificate.
[0143] When the user terminal completes the voting, the supervisory agency node updates the first non-revocation certificate to obtain a second non-revocation certificate, and the supervisory agency node discloses on the blockchain system that the first non-revocation certificate has been updated to the second non-revocation certificate. At this time, the user terminal cannot use the first non-revocation certificate to vote.
[0144] According to the transaction processing method provided by the embodiment of the application, the voting is stopped 24 hours after the voting starts, and the first transaction node counts the number of votes of all user terminals. For example, two user terminals with the role information of ordinary members vote for option A, and because the voting weight of ordinary members is 1, the number of votes of option A is 2. For another example, three user terminals with the role information of diamond members vote for option B, and because the voting weight of diamond members is 2, the number of votes of option B is 6. Therefore, the method can be used to execute the contract according to the role information disclosed by the user terminal, and different contract execution results (i.e. voting results) can be obtained according to different attribute values of the voters.
[0145] Exemplarily, as shown in FIG. 7, a schematic flowchart of a transaction processing method provided by another embodiment of the application is shown, and the method is specifically as follows: Figure 7
[0146] Step S701, the organization node generates a first organization account.
[0147] In some embodiments, the first organization account is an entrance for the user terminal and the first transaction node to perform the first transaction.
[0148] In some embodiments, the organization node sends the first organization account to the user terminal and the first transaction node.
[0149] Step S702, the organization node generates a first contract.
[0150] The first contract includes attribute information to be reported by the user terminal corresponding to the first transaction, and the attribute information does not include privacy information corresponding to the user terminal.
[0151] Step S703, the organization node sends a first contract address to the user terminal and the first transaction node.
[0152] In some embodiments, the first contract address is used to indicate a storage location of the first contract.
[0153] Step S704, the organization node sends the first contract to the user terminal.
[0154] The user terminal receives the first contract sent by the organization node, and the user terminal reports the attribute information corresponding to the first contract based on the first contract when performing the first transaction.
[0155] In some embodiments, the organization node receives first request information sent by the user terminal, and the first request information is used to request a first credential corresponding to the user terminal.
[0156] In some embodiments, the organization node detects whether the user terminal has the qualification to obtain the first credential according to the attribute value of the user terminal, the first random number and the first proof carried by the first request information.
[0157] If the user terminal has the qualification to obtain the first credential, the first credential is sent to the user terminal.
[0158] Step S705, the user terminal receives the first contract sent by the organization node.
[0159] Step S706, the user terminal generates a first signature message according to the first contract.
[0160] In some embodiments, when performing the first transaction, the user terminal generates a first signature message according to the first contract, and the first signature message includes at least one item of the attribute information.
[0161] Step S707, the user terminal sends the first signature message to the first transaction node.
[0162] In some embodiments, the user terminal generates first request information according to the attribute value of the user terminal, the first random number and the first proof, and the first request information is used to request a first credential corresponding to the user terminal.
[0163] In some embodiments, the user terminal sends the first request information to the organization node.
[0164] In some embodiments, when the organization node detects that the user terminal has the qualification to obtain the first credential according to the attribute value of the user terminal, the first random number and the first proof, the user terminal receives the first credential sent by the organization node.
[0165] Step S708, the user terminal performs the first transaction.
[0166] In some embodiments, the user end performs the first transaction by logging into the first organization account.
[0167] In one embodiment, when the first transaction is a voting transaction, the first contract further includes a voting result calculation rule corresponding to the first transaction, and the organization node sends the first contract to the first transaction node, so that when the first transaction is performed, the first transaction node calculates the voting result corresponding to the user end according to the voting result calculation rule corresponding to the first contract.
[0168] Corresponding to the transaction processing method described in the above embodiments, Figure 8A The structure of the transaction processing device provided by the embodiments of the present application is shown, and only the parts related to the embodiments of the present application are shown for ease of illustration.
[0169] Referring to Figure 8A The transaction processing device comprises:
[0170] The receiving module 811 receives the transaction request and the transaction structure data sent by the user end, wherein the transaction structure data contains the first signature message and the first attribute value of the user end, and the first attribute value does not contain the account address of the user end.
[0171] The verification module 812 is configured to verify the first signature message.
[0172] The transaction module 813 is configured to determine the execution result of the transaction request according to the first attribute value when the first signature message is verified.
[0173] The process of each module in the transaction processing device provided by the embodiments of the present application to realize its own function is specifically referable to the description of the foregoing Figures 1 to 7 embodiments and other related method embodiments, which will not be repeated here.
[0174] Corresponding to the transaction processing method described in the above embodiments, Figure 8B The structure of another transaction processing device provided by the embodiments of the present application is shown, and only the parts related to the embodiments of the present application are shown for ease of illustration.
[0175] Referring to Figure 8B The transaction processing device comprises:
[0176] The signature module 821 signs the first to-be-signed message to obtain the first signature message; the first to-be-signed message is generated by the user end according to the content of the first contract provided by the organization node.
[0177] The transaction module 822 sends a transaction request and transaction structure data to the first transaction node, the transaction structure data including the first signature message and a first attribute value of the user terminal, the first attribute value not including an account address of the user terminal; the first attribute value is used by the first transaction node to determine an execution result of the transaction request according to the first attribute value when the first signature message is verified.
[0178] Based on the same technical concept, the embodiments of the present application further provide an electronic device, comprising one or more processors; one or more memories; the one or more memories store one or more computer programs, the one or more computer programs comprise instructions, when the instructions are executed by the one or more processors, make the computer or processor execute one or more steps in any of the above methods.
[0179] Based on the same technical concept, the embodiments of the present application further provide a computer readable storage medium, the computer readable storage medium stores computer executable program instructions, when the computer executable program instructions are run on a computer, make the computer or processor execute one or more steps in any of the above methods.
[0180] Based on the same technical concept, the embodiments of the present application further provide a computer program product comprising instructions, the computer program product comprises computer program code, when the computer program code is run on a computer, make the computer or processor execute one or more steps in any of the above methods.
[0181] The transaction processing method provided by the embodiments of the present application can be applied to electronic devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, notebook computers, ultra-mobile personal computers (UMPCs), personal digital assistants (PDAs), etc. The embodiments of the present application do not make any limitation on the specific type of electronic device. The electronic device can be any device in the user terminal, the first transaction node, the organization node and the regulatory authority node in the embodiments of the present application.
[0182] Figure 9 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. As shown in Figure 9 the electronic device 9 of this embodiment includes at least one processor 90 Figure 9(Only one is shown in the image) A memory 91 stores a computer program 92 that can run on the processor 90. When the processor 90 executes the computer program 92, it implements the steps in the above-described embodiments of the anomaly detection methods for the various sensors, for example... Figure 1 Steps 101 to 106 are shown. Alternatively, when the processor 90 executes the computer program 92, it implements the functions of each module / unit in the above-described device embodiments, for example... Figure 6 The functions of modules 61 to 64 are shown.
[0183] The electronic device 9 can be a desktop computer, laptop, handheld computer, cloud server, or other computing device. The electronic device may include, but is not limited to, a processor 90 and a memory 91. Those skilled in the art will understand that... Figure 9 This is merely an example of electronic device 9 and does not constitute a limitation on electronic device 9. It may include more or fewer components than shown, or combine certain components, or different components. For example, the electronic device may also include input transmitting devices, network access devices, buses, etc.
[0184] The processor 90 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0185] The memory 91 can be an internal storage unit of the electronic device 9 in some embodiments, such as a hard disk or a memory of the electronic device 9. The memory 91 can also be an external storage device of the electronic device 9, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, and the like equipped on the electronic device 9. Further, the memory 91 can also include both an internal storage unit and an external storage device of the electronic device 9. The memory 91 is used to store an operating system, an application program, a boot loader, data, and other programs, such as program codes of the computer program, and the like. The memory 91 can also be used to temporarily store data that has been or will be transmitted.
[0186] In addition, it can be clearly understood by those skilled in the art that, for the convenience and brevity of description, only the division of the above functional units and modules is taken as an example, and in actual application, the above functions can be completed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to complete all or part of the above-described functions. The functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0187] In the above embodiments, all or part of the methods can be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the methods can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted by the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wire (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be magnetic media (for example, floppy disk, hard disk, magnetic tape), optical media (for example, DVD), or semiconductor media (for example, solid state disk (SSD)) and the like.
[0188] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by a computer program instructing relevant hardware, which can be stored in a computer-readable storage medium and executed to include the processes of the above-mentioned embodiments.
[0189] In the embodiments provided in the present application, it should be understood that the disclosed devices or electronic devices and methods can be implemented in other ways. For example, the above-described device or electronic device embodiments are only schematic. For example, the division of the modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed elements can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0190] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may also be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment of the present application.
[0191] The above is only a specific implementation of the embodiments of the present application, but the protection scope of the embodiments of the present application is not limited thereto, any change or replacement within the technical scope disclosed by the embodiments of the present application should be covered in the protection scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application should be subject to the protection scope of the claims.
Claims
1. A transaction processing method, characterized in that, Applied to the first transaction node, the method includes: The system receives a transaction request and transaction structure data from a user client that has already identified itself as a signer. The transaction structure data includes a first signature message and a first attribute value from the user client. The first attribute value does not include the user client's account address. The user client identifies itself as a signer after verifying that a first zero-knowledge proof and a second verification value are equal. The first zero-knowledge proof is generated by the organization node for all attribute values of the user client. The second verification value is calculated by the organization node using the user client's private key, the attribute value, and the organization node's public key. Verify the first signature message; When the first signature message is verified, the execution result of the transaction request is determined based on the first attribute value.
2. The method according to claim 1, characterized in that, The first signature message is obtained by the user terminal signing the first message to be signed, and the first message to be signed is generated based on the content of the first contract provided by the organization node.
3. The method according to claim 1, characterized in that, The verification of the first signature message includes: Obtain the public key of the organization node, and calculate the second signature message based on the public key of the organization node and the first attribute value; The first signature message is compared with the second signature message to verify the first signature message.
4. The method according to any one of claims 1 to 3, characterized in that, Before verifying the first signed message, the method further includes: Receive the first organization account sent by the user terminal; The verification of the first signature message further includes: Obtain the public key of the organization node, and calculate the second organization account based on the public key of the organization node; The account addresses of the first organization account and the second organization account are compared to verify the first signature message.
5. The method according to any one of claims 1 to 3, characterized in that, Before verifying the first signed message, the method further includes: Obtain the first non-revocation certificate from the user terminal; Obtain the public key of the regulatory agency node, and calculate the second non-revocation certificate based on the public key of the regulatory agency node; The first non-revocation certificate and the second non-revocation certificate are compared to verify the first signature message.
6. The method according to any one of claims 1 to 3, characterized in that, Determining the execution result of the transaction request based on the first attribute value includes: The execution result corresponding to the first attribute value is determined according to the content of the first contract, and is used as the execution result of the transaction request.
7. The method according to claim 6, characterized in that, The transaction request is a voting request, and the first attribute value contains the user's role information; The step of determining the execution result corresponding to the first attribute value according to the content of the first contract, and using it as the execution result of the transaction request, includes: The voting results corresponding to the role information are determined according to the content of the first contract, and the voting results are used as the execution result of the voting request.
8. A transaction processing method, characterized in that, When applied to a user terminal, the method includes: If the first zero-knowledge proof and the second verification value are equal, the user's identity is transformed into the signer. The first zero-knowledge proof is generated by the organization node for all attribute values of the user. The second verification value is calculated by the organization node using the user's private key, attribute values, and the organization node's public key. The first message to be signed is signed to obtain a first signed message; the first message to be signed is generated by the user terminal based on the content of the first contract provided by the organization node. A transaction request and transaction structure data are sent to the first transaction node. The transaction structure data includes the first signature message and the first attribute value of the user terminal. The first attribute value does not include the account address of the user terminal. The first attribute value is used by the first transaction node to determine the execution result of the transaction request when the first signature message is verified.
9. The method according to claim 8, characterized in that, Before signing the first message to be signed to obtain the first signed message, the method further includes: Send a first proof to the organization node and receive a first credential returned by the organization node in response to the first proof, wherein the first credential is generated by the organization node after the first proof has been verified. Obtain the public key of the organization node, and verify the first credential based on the public key of the organization node; When the first credential is verified, the operation of signing the first message to be signed to obtain the first signed message is performed.
10. The method according to claim 9, characterized in that, The step of obtaining the public key of the organization node and verifying the first credential based on the public key of the organization node includes: Obtain the private key and attribute value of the user terminal, and generate a second verification value based on the private key of the user terminal, the attribute value of the user terminal, and the public key of the organization node; Compare the second verification value with the first zero-knowledge proof contained in the first credential; When the second verification value is the same as the first zero-knowledge proof contained in the first credential, it is determined that the first credential has passed verification.
11. A transaction processing system, characterized in that, include: The system comprises an organization node, a first transaction node, and a user terminal; wherein the first transaction node is configured to perform the method as described in any one of claims 1 to 7, and the user terminal is configured to perform the method as described in any one of claims 8 to 10.
12. An electronic device, characterized in that, The method includes a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the computer program to implement the method as described in any one of claims 1 to 7, or to implement the method as described in any one of claims 8 to 10.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 7, or implements the method as described in any one of claims 8 to 10.
Citation Information
Patent Citations
Method and system for user attestation-signatures with attributes
US20090049300A1
Method and system for user attestation-signatures with attributes
WO2005038635A2