🚧#9 Circom: Public and Private Inputs
In Circom, signals are treated as private by default, unless otherwise declared.
a
andb
are declared as public signalsc
remains a private signal
Remember, the verifier takes public inputs (signals) and the proof generated by the prover, and verifies them.
Private inputs will only be known by 2 parties, the user who provides them, and the prover. The verifier will not have access to the private inputs.
Private inputs are encrypted within the proof generated, thus the verifier is able to verify the proof without directly knowing the values of the private inputs.
signal output is a public signal
When you have a
signal output
at the top level of the circuit - It's a public input.
Last updated
Was this helpful?