mirror of
https://github.com/logos-storage/gnark-plonky2-verifier.git
synced 2026-01-05 22:53:09 +00:00
fix for V-SCT-VUL-003
This commit is contained in:
parent
85d20ce656
commit
2c361fa5e3
@ -215,6 +215,9 @@ func (p *Chip) ReduceWithMaxBits(x Variable, maxNbBits uint64) Variable {
|
|||||||
|
|
||||||
remainder := NewVariable(result[1])
|
remainder := NewVariable(result[1])
|
||||||
p.RangeCheck(remainder)
|
p.RangeCheck(remainder)
|
||||||
|
|
||||||
|
p.api.AssertIsEqual(x, p.api.Add(p.api.Mul(quotient, MODULUS), remainder.Limb))
|
||||||
|
|
||||||
return remainder
|
return remainder
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user