File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,22 @@ use ark_relations::r1cs::SynthesisError;
44
55use crate :: signature:: SignatureScheme ;
66
7+ pub trait SigVerifyGadget < S : SignatureScheme , ConstraintF : Field > {
8+ type ParametersVar : AllocVar < S :: Parameters , ConstraintF > + Clone ;
9+
10+ type PublicKeyVar : ToBytesGadget < ConstraintF > + AllocVar < S :: PublicKey , ConstraintF > + Clone ;
11+
12+ type SignatureVar : ToBytesGadget < ConstraintF > + AllocVar < S :: Signature , ConstraintF > + Clone ;
13+
14+ fn verify (
15+ parameters : & Self :: ParametersVar ,
16+ public_key : & Self :: PublicKeyVar ,
17+ // TODO: Should we make this take in bytes or something different?
18+ message : & [ UInt8 < ConstraintF > ] ,
19+ signature : & Self :: SignatureVar ,
20+ ) -> Result < Boolean < ConstraintF > , SynthesisError > ;
21+ }
22+
723pub trait SigRandomizePkGadget < S : SignatureScheme , ConstraintF : Field > {
824 type ParametersVar : AllocVar < S :: Parameters , ConstraintF > + Clone ;
925
You can’t perform that action at this time.
0 commit comments