Zero K proof that a chess position contains a checkmate

Click For Summary
SUMMARY

This discussion focuses on constructing a zero-knowledge proof (ZKP) that verifies the existence of a checkmate in a given chess position using the RISC Zero zkVM. The user references the shakmaty crate as a tool to demonstrate this proof without revealing the specific checkmate. The challenge lies in transforming a chess position represented in FEN notation into a graph for a three-coloring scheme, which is essential for completing the proof. The user seeks a detailed understanding of the steps involved, particularly in applying algorithms to achieve this transformation.

PREREQUISITES
  • Understanding of zero-knowledge proofs (ZKP)
  • Familiarity with RISC Zero zkVM and its applications
  • Knowledge of the shakmaty crate for chess position analysis
  • Basic concepts of graph theory, specifically three-coloring
NEXT STEPS
  • Research the implementation of zero-knowledge proofs in cryptographic applications
  • Explore the RISC Zero zkVM documentation for practical examples
  • Learn how to use the shakmaty crate for chess position validation
  • Study algorithms for transforming FEN notation into graph representations
USEFUL FOR

Cryptographers, software developers working with zero-knowledge proofs, chess enthusiasts interested in algorithmic validation, and researchers in graph theory applications.

fluidistic
Gold Member
Messages
3,932
Reaction score
283
Hi people,
It's been years I wanted to post this question here. I would like to build a zero knowledge proof that a given chess position contains at least one checkmate. I know that anything provable admits a zero k proof. I know about https://crypto.stackexchange.com/questions/110939/zero-knowledge-proof-applied-to-a-chess-position and .
I know it's been done already (see https://github.com/risc0/risc0/tree/main/examples/chess):
This code demonstrates a minimal example of how to use the RISC Zero zkVM to make ZK proofs about chess.


The demo uses the shakmaty crate to prove that a chess position has a checkmate without revealing what that checkmate is.
But I would like to understand exactly how to do so, every single step. There are other ways to accomplish it. I think I should be able to transform the problem into a graph/map with 3 colors scheme. I.e. if I can convince the Verifier that I can color the map with 3 colors such that no 2 colors are adjacent, then the proof would be complete. The hard part I don't know how to do is to apply an algorithm to transform a given FEN (or chess position) into such a graph. For example, this position
Code:
6Q1/8/8/8/8/8/5K2/7k w - - 0 1
contains 4 ways to checkmate in 1.
 
Computer science news on Phys.org
You need to feed the FEN into a chess engine, and get it to tell you what all of the legal moves are and what the resulting positions are.
 
pasmith said:
You need to feed the FEN into a chess engine, and get it to tell you what all of the legal moves are and what the resulting positions are.
Not exactly. I could use shakmaty (not even a,chess engine) like risc0 does, to assert whether the FEN contains a checkmate. You don't even need to invoke the command to check all legal moves. However risc0 does more than this, for it is designed to be a real 0k setup. It's over my,head for now.
 

Similar threads

  • · Replies 25 ·
Replies
25
Views
5K
Replies
4
Views
4K
Replies
8
Views
3K
  • · Replies 28 ·
Replies
28
Views
7K
  • · Replies 175 ·
6
Replies
175
Views
27K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 10 ·
Replies
10
Views
5K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 5 ·
Replies
5
Views
5K