A transaction verification method based on non-interactive zero-knowledge proof of designated verification party

By introducing trusted processors and identity-based encryption into the non-interactive zero-knowledge proof protocol, the security and efficiency issues of the protocol in complex network environments are solved, efficient and secure transaction amount verification is achieved, and multi-blockchain applications are supported. And simplifies the encryption and decryption process.

CN118537017BActive Publication Date: 2024-10-01ZHEJIANG UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410943160.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-15
Publication Date
2024-10-01
Estimated Expiration
2044-07-15

AI Technical Summary

Technical Problem

Existing non-interactive zero-knowledge proof protocols have insufficient security in complex network environments, low computing and communication efficiency, and the trusted processor cannot be reused, resulting in increased initial setup complexity.

Method used

The designated verifier non-interactive zero-knowledge proof method based on trusted processor and identity-based encryption is used to verify the validity of the transaction amount through the trusted processor, and uses the identity-based encryption algorithm for encryption and decryption to ensure the security and safety of the verification process. efficiency.

Benefits of technology

It realizes an efficient and safe proof calculation process, has global and universal composable security, supports the application of multiple alliance blockchains or private blockchains, simplifies the encryption and decryption process, and improves the efficiency and security of the transaction amount validity proof. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118537017B_ABST
    Figure CN118537017B_ABST
Patent Text Reader

Abstract

The present invention discloses a transaction verification method based on non-interactive zero-knowledge proof of a designated verification party. The transaction initiator is used as the verification party and the blockchain node is used as the verification party. The verification party obtains a first proposition and corresponding evidence for transaction verification and constructs a proof instruction. The verification party uses its own trusted processor to verify the first proposition and evidence based on the proof instruction. If the verification is successful, the first proposition is signed to obtain a first signature. The first proposition and the first signature are encrypted based on an identity-based encryption algorithm using the public key of the verification party, and the obtained ciphertext is sent to the verification party as the proof and the first proposition. The verification party uses its own private key to decrypt the proof to obtain a second proposition and a second signature. The first proposition and the second proposition are compared. If the two are different, the verification fails. If the two are the same, the global public key of the trusted processor is used to verify the validity of the second signature. If it is valid, the verification passes; if it is invalid, the verification fails.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of information security technology, and in particular relates to a transaction verification method based on non-interactive zero-knowledge proof of a designated verification party. Background Art

[0002] As an emerging decentralized distributed database, blockchain is tamper-proof, transparent, secure and programmable, and has been widely used in many fields such as cryptocurrency, finance, supply chain, and the Internet. Cryptography technology is the core technology of blockchain, which can meet the security and privacy protection needs of multiple application scenarios on blockchain. Among them, the most typical demand is blockchain confidential transactions. In alliance blockchains or private blockchains, transaction blocks are packaged, stored, verified and maintained by multiple or one nodes. These nodes require identity authorization access mechanisms, so the nodes have identity information. In a blockchain confidential transaction, there is usually a transaction sender and a transaction receiver. The transaction information should at least include the sender's address, the receiver's address and the transaction amount. Sometimes the transaction parties do not want to disclose the transaction amount, but the transaction receiver hopes to verify the legitimacy of the transaction amount.

[0003] Zero-knowledge proof is a typical technology to achieve this requirement. Zero-knowledge proof allows the prover to prove the correctness of an assertion to a verifier without leaking any other knowledge. Non-interactive zero-knowledge proof (NIZK) can significantly reduce the communication cost by introducing a trusted third party to remove the interaction in zero-knowledge proof. Non-interactive zero-knowledge proof has been widely used in scenarios such as privacy-preserving cryptocurrencies and blockchain expansion. For example, in blockchain anonymous cryptocurrencies, non-interactive zero-knowledge proofs can prove the ownership of unpaid funds without leaking the user's address and amount; in blockchain expansion, complex calculations on the chain need to be transferred off-chain, and non-interactive zero-knowledge proofs can ensure the data validity of the process.

