The MoonMath Manual
The MoonMath Manual is a resource for anyone interested in understanding and unlocking the potential of zk-SNARKs, from beginners to experts.
The acronym zk-SNARK stands for “Zero-Knowledge Succinct Non-Interactive Argument of Knowledge,” and refers to a cryptographic technique where one can prove correct execution of computation and possession of certain information without revealing the information itself. Zk-SNARKs, a type of zero-knowledge proof, offer a new paradigm for privacy, and have been used to enable private blockchain transactions. They also have the potential to securely scale blockchain-based solutions.
Most explanations struggle to clarify how and why they work, so zk-SNARKs remain somewhat “magical” and elusive, deterring developers from exploring or utilizing them in projects. Resources are scattered across blog posts and GitHub libraries. This results in a high barrier to entry, thereby slowing the widespread adoption of zk-SNARKs and associated privacy-enhancing technologies. Even worse, implementing zk-SNARKs without understanding the fundamentals of how they work increases the potential for security issues.
We want to change that with our MoonMath Manual to zk-SNARKs, designed for an audience with only minimal experience in cryptography and programming.
What is particularly unique about the MoonMath Manual is that it is designed to enable users to construct zk-SNARKs using simple pen-and-paper computations. Throughout the manual, users are encouraged to complete exercises that ensure they engage with the foundational building blocks of zk-SNARKs. While doing that, readers build the smallest possible — but fully functional — cryptographic stack to compute zk-SNARK internals without the need of a computer.
As users go through the manual, they will grasp mathematical concepts that are not only used in SNARKs, but also in other zero-knowledge proofs and cryptography more generally.
Donations
If you would like to support the continuous production of content like this, please donate via one of the following channels, or contact Least Authority for additional solutions:
-
Bitcoin: bc1q0d8pf6tgqq6j0gzv5yf259usvh6zfjsuuq39d7
-
Ethereum: 0x470E2902CC34A8b2A1E1890325cA0564593a5eDB
-
ZCash: t1JyQ9X4VDkiZSdNF2XLXPU5CHTT33saunf
Download
You can download the latest version of the moonmath manual here.
Build instructions
Prerequisites
-
LaTeX distribution installed
-
Latexmk installed
-
Docker installed
Steps
In order to build the PDF document of the moonmath manual, please follow these steps:
-
git clone https://github.com/LeastAuthority/moonmath-manual.git
(download the source) -
cd moonmath-manual
(change into the moonmath-manual folder) -
./install_sagetex_sty.sh
(installsagetex.sty
) -
pdflatex main-moonmath.tex
(create SageMath files from document) -
./generate_sagetex_files.sh
(run SageMath 9.3 on the output files) -
latexmk -pdf main-moonmath.tex
(build main-moonmath.pdf)