Given a function:

$$Y = a * b$$

Is there a way to prove in zero knowledge that a value $Y$ was gotten, without revealing $a$ and $b$? Alternatively, that we have knowledge of $a$ and $b$ such that their product equals $Y$.

public : $Y$

private: $a$,$b$


1 Answer 1


Yes, what you describe is an example of a zero-knowledge proof.

ZKP systems such as libSNARK, libSTARK, pepper-project, etc. can help the prover generate a proof that he/she knows private $a$ and $b$ such that $Y = a * b$ and then a verifier can check that the computation was done correctly without ever knowing $a$ and $b$.

What you describe is the knowledge-of-factorization example and I recently implemented that in the pepper-project here.

  • $\begingroup$ What about Y = a / b ? $\endgroup$ Commented Jan 12, 2019 at 13:32
  • $\begingroup$ It is same logic with a different operator. $\endgroup$
    – m0ur
    Commented Jan 12, 2019 at 13:46
  • $\begingroup$ The lib seems to be focussed around zksnarks, is there any way to use it without the verification/proving keys? $\endgroup$ Commented Jan 12, 2019 at 13:50
  • $\begingroup$ If I wanted multiple people to verify a computation, I would need multiple keys? $\endgroup$ Commented Jan 12, 2019 at 13:51
  • $\begingroup$ The keys are generated per program, not per verifier. libSTARK does not use prover/verifier keys. $\endgroup$
    – m0ur
    Commented Jan 12, 2019 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.