Skip to content

chore(avm): attacker-simulation tests for shift/unshift row-0 guarantees#22743

Merged
jeanmon merged 1 commit intomerge-train/avmfrom
jean/proving-shift-guarantees
Apr 28, 2026
Merged

chore(avm): attacker-simulation tests for shift/unshift row-0 guarantees#22743
jeanmon merged 1 commit intomerge-train/avmfrom
jean/proving-shift-guarantees

Conversation

@jeanmon
Copy link
Copy Markdown
Contributor

@jeanmon jeanmon commented Apr 23, 2026

Add two AvmVerifierTests cases that simulate a malicious prover injecting a non-zero value into keccak_memory_addr polynomials in positions the proving system is expected to structurally enforce as zero:

  • ProvingSystemSecurityShiftedLastRowMustBeZero (active): forges addr_shift at row N-1 by overwriting the shifted view with an independent polynomial after AvmProver construction. The PCS shift-consistency check catches the mismatch and verification fails.

  • DISABLED_ProvingSystemSecurityUnshiftedFirstRowMustBeZero (disabled): same pattern for the unshifted polynomial at row 0. Kept disabled because it requires relaxing two safeguards in polynomials/polynomial.cpp (Polynomial::add_scaled / operator+= and Polynomial::shifted); the test comment documents the exact patches needed and why, for later audit reproduction.

Both tests invoke run_check_circuit on a separate ProverPolynomials instance holding the same malicious mutation to demonstrate that every main/lookup/permutation relation still holds on the attacker's trace -- so the verifier's rejection comes from the PCS shift algebra, not from a relation violation.

@jeanmon jeanmon changed the title test(avm): attacker-simulation tests for shift/unshift row-0 guarantees chore(avm): attacker-simulation tests for shift/unshift row-0 guarantees Apr 23, 2026
@jeanmon jeanmon force-pushed the jean/proving-shift-guarantees branch 2 times, most recently from 3885099 to 4ac1b78 Compare April 23, 2026 13:44
@jeanmon jeanmon marked this pull request as ready for review April 23, 2026 13:44
@jeanmon jeanmon removed the request for review from fcarreiro April 23, 2026 13:46
Add two AvmVerifierTests cases that simulate a malicious prover injecting a
non-zero value into keccak_memory_addr polynomials in positions the proving
system is expected to structurally enforce as zero:

- ProvingSystemSecurityShiftedLastRowMustBeZero (active): forges addr_shift
  at row N-1 by overwriting the shifted view with an independent polynomial
  after AvmProver construction. The PCS shift-consistency check catches the
  mismatch and verification fails.

- DISABLED_ProvingSystemSecurityUnshiftedFirstRowMustBeZero (disabled): same
  pattern for the unshifted polynomial at row 0. Kept disabled because it
  requires relaxing two safeguards in polynomials/polynomial.cpp
  (Polynomial::add_scaled / operator+= and Polynomial::shifted); the test
  comment documents the exact patches needed and why, for later audit
  reproduction.

Both tests invoke run_check_circuit on a separate ProverPolynomials
instance holding the same malicious mutation to demonstrate that every
main/lookup/permutation relation still holds on the attacker's trace --
so the verifier's rejection comes from the PCS shift algebra, not from a
relation violation.
@jeanmon jeanmon force-pushed the jean/proving-shift-guarantees branch from 4ac1b78 to 4a81b9b Compare April 23, 2026 15:01
@jeanmon jeanmon merged commit c277fb5 into merge-train/avm Apr 28, 2026
12 checks passed
@jeanmon jeanmon deleted the jean/proving-shift-guarantees branch April 28, 2026 15:45
@AztecBot AztecBot mentioned this pull request Apr 28, 2026
chrismarino pushed a commit to chrismarino/aztec-packages that referenced this pull request May 5, 2026
BEGIN_COMMIT_OVERRIDE
chore(avm)!: remove hack for bb pilcom to see shifted temp columns
(AztecProtocol#22723)
chore(avm): attacker-simulation tests for shift/unshift row-0 guarantees
(AztecProtocol#22743)
END_COMMIT_OVERRIDE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants