MCPcopy Create free account
hub / github.com/ZK-Hack/puzzle-zero-sum-game

github.com/ZK-Hack/puzzle-zero-sum-game @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
16 symbols 21 edges 6 files 2 documented · 12% updated 3y ago★ 37

Browse by type

Functions 11 Types & classes 5
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

puzzle-zero-sum-game


DO NOT FORK THE REPOSITORY, AS IT WILL MAKE YOUR SOLUTION PUBLIC. INSTEAD, CLONE IT AND ADD A NEW REMOTE TO A PRIVATE REPOSITORY, OR SUBMIT A GIST

Trying it out

Use cargo run --release to see it in action

Submitting a solution

Submit a solution

Submit a write-up

Puzzle description

    ______ _   __  _   _            _
    |___  /| | / / | | | |          | |
       / / | |/ /  | |_| | __ _  ___| | __
      / /  |    \  |  _  |/ _` |/ __| |/ /
    ./ /___| |\  \ | | | | (_| | (__|   <
    \_____/\_| \_/ \_| |_/\__,_|\___|_|\_\

Bob has designed a new private payments protocol design, where every note comes with a secret 
polynomial f whose sum over a specific set is zero. This is enforced using a sumcheck protocol.
Once a note is spent, f is modified to a different polynomial whose sum isn't zero. One day, 
after an interesting conversation with her friends, Alice got an idea for an attack that can 
potentially allow her to double spend notes.

Alice successfully double spent a note. Can you figure out how she did it?

Be very careful, if the verifier somehow learns the sum of the modified f, 
they can deanonymize you.

In the rest of protocol that is not described here, the masking polynomial used by 
the prover is opened twice. Therefore, the masking polynomial cannot be a 
constant polynomial.

To see examples of sumcheck, you can review the protocol described in 
https://github.com/arkworks-rs/marlin/blob/master/diagram/diagram.pdf.

Extension points exported contracts — how you extend this code

browse all types & interfaces →

Core symbols most depended-on inside this repo

browse all functions →

Shape

Method 8
Class 3
Function 3
Enum 1
Interface 1

Languages

Rust100%

Modules by API surface

src/rng.rs8 symbols
src/data_structures.rs3 symbols
src/error.rs2 symbols
src/verifier.rs1 symbols
src/prover.rs1 symbols
src/main.rs1 symbols

For agents

$ claude mcp add puzzle-zero-sum-game \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page