[0004] In order to improve the efficiency of non-interactive zero-knowledge proof protocols and the reliability of their settings, trusted hardware has been introduced as a new technology into the construction of non-interactive zero-knowledge proof protocols. In recent years, relatively mature trusted hardware solutions have emerged, such as ARM TrustZone, Intel SGX, and AMD SEV. Although these trusted hardware solutions have some differences in architecture selection, instruction set, implementation details, encryption suites, and security models, they still have many commonalities and can be abstracted as trusted processors.

[0005] The Universally Composable (UC) security model is a universal model for describing and analyzing cryptographic protocols. Almost all cryptographic protocols can be described using the UC model. Protocols with UC security can maintain security in complex network environments, even if there are any number of attackers in the environment that execute the protocol concurrently in a malicious manner. This guarantee is essential for analyzing the security of cryptographic protocols in complex and unpredictable environments such as modern communication networks.

[0006] In an asynchronous network environment such as the Internet, non-interactive zero-knowledge proof protocols may be combined and executed multiple times in different ways, and these executions are not necessarily synchronized. Attackers can attack the protocol by controlling the order of execution. In these cases, it is necessary to build a UC-secure non-interactive zero-knowledge proof protocol. On the other hand, the performance of the non-interactive zero-knowledge proof protocol is an important factor affecting the implementation. The performance of the non-interactive zero-knowledge proof protocol mainly includes: the communication complexity and computational complexity of the initial setting, the computational complexity of the prover, the computational complexity of the verifier, and the communication complexity. In the existing UC-secure non-interactive zero-knowledge proof protocol constructed using a trusted processor, the trusted processor is used as a local setting, and each protocol instance needs to use a new trusted processor. On the one hand, the trusted processor cannot be reused, which is not conducive to improving the efficiency of the trusted processor. On the other hand, the complexity of the initial setting will also increase with the increase of protocol instances. Summary of the invention

[0007] The main purpose of the present invention is to provide a transaction verification method based on non-interactive zero-knowledge proof of a designated verification party in order to address the problems existing in the prior art.

[0008] According to a first aspect of an embodiment of the present application, a transaction verification method based on non-interactive zero-knowledge proof by a designated verifier is provided, comprising:

[0009] Obtaining a first proposition and corresponding evidence for transaction verification, and constructing a proof instruction based on the first proposition and the evidence;

[0010] Using its own trusted processor, based on the proof instruction, verify the first proposition and the evidence, and if the verification passes, sign the first proposition to obtain a first signature;

[0011] The first proposition and the first signature are encrypted using the public key of the verifier based on the identity-based encryption algorithm, the obtained ciphertext is used as the proof, and the first proposition and the proof are sent to the verifier, so that the verifier uses its own private key to decrypt the proof to obtain the second proposition and the second signature, and the first proposition and the second proposition are compared. If the two propositions are different, the verification fails; if the two propositions are the same, the global public key of the trusted processor is used to verify the validity of the second signature. If the second signature is valid, the verification passes; if the second signature is invalid, the verification fails.

[0012] Furthermore, the first proposition is that the transaction amount is valid, and the evidence is the transaction amount, wherein a valid transaction amount means that the transaction amount is greater than 0 and is within the allowable range of the blockchain system.

[0013] Furthermore, the proof instruction includes a calling instruction of a proof program, the first proposition, the evidence and a signature algorithm. The trusted processor calls the proof program based on the calling instruction, and uses the proof program to determine whether the first proposition and the evidence conform to a binary relationship. If so, the signature algorithm is used to sign the first proposition to obtain a first signature.

[0014] Furthermore, the first proposition and the first signature are encrypted using the public key of the verifier based on the identity-based encryption algorithm to obtain a ciphertext, which is specifically:

[0015] Concatenate the first proposition and the first signature as a first plaintext;

[0016] The ciphertext is encrypted using the public key of the authenticator and the first plaintext based on an identity-based encryption algorithm.

[0017] According to a second aspect of an embodiment of the present application, a transaction verification method based on non-interactive zero-knowledge proof by a designated verifier is provided, comprising:

