Skip to content

Commit

Permalink
Merge pull request #480 from Stumble/yumin/fix-groth16-verifier-solid…
Browse files Browse the repository at this point in the history
…ity-tmpl

fix: Groth16Verifier solidity scalar size check. (security vulnerability)
  • Loading branch information
OBrezhniev authored Apr 8, 2024
2 parents e44656d + 8035774 commit fcfa802
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/verifier_groth16.sol.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ contract Groth16Verifier {
function verifyProof(uint[2] calldata _pA, uint[2][2] calldata _pB, uint[2] calldata _pC, uint[<%=IC.length-1%>] calldata _pubSignals) public view returns (bool) {
assembly {
function checkField(v) {
if iszero(lt(v, q)) {
if iszero(lt(v, r)) {
mstore(0, 0)
return(0, 0x20)
}
Expand Down

0 comments on commit fcfa802

Please sign in to comment.