可验证延迟函数(VDF)
可验证延迟函数(Verifiable Delay Function, VDF):
VDF 这个概念最初由斯坦福大学密码学教授 Dan Boneh 等人在2018年论文《Verifiable Delay Functions》中给出。该篇文章于 2018 年发表在密码学*会议之一的 CRYPTO 上。
目前的VDF算法复杂度较高,离实用仍有差距。
https://github.com/Chia-Network/vdf-competition/
中有对VDF的实现进行了竞赛。
[研究]可验证延迟函数(VDF)(一)一文搞懂VDF中有很详细的介绍。
https://github.com/cambrian/accumulator/blob/master/src/group/class.rs
中有对https://github.com/Chia-Network/vdf-competition/blob/master/classgroups.pdf
的class group 做实现。
VDF是串行运算算法,执行时间可预知,且无法通过并行来加速。通过VDF生成的证明可被快速verify。
目前知名的不可并行的串行运算为:对未知order的group进行repeated squaring。
The unknown order requirement is due to the divisibility of the order of a finite group by the order of any element in the group; if the group order is known then the repeated squaring operation could be reduced modulo the order of the group, shortcutting the computation.
在VDF中:
- 若使用RSA group,则需要trusted setup,并保证生成后的有毒垃圾被即时清理,否则VDF的sequentiality requirement将broken。
- 若使用class group of binary quadratic form将不需要trusted setup。因为其order为一个负素数判别式,当时,is believed to be difficult to compute when jdj is sufficiently large, making the order of the class group effectively unknown. Therefore, a suitable discriminant ——and its associated class group —— can be chosen without the need for a trusted setup, which is a major advantage for using class groups in applications requiring groups of unknown order.
1. Binary quadratic form
, where and 。
可称为a form。
若, where and ,则 f 称为integral form。
称为content of a form。
若,则form f称为primitive。
discriminant of form f为:。
若,则form 称为normal。
1.1 Normalization操作
Normalization操作(当时,需要进行此操作, Normalization操作不会影响discriminant值,既保持不变。):
,其中。
若, ,则两者等价:
,。
1.3 Reduced form
在Chia VDF中频繁地reduce 非常重要,可保证在做平方运算时,a,b,c的值不会增长过大。
若已为normal,且或者当,则称 f 为Reduced form。
1.3 Reduction操作
在reduction操作之前应先进行normalization操作。
Reduction操作为(当时或,需要进行此操作, Reduction操作不会影响discriminant值,既保持不变。):
对于,有reduction操作,其中
两者等价。
若,则两者等价,其中的,。
如上图所示,reduction算法会循环执行步骤2,以保证最终获得reduced form。执行步骤2的次数为:
1.4 composition计算
1.4.1 squaring算法
1.4.2 linear congruence算法
2. Matrix表示a form
,其中
若,则有:
如上有:
参考资料:
[1] [研究]可验证延迟函数(VDF)(一)一文搞懂VDF
[2] https://github.com/Chia-Network/vdf-competition/
[3] 2018年论文《Verifiable Delay Functions》