fix for V-SCT-VUL-030
Kevin Jue kjue235@gmail.com
Tue, 19 Dec 2023 13:06:15 -0800
2 files changed,
4 insertions(+),
2 deletions(-)
M
plonk/gates/poseidon_mds_gate.go
→
plonk/gates/poseidon_mds_gate.go
@@ -90,7 +90,9 @@
for i := uint64(0); i < poseidon.SPONGE_WIDTH; i++ { output := vars.GetLocalExtAlgebra(g.WireOutput(i)) diff := glApi.SubExtensionAlgebra(output, computed_outputs[i]) - constraints = append(constraints, diff[0], diff[1]) + for i := 0; i < gl.D; i++ { + constraints = append(constraints, diff[i]) + } } return constraints
M
plonk/gates/public_input_gate.go
→
plonk/gates/public_input_gate.go
@@ -38,7 +38,7 @@ constraints := []gl.QuadraticExtensionVariable{}
wires := g.WiresPublicInputsHash() hash_parts := vars.publicInputsHash - for i := 0; i < 4; i++ { + for i := 0; i < len(wires); i++ { wire := wires[i] hash_part := hash_parts[i]