Browse Source

Fix verifier inputs field check

ed255-patch-1
arnaucube 4 years ago
parent
commit
bbcbba3113
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      verifier/verifier.go

+ 1
- 1
verifier/verifier.go

@ -25,7 +25,7 @@ func Verify(vk *types.Vk, proof *types.Proof, inputs []*big.Int) bool {
vkX := new(bn256.G1).ScalarBaseMult(big.NewInt(0))
for i := 0; i < len(inputs); i++ {
// check input inside field
if inputs[0].Cmp(types.R) != -1 {
if inputs[i].Cmp(types.R) != -1 {
return false
}
vkX = new(bn256.G1).Add(vkX, new(bn256.G1).ScalarMult(vk.IC[i+1], inputs[i]))

Loading…
Cancel
Save