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 2048-bit RSA key length, much smaller than the previous expectation. This implies that the Pietrzak VDF can be practically used for cryptographic applications on blockchains.
翻译:可验证延迟函数(VDF)是一种密码学概念,通过顺序处理确保输出前的最小时间延迟,具有抗并行计算特性。在两种著名的VDF协议(Wesolowski VDF与Pietrzak VDF)中,本文聚焦于Pietrzak VDF,因其计算效率高且适用于区块链环境。Pietrzak方法采用基于二分协议的递归证明验证机制,尽管证明长度较Wesolowski方法更长,但仍提供了可行的替代方案。鉴于当前关于VDF实际验证实现(尤其在智能合约中)的研究匮乏,本文旨在以太坊环境中实现Pietrzak VDF的经济高效验证,且不损害VDF验证的完整性与可靠性。首先,我们提出通用的证明生成与验证算法以提升潜在效率;其次,分类测量VDF验证交易中各部分的Gas成本;再次,基于分析结果理论预测优化证明构造方案;最后,实验证明理论预测与实现结果一致。此外,研究表明在使用2048位RSA密钥时,Pietrzak VDF的证明长度可控制在8 KB以下,远低于预期水平,这表明该协议可实际应用于区块链密码学场景。