fix for V-SCT-VUL-003

This commit is contained in:
Kevin Jue 2023-12-18 12:54:36 -08:00
parent 85d20ce656
commit 2c361fa5e3

View File

@ -215,6 +215,9 @@ func (p *Chip) ReduceWithMaxBits(x Variable, maxNbBits uint64) Variable {
remainder := NewVariable(result[1])
p.RangeCheck(remainder)
p.api.AssertIsEqual(x, p.api.Add(p.api.Mul(quotient, MODULUS), remainder.Limb))
return remainder
}