Skip to content

Conversation

@dkaidalov
Copy link
Collaborator

Previously, signature positions were enforced by circuit constraints, preventing the same compiled circuit from being used with different signature sets. This fix removes the positional constraints by always assigning dummy signatures for non-signers, allowing circuit reuse across different signing party combinations.

Copy link
Collaborator

@iquerejeta iquerejeta left a comment

Choose a reason for hiding this comment

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

The new circuit logic looks good 👍

Comment on lines 101 to 105
let is_verified = self.verify(ctx, signature, pk, msg)?;
self.ecc_gate
.main_gate
.assert_one(ctx, &is_verified)?;
Ok(())
Copy link
Collaborator

Choose a reason for hiding this comment

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

this assert verify is more expensive than previously, as you've replaced an assert_equal(free) by an is_equal.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good point
I refactored the code so that assert_equal is used for assert_verify function. Unfortunetely we still need is_equal for the version that returns value

@dkaidalov dkaidalov merged commit e93d2ac into master Oct 21, 2025
5 checks passed
@dkaidalov dkaidalov deleted the fix_atms branch October 21, 2025 14:19
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