ZKDocs provides comprehensive, detailed, and interactive documentation on zero-knowledge proof systems and related primitives.
At Trail of Bits, we audit many implementations of non-standardized cryptographic protocols and often find the same issues. As we discovered more instances of these bugs, we wanted to find a way to prevent them in the future. Unfortunately, for these protocols, the burden is on the developers to figure out all of the low-level implementation details and security pitfalls.
We hope that ZKDocs can fill in this gap and benefit the larger cryptography community.
We aim to be both self-contained and comprehensive in the topics related to zero-knowledge proof systems, from descriptions of simple systems like Schnorr’s identification protocol, to complex proof systems like Paillier-Blum modulus. We also cover cryptographic primitives such as: random sampling, Fiat-Shamir transformation, and Shamir's Secret Sharing.
We describe each protocol in great detail, including all necessary setup, sanity-checks, auxiliary algorithms, further references, and potential security pitfalls with their associated severity.
The protocol descriptions are interactive, letting you modify variable names. This allows you to match the variable names in ZKdocs' specification to the variable names in your code, making it easier to find bugs and missing assertions.
Interactivity features:
Enter
or Escape
to stop editing.Reset variable names
button to reset the names of all variables on the current page (variable names are independent across different pages)hugo - install with
brew install hugo
hugo server --minify --theme book
\work{Work for Alice}{Work for Bob}
- writes work in both Alice's and Bob's column\alicework{Work for Alice}
, \bobwork{Work for Bob}
- writes work for either Alice or Bob\alicebob{Alice work}{message description}{Bob work}
, \bobalice{Alice work}{message description}{Bob work}
- writes an arrow from alice to bob, or from bob to alice{{< rawhtml >}}
$$
\begin{array}{c}
\work{\varprover}{\varverifier}
\alicework{\samplezqs{\varr}}
\alicework{\varu = \varg^\varr}
\alicebob{}{\varu}{}
\bobwork{\sample{\varc}}
\bobalice{}{\varc}{}
\alicework{\varz = \varr + \varx\cdot \varc}
\alicebob{}{\varz}{}
\bobwork{\varg^{\varz} \equalQ \varu \cdot \varh^\varc }
\end{array}
$$
{{< /rawhtml >}}
$\varz$
it will default to a z
but the user can change its name anywhere on the page.