Statistics for Efficient Zero-Knowledge Proofs and Applications