1. 引言
2024年4月17日OpenZeppelin团队论文《The Last Challenge Attack: Exploiting a Vulnerable Implementation of the Fiat-Shamir Transform in a KZG-based SNARK》,开源实现:
- https://github.com/OpenZeppelin/publications/tree/main/papers/the-last-challenge-attack/proof-of-concept(Solidity)
- 2023年10月17日 Consensys gnark中修复的Fiat Shamir Plonk verifier KZG multi point verification致命漏洞
Fiat-Shamir transform广泛用于将sound public-coin interactive协议,转换为,sound non-interactive协议。尽管Fiat-Shamir transform自身相对清晰简单,但为性能等原因,某些工程实现与Fiat-Shamir transform规范存在偏差,从而让导致漏洞。
本文揭示了某 KZG-based PLONK verifier实现偏差所导致的漏洞,该偏差源自:
- PLONK协议中last challenge的不正确计算,在此之前,独立于KZG evaluation proofs,已计算了KZG batching proof challenge。
- 任何,使用至少2个不同evaluation points的batched KZG proof evaluations,的KZG实现,都存在该漏洞。
- 将该偏差所引起的攻击称为Last Challenge Attack。
- 对于有该偏差的PLONK verifier实现,恶意PLONK prover可发起Last Challenge Attack来伪造false statements的可验证通过的proofs。
- 本漏洞的发现源自一次审计,已公开给开发者并修复。
- https://github.com/OpenZeppelin/publications/tree/main/papers/the-last-challenge-attack/proof-of-concept中提供了该漏洞的PoC展示,可对任意public input伪造proof并验证通过。
为此,本文提供了:
- 对于,使用至少2个不同evaluation points的batched KZG proof evaluations,的batched KZG方案,的knowledge-soundness安全论证。