Skip to content

Instantly share code, notes, and snippets.

@timgestson
timgestson / Supervillain.md
Last active January 31, 2024 04:22
Explanation for the zkhack puzzle

The Scenario

Bob has been designing a new optimized signature scheme for his L1 based on BLS signatures. Specifically, he wanted to be able to use the most efficient form of BLS signature aggregation, where you just add the signatures together rather than having to delinearize them. In order to do that, he designed a proof-of-possession scheme based on the B-KEA assumption he found in the the Sapling security analysis paper by Mary Maller [1]. Based the reasoning in the Power of Proofs-of-Possession paper [2], he concluded that his scheme would be secure. After he deployed the protocol, he found it was attacked and there was a malicious block entered the system, fooling all the light nodes...

Bob's Source Code

Bob's BLS signature scheme was exploited by a rogue public key attack. The attack was enabled because the protocol did not use fiat-shamir to simulate randomness. Below is a detailed account of the attack.

Pairings