A wire is a connection in an arithmetic circuit that carries either an input value or a value computed by a multiplication gate. In a quadratic arithmetic program (QAP), wires are labeled a_j and provide the gate inputs and outputs used to check whether the circuit equations are satisfied. section 19.2 section 19.7
QAP wires have several operational properties:
- Each wire carries a value associated with an input or computation, while each multiplication gate connects left inputs, right inputs, and an output. section 19.2
- The conventional wire a_0 has value 1; other wires can represent public record data, private witness data, or intermediate computations. section 19.2 section 19.7
- Wire values must be represented modulo the torsion-field size, and incorrect values cause the QAP verification equations to fail. section 19.7
- Public wires are statement variables visible to the verifier; secret wires are witness variables known to the prover. section 19.7
Medical-record circuit
A toy QAP assigns a medicine number to a_1, a dose to a_2, a patient number to a_3, and a random value to a_4. Further wires compute intermediate products until a_9 is produced. The random wire helps prevent backward propagation from revealing the patient number. section 19.2
Figure 19.2 Example quadratic arithmetic program
Use the circuit figure to trace how labeled wires enter multiplication gates and carry outputs into later computations. section 19.2
