I'm not sure if this is a good place to ask, but I have some issues with using plonky2 to make some proof.

In particular, I want to prove that a private element is part of a set (i.e. $x \in X$), and that this same element is the primitive of a hash function (i.e $\operatorname{SHA}256(x) = h$). The set $X$ and the hashed $h$ are public, but I need to keep the value $x$ private.

It was fine to prove that I have $x$ which is the primitive of a hash function (using plonky2_sha256), but I’m struggling to prove that x is in a set X.

Reading the source code of plonky2, it seems that MerkleTrees are well implemented and could be used for my particular need, but I don't find any good documentation for that and don't really understand how to use this tool.

If you know where I could find good information to help me, or if you know the implementation details, I will be happy to hear you!

New contributor
Benjamin V is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • $\begingroup$ What is power of X? You can brute force if it is small. $\endgroup$
    – Moorhuhn
    May 26 at 13:47


Browse other questions tagged or ask your own question.