liveBook · Manning

Arithmetic circuit

As explained in Real-World Cryptography

An arithmetic circuit is a directed acyclic computation structure whose gates perform arithmetic operations over a specified field or ring.

An arithmetic circuit turns a computation into linked addition and multiplication gates. Inputs may be public or private, and values flow toward one or more outputs. section 15.1.2

General-purpose MPC evaluates the circuit in three broad steps:

  • Share private inputs while leaving public inputs visible. section 15.1.2
  • Evaluate each gate: additions can be local, while multiplications require interaction. section 15.1.2
  • Reconstruct the output, or keep intermediate shares separate for continued computation. section 15.1.2

A conditional computation as constraints

A function selecting between a × (b + 3) and a + b can be represented by w × (a × (b + 3)) + (1 − w) × (a + b) = v, where w is 0 or 1. Such equations let a verifier check whether inputs and outputs match a valid execution. section 15.3.6 section 15.3.7

Figure 15.3 An arithmetic circuit is a number of addition or multiplication gates linking inputs to outputs. In the figure, values travel from left to right. For example, d = a + b. Here, the circuit only outputs one value f = a + b + bc, but it can in theory have multiple output values. Notice that different inputs to the circuit are provided by different participants, but they could also be public inputs (known to everyone).

Diagram the circuit as addition and multiplication gates linking participant or public inputs to outputs. section 15.1.2

How Real-World Cryptography covers it

How deep it goes
Explains inputs, gate evaluation, and constraint conversion, while omitting technical reasons for interactive multiplication and later proving details.
Examples
Uses a conditional function, the equation w × (a × (b + 3)) + (1 − w) × (a + b) = v, and the circuit f = a + b + bc.
What it assumes
Assumes basic arithmetic and introduces public versus private inputs; it relies on Shamir's secret sharing as an existing ingredient.
What you can do after
Evaluate/understand how private computations become gate evaluations or verifiable constraints.
How it connects
Connects arithmetic circuits to MPC, Shamir's secret sharing, zero-knowledge proofs, zk-SNARKs, and R1CS.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Real-World Cryptography. The section links point to the parts of the book it draws on.