Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion circom/circuits/fri.circom
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ template VerifyFriProof() {

// fri_verify_proof_of_work
component check = LessNBits(64 - MIN_FRI_POW_RESPONSE());
check.x <== fri_pow_response;
check.x <== fri_pow_response;
assert(check.out == 1);
Comment on lines +142 to +143

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Enhanced security with critical assertion.

The addition of the assertion is a crucial change that enforces the validity of the proof-of-work check. This ensures that fri_pow_response is properly validated by the LessNBits component, preventing potential security vulnerabilities in the FRI verification process.

Note: According to the PR description, a redundant duplicate assignment of check.x <== fri_pow_response; was also removed, but this isn't visible in the provided diff. The addition of the assertion is an important security improvement regardless.


component c_gl_mul[NUM_FRI_QUERY_ROUND()][1];
component c_gl_exp[NUM_FRI_QUERY_ROUND()][1];
Expand Down