add circuit to verify signatures (SignatureVerifyGadget) (#167)

* implement circuit to verify signature (proof-based signature), ie. a 1-level recursion verification

* as agreed in the call, rename Gate -> Gadget when it's not a 'gate'

* make SignatureVerifyGadget conditional on the selector input

* small naming polish

* sigverifygadget: add s computation in-circuit, connect pk,msg,s to internalproof's public_inputs

* optimize signature verify

---------

Co-authored-by: Eduard S. <eduardsanou@posteo.net>
This commit is contained in:
arnaucube 2025-04-01 01:36:37 +02:00 committed by GitHub
parent d00ff95f41
commit 0637f52573
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 325 additions and 42 deletions

View file

@ -105,8 +105,8 @@ pub struct Params {
// in a custom predicate
pub max_custom_predicate_arity: usize,
pub max_custom_batch_size: usize,
// maximum depth for merkle tree gates
pub max_depth_mt_gate: usize,
// maximum depth for merkle tree gadget
pub max_depth_mt_gadget: usize,
}
impl Default for Params {
@ -121,7 +121,7 @@ impl Default for Params {
max_operation_args: 5,
max_custom_predicate_arity: 5,
max_custom_batch_size: 5,
max_depth_mt_gate: 32,
max_depth_mt_gadget: 32,
}
}
}