Module bellman::groth16::batch

source ·
Expand description

Performs batch Groth16 proof verification.

Batch verification asks whether all proofs in some set are valid, rather than asking whether each of them is valid. This allows sharing computations among all proof verifications, performing less work overall at the cost of higher latency (the entire batch must complete), complexity of caller code (which must assemble a batch of proofs across work-items), and loss of the ability to easily pinpoint failing proofs.

This batch verification implementation is non-adaptive, in the sense that it assumes that all the proofs in the batch are verifiable by the same VerifyingKey. The reason is that if you have different proof statements, you need to specify which statement you are proving, which means that you need to refer to or lookup a particular VerifyingKey. In practice, with large enough batches, it’s manageable and not much worse performance-wise to keep batches of each statement type, vs one large adaptive batch.

Structs

  • A batch verification item.
  • A batch verification context.