Verifiable Delay Function (VDF) is a cryptographic concept that ensures a minimum delay before output through sequential processing, which is resistant to parallel computing. Among the two well-known VDF protocols, Wesolowski and Pietrzak VDF, we focus on the Pietrzak VDF due to its computational efficiency and suitability for blockchain environments. Pietrzak's approach uses a recursive proof verification with the halving protocol, offering a practical alternative despite the longer proof length than Wesolowski's approach. Given the scarcity of research on practical VDF verification implementation, especially within smart contracts, this paper aims to implement cost-effective verification for the Pietrzak VDF in an Ethereum-based environment without compromising the VDF verification's integrity and reliability. Firstly, we propose generalized proof generation and verification algorithms for potential efficiency improvement. Secondly, we categorize and measure the gas cost of each part in a transaction for VDF verification. Thirdly, based on the analysis, we theoretically predict the optimized proof construction. Finally, we demonstrate the theoretical prediction matches the implementation results. Furthermore, our research shows that the proof length of the Pietrzak VDF is generated under 8 KB with the security level of 2048 bits, much smaller than the previous expectation. This implies that the Pietrzak VDF can be practically used for cryptographic applications on blockchains.
翻译:可验证延迟函数(VDF)是一种密码学概念,通过顺序处理确保输出前存在最小延迟,且具有抗并行计算能力。在Wesolowski与Pietrzak两种主流VDF协议中,本文聚焦于Pietrzak VDF,因其计算效率高且适用于区块链环境。Pietrzak方法采用基于减半协议的递归证明验证,尽管证明长度长于Wesolowski方案,但提供了实用的替代选择。鉴于现有关于VDF验证的实践实现研究(尤其在智能合约领域)较为稀缺,本文旨在以太坊环境下以不损害VDF验证完整性与可靠性为前提,实现Pietrzak VDF的经济高效验证。首先,我们提出具有潜在效率提升空间的通用化证明生成与验证算法;其次,对VDF验证交易中每个部分的燃料成本进行分类与度量;再次,基于分析结果,从理论上预测优化的证明构造方式;最后,证明理论预测与实现结果的一致性。此外,研究表明,在2048位安全等级下,Pietrzak VDF的证明长度可控制在8 KB以下,远低于先前预期。这意味着Pietrzak VDF可实际应用于区块链密码学场景。