Secret inputs in witness obtainable #1405
Unanswered
RichardGazdik1
asked this question in
Q&A
Replies: 1 comment
-
Hi @RichardGazdik1 , if you want to have the full witness, you need to query the underlying vector that the witness stores, and cast it to the correct type: (include "github.com/consensys/gnark-crypto/ecc/bn254/fr" in your example). The entries in the vector correspond to the variables in the witness, in the same order than in the structure representing the circuit, with the public witness first, like this: [public || secret ] (for instance, the secret part contains the secret witness in the same order of appearance than in the structure defining the circuit) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I am interested in
gnark
privacy and wanted to know if it is possible to obtain secret inputs from an already created witness file. For example, I have a simple circuit with 1 public and 1 secret input with basic addition:I did all the needed steps to create the witness:
My question now is: Is it possible to obtain the value(s) of secret inputs from this witness file, or is it impossible to do so?
Beta Was this translation helpful? Give feedback.
All reactions