Divide By Zero
Detector Type:
Summary and Usage
The Divide By Zero (DBZ) detector identifies potential divide-by-zero errors in ZK circuits. Such errors can pose significant security risks, since malicious actors may be able to generate valid proofs for bogus statements.
Usage
Coming soon.
Example and Explanation
In the following example, the Divide
circuit has been developed to compute the
quotient
of dividend
divided by divisor
.
- Zirgen
Coming soon.
Usage Example
- Zirgen
Coming soon.
Limitations
This detector relies on LLZK’s intraprocedural range analysis to determine whether a divisor value may be zero. Inaccuracies in this analysis (for example, if a divisor is constrained to be non-zero in a separate function call) can lead to false positives.
How to Assess Severity
If analysis shows that the divisor of a division operation may be zero, the circuit may contain a critical vulnerability, as unexpected signal values could be used to generate a valid proof.