Skip to content

Commit

Permalink
Rename _Q -> _R
Browse files Browse the repository at this point in the history
Using 'r' for the size of the scalar field is
standard practice.

Co-Authored-By: Balazs Komuves <[email protected]>
  • Loading branch information
markspanbroek and bkomuves committed Jan 31, 2024
1 parent 99a3d10 commit b47164a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/Groth16Verifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import "./Groth16.sol";
contract Groth16Verifier is IGroth16Verifier {
uint private constant _P =
21888242871839275222246405745257275088696311157297823662689037894645226208583;
uint256 private constant _Q =
uint256 private constant _R =
21888242871839275222246405745257275088548364400416034343698204186575808495617;

VerifyingKey private _verifyingKey;
Expand Down Expand Up @@ -137,7 +137,7 @@ contract Groth16Verifier is IGroth16Verifier {
}
// Check that public inputs are field elements
for (uint i = 0; i < input.length; i++) {
if (input[i] >= _Q) {
if (input[i] >= _R) {
return false;
}
}
Expand Down

0 comments on commit b47164a

Please sign in to comment.