Skip to content

Conversation

@nulltea
Copy link
Member

@nulltea nulltea commented Feb 27, 2024

Issue

If a bad r is sampled and used to initiate an accumulator, then the resulting agg_pubkey - r could be the point at infinity, which would likely result in the signature validation failing. However, this is a very unlikely scenario.

Fix

Aggregate from PK[0] instead of random point. Though since participation[0] could false we need to set

let acc = CMOV(PK[0], G1::Idenity, participation[0])`

Question

Is it safe to use identity? The halo2lib API actually prohibits implicitly assigning identity as constant, though allows it as a witness.

@ec2
Copy link
Contributor

ec2 commented Mar 4, 2024

That's actually something I thought about and forgot to ask... Why was it originally a random point? I've seen this done in halo2-lib as well for other stuff.

@nulltea nulltea merged commit 98a9362 into main Mar 5, 2024
@nulltea nulltea deleted the nulltea/pk_aggr_avoid_infinity branch March 5, 2024 13:31
nulltea added a commit that referenced this pull request Apr 3, 2024
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.

3 participants