[0018] Decrypt the proof using its own private key to obtain a second proposition and a second signature, wherein the proof is obtained through the following process: obtain a first proposition and corresponding evidence for transaction verification, and construct a proof instruction based on the first proposition and the evidence; use its own trusted processor to verify the first proposition and the evidence based on the proof instruction, and if the verification passes, sign the first proposition to obtain a first signature; use the public key of the verifier to encrypt the first proposition and the first signature based on the identity-based encryption algorithm, use the obtained ciphertext as the proof, and send the first proposition and the proof to the verifier;

[0019] The first proposition and the second proposition are compared. If they are different, the verification fails. If they are the same, the global public key of the trusted processor is used to verify the validity of the second signature. If the second signature is valid, the verification succeeds; if the second signature is invalid, the verification fails.

[0020] Furthermore, the proof is decrypted using its own private key to obtain the second proposition and the second signature, including:

[0021] The key extraction algorithm based on identity-based encryption obtains its own private key according to its own public identity;

[0022] Decrypting the ciphertext using the private key based on an identity-based decryption algorithm to obtain a second plaintext including a second proposition and a second signature;

[0023] Based on the length of the first proposition, the second plaintext is parsed to obtain a second proposition and a second signature.

[0024] According to a third aspect of an embodiment of the present application, there is provided a transaction verification system based on non-interactive zero-knowledge proof by a designated verifier, including a prover and a verifier;

[0025] The prover obtains a first proposition and corresponding evidence for transaction verification, and constructs a proof instruction based on the first proposition and the evidence; uses its own trusted processor to verify the first proposition and the evidence based on the proof instruction, and if the verification passes, signs the first proposition to obtain a first signature; uses the public key of the verifier to encrypt the first proposition and the first signature based on the identity-based encryption algorithm, uses the obtained ciphertext as proof, and sends the first proposition and the proof to the verifier;

[0026] The verifier uses its own private key to decrypt the certificate to obtain a second proposition and a second signature, and compares the first proposition and the second proposition. If the two are different, the verification fails; if the two are the same, the global public key of the trusted processor is used to verify the validity of the second signature. If the second signature is valid, the verification passes; if the second signature is invalid, the verification fails.

[0027] Furthermore, the proving party is a transaction initiator, the verifying party is a blockchain node, and the proving party has a trusted processor installed locally.

[0028] According to a fourth aspect of an embodiment of the present application, there is provided an electronic device, including:

[0029] one or more processors;

[0030] A memory for storing one or more programs;

[0031] When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in the first aspect or the second aspect.

[0032] According to a fifth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer instructions are stored. When the instructions are executed by a processor, the steps of the method described in the first aspect or the second aspect are implemented.

[0033] The technical solution provided by the embodiments of the present application may have the following beneficial effects:

[0034] It can be seen from the above embodiments that the present application adopts a trusted processor as a proof component, which overcomes the problems of low computational efficiency of non-interactive zero-knowledge proof and tampering of the proof generation process, thereby realizing an efficient and secure proof calculation process; utilizing the global parameters of the trusted processor, the present application has global universal combinable security, so that it can be conveniently applied to multiple alliance blockchains or private blockchains at the same time to prove the validity of the transaction amount of confidential transactions without affecting its security; using an identity-based encryption scheme for encryption and decryption, which is independent of the proposition size, overcomes the complex processes and overheads such as the need to distribute and query public key certificates, thereby realizing a convenient and flexible encryption and decryption process for designated verification parties, making the generation and verification process of proof of transaction amount validity very efficient and practical.

[0035] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0037] Figure 1 The invention is an interaction diagram showing a transaction verification method based on non-interactive zero-knowledge proof of a designated verification party according to an exemplary embodiment.

[0038] Figure 2 The present invention is a flowchart showing a transaction verification method (applied to a proving party) based on non-interactive zero-knowledge proof of a designated proving party according to an exemplary embodiment.

[0039] Figure 3 The present invention is a flowchart of a transaction verification method (applied to a verification party) based on non-interactive zero-knowledge proof of a designated verification party according to an exemplary embodiment.

