fix!: sha256.pil missing input propagation constraints#19590
Merged
Conversation
f2903a0 to
8dd5e6e
Compare
dbanks12
commented
Jan 14, 2026
Comment on lines
+799
to
+807
| // Tamper with init_a on row 1 (making it different from row 0) | ||
| FF original_init_a = trace.get(C::sha256_init_a, TAMPER_ROW); | ||
| FF tampered_init_a = original_init_a + FF(0x12345678); | ||
| trace.set(C::sha256_init_a, TAMPER_ROW, tampered_init_a); | ||
|
|
||
| // The PROPAGATE_INIT_A constraint should catch this: | ||
| // perform_round * (init_a' - init_a) = 0 | ||
| // On row 0: perform_round=1, init_a'=tampered, init_a=original -> constraint violated | ||
| EXPECT_THROW_WITH_MESSAGE(check_relation<sha256>(trace, sha256::SR_PROPAGATE_INIT_A), "PROPAGATE_INIT_A"); |
Contributor
Author
There was a problem hiding this comment.
Before fix, this tampering did not fail constraints
IlyasRidhuan
approved these changes
Jan 14, 2026
Collaborator
Flakey Tests🤖 says: This CI run detected 3 tests that failed, but were tolerated due to a .test_patterns.yml entry. |
2755e3c to
7cee6b0
Compare
Merged
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Jan 14, 2026
BEGIN_COMMIT_OVERRIDE fix(avm): Fix relative addressing in fuzzer (#19550) feat(avm): avm fuzzer bytecode mutation (#19378) chore(avm): there is automatic conversion from uint128_t to FF chore(avm): ECC pre-audit - normalise infinity points (#19462) feat(bb-pilcom): single-component graph check (#19578) feat(avm): contract class mutation (#19498) chore: support uint128_t in uint256_t construction (#19581) fix!: remove unused column in update_check.pil (#19557) fix(avm)!: pre-audit review of context.pil (#19549) fix(avm): Relax fuzzer memory manager asserts (#19591) fix!: sha256.pil missing input propagation constraints (#19590) END_COMMIT_OVERRIDE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This allowed you to tamper with sha256 inputs on rows after start