mattrglobal / pairing_crypto

A library for pairing based cryptography
Apache License 2.0
14 stars 7 forks source link

Optional Signature Verification in ProofGen API #76

Closed dev0x1 closed 2 years ago

dev0x1 commented 2 years ago

As suggested by @BasileiosKal here, signature verification during proof-gen is considerable overhead. We can make this optional for API-users so this check can be skipped if a signature is already integrity-checked or coming from a trusted source. To implement it, I can think of 2 ways

  1. either accept a flag parameter from the user
  2. or make 2 versions of API - proof_gen and proof_gen_checked

Open for suggestions? @tplooker @BasileiosKal

BasileiosKal commented 2 years ago

Personalty I would go with option 1. It seems a bit easier for a user to "turn on" signature checking periodically this way.

The tradeoff here could be that a user that doesn't read the documentation carefully may miss this flag (i imagine it will be true by default) and pay the cost of sig verification unknowingly (while two different proof_gen versions are harder to miss).

That said, maybe it's not the worst thing to "force" signature verification on "negligent" users ;P