[0040] Figure 4 The diagram is a schematic diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0041] Here, exemplary embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application.

[0042] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0043] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0044] First, some technical concepts involved in the present invention are introduced.

[0045] The identity-based encryption (IBE) scheme is an evolution of traditional public key encryption. In the identity-based encryption scheme, there is no need to use certificates. In the identity-based encryption scheme, the user's unique identity is directly used as the public key, which can greatly simplify the key management based on digital certificates. When encrypting, the message sender only needs to know the identity information of the decryptor (that is, the message receiver) to encrypt, and to verify the signature, only the identity of the signer needs to be known. An identity-based encryption scheme IBE.Scheme consists of the initialization algorithm IBE.Setup, the key extraction algorithm IBE.KG, the encryption algorithm IBE.ENC, and the decryption algorithm IBE.DEC. Among them:

[0046] The initialization algorithm IBE.Setup is run by a trusted third party, with security parameters as input and a master public key mpk-ibe and a master private key msk-ibe as output;

[0047] The key extraction algorithm IBE.KG is run by a trusted third party, and its input is the master private key msk-ibe and the user identity string and plaintext message, the output is the private key corresponding to the identity string;

[0048] The encryption algorithm IBE.ENC is run by the sender of the message, and its input is the master public key mpk-ibe, the public key of the message receiver (i.e. the identity string ) and plaintext message, the output is ciphertext;

[0049] The decryption algorithm IBE.DEC is run by the message receiver, with its input being its own private key and ciphertext, and its output being a plaintext message or a decryption failure symbol.

[0050] The present invention mainly considers alliance blockchain or private blockchain, and is aimed at the scenario where both parties do not want to disclose the transaction amount, and the transaction recipient needs to confirm that the transaction amount is a positive number greater than 0 and within the permitted range of the blockchain system. The transaction sender, as the prover, needs to hide the transaction amount and provide a non-interactive zero-knowledge proof for the hidden value to prove that the value is within the legal transaction amount range; the blockchain node, as the verifier, verifies the correctness of the proof to ensure that the transaction amount is legal, but cannot obtain any other useful information about the transaction amount.

[0051] To achieve the above-mentioned purpose, the present invention provides a method for constructing a designated verifier non-interactive zero-knowledge proof protocol (Designated verifier NIZK, DV-NIZK) using a trusted processor as a global setting and identity-based encryption, aiming to solve the problem that the non-interactive zero-knowledge proof protocol has low security strength and low computational and communication efficiency in a complex network environment. DV-NIZK considers the situation where only one verifier can verify the non-interactive zero-knowledge proof with its secret information. It is worth noting that DV-NIZK covers NIZK, because making the secret information of the verifier in DV-NIZK public can make it a NIZK. The method realizes universal composable security and deniability under a global setting, and achieves stronger security than the existing non-interactive zero-knowledge proof protocol. In addition, the method realizes a constant proof size and constant proof time and verification time, and has very high computational efficiency; in addition, the method realizes the reusability of the trusted processor and improves the efficiency of the initial setting.

[0052] The present application embodiment provides a transaction verification method based on non-interactive zero-knowledge proof of a designated verification party, such as Figure 1 As shown, the method includes:

[0053] Step S1: The proving party obtains a first proposition and corresponding evidence for transaction verification, and constructs a proof instruction based on the first proposition and the evidence;

[0054] Specifically, the first proposition For the transaction amount to be valid, the evidence The transaction amount is hidden by the prover through encryption or other means, where a valid transaction amount means that the transaction amount is greater than 0 and is within the allowable range of the blockchain system. Contains the call instruction of the certification program The first proposition , the evidence And signature algorithm SIG, SIG can adopt probabilistic digital signature algorithm or others.

[0055] Step S2: The prover uses its own trusted processor to verify the first proposition and evidence based on the proof instruction. If the verification is successful, the prover signs the first proposition to obtain a first signature.

