CN108847943B - NP problem processing method and device, electronic device and storage medium - Google Patents

NP problem processing method and device, electronic device and storage medium Download PDF

Info

Publication number
CN108847943B
CN108847943B CN201810660749.7A CN201810660749A CN108847943B CN 108847943 B CN108847943 B CN 108847943B CN 201810660749 A CN201810660749 A CN 201810660749A CN 108847943 B CN108847943 B CN 108847943B
Authority
CN
China
Prior art keywords
verification
answer
client
constraint condition
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810660749.7A
Other languages
Chinese (zh)
Other versions
CN108847943A (en
Inventor
胡宇光
陈毅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201810660749.7A priority Critical patent/CN108847943B/en
Publication of CN108847943A publication Critical patent/CN108847943A/en
Application granted granted Critical
Publication of CN108847943B publication Critical patent/CN108847943B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3218Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using proof of knowledge, e.g. Fiat-Shamir, GQ, Schnorr, ornon-interactive zero-knowledge proofs
    • H04L9/3221Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using proof of knowledge, e.g. Fiat-Shamir, GQ, Schnorr, ornon-interactive zero-knowledge proofs interactive zero-knowledge proofs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the application provides an NP problem processing method, an NP problem processing device, electronic equipment and a storage medium. The processing method comprises the following steps: publishing the NP problem to be solved and a verification constraint condition to a client, wherein the verification constraint condition is used for verifying whether an answer of the NP problem to be solved is correct or not; receiving a zero-knowledge proof of an answer to the NP problem to be solved, which is sent by a client; and verifying the zero knowledge proof information according to the verification constraint conditions, if the verification is passed, determining that the client knows the NP problem to be solved, sending verification passing information to the client, and receiving the answer of the NP problem to be solved sent by the client. The embodiment of the application provides a safe and credible NP problem processing scheme on the basis of effectively utilizing network resources, and well meets the actual application requirements.

Description

NP problem processing method and device, electronic device and storage medium
Technical Field
The present invention relates to the field of network security technologies, and in particular, to a method and an apparatus for processing an NP problem, an electronic device, and a storage medium.
Background
The Non-Deterministic problem of Polynomial complexity (NP problem) is the existence of a Non-Deterministic problem that Polynomial algorithms can solve, in other words, the NP problem is the decision problem that we can check whether it is correct or not within Polynomial time given a solution. As can be seen, the NP problem is a type of problem that requires a lot of computing power to be solved, but it is easy to verify the result.
Under the large background of the rapid development of internet technology in multiple modes, if the NP problem can be processed by fully utilizing internet resources based on the advantages of the internet, the processing requirement of the NP problem can be well met, but in the mode, how to establish a safe and reliable processing mode is also an important problem to be solved in the processing process of the NP problem. For this problem, a trusted third party can be used to solve the conventional internet model, but with the upgrading of the internet model, such as in the blockchain system, transactions usually occur directly between two common nodes, so that there is a great problem of security and trust, and due to the decentralized feature of the blockchain, the solution solved by the third party is no longer applicable, so that a new solution is urgently needed.
Disclosure of Invention
The application provides a processing method and device of NP problem, electronic equipment and a storage medium, which can solve the problem of security trust in the NP problem processing process. The technical scheme adopted by the application is as follows:
in a first aspect, an embodiment of the present application provides a method for processing an NP problem, where the method includes:
publishing the NP problem to be solved and a verification constraint condition to a client, wherein the verification constraint condition is used for verifying whether an answer of the NP problem to be solved is correct or not;
receiving zero-knowledge proof information of an answer of an NP problem to be solved, which is sent by a client;
and verifying the zero knowledge proof information according to the verification constraint conditions, and if the verification is passed, determining that the client knows the answer of the NP problem to be solved.
In one possible implementation manner of the first aspect, publishing the NP problem to be solved and the verification constraint to the client includes:
obtaining a Quadratic Arithmetic Polynomials (QAP) of the NP problem to be solved according to the NP problem to be solved, the verification constraint condition and the public parameters of the NP problem to be solved;
and publishing the QAP of the NP problem to be solved to the client.
In a possible implementation manner of the first aspect, obtaining the QAP of the NP issue to be solved according to the NP issue to be solved, the verification constraint and the common parameter of the NP issue to be solved includes:
and taking the NP problem to be solved, the verification constraint condition and the public parameter as the parameters of the QAP of an Etherum Virtual Machine (EVM) to obtain the QAP of the NP problem to be solved.
In a possible implementation manner of the first aspect, the zero knowledge proof information is proof information generated by proof of an answer to an NP problem to be solved through a proof function of a zero-knowledge concise Non-Interactive knowledge proof (zkSNARKs) algorithm according to a verification constraint condition and a common parameter;
verifying the zero knowledge proof information according to the verification constraint condition, comprising:
and verifying the zero knowledge proof information through a verification function of the zkSNARKs algorithm corresponding to the proof function according to the verification constraint condition and the common parameters.
In one possible implementation of the first aspect, the method further comprises:
and after the verification is passed, sending verification passing information to the client, and receiving an answer of the NP problem to be solved, which is sent by the client.
In a possible implementation manner of the first aspect, when publishing the NP problem to be solved and the verification constraint to the client, the method further includes: publishing the corresponding certificate-passing reward information of the NP problem to be solved to the client;
sending verification passing information to the client, including: and distributing the corresponding certificate award to the client.
In a possible implementation manner of the first aspect, after receiving the answer to the NP problem to be solved sent by the client, the method further includes:
and canceling the related information of the NP problem to be solved, which is published to the client, wherein the related information comprises the NP problem to be solved and the verification constraint condition.
In a second aspect, an embodiment of the present application provides a method for processing an NP problem, including:
acquiring an NP problem to be solved and a verification constraint condition published by a server, wherein the verification constraint condition is used for verifying whether an answer of the NP problem to be solved is correct or not;
generating zero-knowledge proof information of an answer to the NP problem to be solved;
and sending the zero knowledge proof information to a server so that the server verifies the zero knowledge proof information according to verification constraint conditions, and determining that the client knows the answer of the NP problem to be solved after the verification is passed.
In a possible implementation manner of the second aspect, the obtaining of the NP problem to be solved and the verification constraint published by the server includes:
the method comprises the steps of obtaining a QAP (quality assurance protocol) of an NP problem to be solved, which is published by a server, wherein the QAP of the NP problem to be solved is obtained by the server according to the NP problem to be solved, a verification constraint condition and public parameters of the NP problem to be solved;
and obtaining the NP problem to be solved, verification constraint conditions and public parameters according to the QAP of the NP problem to be solved.
In a possible implementation manner of the second aspect, the server obtains the QAP of the NP problem to be solved according to the NP problem to be solved, the verification constraint and the common parameter of the NP problem to be solved, and obtains the QAP of the NP problem to be solved for the server by using the NP problem to be solved, the verification constraint and the common parameter as the parameters of the QAP of the EVM.
In one possible implementation of the second aspect, generating zero-knowledge proof information of the answer to the NP problem to be solved includes:
according to the verification constraint conditions and the public parameters, proving the answer of the NP problem to be solved through a proving function of a zkSNARKs algorithm to obtain zero-knowledge proving information;
the server verifies the zero knowledge proof information according to the verification constraint condition, and verifies the zero knowledge proof information through a verification function of a zkSNARKs algorithm corresponding to the proof function according to the verification constraint condition and the public parameter.
In one possible embodiment of the second aspect, the method further comprises:
and receiving verification passing information sent by the server after the verification passes, and sending the answer of the NP problem to be solved to the server.
In a possible implementation manner of the second aspect, when acquiring the NP problem to be solved and the verification constraint condition published by the server, the method further includes: determining the corresponding certificate passing reward information of the NP problem to be solved, which is published by the server;
receiving authentication passing information sent by the server after the authentication passing, wherein the authentication passing information comprises: and receiving the corresponding certificate passing awards distributed by the server and corresponding to the certificate passing awards information.
In a third aspect, an embodiment of the present application provides an NP problem processing apparatus, including:
the problem issuing module is used for issuing the NP problem to be solved and the verification constraint condition to the client, wherein the verification constraint condition is used for verifying whether the answer of the NP problem to be solved is correct;
the certification information receiving module is used for receiving zero-knowledge certification information of the answer of the NP problem to be solved, which is sent by the client;
and the answer verification module is used for verifying the zero knowledge proof information according to the verification constraint conditions, and if the verification is passed, determining that the client knows the answer of the NP problem to be solved.
In a possible implementation manner of the third aspect, the issue issuing module is specifically configured to:
obtaining a QAP of the NP problem to be solved according to the NP problem to be solved, the verification constraint condition and the public parameter of the NP problem to be solved;
and publishing the QAP of the NP problem to be solved to the client.
In a possible implementation manner of the third aspect, when the problem issuing module obtains the QAP of the NP problem to be solved according to the NP problem to be solved, the verification constraint, and the common parameter of the NP problem to be solved, the problem issuing module is specifically configured to:
and taking the NP problem to be solved, the verification constraint condition and the public parameter as the parameters of the QAP of the Ethernet virtual machine EVM to obtain the QAP of the NP problem to be solved.
In a possible implementation manner of the third aspect, the zero-knowledge proof information is proof information generated by proving an answer to an NP problem to be solved through a proof function of the zksscarks algorithm according to the verification constraint condition and the common parameter;
when the answer verification module verifies the zero knowledge proof information according to the verification constraint condition, the answer verification module is specifically used for:
and verifying the zero knowledge proof information through a verification function of the zkSNARKs algorithm corresponding to the proof function according to the verification constraint condition and the common parameters.
In one possible embodiment of the third aspect, the apparatus further comprises;
and the answer acquisition module is used for sending the verification passing information to the client side after the verification passes and receiving the answer of the NP problem to be solved, which is sent by the client side.
In a possible implementation manner of the third aspect, the problem issuing module is further configured to issue, to the client, the corresponding certificate authority information of the NP problem to be solved;
when the answer obtaining module sends the verification passing information to the client, the answer obtaining module is specifically used for: and distributing the corresponding certificate-passing reward to the client.
In one possible implementation manner of the third aspect, the processing apparatus further includes:
and the problem canceling module is used for canceling the related information of the NP problem to be solved, which is published to the client, after receiving the answer of the NP problem to be solved, which is sent by the client, wherein the related information comprises the NP problem to be solved and the verification constraint condition.
In a fourth aspect, an embodiment of the present application provides an apparatus for processing an NP issue, including:
the problem acquisition module is used for acquiring the NP problem to be solved and the verification constraint condition published by the server, wherein the verification constraint condition is used for verifying whether the answer of the NP problem to be solved is correct or not;
the certification information generating module is used for generating zero-knowledge certification information of the answer of the NP problem to be solved;
and the data transceiving module is used for sending the zero knowledge proof information to the server so that the server verifies the zero knowledge proof information according to the verification constraint condition, and after the verification is passed, the client is determined to know the answer of the NP problem to be solved.
In a possible implementation manner of the fourth aspect, the problem obtaining module is specifically configured to:
the method comprises the steps of obtaining a QAP (quality assurance protocol) of an NP problem to be solved, which is published by a server, wherein the QAP of the NP problem to be solved is obtained by the server according to the NP problem to be solved, a verification constraint condition and public parameters of the NP problem to be solved;
and obtaining the NP problem to be solved, verification constraint conditions and public parameters according to the QAP of the NP problem to be solved.
In a possible implementation manner of the fourth aspect, the QAP of the NP problem to be solved is obtained by the server according to the QAP of the NP problem to be solved obtained by the NP problem to be solved, the verification constraint and the common parameter of the NP problem to be solved, and is obtained by the server by using the NP problem to be solved, the verification constraint and the common parameter as the parameters of the QAP of the EVM.
In a possible implementation manner of the fourth aspect, the certification information generating module is specifically configured to:
according to the verification constraint conditions and the public parameters, proving the answer of the NP problem to be solved through a proving function of a zkSNARKs algorithm to obtain zero-knowledge proving information;
the server verifies the zero knowledge proof information according to the verification constraint condition, and verifies the zero knowledge proof information through a verification function of a zkSNARKs algorithm corresponding to the proof function according to the verification constraint condition and the public parameter.
In a possible implementation manner of the fourth aspect, the data transceiver module is further configured to: and receiving verification passing information sent by the server after the verification passes, and sending the answer of the NP problem to be solved to the server.
In a possible implementation manner of the fourth aspect, the problem obtaining module, when obtaining the NP problem to be solved and the verification constraint published by the server, is further configured to: determining the corresponding certificate passing reward information of the NP problem to be solved, which is published by the server;
when the data transceiver module receives the verification passing information sent by the server after passing the verification, the data transceiver module is specifically configured to: and receiving the corresponding certificate passing awards distributed by the server and corresponding to the certificate passing awards information.
In a fifth aspect, an embodiment of the present application provides an electronic device, including a processor and a memory;
a memory configured to store machine-readable instructions;
a processor, configured to execute, by invoking the readable instructions, the method for processing the NP issue shown in the first aspect or any possible implementation manner of the first aspect of the present application, or the method for processing the NP issue shown in the second aspect or any possible implementation manner of the second aspect of the present application.
In a sixth aspect, embodiments of the present application provide a computer-readable storage medium for storing computer instructions, which, when executed on a computer, enable the computer to perform a method for processing an NP problem shown in the first aspect or any of the possible embodiments of the first aspect of the present application, or perform a method for processing an NP problem shown in the second aspect or any of the possible embodiments of the second aspect of the present application.
The technical scheme provided by the embodiment of the application has the following beneficial effects: according to the scheme of the embodiment of the application, the users in the network can actively participate in the solution of the NP problem, the NP problem is effectively solved by utilizing network resources, the client and the server execute the zero knowledge proof protocol, the fact that the NP problem is really solved by the users of the client can be guaranteed to be proved to the server even under the condition that the NP problem answer is not revealed by the users of the client, the server determines whether the NP problem is really solved by the client or not through verification and zero knowledge proof information, through the scheme, the trust problem between the client and the server is effectively solved, and a safe and credible NP problem processing mechanism is established.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments of the present application will be briefly described below.
FIG. 1 is a flow chart illustrating a method for processing an NP problem according to an embodiment of the present application;
FIG. 2 is a flow chart illustrating a method for processing an NP problem according to another embodiment of the present application;
FIG. 3 is a flow chart illustrating a method for processing NP problem according to another embodiment of the present application;
FIG. 4 is a flow chart illustrating a method for processing NP problem according to still another embodiment of the present application;
FIG. 5 is a schematic diagram illustrating an apparatus for processing an NP problem according to an embodiment of the present application;
FIG. 6 is a schematic diagram illustrating an apparatus for processing an NP problem according to another embodiment of the present application;
FIG. 7 is a schematic diagram illustrating an apparatus for processing NP problem according to another embodiment of the present application;
FIG. 8 is a schematic diagram illustrating an NP problem handling apparatus according to yet another embodiment of the present application;
fig. 9 shows a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative and are only for the purpose of explaining the present application and are not to be construed as limiting the present invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
To make the objects, technical solutions and advantages of the present application more clear, the following detailed description of the embodiments of the present application will be made with reference to the accompanying drawings.
The terms referred to in this application will first be introduced and explained:
problem NP: refers to a problem that can be solved by a non-deterministic machine within polynomial time. It is generally difficult to find a solution to the polynomial time for this type of problem, but if a solution to the problem is given, it can be determined whether this solution is correct within the polynomial time.
Zero knowledge proves that: meaning that the prover can convince the verifier that some assertion is correct without providing the verifier with any useful information. The prover proves to the verifier and convinces him that he knows or owns a certain message, but the proving process cannot reveal information about the proven message to the verifier.
zkSNARKs: zkSNARKs is short for 'concise zero knowledge non-interactive knowledge certification', is a zero knowledge certification for certifying certain data operations without revealing data, is a non-interactive zero knowledge certification scheme, and a certifier only needs to provide a character string for a verifier to verify whether the verifier really knows the data.
EVM: the EVM is a code execution environment built on an ethernet blockchain, and the main role of the EVM is to process intelligent contracts in the ethernet blockchain, and the EVM is stored on a computer of each node of the blockchain in a scattered manner, that is, the EVM is the same for all nodes in the blockchain.
QAP: which may also be referred to as a quadratic arithmetic procedure, refers to a process of converting verification of a vector into verification of a polynomial.
QAP of EVM: the polynomial is converted from the code operating environment on the ether house block chain, and the form of QAP of EVM is fixed because the EVM corresponding to all nodes is the same.
QAP for NP problem: the QAP obtained by using the information on the NP problem as the parameters (i.e., coefficients) of the QAP of the EVM has the same form for different NP problems, and has different coefficients.
The NP problem has been one of the difficult mathematical problems to solve, and if internet resources can be utilized, different users/organizations, etc. can actively participate in the solution of the NP problem, which can undoubtedly improve the efficiency of obtaining the solution of the NP problem. However, how to solve the trust problem between the NP problem issuing party and the problem solving party under the condition that no third party participates in the process is an important problem to be solved, and the process of ensuring the safe and reliable transaction of both parties is ensured.
The NP problem processing method and apparatus, the electronic device, and the storage medium provided in the embodiments of the present application aim to solve the above technical problems in the prior art.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
An embodiment of the present application provides a processing method for an NP problem, as shown in fig. 1, the processing method may be applied to a server side, and mainly includes:
step S101: publishing the NP problem to be solved and the verification constraint condition to the client;
wherein the verification constraint condition is used for verifying whether the answer of the NP problem to be solved is correct. The verification constraint condition is determined by the server according to the specific NP problem to be solved, the condition is that both the server and the client need to abide by, and the client and the server execute a zero-knowledge proof protocol based on the verification constraint condition to complete answer zero-knowledge proof and verification of the NP problem. The verification constraint may be considered as a part of a topic that the client needs to prove given by the server, the topic is associated with the NP problem to be solved, and is a parallel problem of the NP problem to be solved, a precondition for solving the topic is that the NP problem has been solved, and the client may prove to the server that it has indeed solved the NP problem based on the condition.
Step S102: receiving zero-knowledge proof information of an answer of an NP problem to be solved, which is sent by a client;
step S103: and verifying the zero knowledge proof information according to the verification constraint conditions, and if the verification is passed, determining that the client knows the answer of the NP problem to be solved.
According to the scheme of the embodiment of the application, the client and the server can prove that the NP problem is really solved to the server even if the client does not reveal the NP problem answer by executing the zero knowledge proof information protocol based on the verification of the zero knowledge proof information and the information, the answer of the NP problem is known, and the server verifies whether the client really knows more answers to the NP problem by verifying the zero knowledge proof information of the client. By the scheme of the embodiment of the application, on the basis of fully utilizing network resources to solve the NP problem, the trust problem between the client and the server is effectively solved based on zero knowledge proof, and a safe and credible NP problem processing mechanism is established.
It can be understood that, in the embodiment of the present application, the client is a computing device of all users that can participate in NP problem solution, the server may be a computing device of an NP problem publisher or a third-party service platform authorized by the NP problem publisher, the client is a challenger of an NP problem to be solved, and the server is a verifier of the NP problem, and verifies whether the client really knows an answer to the NP problem.
In practical application, after the server determines that the client knows the answer of the NP problem to be solved, the publisher and the client of the NP problem can agree to perform transaction in an online or offline mode, so that the publisher of the NP problem obtains the answer of the NP problem, and the client obtains the answer required by the publisher by providing the answer for the publisher.
In this embodiment of the application, as shown in fig. 2, the processing method for the NP issue may further include:
step S104: and after the verification is passed, sending verification passing information to the client, and receiving an answer of the NP problem to be solved, which is sent by the client.
After the server determines that the client knows the answer of the NP problem, namely after the zero knowledge proof information of the answer is verified, the server can obtain the answer of the NP problem by feeding back verification passing information to the client, and the client can feed back the answer to the server after obtaining the verification passing information. The specific form of the verification passing information may be set according to actual needs, for example, the verification passing information may be authentication information in which the client solves the NP problem or reward information provided by the server.
In this embodiment, when the server publishes the NP problem to be solved and the verification constraint condition to the client, the method may further include: publishing the corresponding certificate-passing reward information of the NP problem to be solved to the client; correspondingly, the sending, by the server, the verification passing information to the client may include: and distributing the corresponding certificate-passing reward to the client.
The Token is a certificate which exists in a digital form and can verify the rights and interests anytime and anywhere. The issuing party of the NP problem can transfer the enthusiasm of the user for participating in the NP problem solution by setting the evidence-based reward, so that the user in the network can actively participate in the NP problem solution, various network resources can be more fully utilized, and the NP problem solution efficiency is improved.
By setting the evidence-based reward information, the server distributes the evidence-based reward to the client when verifying that the zero-knowledge proof information sent by the client passes the verification, namely confirming that the client knows the answer of the NP problem to be solved, so as to obtain the answer of the NP problem sent by the client. That is, the server may use the distribution of the pass-through reward as the verification pass information, and the client notifies the server of the answer to the NP question after receiving the pass-through reward distributed by the server. The server and the client establish a credible mechanism of both sides through the verification based on the zero-knowledge proof information and the information, so that the NP problem issuing party can obtain the answer of the NP problem, and the user knowing the answer of the NP problem can obtain the corresponding evidence-based reward.
In the embodiment of the present application, publishing NP problem to be solved and verification constraint condition to a client includes:
obtaining a QAP of the NP problem to be solved according to the NP problem to be solved, the verification constraint condition and the public parameter of the NP problem to be solved;
and publishing the QAP of the NP problem to be solved to the client.
QAP is the basis for establishing zero knowledge proof. In the embodiment of the application, different common parameters are set according to different NP problems, that is, the common parameters are used to distinguish different NP problems, have uniqueness (for example, may be a random string), and are parameters that are required to be used in both the zero-knowledge proof and the verification processes. For example, if the NP problem to be solved is the sudoku problem, the common parameter corresponding to the sudoku problem may be a parameter obtained based on a known number in the sudoku problem to be solved. The server publishes the QAP of the NP problem to be solved to the client so that the client can obtain the relevant information of the NP problem to be solved, the NP problem can be solved offline, and zero knowledge proof information of the answer is generated according to the information published by the server.
In the embodiment of the present application, obtaining the QAP of the NP problem to be solved according to the NP problem to be solved, the verification constraint condition, and the common parameter of the NP problem to be solved may specifically include:
and taking the NP problem to be solved, the verification constraint condition and the public parameter as the parameters of the QAP of the EVM to obtain the QAP of the NP problem to be solved.
Because the form of the QAP of the EVM is fixed, the NP problem to be solved, the corresponding verification constraint condition and the public parameter are used as the parameters of the QAP, and the QAP of the NP problem can be obtained. That is, QAPs of different NP problems are obtained based on the same fixed-form QAP polynomial, and since specific parameter information (NP problem to be solved, verification constraint and common parameter) of each NP problem to be solved is different, QAPs of each NP problem to be solved obtained based on QAPs of EVM are also different. The QAP of the NP problem to be solved is obtained based on the QAP of the EVM, the QAP which is generated according to the NP problem to be solved does not need to be converted and generated again each time, only the specific parameter information of the specific NP problem needs to be used as the coefficient of the QAP of the EVM, and compared with the method for generating the QAP according to the conversion of each NP problem, the method can greatly reduce the data volume to be processed.
It should be noted that the specific implementation of the QAP for obtaining the EVM is the prior art, and will not be described in detail here.
In the embodiment of the application, the generation and verification process of the zero-knowledge proof information can be specifically realized by adopting a zkSNARKs algorithm. Specifically, the zero-knowledge proof information may be proof information generated by proof of the answer to the NP problem to be solved by a proof function of the zksnorks algorithm according to the verification constraint condition and the common parameter. Correspondingly, verifying the zero knowledge proof information according to the verification constraint condition, comprising:
and verifying the zero knowledge proof information through a verification function of the zkSNARKs algorithm corresponding to the proof function according to the verification constraint condition and the common parameters.
The client can determine whether the client really knows the answer of the NP problem or not through the zero knowledge proof information of the answer under the condition that the client does not inform the server of the answer of the NP problem to be solved, so that the client can obtain the corresponding pass-certificate after the NP problem is solved, the server can really obtain the answer of the NP problem after the pass-certificate is distributed to the client, and the benefits of the client and the server are guaranteed.
In the embodiment of the application, the client and the server can respectively generate zero knowledge proof information of the answer to the NP problem to be solved and complete verification of the zero knowledge proof information through a zkSNARKs algorithm. The data size of the zero knowledge proof information generated by adopting the zkSNARKs algorithm is small, and the efficiency of generating the zero knowledge proof information and the efficiency of verifying the zero knowledge proof information by the server can be improved.
In this embodiment of the present application, after receiving an answer to an NP problem to be solved sent by a client, the method further includes:
and revoking the related information of the NP problem to be solved published to the client, wherein the related information comprises the NP problem to be solved and the verification constraint condition.
In the embodiment of the application, after receiving the answer of the NP problem to be solved sent by the client, the server needs to cancel the NP problem and the information such as the verification constraint condition corresponding to the NP problem, so as to avoid the problem that the other clients cannot pay the certification reward after solving the NP problem again after the certification reward is distributed. If the publisher of the NP problem wants to obtain a plurality of different answers, after obtaining one answer each time, the publisher of the NP problem needs to cancel the published information corresponding to the answer and then publish again according to new verification constraint conditions.
Fig. 3 shows another processing method for NP problem provided by the embodiment of the present application, which can be applied to a client. As shown in fig. 3, the processing method may mainly include:
step S301: acquiring NP problems to be solved and verification constraint conditions published by a server;
step S302: generating zero-knowledge proof information of an answer to the NP problem to be solved;
step S303: and sending the zero knowledge proof information to a server so that the server verifies the zero knowledge proof information according to verification constraint conditions, and determining that the client knows the answer of the NP problem to be solved after the verification is passed.
Wherein the verification constraint condition is used for verifying whether the answer of the NP problem to be solved is correct. After the server side publishes the NP problem to be solved and the verification constraint condition to the client side, the client side can obtain the relevant information of the NP problem. After acquiring the NP problem to be solved and the corresponding verification constraint condition, a client user can perform answer of the NP problem offline, after the answer of the NP problem is answered, the client does not directly provide the answer to the server in order to avoid paying a white fee, but zero knowledge proof information of the answer of the NP problem to be solved is sent to the server, so that the server can determine whether the client really knows the answer of the NP problem or not by verifying the zero knowledge proof information of the answer, and after the answer passes the verification, the server determines that the client has answered the answer.
Through the scheme of the embodiment of the application, the client proves that the NP problem is really solved to the server under the condition that the answer of the NP problem is not informed to the server, the rights and interests of the client and the server are guaranteed, and the trust problem of the client and the server is solved.
In this embodiment of the application, as shown in fig. 4, the processing method for the NP issue may further include:
step S304: and receiving verification passing information sent by the server after the verification passes, and sending the answer of the NP problem to be solved to the server.
After the server verifies the zero knowledge proof information, the server sends corresponding verification passing information to the client, and the client sends the answer to the server after receiving the verification passing information in order to ensure that the client can feed back correspondingly.
In this embodiment of the present application, when acquiring the NP problem to be solved and the verification constraint condition published by the server, the method may further include: determining the corresponding certificate passing reward information of the NP problem to be solved, which is published by the server; correspondingly, the receiving the verification passing information sent by the server after the verification passing may include: and receiving the corresponding certificate passing awards distributed by the server and corresponding to the certificate passing awards information.
The promulgator who waits to solve the NP problem can greatly improve the enthusiasm of the client for participating in solving the NP problem by setting the certificate-through reward. After the server verifies the zero-knowledge proof information of the answer to the NP problem to be solved, which is provided by the client, the server distributes the certification passing reward to the client as verification passing information, and after the client obtains the corresponding certification passing reward, the server sends the answer to the NP problem to enable the server to obtain the answer to the NP problem of the client.
In the embodiment of the present application, obtaining NP problem to be solved and verification constraint condition published by a server includes:
the method comprises the steps of obtaining a QAP (quality assurance protocol) of an NP problem to be solved, which is published by a server, wherein the QAP of the NP problem to be solved is obtained by the server according to the NP problem to be solved, a verification constraint condition and common parameters of the NP problem to be solved;
and obtaining the NP problem to be solved, verification constraint conditions and public parameters according to the QAP of the NP problem to be solved.
In the embodiment of the present application, the QAP of the NP problem to be solved, which is obtained by the server according to the NP problem to be solved, the verification constraint, and the common parameter of the NP problem to be solved, may specifically be the QAP of the NP problem to be solved, which is obtained by the server using the NP problem to be solved, the verification constraint, and the common parameter as parameters of the QAP of the EVM.
In the embodiment of the application, because the form of the QAP of the EVM is fixed, when the server obtains the QAP of the NP problem to be solved based on the QAP of the EVM, it is not necessary to convert each NP problem to be solved to obtain the corresponding QAP, and it is only necessary to use the specific parameter information (the NP problem to be solved, the verification constraint condition, and the common parameter) of each NP problem to be solved as the parameters of the QAP of the EVM.
In the embodiment of the present application, generating zero-knowledge proof information of an answer to an NP problem to be solved includes:
according to the verification constraint conditions and the public parameters, proving the answer of the NP problem to be solved through a proving function of a zkSNARKs algorithm to obtain zero-knowledge proving information;
the server verifies the zero knowledge proof information according to the verification constraint condition, and verifies the zero knowledge proof information through a verification function of a zkSNARKs algorithm corresponding to the proof function according to the verification constraint condition and the public parameter.
It can be understood that, in the embodiment of the present application, the processing method of the NP problem shown in fig. 1 and fig. 2 and the processing method of the NP problem shown in fig. 3 and fig. 4 are described from both sides of the server and the client, respectively, and the descriptions based on the schemes in the embodiments shown in fig. 1 to fig. 4 may be mutually referred to.
The NP problem processing method of the embodiment of the application can be applied to the processing of various NP problems. For example, a problem of finding a program bug (bug) is difficult to find, and a program publisher can publish the problem to a client by setting a pass according to the method of the embodiment of the present invention, and after finding the program bug, the client and the client execute a zero-knowledge proof information protocol, and the client completes the proof that the bug has been found to the publisher without informing the publisher of the bug, and after the publisher passes the verification, the publisher trusts that the user of the client really finds the bug, and distributes the pass to the user to obtain the bug of the program, so that the program can be further perfected based on the bug, and respective requirements of the two parties are met.
Corresponding to the NP question processing method shown in fig. 1, an embodiment of the present application further provides an NP question processing apparatus, as shown in fig. 5, the processing apparatus 500 may mainly include a question issuing module 510, a certification information receiving module 520, and an answer verifying module 530.
A problem issuing module 510, configured to issue, to a client, an NP problem to be solved and a verification constraint, where the verification constraint is used to verify whether an answer to the NP problem to be solved is correct;
a certification information receiving module 520, configured to receive zero-knowledge certification information of an answer to the NP problem to be solved, where the certification information is sent by the client;
and the answer verification module 530 is configured to verify the zero knowledge proof information according to the verification constraint condition, and if the verification passes, determine that the client knows the answer to the NP problem to be solved.
In this embodiment of the application, the issue issuing module 510 may be specifically configured to:
obtaining a QAP of the NP problem to be solved according to the NP problem to be solved, the verification constraint condition and the public parameter of the NP problem to be solved;
and publishing the QAP of the NP problem to be solved to the client.
In this embodiment, when obtaining the QAP of the NP problem to be solved according to the NP problem to be solved, the verification constraint condition, and the common parameter of the NP problem to be solved, the problem issuing module 510 may be specifically configured to:
and taking the NP problem to be solved, the verification constraint condition and the public parameter as the parameters of the QAP of the EVM to obtain the QAP of the NP problem to be solved.
In the embodiment of the application, the zero-knowledge proof information may be proof information generated by proving the answer to the NP problem to be solved through a proving function of the zkSNARKs algorithm according to the verification constraint condition and the common parameter; correspondingly, the answer verification module 530 may specifically be configured to, when verifying the zero-knowledge proof information according to the verification constraint condition:
and verifying the zero knowledge proof information through a verification function of the zkSNARKs algorithm corresponding to the proof function according to the verification constraint condition and the common parameters.
In the embodiment of the present application, the processing device 500 may further include an answer obtaining module 540, as shown in fig. 6.
And the answer obtaining module 540 is configured to send the verification passing information to the client after the verification passes, and receive an answer of the NP problem to be solved, which is sent by the client.
In this embodiment of the application, the issue issuing module 510 may be further configured to issue, to the client, the corresponding certificate authority information of the NP issue to be solved; correspondingly, when the answer obtaining module 540 sends the verification passing information to the client, the answer obtaining module may be specifically configured to: and distributing the corresponding certificate passing awards corresponding to the certificate passing awards information to the client.
In this embodiment, the processing device 500 may further include a question revocation module 550, as shown in fig. 7.
And a question canceling module 550, configured to cancel, after receiving the answer to the NP problem to be solved sent by the client, the relevant information of the NP problem to be solved that is published to the client, where the relevant information includes the NP problem to be solved and the authentication constraint.
Of course, when the information published to the client includes the corresponding information, the related information of the revocation also includes the corresponding information.
It is understood that each module of the processing device for the NP issue in the embodiment of fig. 5 and based on fig. 5 may have a function of implementing the corresponding step in the processing method for the NP issue in the embodiment of fig. 1 or based on fig. 1. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The modules can be software and/or hardware, and can be implemented individually or by integrating a plurality of modules. For the functional description of each module of the NP issue processing apparatus, reference may be made to the above-mentioned fig. 1 or the corresponding description in the NP issue processing method based on fig. 1, and details are not repeated here.
Corresponding to the NP problem processing method shown in fig. 3, the embodiment of the present application provides an NP problem processing apparatus, and as shown in fig. 8, the processing apparatus 800 may mainly include a problem obtaining module 810, a certification information generating module 820, and a data transceiving module 830.
The problem obtaining module 810 is configured to obtain an NP problem to be solved and a verification constraint condition published by the server, where the verification constraint condition is used to verify whether an answer to the NP problem to be solved is correct;
a proof information generating module 820 for generating zero-knowledge proof information of the answer to the NP problem to be solved;
and the data transceiver module 830 is configured to send the zero knowledge proof information to the server, so that the server verifies the zero knowledge proof information according to the verification constraint condition, and after the verification passes, determines that the client knows the answer to the NP problem to be solved.
In this embodiment of the application, the problem obtaining module 810 may be specifically configured to:
the method comprises the steps of obtaining a QAP (quality assurance protocol) of an NP problem to be solved, which is published by a server, wherein the QAP of the NP problem to be solved is obtained by the server according to the NP problem to be solved, a verification constraint condition and public parameters of the NP problem to be solved;
and obtaining the NP problem to be solved, verification constraint conditions and public parameters according to the QAP of the NP problem to be solved.
In the embodiment of the application, the server obtains the QAP of the NP problem to be solved according to the NP problem to be solved, the verification constraint condition and the public parameter of the NP problem to be solved, and obtains the QAP of the NP problem to be solved by taking the NP problem to be solved, the verification constraint condition and the public parameter as the parameters of the QAP of the EVM for the server.
In this embodiment of the application, the certification information generating module 820 may be specifically configured to:
and according to the verification constraint conditions and the public parameters, proving the answer of the NP problem to be solved through a proving function of the zkSNARKs algorithm to obtain zero-knowledge proving information.
Correspondingly, the server verifies the zero knowledge proof information according to the verification constraint condition, and verifies the zero knowledge proof information through the verification function of the zkSNARKs algorithm corresponding to the proof function according to the verification constraint condition and the public parameter.
In this embodiment, the data transceiver module 830 may be further configured to:
and receiving verification passing information sent by the server after the verification passes, and sending the answer of the NP problem to be solved to the server.
In the embodiment of the present application, the problem obtaining module 810 may be further configured to determine the corresponding certification-based reward information of the NP problem to be solved, which is published by the server, when obtaining the NP problem to be solved and the verification constraint condition, which are published by the server; correspondingly, the data transceiver module 830 may be specifically configured to receive the pass-through reward distributed by the server and corresponding to the pass-through reward information when receiving the verification passing information sent by the server after the verification passes.
Each module of the NP problem processing apparatus in the embodiment of fig. 8 and based on fig. 8 may have a function of implementing a corresponding step in the NP problem processing method in the embodiment of fig. 3 or based on fig. 3. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The modules can be software and/or hardware, and can be implemented individually or by integrating a plurality of modules. For the functional description of each module of the NP problem processing apparatus, reference may be specifically made to fig. 3 or the corresponding description in the NP problem processing method based on fig. 3, and details are not repeated here.
An embodiment of the present application provides an electronic device, as shown in fig. 9, an electronic device 2000 shown in fig. 9 includes: a processor 2001 and a transceiver 2004. The processor 2001 is coupled to the transceiver 2004, such as via the bus 2002. Optionally, the electronic device 2000 may further include a memory 2003. It should be noted that the transceiver 2004 is not limited to one in practical applications, and the structure of the electronic device 2000 is not limited to the embodiment of the present application.
The processor 2001 may be applied to the embodiments shown in fig. 1, fig. 2, fig. 5, fig. 6, or fig. 7 of the present application, and is configured to implement the functions of the question issuing module 510, the answer verifying module 530, and the question canceling module 550. The transceiver 2004 includes a receiver and a transmitter, and the transceiver 2004 is applied to the embodiments shown in fig. 1, fig. 2, fig. 5, fig. 6 or fig. 7 of the present application to realize the functions of the certification information receiving module 520 and the answer obtaining module 540.
The processor 2001 may also be applied in the embodiments shown in fig. 3, fig. 4, or fig. 8 of the present application to implement the function of the certification information generating module 820 shown in fig. 8. The transceiver 2004 includes a receiver and a transmitter, and the transceiver 2004 is applied in the embodiments of fig. 3, fig. 4 or fig. 8 of the present application to realize the functions of the problem obtaining module 810 and the data transceiver module 830 shown in fig. 8.
The processor 2001 may be a CPU, general purpose processor, DSP, ASIC, FPGA or other programmable logic device, transistor logic device, hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor 2001 may also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs and microprocessors, and the like.
Bus 2002 may include a path that conveys information between the aforementioned components. The bus 2002 may be a PCI bus or an EISA bus, etc. The bus 2002 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 9, but this does not indicate only one bus or one type of bus.
Memory 2003 may be, but is not limited to, ROM or other types of static storage devices that can store static information and instructions, RAM or other types of dynamic storage devices that can store information and instructions, EEPROM, CD-ROM or other optical disk storage, optical disk storage (including compact disk, laser disk, optical disk, digital versatile disk, blu-ray disk, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
Optionally, the memory 2003 is used for storing application program code for performing the disclosed aspects, and is controlled in execution by the processor 2001. The processor 2001 is configured to execute application program codes stored in the memory 2003 to implement the actions of the NP problem processing apparatus according to any of the embodiments shown in fig. 5 to 8.
Embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the computer program implements a processing method for an NP problem shown in any one of the embodiments of the present application.
The embodiment of the application provides a computer-readable storage medium which is suitable for the method embodiment. And will not be described in detail herein.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
The foregoing is only a partial embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (18)

1. A method for processing a non-deterministic problem (NP) problem with polynomial complexity is characterized by comprising the following steps:
obtaining a quadratic arithmetic polynomial QAP of the NP problem to be solved according to the NP problem to be solved, a verification constraint condition and a public parameter of the NP problem to be solved; publishing the QAP of the NP problem to be solved to a client, wherein the verification constraint condition is used for verifying whether the answer of the NP problem to be solved is correct;
receiving zero-knowledge proof information of the answer of the NP problem to be solved, which is sent by the client;
the zero knowledge proof information is proof information generated by proving the answer of the NP problem to be solved through a proof function of a zero knowledge concise non-interactive knowledge demonstration zkSNARKs algorithm according to the verification constraint condition and the public parameters;
verifying the zero-knowledge proof information according to the verification constraint condition, and if the verification is passed, determining that the client knows the answer of the NP problem to be solved;
the second-order arithmetic polynomial QAP of the NP problem to be solved is obtained according to the NP problem to be solved, the verification constraint condition and the public parameter of the NP problem to be solved, and comprises the following steps: and taking the NP problem to be solved, the verification constraint condition and the public parameter as the parameters of the QAP of the EVM to obtain the QAP of the NP problem to be solved.
2. The NP problem handling method according to claim 1,
the verifying the zero knowledge proof information according to the verification constraint condition comprises:
and verifying the zero knowledge proof information through a verification function of the zkSNARKs algorithm corresponding to the proof function according to the verification constraint condition and the common parameters.
3. The NP issue processing method according to claim 1 or 2, wherein the method further comprises:
and after the verification is passed, sending verification passing information to the client, and receiving the answer of the NP problem to be solved sent by the client.
4. The method of claim 3, wherein the second order polynomial QAP of the NP problem to be solved is obtained according to the NP problem to be solved, the verification constraint and the common parameters of the NP problem to be solved; when the QAP of the NP problem to be solved is published to the client, the method further comprises the following steps:
publishing the corresponding certificate approval reward information of the NP problem to be solved to the client;
the sending the verification passing information to the client comprises:
and distributing the corresponding certificate-passing reward to the client.
5. The method for processing NP issue as claimed in claim 1 or 2, wherein after receiving the answer to the NP issue to be solved sent by the client, the method further comprises:
revoking the related information of the NP problem to be solved, which is published to the client, wherein the related information comprises the NP problem to be solved and the verification constraint condition.
6. A method for processing a non-deterministic problem (NP) problem with polynomial complexity is characterized by comprising the following steps:
acquiring a quadratic arithmetic polynomial QAP (quality enhancement protocol) of an NP problem to be solved, which is published by a server, wherein the QAP of the NP problem to be solved is the QAP of the NP problem to be solved, which is obtained by the server according to the NP problem to be solved, a verification constraint condition and public parameters of the NP problem to be solved; obtaining the NP problem to be solved, the verification constraint condition and the public parameter according to the QAP of the NP problem to be solved, wherein the verification constraint condition is used for verifying whether the answer of the NP problem to be solved is correct or not;
proving the answer of the NP problem to be solved through a proving function of a zero-knowledge concise non-interactive knowledge demonstration zkSNARKs algorithm according to the verification constraint condition and the public parameters to obtain zero-knowledge proving information;
the server verifies the zero knowledge proof information according to the verification constraint condition, and verifies the zero knowledge proof information through a verification function of the zkSNARKs algorithm corresponding to the proof function according to the verification constraint condition and the public parameter;
sending the zero knowledge proof information to the server so that the server verifies the zero knowledge proof information according to the verification constraint condition, and after the verification is passed, determining that the client knows the answer of the NP problem to be solved;
and the server obtains the QAP of the NP problem to be solved according to the NP problem to be solved, the verification constraint condition and the public parameter of the NP problem to be solved, and obtains the QAP of the NP problem to be solved by taking the NP problem to be solved, the verification constraint condition and the public parameter as the parameters of the QAP of the Ethernet virtual machine EVM for the server.
7. The method of processing NP issues of claim 6, further comprising:
and receiving verification passing information sent by the server after the verification passes, and sending the answer of the NP problem to be solved to the server.
8. The NP problem processing method according to claim 7, wherein the acquiring the NP problem to be solved and the verification constraint published by the server further comprises:
determining the corresponding certificate approval reward information of the NP problem to be solved, which is published by the server;
the receiving of the verification passing information sent by the server after the verification passing includes:
and receiving the corresponding certificate passing awards distributed by the server and corresponding to the certificate passing awards information.
9. An apparatus for processing a non-deterministic problem (NP) of polynomial complexity, comprising:
the problem issuing module is used for obtaining a quadratic arithmetic polynomial QAP of the NP problem to be solved according to the NP problem to be solved, the verification constraint condition and the public parameter of the NP problem to be solved; publishing the QAP of the NP problem to be solved to a client, wherein the verification constraint condition is used for verifying whether the answer of the NP problem to be solved is correct;
the certification information receiving module is used for receiving zero-knowledge certification information of the answer of the NP problem to be solved, which is sent by the client;
the zero knowledge proof information is proof information generated by proving the answer of the NP problem to be solved through a proof function of a zero knowledge concise non-interactive knowledge demonstration zkSNARKs algorithm according to the verification constraint condition and the public parameters;
the answer verification module is used for verifying the zero-knowledge proof information according to the verification constraint condition, and determining that the client knows the answer of the NP problem to be solved if the verification passes;
the problem issuing module is specifically configured to, when obtaining the quadratic arithmetic polynomial QAP of the NP problem to be solved according to the NP problem to be solved, the verification constraint condition, and the common parameter of the NP problem to be solved: and taking the NP problem to be solved, the verification constraint condition and the public parameter as the parameters of the QAP of the EtherFang virtual machine EVM to obtain the QAP of the NP problem to be solved.
10. The NP problem handling device according to claim 9,
when the answer verification module verifies the zero knowledge proof information according to the verification constraint condition, the answer verification module is specifically configured to:
and verifying the zero knowledge proof information through a verification function of the zkSNARKs algorithm corresponding to the proof function according to the verification constraint condition and the common parameters.
11. The NP problem processing apparatus according to claim 9 or 10, wherein the apparatus further comprises:
and the answer acquisition module is used for sending verification passing information to the client after the verification passes and receiving the answer of the NP problem to be solved, which is sent by the client.
12. The apparatus for processing NP issue of claim 11, wherein the issue issuing module is further configured to issue the corresponding forensic reward information of the NP issue to be solved to the client;
when the answer obtaining module sends the verification passing information to the client, the answer obtaining module is specifically configured to:
and distributing the corresponding certificate award to the client side.
13. The NP problem processing apparatus according to claim 9 or 10, wherein the processing apparatus further comprises:
and the problem canceling module is used for canceling the relevant information of the NP problem to be solved, which is published to the client, after receiving the answer of the NP problem to be solved, which is sent by the client, wherein the relevant information comprises the NP problem to be solved and the verification constraint condition.
14. An apparatus for processing a non-deterministic problem (NP) of polynomial complexity, comprising:
the problem acquisition module is used for acquiring a QAP (quadratic arithmetic polynomial) of an NP problem to be solved, which is published by a server, wherein the QAP of the NP problem to be solved is the QAP of the NP problem to be solved, which is obtained by the server according to the NP problem to be solved, a verification constraint condition and public parameters of the NP problem to be solved; obtaining the NP problem to be solved, the verification constraint condition and the public parameter according to the QAP of the NP problem to be solved; wherein the verification constraint condition is used for verifying whether the answer of the NP problem to be solved is correct;
the proof information generation module is used for proving the answer of the NP problem to be solved through a proof function of a zero-knowledge concise non-interactive knowledge demonstration zkSNARKs algorithm according to the verification constraint condition and the public parameters to obtain zero-knowledge proof information; the server verifies the zero knowledge proof information according to the verification constraint condition, and verifies the zero knowledge proof information through a verification function of the zkSNARKs algorithm corresponding to the proof function according to the verification constraint condition and the public parameter;
the data transceiving module is used for sending the zero knowledge proof information to the server so that the server verifies the zero knowledge proof information according to verification constraint conditions, and after the verification is passed, the client side is determined to know the answer of the NP problem to be solved;
and the server obtains the QAP of the NP problem to be solved according to the NP problem to be solved, the verification constraint condition and the public parameter of the NP problem to be solved, and obtains the QAP of the NP problem to be solved by taking the NP problem to be solved, the verification constraint condition and the public parameter as the parameters of the QAP of the Ethernet virtual machine EVM for the server.
15. The NP issue processing apparatus of claim 14, wherein the data transceiver module is further configured to:
and receiving verification passing information sent by the server after the verification passes, and sending the answer of the NP problem to be solved to the server.
16. The NP issue processing apparatus as claimed in claim 15, wherein the issue obtaining module, when obtaining the NP issue to be solved and the verification constraint published by the server, is further configured to:
determining the corresponding accreditation reward information of the NP problem to be solved, which is published by the server;
when the data transceiver module receives the verification passing information sent by the server after the verification passing, the data transceiver module is specifically configured to: and receiving the corresponding certificate awards distributed by the server and corresponding to the certificate awards information.
17. An electronic device comprising a processor and a memory;
the memory configured to store machine-readable instructions;
the processor is configured to execute the processing method of the NP issue recited in any one of claims 1 to 5 or execute the processing method of the NP issue recited in any one of claims 6 to 8 by calling the readable instructions.
18. A computer-readable storage medium for storing computer instructions which, when executed on a computer, cause the computer to perform the method of handling an NP problem as claimed in any one of claims 1 to 5 or the method of handling an NP problem as claimed in any one of claims 6 to 8.
CN201810660749.7A 2018-06-25 2018-06-25 NP problem processing method and device, electronic device and storage medium Active CN108847943B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810660749.7A CN108847943B (en) 2018-06-25 2018-06-25 NP problem processing method and device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810660749.7A CN108847943B (en) 2018-06-25 2018-06-25 NP problem processing method and device, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN108847943A CN108847943A (en) 2018-11-20
CN108847943B true CN108847943B (en) 2022-07-01

Family

ID=64202213

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810660749.7A Active CN108847943B (en) 2018-06-25 2018-06-25 NP problem processing method and device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN108847943B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112487485B (en) * 2020-05-09 2022-12-27 支付宝(杭州)信息技术有限公司 Personal data processing method and device based on zero-knowledge proof and electronic equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107862216A (en) * 2017-10-13 2018-03-30 布比(北京)网络技术有限公司 Method for secret protection, device and the storage medium merchandised for anonymity across chain

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107862216A (en) * 2017-10-13 2018-03-30 布比(北京)网络技术有限公司 Method for secret protection, device and the storage medium merchandised for anonymity across chain

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
zksnark—零知识证明;Publish of Perish;《CSDN博客》;20180511;参见第1-8页 *

Also Published As

Publication number Publication date
CN108847943A (en) 2018-11-20

Similar Documents

Publication Publication Date Title
Garman et al. Decentralized anonymous credentials
CN1941699B (en) Cryptographic methods, host system, trusted platform module, and computer arrangement
CN111466100B (en) System and method for multiparty generation of blockchain-based smart contracts
WO2019116248A1 (en) System and method for authenticating off-chain data based on proof verification
CN111563261A (en) Privacy protection multi-party computing method and system based on trusted execution environment
CN111342962B (en) Method and system for verifying ciphertext message range
WO2021228239A1 (en) Asset type consistency evidence generation method and system, transaction method and system, and transaction verification method and system
WO2019174402A1 (en) Group membership issuing method and device for digital group signature
CN113037479B (en) Data verification method and device
KR101986392B1 (en) Information processing device, information processing method, and recording medium
CN113541960B (en) Network authentication method and device based on federal learning
CN108847943B (en) NP problem processing method and device, electronic device and storage medium
CN112653554A (en) Signature method, system, equipment and readable storage medium
CN116797227A (en) Method and system for secure exchange protection of client privacy information based on homomorphic encryption
CN107547199B (en) Method for realizing forward safety repudiation key exchange protocol for improving network competitive bidding system
CN110278073B (en) Group digital signature and verification method, and equipment and device thereof
CN113112269B (en) Multiple signature method, computer device, and storage medium
JP5314449B2 (en) Electronic signature verification system, electronic signature device, verification device, electronic signature verification method, electronic signature method, verification method, electronic signature program, verification program
JP6634171B2 (en) Apparatus, method and program for certifying public key reliability
Fajiang et al. An efficient anonymous remote attestation scheme for trusted computing based on improved CPK
Diaz et al. On securing online registration protocols: Formal verification of a new proposal
JP5227764B2 (en) Electronic signature verification system, electronic signature device, verification device, electronic signature verification method, electronic signature method, verification method, electronic signature program, verification program
WO2020260151A1 (en) Zero-knowledge contingent payments protocol for granting access to encrypted assets
Pagnin et al. Anonymous single-round server-aided verification
Tan et al. Multi-party co-signature scheme based on SM2

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant