Skip to content

Commit

Permalink
Merge pull request #469 from ConsenSys/fix/mimc-pow7
Browse files Browse the repository at this point in the history
fix: mimc pow7
  • Loading branch information
Tabaie authored Feb 9, 2023
2 parents ac65069 + 5e18cad commit e8d66c7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions std/hash/mimc/encrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ func pow5(api frontend.API, x frontend.Variable) frontend.Variable {
}

func pow7(api frontend.API, x frontend.Variable) frontend.Variable {
r := api.Mul(x, x)
r = api.Mul(r, r)
r = api.Mul(r, r)
return api.DivUnchecked(r, x)
t := api.Mul(x, x)
r := api.Mul(t, t)
r = api.Mul(r, t)
return api.Mul(r, x)
}

func pow17(api frontend.API, x frontend.Variable) frontend.Variable {
Expand Down

0 comments on commit e8d66c7

Please sign in to comment.