[0056] Specifically, the prover installs a trusted processor locally and registers its identity with the trusted processor's server after installation, adding the prover's identity to the trusted processor's server registration list. After registration, the prover can communicate with the global trusted processor. And the evidence for the first proposition After that, the trusted processor is requested to install the certification program specified by the certifier in a secure storage area of ​​the trusted processor, and then the program identification number eid is returned by the trusted processor. The trusted processor is a global setting of the method, and its master public key mpk is published in the network, and a signature algorithm SIG is published as its parameter.

[0057] For the proof program, its execution logic is as follows: when receiving input in the form of "proof program call instructions, propositions, evidence of propositions, signature algorithm", determine whether the proposition and the evidence of the proposition conform to the binary relationship R; if so, return the proposition and the signature of the trusted processor on the proposition; otherwise, do not return the result.

[0058] It should be noted that a trusted third party generates and publishes the parameters of identity-based encryption, including the identity-based encryption scheme IBE.Scheme, the public parameters of identity-based encryption pp-ibe, the master public key mpk-ibe, and the master private key msk-ibe. (SIG, mpk, IBE.Scheme, pp-ibe, mpk-ibe) together constitute the globally public public parameters pp. The public parameters are required when the attestation program is running, and the setting of the public parameters avoids confusion caused by other programs that can be used for attestation. The trusted third party is not the trusted processor.

[0059] In the specific implementation of this step, the trusted processor calls the proof program based on the calling instruction, and uses the proof program to determine whether the first proposition and the evidence conform to the binary relationship, that is, to verify Is it true? If it is true, then uniformly randomly select a signature random number r and put r, the trusted processor private key msk, and the first proposition As the input of the signature algorithm SIG, the first proposition is signed using the signature algorithm to obtain a first signature ;like If it is not true, no value is returned. This judgment of binary relations is very intuitive for any NP (non-deterministic polynomial) language, because the binary relation R usually implies a computable function with a parameter g. Substituting it into the proposition ,evidence And parameter g is used to calculate whether the function relationship is satisfied. If so, it conforms to the binary relationship R, otherwise it does not conform to the binary relationship R.

[0060] Through these designs, the verifier verifies the first proposition by verifying the trusted processor First signature , you can verify the proposition The correctness of the evidence is simple to verify, and the verification party cannot obtain any information about the evidence. The reason is as follows: Based on the correctness and security of the verification program executed by the trusted processor, the first proposition can be confirmed Evidence for the proposition The relation R is met and the execution process does not leak evidence to any node other than the trusted processor ; According to the execution logic of the proof program, the trusted processor Generate signature That is to say, "the proposition is correct", and all nodes in the network can verify the first signature To verify the validity of the proposition correctness.

[0061] Step S3: the prover uses the public key of the verifier to encrypt the first proposition and the first signature based on the identity-based encryption algorithm, uses the obtained ciphertext as the proof, and sends the first proposition and the proof to the verifier;

[0062] Specifically, the first proposition and the first signature are encrypted using the public key of the verifier based on the identity-based encryption algorithm to obtain a ciphertext, which is specifically:

[0063] The first proposition and the first signature The first plaintext is concatenated together as the first plaintext; according to the public key of the verifier (that is, the public identity of the verifier V ) and the first plaintext , identity-based encryption public parameter mpk-ibe, based on the identity-based encryption algorithm IBE.ENC, encrypt the ciphertext .

[0064] Then, the prover P uses the ciphertext As proof, Sent to the verifier as a designated verifier non-interactive zero-knowledge proof.

[0065] Step S4: The verifier uses its own private key to decrypt the certificate to obtain a second proposition and a second signature;

[0066] Specifically, this step may include the following sub-steps:

[0067] S41: A key extraction algorithm based on identity-based encryption is used to obtain the private key according to the public identity of the user.

[0068] Specifically, the verifier V receives the ciphertext After that, you authenticate your identity string to a trusted third party (called a private key generator). , the private key generator uses its master private key msk-ibe, As input, run the key extraction algorithm IBE.KG to get the output The private key is used as the authenticator's private key and sent to the authenticator.

[0069] S42: Decrypt the ciphertext using the private key based on an identity-based decryption algorithm to obtain a second plaintext including a second proposition and a second signature;

[0070] Specifically, the verifier runs the identity-based decryption algorithm IBE.DEC, using its own private key Decryption , we get a formula containing the second proposition and second signature The second plaintext M.

[0071] S43: Based on the length of the first proposition, the second plaintext is parsed to obtain a second proposition and a second signature.

[0072] Specifically, suppose that the first proposition received is For a string of n bits, parse the first n bits of the second plaintext M into the second proposition , the rest of M resolves to the second signature .because When running the identity-based encryption algorithm IBE.ENC as a whole as plain text and It is a front-to-back splicing method. The decrypted plaintext should also be parsed in this order to ensure correct parsing.

[0073] Step S5: the verifier compares the first proposition and the second proposition. If the two are different, the verification fails. If the two are the same, the global public key of the trusted processor is used to verify the validity of the second signature. If the second signature is valid, the verification passes. If the second signature is invalid, the verification fails.

[0074] Specifically, the verifier verifies the first proposition And the second proposition Compare the strings and verify if they are the same Is it right? The valid signature is as follows: the verifier runs the signature verification algorithm corresponding to the SIG algorithm, and and second signature , Master Public Key and system public parameters As input, output a one-bit parameter , if b=1, the signature verification succeeds; if b=0, the signature verification fails. This design can convert the verification of non-interactive zero-knowledge proofs into the verification of digital signatures. No matter how large the size of the proposition is, only one signature is required, which greatly simplifies the verification process and saves verification overhead, making the verification computation overhead constant.

[0075] If the verification is successful, the verifier accepts the proof and outputs the proposition and 1; otherwise, the proof sent by the prover is rejected and the proposition and 0 are output. With the proposition If they are different, reject the proof and output the statement and 0.

[0076] In this method, the system public parameters pp are all globally public and can be shared by multiple provers and verifiers involved in transactions. First, based on the execution security of the trusted processor and the indistinguishability of identity-based encryption, this method and the ideal designated verifier zero-knowledge proof protocol are computationally indistinguishable for any global environment. This method can be used to replace the ideal designated verifier zero-knowledge proof protocol in any security system, and the parameters of the trusted processor and identity-based encryption are all globally public. Therefore, this method has global universal composable security, so it can be conveniently applied to multiple alliance blockchains or private blockchains at the same time to prove the validity of the transaction amount of confidential transactions without affecting its security. Secondly, after receiving the proof, the verifier can decrypt the signature of the proposition by the trusted processor, and has the ability to encrypt the proposition and the signature with the public identity string of any participant, and send the encrypted result to the participant as the proof of the verifier. Therefore, this method has deniability, so that the identity of the transaction sender can be protected from being easily leaked. For example, when identifying the identity of the transaction sender, the prover can deny that he has produced the proof of the proposition. Third, since the proof of this method is an identity-based encrypted ciphertext, it is independent of the proposition size, so the proof size is a constant; since the proof process consists of a trusted processor executing a proof program and an identity-based encryption process by the prover, and the verification process consists of an identity-based decryption and a verification signature, it is also independent of the proposition size, so the proof time and verification time are both constants, which can make the generation and verification process of the transaction amount validity proof very efficient and practical.

[0077] Based on this, the present application also provides a transaction verification method based on non-interactive zero-knowledge proof of a designated verification party, which is applied to the verification party, such as Figure 2 As shown, it may include:

[0078] S100: Acquire a first proposition and corresponding evidence for transaction verification, and construct a proof instruction based on the first proposition and the evidence;

[0079] S101: using its own trusted processor, based on the proof instruction, verifying the first proposition and the evidence, and if the verification passes, signing the first proposition to obtain a first signature;

