Skip to content

ecc: constrain incomplete-mul base to the actual base point#2

Merged
mikdk merged 1 commit into
mainfrom
fix/ecc-incomplete-mul-base-constraint
Jun 15, 2026
Merged

ecc: constrain incomplete-mul base to the actual base point#2
mikdk merged 1 commit into
mainfrom
fix/ecc-incomplete-mul-base-constraint

Conversation

@mikdk

@mikdk mikdk commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

The variable-base scalar-multiplication gadget assigned the base point's
coordinates into the incomplete-addition loop with `assign_advice`, which
introduces an unconstrained witness. The `q_mul_2` gate only forces the
per-row `x_p`/`y_p` values to equal each other, never to equal the actual
`base`. A malicious prover could therefore set the loop's base to any point
P and compute [scalar]·P instead of [scalar]·base, breaking the soundness
of variable-base scalar mul (e.g. the `pk_d == [ivk] g_d` recipient-integrity
check, enabling note-ownership forgery / multiple nullifiers per note).

Copy the base coordinates in on the first row so they are constrained to the
real base; the existing `q_mul_2` equality gate propagates the binding across
the remaining rows.
@mikdk mikdk requested a review from zeapoz June 10, 2026 10:30

@zeapoz zeapoz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Change looks good to me, but let's fix the CI checks too

@mikdk mikdk merged commit 7ff027d into main Jun 15, 2026
31 of 42 checks passed
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