Performance Analysis of Zero-Knowledge Proofs
Data privacy has become a severe concern due to the substantial growth in data gathering and processing, driven by the widespread adoption of cloud computing and cryptocurrency. Zero-Knowledge Proof (ZKP) has emerged as a promising cryptographic protocol for ensuring data privacy. However, ZKP suffers from high computational costs, making it excessively slow when implemented in software. To identify performance bottlenecks in the ZKP protocol, existing research has focused on CPU performance evaluation at the architecture level, considering factors such as execution time and memory consumption. Nevertheless, ZKP protocols have distinct memory and computing needs at each stage, these studies lack detailed CPU performance analyses necessary to improve ZKP performance and promote wider adoption.In this paper, we provide a comprehensive performance analysis of widely used ZKP libraries on CPUs. We perform four different analyses to characterize the CPU microarchitecture, memory, code, and scalability performance of the ZKP protocol on different CPUs. Our analysis reveals that the ZKP protocol performs differently on different CPUs, emphasizing the need for microarchitecture-specific analysis and optimizations. We evaluate loads and stores, last level cache (LLC) misses per kilo instructions (MPKI), and maximum memory bandwidth utilization of ZKP. We observe the proving stage consumes the highest memory bandwidth (25Gbps). We identify the functions that consume the most CPU time in each stage of the ZKP protocol and categorize each stage as compute, control-flow, or data-flow intensive. Also, we identify the proving stage as the most scalable with the potential to be sped up by parallel computation. These findings provide valuable insights for designing future ZKP accelerators, leading to more efficient and scalable ZKP implementations.