[0080] S102: Encrypt the first proposition and the first signature using the public key of the verifier based on the identity-based encryption algorithm, use the obtained ciphertext as proof, and send the first proposition and the proof to the verifier, so that the verifier uses its own private key to decrypt the proof to obtain the second proposition and the second signature, and compare the first proposition and the second proposition. If the two propositions are different, the verification fails; if the two propositions are the same, use the global public key of the trusted processor to verify the validity of the second signature. If the second signature is valid, the verification passes; if the second signature is invalid, the verification fails.

[0081] Based on this, the present application also provides a transaction verification method based on non-interactive zero-knowledge proof of a designated verification party, which is applied to the verification party, such as Figure 3 As shown, it may include:

[0082] S200: decrypt the proof using its own private key to obtain a second proposition and a second signature, wherein the proof is obtained through the following process: obtaining a first proposition and corresponding evidence for transaction verification, and constructing a proof instruction based on the first proposition and the evidence; using its own trusted processor to verify the first proposition and the evidence based on the proof instruction, and if the verification passes, signing the first proposition to obtain a first signature; using the public key of the verifier to encrypt the first proposition and the first signature based on the identity-based encryption algorithm, using the obtained ciphertext as the proof, and sending the first proposition and the proof to the verifier;

[0083] S201: Compare the first proposition and the second proposition. If they are different, the verification fails. If they are the same, use the global public key of the trusted processor to verify the validity of the second signature. If the second signature is valid, the verification succeeds; if the second signature is invalid, the verification fails.

[0084] Corresponding to the aforementioned embodiment of the transaction verification method based on non-interactive zero-knowledge proof of a designated verifier, the present application also provides an embodiment of a transaction verification system based on non-interactive zero-knowledge proof of a designated verifier.

[0085] A transaction verification system based on non-interactive zero-knowledge proof by a designated verifier, the system may include a prover and a verifier;

[0086] The prover obtains a first proposition and corresponding evidence for transaction verification, and constructs a proof instruction based on the first proposition and the evidence; uses its own trusted processor to verify the first proposition and the evidence based on the proof instruction, and if the verification passes, signs the first proposition to obtain a first signature; uses the public key of the verifier to encrypt the first proposition and the first signature based on the identity-based encryption algorithm, uses the obtained ciphertext as proof, and sends the first proposition and the proof to the verifier;

[0087] The verifier uses its own private key to decrypt the certificate to obtain a second proposition and a second signature, and compares the first proposition and the second proposition. If the two are different, the verification fails; if the two are the same, the global public key of the trusted processor is used to verify the validity of the second signature. If the second signature is valid, the verification passes; if the second signature is invalid, the verification fails.

[0088] Regarding the system in the above embodiment, the specific manner in which each party performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0089] Accordingly, the present application also provides an electronic device, comprising: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the transaction verification method based on the non-interactive zero-knowledge proof of the designated verification party as described above. Figure 4 As shown in FIG. 1 , a hardware structure diagram of a transaction verification system based on non-interactive zero-knowledge proof of a designated verifier provided by an embodiment of the present invention is provided for any device with data processing capability, except Figure 4 In addition to the processor, memory and network interface shown, any device with data processing capability in which the apparatus in the embodiment is located may also include other hardware, generally based on the actual functions of the device with data processing capability, which will not be described in detail.

[0090] Correspondingly, the present application also provides a computer-readable storage medium on which computer instructions are stored, and when the instructions are executed by the processor, the transaction verification method based on the non-interactive zero-knowledge proof of the designated verifier as described above is implemented. The computer-readable storage medium can be an internal storage unit of any device with data processing capabilities described in any of the aforementioned embodiments, such as a hard disk or a memory. The computer-readable storage medium can also be an external storage device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), an SD card, a flash card (Flash Card), etc. equipped on the device. Furthermore, the computer-readable storage medium can also include both an internal storage unit of any device with data processing capabilities and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capabilities, and can also be used to temporarily store data that has been output or is to be output.

[0091] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the contents disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.

[0092] It should be understood that the present application is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.

Claims

