Skip to content

Validate cached matvec public values in NeutronNova prove#121

Merged
srinathsetty merged 1 commit into
mainfrom
audit/neutronnova-prep-prove-validation
Apr 25, 2026
Merged

Validate cached matvec public values in NeutronNova prove#121
srinathsetty merged 1 commit into
mainfrom
audit/neutronnova-prep-prove-validation

Conversation

@srinathsetty
Copy link
Copy Markdown
Collaborator

prep_prove caches full matrix-vector products for step circuits when num_challenges==0 and num_rest_unpadded==0. The cache includes public values in the z vector, creating an implicit invariant that prove must be called with the same step circuits.

Add an explicit check: store the public values used during prep_prove and compare them in prove before using the cache. Return InternalError if the values diverge, preventing stale cache from producing incorrect proofs.

prep_prove caches full matrix-vector products for step circuits when
num_challenges==0 and num_rest_unpadded==0. The cache includes public
values in the z vector, creating an implicit invariant that prove must
be called with the same step circuits.

Add an explicit check: store the public values used during prep_prove
and compare them in prove before using the cache. Return InternalError
if the values diverge, preventing stale cache from producing incorrect
proofs.
@srinathsetty srinathsetty merged commit fcdac51 into main Apr 25, 2026
10 checks passed
@srinathsetty srinathsetty deleted the audit/neutronnova-prep-prove-validation branch April 25, 2026 03:08
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.

1 participant