Browse Source

fix for V-SCT-VUL-030

main
Kevin Jue 1 year ago
parent
commit
e3eff27eb1
2 changed files with 4 additions and 2 deletions
  1. +3
    -1
      plonk/gates/poseidon_mds_gate.go
  2. +1
    -1
      plonk/gates/public_input_gate.go

+ 3
- 1
plonk/gates/poseidon_mds_gate.go

@ -90,7 +90,9 @@ func (g *PoseidonMdsGate) EvalUnfiltered(
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

+ 1
- 1
plonk/gates/public_input_gate.go

@ -38,7 +38,7 @@ func (g *PublicInputGate) EvalUnfiltered(
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]

Loading…
Cancel
Save