1. A transaction verification method based on non-interactive zero-knowledge proof by a designated verifier, characterized in that: Applicable to the proving party, including: Obtaining a first proposition and corresponding evidence for transaction verification, and constructing a proof instruction based on the first proposition and the evidence; Using its own trusted processor, based on the proof instruction, verify the first proposition and the evidence, and if the verification passes, sign the first proposition to obtain a first signature; The first proposition and the first signature are encrypted using the public key of the verifier based on the identity-based encryption algorithm, the obtained ciphertext is used as the proof, and the first proposition and the proof are sent to the verifier, so that the verifier uses its own private key to decrypt the proof to obtain the second proposition and the second signature, and the first proposition and the second proposition are compared. If the two propositions are different, the verification fails; if the two propositions are the same, the global public key of the trusted processor is used to verify the validity of the second signature. If the second signature is valid, the verification passes; if the second signature is invalid, the verification fails.

2. The method according to claim 1, characterized in that The first proposition is that the transaction amount is valid, and the evidence is the transaction amount, wherein the valid transaction amount means that the transaction amount is greater than 0 and is within the allowable range of the blockchain system.

3. The method according to claim 1, characterized in that The proof instruction includes a calling instruction of a proof program, the first proposition, the evidence and a signature algorithm. The trusted processor calls the proof program based on the calling instruction, and uses the proof program to determine whether the first proposition and the evidence conform to a binary relationship. If so, the signature algorithm is used to sign the first proposition to obtain a first signature.

4. The method according to claim 1, characterized in that: The first proposition and the first signature are encrypted using the public key of the verifier based on the identity-based encryption algorithm to obtain a ciphertext, specifically: Concatenate the first proposition and the first signature as a first plaintext; The ciphertext is encrypted using the public key of the authenticator and the first plaintext based on an identity-based encryption algorithm.

5. A transaction verification method based on non-interactive zero-knowledge proof by a designated verifier, characterized in that: Applicable to the verification party, including: The proof is decrypted using its own private key to obtain a second proposition and a second signature, wherein the proof is obtained through the following process: the prover obtains a first proposition and corresponding evidence for transaction verification, and constructs a proof instruction based on the first proposition and the evidence; uses its own trusted processor to verify the first proposition and the evidence based on the proof instruction, and if the verification passes, signs the first proposition to obtain a first signature; uses the public key of the verifier to encrypt the first proposition and the first signature based on an identity-based encryption algorithm, uses the obtained ciphertext as the proof, and sends the first proposition and the proof to the verifier; The first proposition and the second proposition are compared. If they are different, the verification fails. If they are the same, the global public key of the trusted processor is used to verify the validity of the second signature. If the second signature is valid, the verification succeeds; if the second signature is invalid, the verification fails.

6. The method according to claim 5, characterized in that Use your own private key to decrypt the proof and obtain the second proposition and the second signature, including: The key extraction algorithm based on identity-based encryption obtains its own private key according to its own public identity; Decrypting the ciphertext using the private key based on an identity-based decryption algorithm to obtain a second plaintext including a second proposition and a second signature; Based on the length of the first proposition, the second plaintext is parsed to obtain a second proposition and a second signature.

7. A transaction verification system based on non-interactive zero-knowledge proof by a designated verifier, characterized in that: Includes the proving party and the verifying party; The prover obtains a first proposition and corresponding evidence for transaction verification, and constructs a proof instruction based on the first proposition and the evidence; uses its own trusted processor to verify the first proposition and the evidence based on the proof instruction, and if the verification passes, signs the first proposition to obtain a first signature; uses the public key of the verifier to encrypt the first proposition and the first signature based on the identity-based encryption algorithm, uses the obtained ciphertext as proof, and sends the first proposition and the proof to the verifier; The verifier uses its own private key to decrypt the certificate to obtain a second proposition and a second signature, and compares the first proposition and the second proposition. If the two are different, the verification fails; if the two are the same, the global public key of the trusted processor is used to verify the validity of the second signature. If the second signature is valid, the verification passes; if the second signature is invalid, the verification fails.

8. The system according to claim 7, characterized in that The proving party is a transaction initiator, the verifying party is a blockchain node, and the proving party has a trusted processor installed locally.

9. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.

10. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.