Skip to content

feat(adaptor-sigs): import adaptor-sigs library#27

Merged
AaronFeickert merged 11 commits intomainfrom
feat/import_adaptor_sigs_lib
Feb 11, 2026
Merged

feat(adaptor-sigs): import adaptor-sigs library#27
AaronFeickert merged 11 commits intomainfrom
feat/import_adaptor_sigs_lib

Conversation

@manishbista28
Copy link
Copy Markdown
Contributor

Description

Import adaptor signature library from cut-and-choose-crypto repo.
Library provides functionality for adaptor signature generation and verification.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature/Enhancement (non-breaking change which adds functionality or enhances an existing one)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor
  • New or updated tests
  • Dependency update
  • Security fix

Notes to Reviewers

Checklist

  • I have performed a self-review of my code.
  • I have commented my code where necessary.
  • I have updated the documentation if needed.
  • My changes do not introduce new warnings.
  • I have added tests that prove my changes are effective or that my feature works.
  • New and existing tests pass with my changes.

Related Issues

@manishbista28 manishbista28 self-assigned this Jan 7, 2026
@manishbista28 manishbista28 marked this pull request as ready for review January 7, 2026 11:05
Comment thread crates/adaptor-sigs/src/adaptor.rs
Comment thread crates/adaptor-sigs/src/adaptor.rs Outdated
Comment thread crates/adaptor-sigs/src/adaptor.rs Outdated
Comment thread crates/adaptor-sigs/src/adaptor.rs Outdated
Comment thread crates/adaptor-sigs/src/fixed_base.rs Outdated
Comment thread crates/adaptor-sigs/src/lib.rs Outdated
Comment thread crates/adaptor-sigs/src/adaptor.rs
Copy link
Copy Markdown
Contributor

@delbonis delbonis left a comment

Choose a reason for hiding this comment

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

Concur with Aaron's comments. My additional comments are mostly about code/repo organization.

Comment thread crates/adaptor-sigs/Cargo.toml Outdated
Comment thread crates/adaptor-sigs/src/adaptor.rs
Comment thread crates/adaptor-sigs/src/lib.rs Outdated
Comment thread crates/adaptor-sigs/src/lib.rs Outdated
Comment thread fuzz/Cargo.toml
Comment thread crates/adaptor-sigs/src/fixed_base.rs Outdated
Comment thread crates/adaptor-sigs/src/lib.rs Outdated
Comment thread crates/adaptor-sigs/src/adaptor.rs
Comment thread crates/adaptor-sigs/src/adaptor.rs
Comment thread crates/adaptor-sigs/src/adaptor.rs
@AaronFeickert
Copy link
Copy Markdown
Collaborator

@manishbista28 please address review comments as appropriate.

@manishbista28
Copy link
Copy Markdown
Contributor Author

This should be an upper bound on the number of parallel multiplications which is decided by polynomial commitments. At this step, we perform N_INPUT_WIRES * N_COEFFICIENTS * 256 fixed base scalar muls.

@nakkstar123, if N_INPUT_WIRES is in byte representation, what should be the expression for APPROX_MULS ?

Cut-and-choose crypto used N_INPUT_WIRES * N_COEFFICIENTS * 3 where N_INPUT_WIRES is in bit representation, while you suggested N_INPUT_WIRES * N_COEFFICIENTS * 256 in the above comment. Hence the question.

@nakkstar123
Copy link
Copy Markdown
Contributor

@nakkstar123, if N_INPUT_WIRES is in byte representation, what should be the expression for APPROX_MULS ?

Cut-and-choose crypto used N_INPUT_WIRES * N_COEFFICIENTS * 3 where N_INPUT_WIRES is in bit representation, while you suggested N_INPUT_WIRES * N_COEFFICIENTS * 256 in the above comment. Hence the question.

Earlier cut-and-choose crypto didn't handle wide labels so the total number of polynomials was in fact N_INPUT_WIRES * N_COEFFICIENTS * 2 (one for true, one for false). I used N_INPUT_WIRES * N_COEFFICIENTS * 3 as a safe upper bound but it isn't really needed, we should just use the total number of polynomials. So my answer is still N_INPUT_WIRES * N_COEFFICIENTS * 256 where N_INPUT_WIRES is in byte representation. FWIW, under the hood I believe there's a max window size (something like 11?) after which it doesn't matter what we enter as APPROX_MULS. I think we reach this ceiling already. If you test it with different APPROX_MUL sizes (anything bigger than 2^11) it should make no difference to performance.

@manishbista28 manishbista28 force-pushed the feat/import_adaptor_sigs_lib branch from 046327e to 5cd8ab6 Compare January 28, 2026 09:44
Comment thread crates/adaptor-sigs/src/adaptor.rs
Comment thread crates/adaptor-sigs/src/adaptor.rs Outdated
Comment thread crates/adaptor-sigs/src/adaptor.rs Outdated
Comment thread crates/adaptor-sigs/src/adaptor.rs Outdated
Comment thread crates/adaptor-sigs/src/adaptor.rs
Comment thread crates/adaptor-sigs/src/adaptor.rs Outdated
Comment thread crates/adaptor-sigs/src/adaptor.rs
Comment thread crates/adaptor-sigs/src/adaptor.rs Outdated
@manishbista28 manishbista28 force-pushed the feat/import_adaptor_sigs_lib branch from 07f15b3 to e139813 Compare February 9, 2026 05:11
@AaronFeickert AaronFeickert requested review from delbonis and removed request for delbonis February 9, 2026 17:56
@manishbista28 manishbista28 force-pushed the feat/import_adaptor_sigs_lib branch from e139813 to 069cbab Compare February 11, 2026 03:03
Copy link
Copy Markdown
Contributor

@nakkstar123 nakkstar123 left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Comment thread crates/adaptor-sigs/src/adaptor.rs
@Zk2u Zk2u added this to the Service Production Ready milestone Feb 11, 2026
@AaronFeickert
Copy link
Copy Markdown
Collaborator

This is currently blocked since @delbonis had previously issued a review. Can @Zk2u update merge rules to remove this requirement? It seems unnecessarily onerous.

@AaronFeickert AaronFeickert merged commit 86d53c4 into main Feb 11, 2026
10 checks passed
@AaronFeickert AaronFeickert deleted the feat/import_adaptor_sigs_lib branch February 11, 2026 21:51
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.

5 participants